[hibernate-issues] [Hibernate-JIRA] Resolved: (HSHARDS-48) NullPointerException in disconnect method
Max Ross (JIRA)
noreply at atlassian.com
Mon Dec 10 19:56:57 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Ross resolved HSHARDS-48.
-----------------------------
Resolution: Fixed
Fix Version/s: 3.0.0
> NullPointerException in disconnect method
> -----------------------------------------
>
> Key: HSHARDS-48
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-48
> Project: Hibernate Shards
> Issue Type: Bug
> Affects Versions: 3.0.0.Beta2
> Reporter: Aviad Lichtenstadt
> Assignee: Max Ross
> Fix For: 3.0.0
>
>
> Sometimes when the disconnect method of ShardedSessionImpl is called a NullPointerException occurs
> This happened when attaching the OpenSessionInViewFilter to a shardSessionFactory
> Here is the fixed method (validate that the session is not null when calling disconnect:
> public Connection disconnect() throws HibernateException {
> for (Shard s : getShards()) {
> Session sess = s.getSession();
> if (sess != null) {
> sess.disconnect();
> }
> }
> // we do not allow application-supplied connections, so we can always return
> // null
> return null;
> }
--
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