-->
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: Session with supplied Connection
PostPosted: Mon Oct 24, 2005 10:50 am 
Regular
Regular

Joined: Thu Sep 23, 2004 11:53 am
Posts: 83
Hibernate version:
3.1
Mapping documents:
NA
Code between sessionFactory.openSession() and session.close():
NA
Full stack trace of any exception that occurs:
NA
Name and version of the database you are using:
Oracle 10g
The generated SQL (show_sql=true):
NA
Debug level Hibernate log excerpt:
NA

I need to retrieve a conection based on the user's Oralce id, so no connection pooling. I read the Session classes javadocs on suppling a connection and was wondering if anyone can clarify the following...

Note that the second-level cache will be disabled if you supply a JDBC connection. Hibernate will not be able to track any statements you might have executed in the same transaction. Consider implementing your own ConnectionProvider.

Does this mean hibernate will not track transactions that are creatred outside of the session (using the connection directly) or hibernate will not track transaction at all?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 24, 2005 2:43 pm 
Beginner
Beginner

Joined: Thu Jan 22, 2004 8:22 pm
Posts: 48
I think it's saying if you've already used the connection to issue some other JDBC calls Hibernate will know nothing about them. I can say that this does work. I have a modest application written several years ago that uses user supplied connections and it works just fine.


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.