[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: A question about Configure Persistence Context with Orac
thomas2008ch
do-not-reply at jboss.com
Sat May 10 15:53:53 EDT 2008
OK, I find the file "oracle-ds.xml". It should be the correct one.
Besides I find some examples from the internet. The "persistence.xml" for Oracle looks as follow:
| <persistence>
| <persistence-unit name="ejb3trail">
| <jta-data-source>java:/OracleDS</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto"
| value="create-drop"/>
| </properties>
| </persistence-unit>
| </persistence>
|
But:
1.
WHere can I put this file in my project? Under /META-INF/ ? Where the "persistence.xml" locates?
2.
How can the program or the server knows where the file "oracle-ds.xml" locates? Should I change the <jta-data-source/> in "persistence.xml" as follow?
| <persistence>
| <persistence-unit name="ejb3trail">
| <jta-data-source>java:/oracle-ds</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto"
| value="create-drop"/>
| </properties>
| </persistence-unit>
| </persistence>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149948#4149948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149948
More information about the jboss-user
mailing list