-->
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: the user must supply JDBC connections
PostPosted: Sat Mar 20, 2004 4:28 pm 
Regular
Regular

Joined: Fri Feb 13, 2004 10:02 pm
Posts: 90
I am receiving this error message in log file when I try to initialize a user-supplied connection. Our application uses JBOSS 3.2.3 as our app server, and is configured to use the JBOSS supplied data source to MYSQL. This works perfectly, I have a hibernate.cfg.xml file, and hibernate connects to the data source, and updates the schema if necessary. This connection provides configuration data to our application. I can retrieve data, as well as save data. Now, in our application the user can specify a different database from the default that they wish to connect to perform the data manipulation on. The user selects a Dialect object, which will give me the hibernate dialect, and the driver class. I then use the information that is provided to try and connect to the database. Unfortunately since the user can connect to any database they specify, I can't just add it as a data source to JBOSS. As you can see, I keep the session factories for the different databases in a singleton so that they are only initialized once, and returned when the user needs to connect to them. I have debugged and stepped through the code, and all of the parameters are being passed properly. Any help would be great, as well as any suggestions if there is a better way to do this. I


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 24, 2004 7:03 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
add hibernate.connection.provider_class

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Got it
PostPosted: Wed Mar 24, 2004 11:26 pm 
Regular
Regular

Joined: Fri Feb 13, 2004 10:02 pm
Posts: 90
Emmanuel,

Thanks for the help, I did needed to add that, but I also needed to change

Code:
private static final String URL = "hibernate.connection.url jdbc";


to

Code:
private static final String URL = "hibernate.connection.url";


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.