-->
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.  [ 3 posts ] 
Author Message
 Post subject: Plugging in a connection. <NOT FROM HIBERNATE.CFG.XML>
PostPosted: Tue Dec 11, 2007 6:08 pm 
Newbie

Joined: Thu Jul 27, 2006 5:33 pm
Posts: 6
I am a user of Hibernate for quite some time. Everything is goign smoothly untill our DBA came in rised the question of having password naked in hibernate.cfg.xml.

Couple of questions.

1. Is there a way to inject a JdbCConnection from an outside api into Hibernate runtime. (Say we need to have all the connection to be datasourced from a Apache dbcp). So I shouldnt have any of my connection parameters in my xml file.

2. If point 1 can't be done, how can I get a encrypted password in my hibernate.cfg.xml.

Thanks for your help in advance.

Thanks
- javabuddy


Top
 Profile  
 
 Post subject: Re: Plugging in a connection. <NOT FROM HIBERNATE.CFG.XML
PostPosted: Tue Dec 11, 2007 6:19 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
javabuddy wrote:
I am a user of Hibernate for quite some time. Everything is goign smoothly untill our DBA came in rised the question of having password naked in hibernate.cfg.xml.

Couple of questions.

1. Is there a way to inject a JdbCConnection from an outside api into Hibernate runtime. (Say we need to have all the connection to be datasourced from a Apache dbcp). So I shouldnt have any of my connection parameters in my xml file.

2. If point 1 can't be done, how can I get a encrypted password in my hibernate.cfg.xml.

Thanks for your help in advance.

Thanks
- javabuddy


You can configure hibernate to use an external datasource by giving a datasource jndi name. Look at Table 3.2. Hibernate Datasource Properties in the documentation.


Farzad-


Top
 Profile  
 
 Post subject: Connection Provided
PostPosted: Thu Dec 13, 2007 9:24 am 
Newbie

Joined: Thu Jul 27, 2006 5:33 pm
Posts: 6
I used hibernate.connection.provider_class. Below is the reference

"You may define your own plugin strategy for obtaining JDBC connections by implementing the interface org.hibernate.connection.ConnectionProvider. You may select a custom implementation by setting hibernate.connection.provider_class. "

FROM

http://www.hibernate.org/hib_docs/refer ... ation.html

Thanks All
- javabuddy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.