[jboss-jira] [JBoss JIRA] Closed: (JBMESSAGING-1640) ClientSessionFactory are garbage collected while the sessions are used in the integration tests
Tim Fox (JIRA)
jira-events at lists.jboss.org
Tue Jun 9 08:31:24 EDT 2009
[ https://jira.jboss.org/jira/browse/JBMESSAGING-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Fox closed JBMESSAGING-1640.
--------------------------------
Resolution: Out of Date
> ClientSessionFactory are garbage collected while the sessions are used in the integration tests
> -----------------------------------------------------------------------------------------------
>
> Key: JBMESSAGING-1640
> URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1640
> Project: JBoss Messaging
> Issue Type: Bug
> Reporter: Jeff Mesnil
> Assignee: Tim Fox
> Fix For: 2.0.0.CR1
>
>
> The client session impl does not have a ref on the factory which was used to create it.
> In the integration-tests (e.g. ClientConsumerCloseTest), there are a lot of:
> protected void setUp() throws Exception
> {
> ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
> ...
> session = sf.createSession(false, true, true);
> session.createQueue(address, queue, false);
> }
> In that case, the sf variable will be GC'ed while the session field is still used which could lead to problems.
> The factory *must not* be GC'ed while it still has sessions. To prevent that in all case, we can add a reference to the factory
> in the created sessions.
> For the integration-tests, we must also ensure that the sf is properly closed by making the sf a field and call close() in the
> teardown methods.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list