[jbpm-issues] [JBoss JIRA] Commented: (JBPM-2763) jBPM 4.3 - InitialContext is not closed after being used for JNDI Lookup (Multiple classes)

Ronald van Kuijk (JIRA) jira-events at lists.jboss.org
Fri Jan 22 14:53:19 EST 2010


    [ https://jira.jboss.org/jira/browse/JBPM-2763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12507896#action_12507896 ] 

Ronald van Kuijk commented on JBPM-2763:
----------------------------------------

Are you sure it is an issue? Since Java 6,  there is a static method 

     IntialContext.doLookup(....)

which in the code does

     new InitialContext().lookup(jndiName);

See http://xref.jsecurity.net/openjdk-6/jdk/d0/dd6/_initial_context_8java-source.html#l00266

So since the initial context is not assigned to a variable, I think they both are the same, at least in JavaActivity. So a close does not seem to be needed.

I'll check the other ones as well.

> jBPM 4.3 - InitialContext is not closed after being used for JNDI Lookup (Multiple classes)
> -------------------------------------------------------------------------------------------
>
>                 Key: JBPM-2763
>                 URL: https://jira.jboss.org/jira/browse/JBPM-2763
>             Project: jBPM
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Runtime Engine
>    Affects Versions: jBPM 4.3
>            Reporter: Martin Porter
>
> In various classes when an InitialContext is created it is not closed before the method returns. The following classes have this issue:-
> org.jboss.bpm.console.server.util.InvocationProxy
> org.jbpm.jpdl.internal.activity.JavaActivity
> org.jbpm.jpdl.internal.activity.JmsActivity
> org.jbpm.pvm.internal.cfg.ConfigurationImpl
> org.jbpm.pvm.internal.processengine.ProcessEngineImpl
> org.jbpm.pvm.internal.tx.JtaTransaction
> org.jbpm.pvm.internal.wire.descriptor.JbossIdmIdentitySessionFactoryDescriptor
> org.jbpm.pvm.internal.wire.descriptor.JndiDescriptor
> Hence this will result in memory leaks and also issues with hot deployment for EAR's containing the process engine.

-- 
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 jbpm-issues mailing list