[hibernate-issues] [Hibernate-JIRA] Resolved: (HSHARDS-46) ShardedSessionImpl.isOpen() is inconsistent with SessionImpl.isOpen()

Max Ross (JIRA) noreply at atlassian.com
Tue Sep 4 18:36:14 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Max Ross resolved HSHARDS-46.
-----------------------------

    Resolution: Fixed

> ShardedSessionImpl.isOpen() is inconsistent with SessionImpl.isOpen()
> ---------------------------------------------------------------------
>
>                 Key: HSHARDS-46
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-46
>             Project: Hibernate Shards
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 3.0.0.Beta1, 3.0.0.Beta2
>            Reporter: Max Ross
>            Assignee: Max Ross
>             Fix For: 3.0.0
>
>
> Email exchange between Aviad and Max:
> Aviad:
> I am working on using a Spring SessionFatoryBean class, so the Shard Session can be integrated correctly with the Spring TrasnsactionManager (not distributed transactions) and the OpenSessionInViewFilter.
> While debugging this issue, we encountered that the isOpen method of the ShardedSessionImpl is not acting as the hibernate session version.
> In hibernate if a session is not closed then it is open, meaning every created session that wasn't closed is treated as open.
> In the Shard implementation the method looks for an open HibernateSession in order to return 'true'. This issue causes an unexpected behavior with Spring Transactions, so unless there is an unseen reason for this implementation I suggest to change the method isOpen to return true as long as the session wasn't closed.
> Max:
> Great, I'm glad to hear you're making progress.  I think I understand the issue with isOpen but let me just make sure.  The problem in Shards is that a ShardedSession is only considered open if it contains at least one open Session.  Since we don't open Sessions until someone performs an operation on the ShardedSession that actually requires a Session, if you create a new ShardedSession and immediately call isOpen() it will return false, whereas if you create a regular Session and immediately call isOpen() it will return true.  If I understand the problem correctly that makes sense I can submit the change. 
> Aviad:
> About the problem we discussed you did understand correctly, and I will be glad if it will be changed.

-- 
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