[jboss-user] [Datasource Configuration] - Looking for a concept for dynamic datasources with CMT
Oliver Pfau
do-not-reply at jboss.com
Fri Jun 14 07:41:41 EDT 2013
Oliver Pfau [https://community.jboss.org/people/olpf] created the discussion
"Looking for a concept for dynamic datasources with CMT"
To view the discussion, visit: https://community.jboss.org/message/823193#823193
--------------------------------------------------------------
Hi,
when a method of my EJB is invoked I get the information to which database to connect by passing the datasource name (not the name exactly). Therefore I cannot define all datasources in persistence.xml fixed. I instantiate the EntityManagerFactory and EntityManager by myself and this I think hinders the usage of JTA, CMT with JBoss. The transaction cannot be joined by hibernate. Is there a concept existing to handle this "datasource by EJB invokation" approach?
It runs if I do it without JTA, CMT and with RESOURCE_LOCAL and BMT. Maybe I can tell JBoss which EntityManagerFactory to use?
Cheers
Oliver
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/823193#823193]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130614/e4e274ec/attachment.html
More information about the jboss-user
mailing list