-->
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.  [ 7 posts ] 
Author Message
 Post subject: Datasource name in Hibernate.cfg.xml
PostPosted: Mon Feb 19, 2007 5:29 am 
Newbie

Joined: Thu Oct 28, 2004 1:15 am
Posts: 8
Hibernate version:
3.2.2

problem:
The datasource name is different when using jboss 4.0.5 and weblogic 9.2. In weblogic our datasource name is jdbc/IMSDS, but in jboss the datasource name needs to prepended with java: like java:jdbc/IMSDS.

question:
Is it possible to specify a class that can handle/ delegate to the right datasource name? I'm thinking some like the "transaction.manager_lookup_class" property where it's possible to right you own transaction manager lookup class that can delegate to the right class.

Regards,
Søren Pedersen


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 19, 2007 6:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
write your own subclass of a ConnectionProvider

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 19, 2007 3:21 pm 
Newbie

Joined: Thu Oct 28, 2004 1:15 am
Posts: 8
Thanks a lot.

How do I make hibernate to use/choose my new subclass? Can I refer to the new subclass from hibernate.cfg.xml?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 19, 2007 3:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
of course - you already enter a full classname today ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 19, 2007 3:46 pm 
Newbie

Joined: Thu Oct 28, 2004 1:15 am
Posts: 8
Sorry, but today I'm doing it like this:

<property name="connection.datasource">jdbc/IMSDS</property>

I don't refer to any class?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 4:24 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
from hibernate/etc/hibernate.properties

Code:
#################################
### Plugin ConnectionProvider ###
#################################

## use a custom ConnectionProvider (if not set, Hibernate will choose a built-in ConnectionProvider using hueristics)

#hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider
#hibernate.connection.provider_class org.hibernate.connection.DatasourceConnectionProvider
#hibernate.connection.provider_class org.hibernate.connection.C3P0ConnectionProvider
#hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 5:41 am 
Newbie

Joined: Thu Oct 28, 2004 1:15 am
Posts: 8
Thanks a lot, Max


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