[jboss-user] [EJB 3.0] - Re: How to connect multiple databases at same time?

oskar.carlstedt do-not-reply at jboss.com
Fri Oct 12 02:06:20 EDT 2007


Hello!

AFAIK the whole idea with JPA is to have one data source per ejb-jar-file (but I might have misunderstood everything). If you need to persist data into several schemas you have to create a "super/delegating" ejb that will lookup the correct ejb to use for persistence.

So, you have to make your business logic in one ejb, then a lookup on a (local SLSB) ejb to actually use when persisting your data.


Kind regards
/Oskar


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094363#4094363

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094363



More information about the jboss-user mailing list