You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "angela (Created) (JIRA)" <ji...@apache.org> on 2012/03/20 15:37:38 UTC

[jira] [Created] (OAK-29) Simplify SessionContext

Simplify SessionContext
-----------------------

                 Key: OAK-29
                 URL: https://issues.apache.org/jira/browse/OAK-29
             Project: Jackrabbit Oak
          Issue Type: Improvement
            Reporter: angela


the current way to implement a SessionContext is IMO over-engineered.
a simple thing like a container used to pass around stuff associated
with a session shouldn't cause headache such as the current implementation
does using a derived interface and the original not even being used.

while we are at this:
jukka once suggested to use an adapter class in order not to expose
the sessionImpl altogether on the JCR level. that might be a next step to go.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OAK-29) Simplify SessionContext

Posted by "angela (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234371#comment-13234371 ] 

angela commented on OAK-29:
---------------------------

the patch looks fine to me.
basically in wonder if we would ever have the need for another session-context.
the main usage of it is to grant access to SessionImpl and other internal stuff
in order to prevent passing around the SessionImpl object.  
                
> Simplify SessionContext
> -----------------------
>
>                 Key: OAK-29
>                 URL: https://issues.apache.org/jira/browse/OAK-29
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: angela
>         Attachments: OAK-29.patch
>
>
> the current way to implement a SessionContext is IMO over-engineered.
> a simple thing like a container used to pass around stuff associated
> with a session shouldn't cause headache such as the current implementation
> does using a derived interface and the original not even being used.
> while we are at this:
> jukka once suggested to use an adapter class in order not to expose
> the sessionImpl altogether on the JCR level. that might be a next step to go.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (OAK-29) Simplify SessionContext

Posted by "Michael Dürig (Assigned JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OAK-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig reassigned OAK-29:
--------------------------------

    Assignee: Michael Dürig
    
> Simplify SessionContext
> -----------------------
>
>                 Key: OAK-29
>                 URL: https://issues.apache.org/jira/browse/OAK-29
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: angela
>            Assignee: Michael Dürig
>         Attachments: OAK-29.patch
>
>
> the current way to implement a SessionContext is IMO over-engineered.
> a simple thing like a container used to pass around stuff associated
> with a session shouldn't cause headache such as the current implementation
> does using a derived interface and the original not even being used.
> while we are at this:
> jukka once suggested to use an adapter class in order not to expose
> the sessionImpl altogether on the JCR level. that might be a next step to go.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (OAK-29) Simplify SessionContext

Posted by "Michael Dürig (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234327#comment-13234327 ] 

Michael Dürig commented on OAK-29:
----------------------------------

The original intention was to have a generic session context which allows for different session implementations and avoids casting. I added the Context interface in SessionImpl basically as an alias for the unwieldy SessionContext<SessionImpl>. This could be easily undone. Patch follows. 

The need for different session implementations came into the picture when we where discussing light weight read only sessions which are always on the head revision. These could be useful for example for observation listeners. 

If we don't have a need for different session implementations we can easily scrap the SessionContext interface and make it into a SessionContext class.

Furthermore I'm generally in favour of Jukka's proposal but have yet to see a more worked out concept of that.
                
> Simplify SessionContext
> -----------------------
>
>                 Key: OAK-29
>                 URL: https://issues.apache.org/jira/browse/OAK-29
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: angela
>
> the current way to implement a SessionContext is IMO over-engineered.
> a simple thing like a container used to pass around stuff associated
> with a session shouldn't cause headache such as the current implementation
> does using a derived interface and the original not even being used.
> while we are at this:
> jukka once suggested to use an adapter class in order not to expose
> the sessionImpl altogether on the JCR level. that might be a next step to go.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (OAK-29) Simplify SessionContext

Posted by "Michael Dürig (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234376#comment-13234376 ] 

Michael Dürig commented on OAK-29:
----------------------------------

I committed the patch at revision 1303403. 

I suggest to keep this issue open until we have a clearer picture of the direction this is taking. I think Jukka's proposal is the right direction and might make this issue obsolete in the end.
                
> Simplify SessionContext
> -----------------------
>
>                 Key: OAK-29
>                 URL: https://issues.apache.org/jira/browse/OAK-29
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: angela
>            Assignee: Michael Dürig
>         Attachments: OAK-29.patch
>
>
> the current way to implement a SessionContext is IMO over-engineered.
> a simple thing like a container used to pass around stuff associated
> with a session shouldn't cause headache such as the current implementation
> does using a derived interface and the original not even being used.
> while we are at this:
> jukka once suggested to use an adapter class in order not to expose
> the sessionImpl altogether on the JCR level. that might be a next step to go.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (OAK-29) Simplify SessionContext

Posted by "Michael Dürig (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OAK-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig updated OAK-29:
-----------------------------

    Attachment: OAK-29.patch

patch for replacing Context with SessionContext<SessionImpl>
                
> Simplify SessionContext
> -----------------------
>
>                 Key: OAK-29
>                 URL: https://issues.apache.org/jira/browse/OAK-29
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: angela
>         Attachments: OAK-29.patch
>
>
> the current way to implement a SessionContext is IMO over-engineered.
> a simple thing like a container used to pass around stuff associated
> with a session shouldn't cause headache such as the current implementation
> does using a derived interface and the original not even being used.
> while we are at this:
> jukka once suggested to use an adapter class in order not to expose
> the sessionImpl altogether on the JCR level. that might be a next step to go.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (OAK-29) Simplify SessionContext

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OAK-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig resolved OAK-29.
------------------------------

       Resolution: Fixed
    Fix Version/s: 0.2

Fixed at revision 1331390
                
> Simplify SessionContext
> -----------------------
>
>                 Key: OAK-29
>                 URL: https://issues.apache.org/jira/browse/OAK-29
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: angela
>            Assignee: Michael Dürig
>             Fix For: 0.2
>
>         Attachments: OAK-29.patch
>
>
> the current way to implement a SessionContext is IMO over-engineered.
> a simple thing like a container used to pass around stuff associated
> with a session shouldn't cause headache such as the current implementation
> does using a derived interface and the original not even being used.
> while we are at this:
> jukka once suggested to use an adapter class in order not to expose
> the sessionImpl altogether on the JCR level. that might be a next step to go.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira