Hello,

I try to have two use two different DB in my EJB Tier. 
I have my persistence.xml : 


  | <?xml version="1.0"?>
  | <persistence xmlns="http://java.sun.com/xml/ns/persistence";
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
  |     version="1.0">
  | 
  |     <persistence-unit name="Stock1">
  |             <jta-data-source>java:Stock1DS</jta-data-source>
  |             <class>com.labosun.stockmanager.entity.Transaction</class>
  |             <properties>
  |                     <property name="hibernate.hbm2ddl.auto" value="update" 
/>
  |                     <property name="hibernate.dialect"
  |                             
value="org.hibernate.dialect.MySQLInnoDBDialect" />
  |             </properties>
  |     </persistence-unit>
  | 
  |     <persistence-unit name="Stock2">
  |             <jta-data-source>java:Stock2DS</jta-data-source>
  |             <class>com.labosun.stockmanager.entity.FinancialProduct</class>
  |             <class>com.labosun.stockmanager.entity.Obligation</class>
  |             <class>com.labosun.stockmanager.entity.Portfolio</class>
  |             <class>com.labosun.stockmanager.entity.Stock</class>
  |             <class>com.labosun.stockmanager.entity.StockExchange</class>
  |             <class>com.labosun.stockmanager.entity.StockPortfolio</class>
  |             <class>com.labosun.stockmanager.entity.User</class>
  |             <class>com.labosun.stockmanager.entity.AccountInfo</class>
  |             <properties>
  |                     <property name="hibernate.hbm2ddl.auto" value="update" 
/>
  |                     <property name="hibernate.dialect"
  |                             
value="org.hibernate.dialect.MySQLInnoDBDialect" />
  |             </properties>
  |     </persistence-unit>
  | 
  | </persistence>
  | 

But when I deploy my application, JBoss update Stock1 and Stock2 with all 
@Entity annotated classes but I specified that Stock1 have Transaction and 
Stock2 the others ...
Does my persistence.xml correct ?

Thanks by advance.

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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to