-->
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: How to supply a JDBC connection?
PostPosted: Wed Jun 09, 2004 4:00 am 
Newbie

Joined: Thu Jun 03, 2004 5:47 am
Posts: 13
Hi !!

Someone can tell me how to supply a JDBC connection to JBoss ? I have already try to do it but I don't succeed.
When I want to begin a transaction I have this exception :
Code:
09:52:49,812 INFO  [STDOUT] *** EXCEPTION : java.lang.UnsupportedOperationException: The user must supply a JDBC connection***


In my code sessionFactory is OK,
session is OK,
but tx isn't.

Code:
sessionFactory = cfg.buildSessionFactory();
session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();


Thanks a lot !!!

[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2004 7:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
No details on your configuration but I always try to use the application servers datasource. In JBoss you would setup a database source and it would be available via JNDI for Hibernate to access. There are example of this setup in the examples and configurations for the MBean in the wiki.


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.