-
1. Re: Accessing multiple databases
gavin.king Jan 29, 2007 11:55 AM (in response to guy_davis)You can have as many EntityManagerFactory instances as you like, and as many EntityManager instances as you like per transaction. Just give each instance a different name.
-
2. Re: Accessing multiple databases
guy_davis Jan 29, 2007 4:59 PM (in response to guy_davis)Good to know. Is it possible to specify these datasources programatically rather than in an XML file. For example in the booking example, there is the jboss-seam-booking.jar!/booking-ds.xml file which contains the details on a single datasource. Should I add multiple data source declarations in this file?
The reason I ask is that our server application is installed at the client site. Currently we maintain a list of BasicDataSource instances that the server uses internally without requiring the user to touch config files. Ideally, I'd like to set these BasicDataSource objects to the embedded Tomcat context which is running the Seam/EJB3 app.
Any help would be greatly appreciated.
Guy