-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Defining default_schema outside of EAR (persistence.xml)
PostPosted: Tue Jan 27, 2009 9:37 am 
Newbie

Joined: Tue Jan 27, 2009 8:43 am
Posts: 1
Hello,

we have an EJB application using two different Oracle Databases.

We set the default schema of each persistence context in the persistence.xml (residing within the EAR-file):

Code:
<persistence-unit name="PersistenceUnitDefault">
  <provider>org.hibernate.ejb.HibernatePersistence</provider>
  ...
  <properties>
    <property name="hibernate.default_schema" value="data1"/>
    ...
<persistence-unit name="PersistenceUnitStock">
  <provider>org.hibernate.ejb.HibernatePersistence</provider>
  ...
  <properties>
    <property name="hibernate.default_schema" value="prod1"/>
    ...


The application is used by serveral customers, each using their own databases / schema assignment. Since the persistence.xml is contained within the EAR, we have to provide a specific EAR file for each installation.

How can we define the default schema for each persistence context outside of the EAR, e. g. in the datastore definition file?

Hibernate version 3.2.4.sp1
JBoss 4.2.3.GA
Oracle 10g Database

Thank you,
Raimund


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.