hi. My requirement seems a bit complicted to me and hence in need of a solution. There are 5 databases(sybase) available with the same table structure and design across. The clients(web client)are grouped with respect to some attributes and each group has its own database allocated. The web tier passes the data for persistance specifying which database it should get persisted. I follow the wrapper design by wrapping the BMP with session bean. Now how shall I handle the persistance with the usual feature of re-usability and transactional features. Should I add the database name as an instance variable in the BMP or should i handle the connection and persistance at each buisness method level. If second method, how shall the bean maintain its state for an entity per database ???
Is there any other method to solve this requirement with no compromise in performance ??
Thanx
-
Multiple databases for persistance (3 messages)
- Posted by: Vijay Jayabalan
- Posted on: September 05 2001 14:57 EDT
Threaded Messages (3)
- Multiple databases for persistance by Gal Binyamini on September 05 2001 20:23 EDT
- Multiple databases for persistance by Vijay Jayabalan on September 06 2001 02:16 EDT
- Multiple databases for persistance by Gal Binyamini on September 06 2001 05:59 EDT
- Multiple databases for persistance by Vijay Jayabalan on September 06 2001 02:16 EDT
-
Multiple databases for persistance[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: September 05 2001 20:23 EDT
- in response to Vijay Jayabalan
EJBs are reusable components. Why don't you just create 5 seperate deployments, each with the settings necessary for the specific type of client?
Modern App servers should be able to deal with that without any major overheads.
Gal -
Multiple databases for persistance[ Go to top ]
- Posted by: Vijay Jayabalan
- Posted on: September 06 2001 02:16 EDT
- in response to Gal Binyamini
As of now, i knew it is just 5 databases. But in near future while enhancing it is going to expand and the databases allocated are going to be dynamic. Then I think, seperate EJBs for each client group is going to be tough !!!! what shall i do then ?? -
Multiple databases for persistance[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: September 06 2001 17:59 EDT
- in response to Vijay Jayabalan
If you have too many databases then entity beans may not be a feasible solution. One app server couldn't deal with the pooling well if too many DBs are involved, and performance will take a big hit.
I think that as long as Entity beans are viable, using seperate deployment will be viable as well.
I think a design using a single entity bean to access seperate databases with the same structure is very questionable. Think twice before you do it. For instance, you will have to expand the PK of each entity to hold the database identifier along with the actual PK.
Gal