[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2860?page=c...
]
Shawn Clowater commented on HHH-2860:
-------------------------------------
I like the SessionCreationOptions bit as it tends to be a bit more flexible as there are a
number of session creation options with a lot of different parameters. Rather than create
a method for every type of permutation the Options could be used and reduce the number of
physical methods available. It might also be easier for the end user to extend the
functionality as well. i.e. I had to create a patch (it's around in JIRA somewhere)
to provide an option for specifying the Interceptor for the openSession method on the
factory that we could call from buildOrObtainSession() as we wanted an interceptor per
current session so that we could queue audit logging. With an Options impl we could have
probably just set a property and been on our way.
As far as the Connection piece goes when supplying to a session, since the connection()
method has been deprecated and I assume will be removed there would need to be a mechanism
to get at the internal workings of the session somehow in order to supply it. i.e. for
the Work API it looks like you get the existing connection directly (not even using
borrowConnection()) and that is essentially what I really envision piggy backing on the
session to be. The annoying side effect for providing your own connection is the ON_CLOSE
warnings it gives when the session is closed. i.e. you really don't want to close the
connection since you have a controlling session that is handling the transaction, etc but
the closing of the child session ends up spewing this warning.
Consolidate Session creation options/parameters
-----------------------------------------------
Key: HHH-2860
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2860
Project: Hibernate Core
Issue Type: Improvement
Components: core
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.4
This is a partial follow-on for the deprecation of Session#connection()
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira