-->
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: Making connection object Public in SessionImpl class.
PostPosted: Fri Feb 18, 2005 4:37 am 
Newbie

Joined: Mon Feb 14, 2005 12:14 am
Posts: 14
Location: Boston, USA
Hibernate version:2.1.7

Hi,
I want to ask a simple question? Why can't we make Connection object public in the SessionImpl class. This way i can use the connection to execute some simple queries which does not need any objects (like selecting one column from the table, updating two, three columns in the table). Can sombody throw some light on this?

regards.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 18, 2005 4:43 am 
Newbie

Joined: Wed Sep 01, 2004 9:04 am
Posts: 18
Location: Enschede, Netherlands
SessionImpl is an implementation of the Session interface, so we don't want any member of that class to be public. You don't want your application to be dependent of the SessionImpl class.

By the way, isn't there a method connection() on the Session interface which provides the JDBC connection?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 18, 2005 4:50 am 
Newbie

Joined: Mon Feb 14, 2005 12:14 am
Posts: 14
Location: Boston, USA
Thanks a lot. I have seen the connection() method which returns a JDBC connection in the Session interface. I was searching for this method. Thanks again.


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.