-->
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: Hibernate3: cannot specify custom ConnectionProvider
PostPosted: Mon Aug 29, 2005 8:07 pm 
Newbie

Joined: Wed Mar 31, 2004 6:22 pm
Posts: 4
I have noticed that in Hibernate2 I was able to specfy the
hibernate.connection.provider_class
but in Hibernate3 I am unable. I traced through the code in debug and I found this:

HibernateService.start()
-->buildSessionFactory()
This calls static intilizer for Configuration and Environment which loads hibernate.properties and stored is in GLOBAL_PROPERTIES.

Starting the HibernateService triggers the static initializer, which loads the properties, but they are never made available to the HibernateService.
The intialization calls various "setter" methods,
setDatasource
setTransactionManagerLookupStrategy
setUserTransactionName
for the items specified in jboss-service.xml, and these are the only properties made available to the HibernateService. the other properties in GLOBAL_PROPERTIES are not made available.

Meanwhile, we get this:
SettingsFactory.createConnectionProvider()
it always creates a DatasourceConnectioProvider becuase it cannot see the property hibernate.connection.provider_class which I specified in hibernate.properties.

Does anyone have any information about this, and does it look like a bug?

John Pianezze
Telephia


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.