[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2603) Deprecate the Session.connection() method

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Feb 15 05:41:33 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29532 ] 

Steve Ebersole commented on HHH-2603:
-------------------------------------

Getting a connection directly from the ConnectionProvider is a different scenario, and is fine.  There you are getting a connection for your own use.  Even in the case of JTA, you may get the same logical connection as what is being used by a Session; however, you would get a different physical connection handle.

We are specifically talking about the scope/duration of connections in relation to a Session.

And you can get the ConnectionProvider from the SessionFactory as well.  You just need to cast it to org.hibernate.engine.SessionFactoryImplementor, and call org.hibernate.engine.SessionFactoryImplementor#getConnectionProvider.  org.hibernate.engine.SessionFactoryImplementor is not a public API; it is however an integration API and as such is pretty stable.

> Deprecate the Session.connection() method
> -----------------------------------------
>
>                 Key: HHH-2603
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2603
>             Project: Hibernate3
>          Issue Type: Deprecation
>          Components: core
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.2.4
>
>
> Deprecate the Session.connection() method, in favor of a "JDBC work" API.  Schedule for removal in 4.0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list