-->
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.  [ 2 posts ] 
Author Message
 Post subject: Pluggable Databases without JNDI?
PostPosted: Fri Dec 09, 2005 6:54 pm 
Newbie

Joined: Wed Jan 05, 2005 8:20 pm
Posts: 10
I have created a .par file that holds my annotated domain objects and annotated packages. It also contains a persistence.xml file, and this file has hardcoded property values that indicate the database driver, url, and credentials.

I want to be able to distribute this .par file without the database-specific information. I also want to distribute a mysql.jar, oracle.jar, or sybase.jar file that contains the JDBC driver and other configuration information. My intent is to allow the deployment of the .par file and the appropriate database-specific jar file in order for the EntityManagerFactory to be configured properly simply by the inclusion of the jar file.

I realize this would be a lot easier if I could use JNDI since this is an exact situation where it benefits, but I would like this process to work outside of the J2EE container. I don't think the Hibernate EntityManager has a JNDI provider does it? I could switch to a programmatic configuration, but I would really like this to work across other EJB3 implementations as well.

I'm interested to hear what some others may have done to allow more seamless swapping of databases in the hibernate configuration.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 10, 2005 1:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Implements a connection provider that does the configuration externalization mechanism.

_________________
Emmanuel


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

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.