[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2860) Consolidate Session creation options/parameters

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Sep 12 00:07:04 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31160#action_31160 ] 

Steve Ebersole commented on HHH-2860:
-------------------------------------

Shawn, this is still largely in the air and being discussed in terms of exactly what this might look like concretely.  In the general sense, though, it all boils down to the fact that there are a number of attributes with which you'd like to start sessions with at various points and in various combinations, and that those attributes have different sources.  As an example of what I mean, Connection is exactly one of these attributes.  And it can come from a number of different sources such as (1) from some application managed pool (2) from another session (what you describe) (3) none (use the SessionFactory's configured ConnectionProvider).

How this consolidation actually looks in implementation is the part still being discussed.   Perhaps it ends up just being an options object passed into openSession() : SessionFactory.openSession(SessionCreationOptions options)?  Is SessionCreationOptions an interface?  A class?  Is there a better approach?  The SessionCreationOptions approach is certainly flexible, but would probably be nice to "denormalize" for common scenarios with overloaded openSession forms:
{code:title=SessionFactory.java}
    ...
    // this is the same as the existing one
    public Session openSession();

    // Again, same as existing 
    public Session openSession(Interceptor interceptor);

    // here's the new one
    public Session openSession(SessionCreationOptions options);
    ....
{code}
 

> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list