-->
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: Extra properties to JNDI InitialContext to look up datasrc
PostPosted: Mon Oct 18, 2004 2:19 pm 
Newbie

Joined: Thu Aug 26, 2004 12:24 pm
Posts: 5
I am stuck using OC4J as an application container and need to pass in extra parameters to the JNDI InitialContext at the time of DataSource look up.
in addition to java.naming.factory.initial and java.naming.provider.url I need to pass java.naming.security.principal and java.naming.security.credentials.

I look at the way Hibernate looks up the InitialContext and it strips everythign out except for factory and url. Is there a way to feed the System.getProperties() into the InitialContext? Is there a way to override NamingHelper with an interceptor? The reason for System.getProperties() is we have a single properties file that is loaded at the time of appserver boot up and all of these properties are already provided.

I can provide a jndi.properties for each application, but that will be less than optimal during the deployment, as deployment people will need to unwrap each war and modify those properties files per deplooyment environment.

Thanks

Dmitry

Hibernate version:
2.1


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 18, 2004 3:42 pm 
Newbie

Joined: Thu Aug 26, 2004 12:24 pm
Posts: 5
Ok, figured it out.
I missread the code in NamingHelper, thats where all fo the confusion startred for me.
I am just reading in the System.getProperties(), get them into the shape that hibernate expects and add them to the Configuration prior to calling configuration.configure() on it.


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.