[JBoss JIRA] Created: (EJBTHREE-849) @PrePassivate and @PostActivate callbacks not properly handled for nested SFSBS
by Brian Stansberry (JIRA)
@PrePassivate and @PostActivate callbacks not properly handled for nested SFSBS
-------------------------------------------------------------------------------
Key: EJBTHREE-849
URL: http://jira.jboss.com/jira/browse/EJBTHREE-849
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - Patch 1
Reporter: Brian Stansberry
Fix For: EJB 3.0 RC10 - FD
For nested SFSBs that do not implement a remote interface, the passivation/activation callbacks are not properly invoked.
The problem is that the invocation of StatefulBeanContext.prePassivate() and postActivate() is the responsibility of the bean cache. But, for a nested SFSB without a remote interface, the cached object is not the real context, it's a proxy (ProxiedStatefulBeanContext). The real context is separately cached as a contained element of the parent bean's context.
So, this kind of nested bean is actually passivated/activated as part of passivation/activation of the parent bean. The callbacks should be invoked at the same time they are invoked on the parent. Currently the callbacks are invoked when the cache decides to passivate the proxy context, but the passivation of the proxy context is meaningless -- it does not result in serializing the bean instance, so it is incorrect to invoke the callbacks.
See org.jboss.ejb3.test.stateful.unit.NestedBeanUnitTestCase for a demonstration of the failure.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months
[JBoss JIRA] Created: (EJBTHREE-837) test failure - org.jboss.ejb3.test.clusteredentity.unit.EntityQueryRedeployUnitTestCase
by Len DiMaggio (JIRA)
test failure - org.jboss.ejb3.test.clusteredentity.unit.EntityQueryRedeployUnitTestCase
---------------------------------------------------------------------------------------
Key: EJBTHREE-837
URL: http://jira.jboss.com/jira/browse/EJBTHREE-837
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - FD
Environment: [java.version: 1.5.0_08]
[java.vendor: BEA Systems, Inc.]
[java.vm.version: R27.1.0-109-73164-1.5.0_08-20061129-1418-linux-ia32]
[java.vm.name: BEA JRockit(R)]
[java.vm.info: compiled mode]
[os.name: Linux]
[os.arch: i386]
[os.version: 2.6.9-42.0.3.ELsmp]
Reporter: Len DiMaggio
Priority: Minor
Suite: org.jboss.ejb3.test.clusteredentity.unit.EntityQueryRedeployUnitTestCase
Test: testRedeploy
Type: error
Exception: javax.ejb.EJBException
Message: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
ava.lang.IndexOutOfBoundsException: Index: 0, Size: 0
javax.ejb.EJBException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:319)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
at org.jboss.remoting.Client.invoke(Client.java:525)
at org.jboss.remoting.Client.invoke(Client.java:488)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulRemoteProxy.invoke(StatefulRemoteProxy.java:133)
at $Proxy3.getBranch(Unknown Source)
at org.jboss.ejb3.test.clusteredentity.unit.EntityClassloaderTestBase.queryTest(EntityClassloaderTestBase.java:253)
at org.jboss.ejb3.test.clusteredentity.unit.EntityQueryRedeployUnitTestCase.testRedeploy(EntityQueryRedeployUnitTestCase.java:57)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.jboss.ejb3.test.clusteredentity.classloader.EntityQueryTestBean.getBranchViaNamedQuery(EntityQueryTestBean.java:162)
at org.jboss.ejb3.test.clusteredentity.classloader.EntityQueryTestBean.getBranch(EntityQueryTestBean.java:136)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months
[JBoss JIRA] Created: (EJBTHREE-867) Loosen coupling of lifecycle of nested SFSBs
by Brian Stansberry (JIRA)
Loosen coupling of lifecycle of nested SFSBs
--------------------------------------------
Key: EJBTHREE-867
URL: http://jira.jboss.com/jira/browse/EJBTHREE-867
Project: EJB 3.0
Issue Type: Task
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Fix For: EJB 3.0 RC10 - FD
When a parent SFSB has a non-@Remote child SFSB injected, the parent and child currently share a common lifecycle -- i.e. when the parent is destroyed the child will be destroyed as well.
As discussed on the referenced forum thread, we need to loosen this coupling, as it is possible for other in-VM clients to have references to the child bean.
Need to ensure that shared references to any ExtendedPersistentContext and managed entities are maintained, including across replication.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months
[JBoss JIRA] Created: (EJBTHREE-871) Invocation on nested SFSB does not trigger replication of parent context
by Brian Stansberry (JIRA)
Invocation on nested SFSB does not trigger replication of parent context
------------------------------------------------------------------------
Key: EJBTHREE-871
URL: http://jira.jboss.com/jira/browse/EJBTHREE-871
Project: EJB 3.0
Issue Type: Bug
Components: Clustering
Affects Versions: EJB 3.0 RC9 - Patch 1
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Fix For: EJB 3.0 RC11 - FD
An invocation on a clustered @Local nested SFSB causes the replication of the ProxiedStatefulBeanContext. This object does not actually hold the bean instance's state, so replicating it is meaningless.
When a nested bean is involved, what should be replicated is the context that represents the ultimate parent of the tree of nested beans.
Need to handle the case of nested invocations, i.e. a call to one bean in the tree results in a call to another. In this case the replication should only occur when the outer call completes. An inner call should only mark the parent bean context as needing replication.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months