i tried to explain most of the things in the logical model of the sample problem.

lets say there is a main interface to this system called WorkDelegator which is responsible for doing a process and a process may involve a set of subprocesses. It calls Worker1 or Worker2 or Worker1 and Worker2 to do some work for it. The worker1 and worker2 need some data to get the work done. each worker class is given a model to get its data. the model class does not create database connection but the DBFactory class instantiates these models and provide them db connections.
please ask me if you have doubts regarding the situation here.
now the questions are,
1. a sample work might be performed like this:
WorkDelegator calls Worker1's process()
Worker1 calls DBFactory's getModel() to get WorkerModel1
Worker1 calls WorkerModel1's load() to get data
Worker1 performs some function with the data
..
..
there can be any number of workers and any number of workers can be called by main WorkDelegator depending on the work to be performed. No worker here knows about other workers working to solve the bigger process as this is managed by WorkDelegator.
the WorkDelegator is very often called in real time to do some work and it does the work with the help of worker classes. we use singleton for db connection in DBManager class to use same connection for all model classes but everytime WorkDelegator is called, atleast one connection is created which is not closed. Now, how can we close the db connection?
2. are there patterns in here?
2.1. the WorkDelegator gives some work to Worker1 and Worker2. is this a pattern?
2.2. the DBFactory actually creates those models so is this factory pattern?
