You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Vincent MATHON (JIRA)" <ji...@apache.org> on 2008/11/12 12:13:44 UTC

[jira] Created: (OPENEJB-953) OpenEJB embedded does not release stateless EJB instances in case of RuntimeException

OpenEJB embedded does not release stateless EJB instances in case of RuntimeException
-------------------------------------------------------------------------------------

                 Key: OPENEJB-953
                 URL: https://issues.apache.org/jira/browse/OPENEJB-953
             Project: OpenEJB
          Issue Type: Bug
    Affects Versions: 3.1
         Environment: Windows 2000
            Reporter: Vincent MATHON


The bug is easy to reproduce: 

1/ create a simple EJB:
@Local
@Stateless
public class SimpleEJBBean implements SimpleEJB {
	public void testRuntimeException() throws ApplicationException {
		throw new javax.persistence.PersistenceException();
	}
}

2/ create a JUnit test that invokes 11 times the method testRuntimeException() in the same test case.

The test is blocked because all OpenEJB stateless instances of the pool are in use. This behavior seems to be related to the code in class org.apache.openejb.core.stateless.StatelessContainer, in method _invoke. In case of System Exception, instanceManager.poolInstance(callContext, instance) is never called and the pool instances are all in use after 10 invocations since 10 is the default Sateless container pool size. 

I haven't found any workaround yet.

sincerly
Vincent MATHON

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OPENEJB-953) OpenEJB embedded does not release stateless EJB instances in case of RuntimeException

Posted by "Manu T George (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manu T George closed OPENEJB-953.
---------------------------------


> OpenEJB embedded does not release stateless EJB instances in case of RuntimeException
> -------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-953
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-953
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Windows 2000
>            Reporter: Vincent MATHON
>            Assignee: Manu T George
>             Fix For: 3.1.1
>
>
> The bug is easy to reproduce: 
> 1/ create a simple EJB:
> @Local
> @Stateless
> public class SimpleEJBBean implements SimpleEJB {
> 	public void testRuntimeException() throws ApplicationException {
> 		throw new javax.persistence.PersistenceException();
> 	}
> }
> 2/ create a JUnit test that invokes 11 times the method testRuntimeException() in the same test case.
> The test is blocked because all OpenEJB stateless instances of the pool are in use. This behavior seems to be related to the code in class org.apache.openejb.core.stateless.StatelessContainer, in method _invoke. In case of System Exception, instanceManager.poolInstance(callContext, instance) is never called and the pool instances are all in use after 10 invocations since 10 is the default Sateless container pool size. 
> I haven't found any workaround yet.
> sincerly
> Vincent MATHON

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENEJB-953) OpenEJB embedded does not release stateless EJB instances in case of RuntimeException

Posted by "Manu T George (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manu T George resolved OPENEJB-953.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: (trunk/openejb3)

Fixed in trunk. Added a test case to prevent regression

> OpenEJB embedded does not release stateless EJB instances in case of RuntimeException
> -------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-953
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-953
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Windows 2000
>            Reporter: Vincent MATHON
>            Assignee: Manu T George
>             Fix For: (trunk/openejb3)
>
>
> The bug is easy to reproduce: 
> 1/ create a simple EJB:
> @Local
> @Stateless
> public class SimpleEJBBean implements SimpleEJB {
> 	public void testRuntimeException() throws ApplicationException {
> 		throw new javax.persistence.PersistenceException();
> 	}
> }
> 2/ create a JUnit test that invokes 11 times the method testRuntimeException() in the same test case.
> The test is blocked because all OpenEJB stateless instances of the pool are in use. This behavior seems to be related to the code in class org.apache.openejb.core.stateless.StatelessContainer, in method _invoke. In case of System Exception, instanceManager.poolInstance(callContext, instance) is never called and the pool instances are all in use after 10 invocations since 10 is the default Sateless container pool size. 
> I haven't found any workaround yet.
> sincerly
> Vincent MATHON

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENEJB-953) OpenEJB embedded does not release stateless EJB instances in case of RuntimeException

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins updated OPENEJB-953:
----------------------------------

    Fix Version/s:     (was: (trunk/openejb3))
                   3.1.1

> OpenEJB embedded does not release stateless EJB instances in case of RuntimeException
> -------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-953
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-953
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Windows 2000
>            Reporter: Vincent MATHON
>            Assignee: Manu T George
>             Fix For: 3.1.1
>
>
> The bug is easy to reproduce: 
> 1/ create a simple EJB:
> @Local
> @Stateless
> public class SimpleEJBBean implements SimpleEJB {
> 	public void testRuntimeException() throws ApplicationException {
> 		throw new javax.persistence.PersistenceException();
> 	}
> }
> 2/ create a JUnit test that invokes 11 times the method testRuntimeException() in the same test case.
> The test is blocked because all OpenEJB stateless instances of the pool are in use. This behavior seems to be related to the code in class org.apache.openejb.core.stateless.StatelessContainer, in method _invoke. In case of System Exception, instanceManager.poolInstance(callContext, instance) is never called and the pool instances are all in use after 10 invocations since 10 is the default Sateless container pool size. 
> I haven't found any workaround yet.
> sincerly
> Vincent MATHON

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OPENEJB-953) OpenEJB embedded does not release stateless EJB instances in case of RuntimeException

Posted by "Manu T George (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manu T George reassigned OPENEJB-953:
-------------------------------------

    Assignee: Manu T George

> OpenEJB embedded does not release stateless EJB instances in case of RuntimeException
> -------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-953
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-953
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Windows 2000
>            Reporter: Vincent MATHON
>            Assignee: Manu T George
>
> The bug is easy to reproduce: 
> 1/ create a simple EJB:
> @Local
> @Stateless
> public class SimpleEJBBean implements SimpleEJB {
> 	public void testRuntimeException() throws ApplicationException {
> 		throw new javax.persistence.PersistenceException();
> 	}
> }
> 2/ create a JUnit test that invokes 11 times the method testRuntimeException() in the same test case.
> The test is blocked because all OpenEJB stateless instances of the pool are in use. This behavior seems to be related to the code in class org.apache.openejb.core.stateless.StatelessContainer, in method _invoke. In case of System Exception, instanceManager.poolInstance(callContext, instance) is never called and the pool instances are all in use after 10 invocations since 10 is the default Sateless container pool size. 
> I haven't found any workaround yet.
> sincerly
> Vincent MATHON

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENEJB-953) OpenEJB embedded does not release stateless EJB instances in case of RuntimeException

Posted by "Manu T George (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646883#action_12646883 ] 

Manu T George commented on OPENEJB-953:
---------------------------------------

Try setting strictPooling to false. There is a bug in the strictPooling logic where the semaphore is not released in case of exception

> OpenEJB embedded does not release stateless EJB instances in case of RuntimeException
> -------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-953
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-953
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Windows 2000
>            Reporter: Vincent MATHON
>
> The bug is easy to reproduce: 
> 1/ create a simple EJB:
> @Local
> @Stateless
> public class SimpleEJBBean implements SimpleEJB {
> 	public void testRuntimeException() throws ApplicationException {
> 		throw new javax.persistence.PersistenceException();
> 	}
> }
> 2/ create a JUnit test that invokes 11 times the method testRuntimeException() in the same test case.
> The test is blocked because all OpenEJB stateless instances of the pool are in use. This behavior seems to be related to the code in class org.apache.openejb.core.stateless.StatelessContainer, in method _invoke. In case of System Exception, instanceManager.poolInstance(callContext, instance) is never called and the pool instances are all in use after 10 invocations since 10 is the default Sateless container pool size. 
> I haven't found any workaround yet.
> sincerly
> Vincent MATHON

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENEJB-953) OpenEJB embedded does not release stateless EJB instances in case of RuntimeException

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646886#action_12646886 ] 

Vincent MATHON commented on OPENEJB-953:
----------------------------------------

Yes, it works.

For instance, I add the following metho to my test class

@BeforeClass
public static void initClass() {
	System.setProperty("Default Stateless Container.StrictPooling", "false");
}

> OpenEJB embedded does not release stateless EJB instances in case of RuntimeException
> -------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-953
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-953
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Windows 2000
>            Reporter: Vincent MATHON
>
> The bug is easy to reproduce: 
> 1/ create a simple EJB:
> @Local
> @Stateless
> public class SimpleEJBBean implements SimpleEJB {
> 	public void testRuntimeException() throws ApplicationException {
> 		throw new javax.persistence.PersistenceException();
> 	}
> }
> 2/ create a JUnit test that invokes 11 times the method testRuntimeException() in the same test case.
> The test is blocked because all OpenEJB stateless instances of the pool are in use. This behavior seems to be related to the code in class org.apache.openejb.core.stateless.StatelessContainer, in method _invoke. In case of System Exception, instanceManager.poolInstance(callContext, instance) is never called and the pool instances are all in use after 10 invocations since 10 is the default Sateless container pool size. 
> I haven't found any workaround yet.
> sincerly
> Vincent MATHON

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.