lundi 17 octobre 2016

Design Pattern to Handle request processing in java

I am designing an application which performs below tasks-

  1. Application will receive a request set object which can have multiple requests with different parameter values. All the requests in a single request set loads the data into the same database and same table.
  2. Database details will be send by the user in the request set object. So, database connection and table creation is purely dynamic and done for every new request set. It is not possible to create a database connection pool. Table DDL creation is currently done using reflection.
  3. Each request in a single request set is executed in a separate thread and loads the data into the same table using the synchronized load method.
  4. A request can be processed by a specific service object only and all the requests in a request set are processed by the same type of service object.
  5. Currently dynamic database connection is created using jdbc only.

I am using spring and hibernate to handle all back-end schema related operations. Is there a good design pattern to handle this kind of scenario. Is it possible to create dynamic database connections and table using hibernate or spring-jdbc. Any help is appreciated.

Aucun commentaire:

Enregistrer un commentaire