Dave Manley<br />SCJP 1.4, SCWCD 1.4, SCEA 5
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
SCJP5
I wouldn't use EJB for this. I would use regular JDBC (or a framework that facilitates it) and pass the information in at runtime. For EJB (2 or 3), you need to define the datasources in advance. I doubt you have all that information (including passwords) available.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Originally posted by Adam Tkaczyk:
If all your databases have the same schema I think the best solution is to write some sort of common contract for all business operations. The only think that would change is datasource. That approach reduce bad redundancy and makes your code more flexible
Originally posted by Roger Chung-Wee:
I don't understand this. If 250 data sources need to be created, then it is a tedious job but it is only done once. Also, the passwords must surely be known, otherwise how can the connections be made to the DBs?
What we don't know is whether the application would benefit from connection pooling and considerable transaction management. If the answer is yes, then EJB must be a strong candidate solution.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
SCJP5
Dave Manley<br />SCJP 1.4, SCWCD 1.4, SCEA 5
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Dave Manley<br />SCJP 1.4, SCWCD 1.4, SCEA 5
You may have just won ten million dollars! Or, maybe a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|