[jboss-user] [JBoss jBPM] - Re: How can I split storage scheme JBPM and general?

estaub do-not-reply at jboss.com
Wed Jun 20 08:27:00 EDT 2007


fady.matar wrote:

anonymous wrote : It is not recommended to use two JNDI for the same physical database. 

I'm no expert here, but I don't think this is exactly correct.  Accessing different databases (schemas) in the same physical database using different JNDI names is perfectly fine, except perhaps for Hibernate.  In fact, I think it's the ONLY way to do it within J2EE.

In slogger's case, he showed JNDI with different schemas (i.e., user-names):


  | 1-th config:
  | ...
  | <jndi-name>Oracle10jbpm</jndi-name>
  | <connection-url>jdbc:oracle:thin:@192.168.222.116:1521:ora10utf</connection-url>
  | <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
  | <user-name>jbpm</user-name>
  | ...
  | 
  | 2-th config:
  | ...
  | <jndi-name>Oracle10db</jndi-name>
  | <connection-url>jdbc:oracle:thin:@192.168.222.116:1521:ora10utf</connection-url>
  | <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
  | <user-name>pilot</user-name> 
  | 

slogger,

I can't help much with the Hibernate issue, but my reading suggests that if you want coherent transactions across the two databases, you need to use the features of  and <hibernate-mapping> elements to bind together the schemas.  Look at the way the identity schemas are bound in to JBPM for starters, then note that <hibernate-mapping> has a "schema" attribute.

If you want independent transactions between the two contexts, you're on your own!

-Ed Staub


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

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



More information about the jboss-user mailing list