[jboss-user] [JBoss Seam] - hbm2ddl and multiple datasources
dennisrjohn
do-not-reply at jboss.com
Mon Dec 17 18:22:47 EST 2007
I have an app that uses a mysql database for all of it's data, and when one particular event happens, needs to update a table in a MS Sql Server database. I'm using the following persistence.xml file:
[code[
<persistence-unit name="customerservice" transaction-type="JTA">
org.hibernate.ejb.HibernatePersistence
<jta-data-source>java:/customerserviceDatasource</jta-data-source>
</persistence-unit>
<persistence-unit name="stoneedge" transaction-type="JTA">
org.hibernate.ejb.HibernatePersistence
<jta-data-source>java:/stoneedgeDatasource</jta-data-source>
</persistence-unit>
Since the Mysql database is my app's database, I want to create-drop the tables, but the other app isn't mine, therefore, I want to validate only.
I have entity classes defined like follows:
| @Entity
| @PersistenceUnit(unitName="customerservice")
| @DiscriminatorValue("5")
| public class TransferInteraction extends CustomerInteraction implements
| Serializable {
|
| private String transferDestination;
|
| @Length(max = 50)
| public String getTransferDestination()
| {
| return transferDestination;
| }
|
| public void setTransferDestination(String transferDestination)
| {
| this.transferDestination = transferDestination;
| }
|
| @Override
| public String toString()
| {
| return "Transfer";
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113587#4113587
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113587
More information about the jboss-user
mailing list