[infinispan-dev] tccl usage in listeners

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] tccl usage in listeners

Ales Justin
While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.

---

Looking at the stack trace, and how listener is registered,
I don't see how Ispan+CDI integration can change this behavior:

Imo, it should be Ispan's job to properly change this.
e.g. wrap each listener invocation with listener' classloader as tccl

---

as imo it's not cdi integration's job
as it cannot change this
at least i don't see how
and same issue can happen for any other framework
where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
this issue only popped up due to cluster formation
as the other node's code is invoked via Ispan' distribution mechanism
1:48
in standalone you would always get this invoked via app' execution chain

---

12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
       at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
       at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
       at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
       at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
       at org.jboss.weld.Container.instance(Container.java:58)
       at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
       at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
       at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
       at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
       at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
       at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Pete Muir
Agreed, but what do others think, what problems are there?

On 30 Aug 2011, at 13:01, Ales Justin wrote:

> While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.
>
> ---
>
> Looking at the stack trace, and how listener is registered,
> I don't see how Ispan+CDI integration can change this behavior:
>
> Imo, it should be Ispan's job to properly change this.
> e.g. wrap each listener invocation with listener' classloader as tccl
>
> ---
>
> as imo it's not cdi integration's job
> as it cannot change this
> at least i don't see how
> and same issue can happen for any other framework
> where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
> this issue only popped up due to cluster formation
> as the other node's code is invoked via Ispan' distribution mechanism
> 1:48
> in standalone you would always get this invoked via app' execution chain
>
> ---
>
> 12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
> lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
> t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
>        at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>        at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
>        at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
> Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
> s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
>        at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
>        at org.jboss.weld.Container.instance(Container.java:58)
>        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
>        at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
>        at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
>        at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
>        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
>        at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Galder Zamarreno
There's some listener events that are directly associated with cache invocations, so at first glance, it'd make sense to use whatever cache.with(CL) was passed by, defaulting on the cache's (or cache manager's, depending on the granularity of the listener event) class loader. However, this could only work on those events that are local where the invocation context has any CL that has been associated with the invocation. In remotely executed events, it'd be tricky to replicate the same thing. This is a very similar problem to lazy deserialization, but in this case, lazy listener events or something like that, where you only know the CL when a cache operation is called, but for events this does not make sense and it'd be rather counter intuitive.

The least we can do here is simply use the classloader associated with the cache/cachemanager depending on the granularity of the event.

On Aug 30, 2011, at 2:20 PM, Pete Muir wrote:

> Agreed, but what do others think, what problems are there?
>
> On 30 Aug 2011, at 13:01, Ales Justin wrote:
>
>> While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.
>>
>> ---
>>
>> Looking at the stack trace, and how listener is registered,
>> I don't see how Ispan+CDI integration can change this behavior:
>>
>> Imo, it should be Ispan's job to properly change this.
>> e.g. wrap each listener invocation with listener' classloader as tccl
>>
>> ---
>>
>> as imo it's not cdi integration's job
>> as it cannot change this
>> at least i don't see how
>> and same issue can happen for any other framework
>> where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
>> this issue only popped up due to cluster formation
>> as the other node's code is invoked via Ispan' distribution mechanism
>> 1:48
>> in standalone you would always get this invoked via app' execution chain
>>
>> ---
>>
>> 12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
>> lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
>> t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
>>       at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>       at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
>>       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
>>       at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
>> Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
>> s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
>>       at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
>>       at org.jboss.weld.Container.instance(Container.java:58)
>>       at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
>>       at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
>>       at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
>>       at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
>>       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
>>       at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
>>       at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Pete Muir
Adding Stuart.

Maybe worth having an IRC chat on this. Shall we say Thursday morning 10am UK time as that will hit all the relevant people?

On 30 Aug 2011, at 16:56, Galder Zamarreño wrote:

> There's some listener events that are directly associated with cache invocations, so at first glance, it'd make sense to use whatever cache.with(CL) was passed by, defaulting on the cache's (or cache manager's, depending on the granularity of the listener event) class loader. However, this could only work on those events that are local where the invocation context has any CL that has been associated with the invocation. In remotely executed events, it'd be tricky to replicate the same thing. This is a very similar problem to lazy deserialization, but in this case, lazy listener events or something like that, where you only know the CL when a cache operation is called, but for events this does not make sense and it'd be rather counter intuitive.
>
> The least we can do here is simply use the classloader associated with the cache/cachemanager depending on the granularity of the event.
>
> On Aug 30, 2011, at 2:20 PM, Pete Muir wrote:
>
>> Agreed, but what do others think, what problems are there?
>>
>> On 30 Aug 2011, at 13:01, Ales Justin wrote:
>>
>>> While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.
>>>
>>> ---
>>>
>>> Looking at the stack trace, and how listener is registered,
>>> I don't see how Ispan+CDI integration can change this behavior:
>>>
>>> Imo, it should be Ispan's job to properly change this.
>>> e.g. wrap each listener invocation with listener' classloader as tccl
>>>
>>> ---
>>>
>>> as imo it's not cdi integration's job
>>> as it cannot change this
>>> at least i don't see how
>>> and same issue can happen for any other framework
>>> where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
>>> this issue only popped up due to cluster formation
>>> as the other node's code is invoked via Ispan' distribution mechanism
>>> 1:48
>>> in standalone you would always get this invoked via app' execution chain
>>>
>>> ---
>>>
>>> 12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
>>> lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
>>> t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
>>>      at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
>>>      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
>>>      at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
>>> Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
>>> s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
>>>      at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
>>>      at org.jboss.weld.Container.instance(Container.java:58)
>>>      at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
>>>      at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
>>>      at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
>>>      at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
>>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
>>>      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
>>>      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
>>>      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
>>>      at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Stuart Douglas
That time works for me.


Stuart


On 31/08/2011, at 2:48 AM, Pete Muir wrote:

Adding Stuart.

Maybe worth having an IRC chat on this. Shall we say Thursday morning 10am UK time as that will hit all the relevant people?

On 30 Aug 2011, at 16:56, Galder Zamarreño wrote:

There's some listener events that are directly associated with cache invocations, so at first glance, it'd make sense to use whatever cache.with(CL) was passed by, defaulting on the cache's (or cache manager's, depending on the granularity of the listener event) class loader. However, this could only work on those events that are local where the invocation context has any CL that has been associated with the invocation. In remotely executed events, it'd be tricky to replicate the same thing. This is a very similar problem to lazy deserialization, but in this case, lazy listener events or something like that, where you only know the CL when a cache operation is called, but for events this does not make sense and it'd be rather counter intuitive.

The least we can do here is simply use the classloader associated with the cache/cachemanager depending on the granularity of the event.

On Aug 30, 2011, at 2:20 PM, Pete Muir wrote:

Agreed, but what do others think, what problems are there?

On 30 Aug 2011, at 13:01, Ales Justin wrote:

While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.

---

Looking at the stack trace, and how listener is registered,
I don't see how Ispan+CDI integration can change this behavior:

Imo, it should be Ispan's job to properly change this.
e.g. wrap each listener invocation with listener' classloader as tccl

---

as imo it's not cdi integration's job
as it cannot change this
at least i don't see how
and same issue can happen for any other framework
where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
this issue only popped up due to cluster formation
as the other node's code is invoked via Ispan' distribution mechanism
1:48
in standalone you would always get this invoked via app' execution chain

---

12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
    at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
    at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
    at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
    at org.jboss.weld.Container.instance(Container.java:58)
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
    at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
    at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
    at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev



_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Galder Zamarreno
Fine by me as well

On Aug 31, 2011, at 12:02 AM, Stuart Douglas wrote:

> That time works for me.
>
> http://www.timeanddate.com/worldclock/fixedtime.html?iso=20110901T10&p1=136
>
> Stuart
>
>
> On 31/08/2011, at 2:48 AM, Pete Muir wrote:
>
>> Adding Stuart.
>>
>> Maybe worth having an IRC chat on this. Shall we say Thursday morning 10am UK time as that will hit all the relevant people?
>>
>> On 30 Aug 2011, at 16:56, Galder Zamarreño wrote:
>>
>>> There's some listener events that are directly associated with cache invocations, so at first glance, it'd make sense to use whatever cache.with(CL) was passed by, defaulting on the cache's (or cache manager's, depending on the granularity of the listener event) class loader. However, this could only work on those events that are local where the invocation context has any CL that has been associated with the invocation. In remotely executed events, it'd be tricky to replicate the same thing. This is a very similar problem to lazy deserialization, but in this case, lazy listener events or something like that, where you only know the CL when a cache operation is called, but for events this does not make sense and it'd be rather counter intuitive.
>>>
>>> The least we can do here is simply use the classloader associated with the cache/cachemanager depending on the granularity of the event.
>>>
>>> On Aug 30, 2011, at 2:20 PM, Pete Muir wrote:
>>>
>>>> Agreed, but what do others think, what problems are there?
>>>>
>>>> On 30 Aug 2011, at 13:01, Ales Justin wrote:
>>>>
>>>>> While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.
>>>>>
>>>>> ---
>>>>>
>>>>> Looking at the stack trace, and how listener is registered,
>>>>> I don't see how Ispan+CDI integration can change this behavior:
>>>>>
>>>>> Imo, it should be Ispan's job to properly change this.
>>>>> e.g. wrap each listener invocation with listener' classloader as tccl
>>>>>
>>>>> ---
>>>>>
>>>>> as imo it's not cdi integration's job
>>>>> as it cannot change this
>>>>> at least i don't see how
>>>>> and same issue can happen for any other framework
>>>>> where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
>>>>> this issue only popped up due to cluster formation
>>>>> as the other node's code is invoked via Ispan' distribution mechanism
>>>>> 1:48
>>>>> in standalone you would always get this invoked via app' execution chain
>>>>>
>>>>> ---
>>>>>
>>>>> 12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
>>>>> lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
>>>>> t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
>>>>>     at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>     at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
>>>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
>>>>>     at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
>>>>> Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
>>>>> s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
>>>>>     at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
>>>>>     at org.jboss.weld.Container.instance(Container.java:58)
>>>>>     at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
>>>>>     at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
>>>>>     at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
>>>>>     at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
>>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
>>>>>     at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
>>>>>     at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>> _______________________________________________
>>>>> infinispan-dev mailing list
>>>>> [hidden email]
>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>
>>> --
>>> Galder Zamarreño
>>> Sr. Software Engineer
>>> Infinispan, JBoss Cache
>>>
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Manik Surtani
Who's driving this call?  Galder?  Pete?

On 31 Aug 2011, at 12:17, Galder Zamarreño wrote:

> Fine by me as well
>
> On Aug 31, 2011, at 12:02 AM, Stuart Douglas wrote:
>
>> That time works for me.
>>
>> http://www.timeanddate.com/worldclock/fixedtime.html?iso=20110901T10&p1=136
>>
>> Stuart
>>
>>
>> On 31/08/2011, at 2:48 AM, Pete Muir wrote:
>>
>>> Adding Stuart.
>>>
>>> Maybe worth having an IRC chat on this. Shall we say Thursday morning 10am UK time as that will hit all the relevant people?
>>>
>>> On 30 Aug 2011, at 16:56, Galder Zamarreño wrote:
>>>
>>>> There's some listener events that are directly associated with cache invocations, so at first glance, it'd make sense to use whatever cache.with(CL) was passed by, defaulting on the cache's (or cache manager's, depending on the granularity of the listener event) class loader. However, this could only work on those events that are local where the invocation context has any CL that has been associated with the invocation. In remotely executed events, it'd be tricky to replicate the same thing. This is a very similar problem to lazy deserialization, but in this case, lazy listener events or something like that, where you only know the CL when a cache operation is called, but for events this does not make sense and it'd be rather counter intuitive.
>>>>
>>>> The least we can do here is simply use the classloader associated with the cache/cachemanager depending on the granularity of the event.
>>>>
>>>> On Aug 30, 2011, at 2:20 PM, Pete Muir wrote:
>>>>
>>>>> Agreed, but what do others think, what problems are there?
>>>>>
>>>>> On 30 Aug 2011, at 13:01, Ales Justin wrote:
>>>>>
>>>>>> While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.
>>>>>>
>>>>>> ---
>>>>>>
>>>>>> Looking at the stack trace, and how listener is registered,
>>>>>> I don't see how Ispan+CDI integration can change this behavior:
>>>>>>
>>>>>> Imo, it should be Ispan's job to properly change this.
>>>>>> e.g. wrap each listener invocation with listener' classloader as tccl
>>>>>>
>>>>>> ---
>>>>>>
>>>>>> as imo it's not cdi integration's job
>>>>>> as it cannot change this
>>>>>> at least i don't see how
>>>>>> and same issue can happen for any other framework
>>>>>> where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
>>>>>> this issue only popped up due to cluster formation
>>>>>> as the other node's code is invoked via Ispan' distribution mechanism
>>>>>> 1:48
>>>>>> in standalone you would always get this invoked via app' execution chain
>>>>>>
>>>>>> ---
>>>>>>
>>>>>> 12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
>>>>>> lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
>>>>>> t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
>>>>>>    at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>    at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
>>>>>>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
>>>>>>    at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
>>>>>> Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
>>>>>> s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
>>>>>>    at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
>>>>>>    at org.jboss.weld.Container.instance(Container.java:58)
>>>>>>    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
>>>>>>    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
>>>>>>    at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
>>>>>>    at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
>>>>>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
>>>>>>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
>>>>>>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
>>>>>>    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
>>>>>>    at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>> _______________________________________________
>>>>>> infinispan-dev mailing list
>>>>>> [hidden email]
>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> infinispan-dev mailing list
>>>>> [hidden email]
>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>
>>>> --
>>>> Galder Zamarreño
>>>> Sr. Software Engineer
>>>> Infinispan, JBoss Cache
>>>>
>>>>
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Pete Muir
I will. But planning on IRC not a call.

On 31 Aug 2011, at 14:27, Manik Surtani wrote:

> Who's driving this call?  Galder?  Pete?
>
> On 31 Aug 2011, at 12:17, Galder Zamarreño wrote:
>
>> Fine by me as well
>>
>> On Aug 31, 2011, at 12:02 AM, Stuart Douglas wrote:
>>
>>> That time works for me.
>>>
>>> http://www.timeanddate.com/worldclock/fixedtime.html?iso=20110901T10&p1=136
>>>
>>> Stuart
>>>
>>>
>>> On 31/08/2011, at 2:48 AM, Pete Muir wrote:
>>>
>>>> Adding Stuart.
>>>>
>>>> Maybe worth having an IRC chat on this. Shall we say Thursday morning 10am UK time as that will hit all the relevant people?
>>>>
>>>> On 30 Aug 2011, at 16:56, Galder Zamarreño wrote:
>>>>
>>>>> There's some listener events that are directly associated with cache invocations, so at first glance, it'd make sense to use whatever cache.with(CL) was passed by, defaulting on the cache's (or cache manager's, depending on the granularity of the listener event) class loader. However, this could only work on those events that are local where the invocation context has any CL that has been associated with the invocation. In remotely executed events, it'd be tricky to replicate the same thing. This is a very similar problem to lazy deserialization, but in this case, lazy listener events or something like that, where you only know the CL when a cache operation is called, but for events this does not make sense and it'd be rather counter intuitive.
>>>>>
>>>>> The least we can do here is simply use the classloader associated with the cache/cachemanager depending on the granularity of the event.
>>>>>
>>>>> On Aug 30, 2011, at 2:20 PM, Pete Muir wrote:
>>>>>
>>>>>> Agreed, but what do others think, what problems are there?
>>>>>>
>>>>>> On 30 Aug 2011, at 13:01, Ales Justin wrote:
>>>>>>
>>>>>>> While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.
>>>>>>>
>>>>>>> ---
>>>>>>>
>>>>>>> Looking at the stack trace, and how listener is registered,
>>>>>>> I don't see how Ispan+CDI integration can change this behavior:
>>>>>>>
>>>>>>> Imo, it should be Ispan's job to properly change this.
>>>>>>> e.g. wrap each listener invocation with listener' classloader as tccl
>>>>>>>
>>>>>>> ---
>>>>>>>
>>>>>>> as imo it's not cdi integration's job
>>>>>>> as it cannot change this
>>>>>>> at least i don't see how
>>>>>>> and same issue can happen for any other framework
>>>>>>> where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
>>>>>>> this issue only popped up due to cluster formation
>>>>>>> as the other node's code is invoked via Ispan' distribution mechanism
>>>>>>> 1:48
>>>>>>> in standalone you would always get this invoked via app' execution chain
>>>>>>>
>>>>>>> ---
>>>>>>>
>>>>>>> 12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
>>>>>>> lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
>>>>>>> t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
>>>>>>>   at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>   at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
>>>>>>>   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
>>>>>>>   at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
>>>>>>> Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
>>>>>>> s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
>>>>>>>   at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
>>>>>>>   at org.jboss.weld.Container.instance(Container.java:58)
>>>>>>>   at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
>>>>>>>   at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
>>>>>>>   at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
>>>>>>>   at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
>>>>>>>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
>>>>>>>   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
>>>>>>>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
>>>>>>>   at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
>>>>>>>   at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>> _______________________________________________
>>>>>>> infinispan-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> infinispan-dev mailing list
>>>>>> [hidden email]
>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>
>>>>> --
>>>>> Galder Zamarreño
>>>>> Sr. Software Engineer
>>>>> Infinispan, JBoss Cache
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> infinispan-dev mailing list
>>>>> [hidden email]
>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Manik Surtani
Cool, thanks for running with it.  I may not be able to make it but I'm sure I'll see a summary on this thread.  :-)

On 31 Aug 2011, at 14:47, Pete Muir wrote:

> I will. But planning on IRC not a call.
>
> On 31 Aug 2011, at 14:27, Manik Surtani wrote:
>
>> Who's driving this call?  Galder?  Pete?
>>
>> On 31 Aug 2011, at 12:17, Galder Zamarreño wrote:
>>
>>> Fine by me as well
>>>
>>> On Aug 31, 2011, at 12:02 AM, Stuart Douglas wrote:
>>>
>>>> That time works for me.
>>>>
>>>> http://www.timeanddate.com/worldclock/fixedtime.html?iso=20110901T10&p1=136
>>>>
>>>> Stuart
>>>>
>>>>
>>>> On 31/08/2011, at 2:48 AM, Pete Muir wrote:
>>>>
>>>>> Adding Stuart.
>>>>>
>>>>> Maybe worth having an IRC chat on this. Shall we say Thursday morning 10am UK time as that will hit all the relevant people?
>>>>>
>>>>> On 30 Aug 2011, at 16:56, Galder Zamarreño wrote:
>>>>>
>>>>>> There's some listener events that are directly associated with cache invocations, so at first glance, it'd make sense to use whatever cache.with(CL) was passed by, defaulting on the cache's (or cache manager's, depending on the granularity of the listener event) class loader. However, this could only work on those events that are local where the invocation context has any CL that has been associated with the invocation. In remotely executed events, it'd be tricky to replicate the same thing. This is a very similar problem to lazy deserialization, but in this case, lazy listener events or something like that, where you only know the CL when a cache operation is called, but for events this does not make sense and it'd be rather counter intuitive.
>>>>>>
>>>>>> The least we can do here is simply use the classloader associated with the cache/cachemanager depending on the granularity of the event.
>>>>>>
>>>>>> On Aug 30, 2011, at 2:20 PM, Pete Muir wrote:
>>>>>>
>>>>>>> Agreed, but what do others think, what problems are there?
>>>>>>>
>>>>>>> On 30 Aug 2011, at 13:01, Ales Justin wrote:
>>>>>>>
>>>>>>>> While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.
>>>>>>>>
>>>>>>>> ---
>>>>>>>>
>>>>>>>> Looking at the stack trace, and how listener is registered,
>>>>>>>> I don't see how Ispan+CDI integration can change this behavior:
>>>>>>>>
>>>>>>>> Imo, it should be Ispan's job to properly change this.
>>>>>>>> e.g. wrap each listener invocation with listener' classloader as tccl
>>>>>>>>
>>>>>>>> ---
>>>>>>>>
>>>>>>>> as imo it's not cdi integration's job
>>>>>>>> as it cannot change this
>>>>>>>> at least i don't see how
>>>>>>>> and same issue can happen for any other framework
>>>>>>>> where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
>>>>>>>> this issue only popped up due to cluster formation
>>>>>>>> as the other node's code is invoked via Ispan' distribution mechanism
>>>>>>>> 1:48
>>>>>>>> in standalone you would always get this invoked via app' execution chain
>>>>>>>>
>>>>>>>> ---
>>>>>>>>
>>>>>>>> 12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
>>>>>>>> lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
>>>>>>>> t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
>>>>>>>>  at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>  at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
>>>>>>>>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
>>>>>>>>  at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
>>>>>>>> Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
>>>>>>>> s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
>>>>>>>>  at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
>>>>>>>>  at org.jboss.weld.Container.instance(Container.java:58)
>>>>>>>>  at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
>>>>>>>>  at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
>>>>>>>>  at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
>>>>>>>>  at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
>>>>>>>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
>>>>>>>>  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
>>>>>>>>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
>>>>>>>>  at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
>>>>>>>>  at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>> _______________________________________________
>>>>>>>> infinispan-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> infinispan-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>>
>>>>>> --
>>>>>> Galder Zamarreño
>>>>>> Sr. Software Engineer
>>>>>> Infinispan, JBoss Cache
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> infinispan-dev mailing list
>>>>>> [hidden email]
>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>
>>>>
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>
>>> --
>>> Galder Zamarreño
>>> Sr. Software Engineer
>>> Infinispan, JBoss Cache
>>>
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>> --
>> Manik Surtani
>> [hidden email]
>> twitter.com/maniksurtani
>>
>> Lead, Infinispan
>> http://www.infinispan.org
>>
>>
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] tccl usage in listeners

Pete Muir
We concluded that we can fix this either in Weld or Infinispan, but both would benefit from the improvements needed. I've cc'd Mathieu as he is doing a lot of work in Weld in this area right now. Mathieu, please see the JIRAs :-)

Here are the JIRAs:

* https://issues.jboss.org/browse/ISPN-1367
* https://issues.jboss.org/browse/WELD-962
* https://issues.jboss.org/browse/WELD-963



On 31 Aug 2011, at 15:11, Manik Surtani wrote:

> Cool, thanks for running with it.  I may not be able to make it but I'm sure I'll see a summary on this thread.  :-)
>
> On 31 Aug 2011, at 14:47, Pete Muir wrote:
>
>> I will. But planning on IRC not a call.
>>
>> On 31 Aug 2011, at 14:27, Manik Surtani wrote:
>>
>>> Who's driving this call?  Galder?  Pete?
>>>
>>> On 31 Aug 2011, at 12:17, Galder Zamarreño wrote:
>>>
>>>> Fine by me as well
>>>>
>>>> On Aug 31, 2011, at 12:02 AM, Stuart Douglas wrote:
>>>>
>>>>> That time works for me.
>>>>>
>>>>> http://www.timeanddate.com/worldclock/fixedtime.html?iso=20110901T10&p1=136
>>>>>
>>>>> Stuart
>>>>>
>>>>>
>>>>> On 31/08/2011, at 2:48 AM, Pete Muir wrote:
>>>>>
>>>>>> Adding Stuart.
>>>>>>
>>>>>> Maybe worth having an IRC chat on this. Shall we say Thursday morning 10am UK time as that will hit all the relevant people?
>>>>>>
>>>>>> On 30 Aug 2011, at 16:56, Galder Zamarreño wrote:
>>>>>>
>>>>>>> There's some listener events that are directly associated with cache invocations, so at first glance, it'd make sense to use whatever cache.with(CL) was passed by, defaulting on the cache's (or cache manager's, depending on the granularity of the listener event) class loader. However, this could only work on those events that are local where the invocation context has any CL that has been associated with the invocation. In remotely executed events, it'd be tricky to replicate the same thing. This is a very similar problem to lazy deserialization, but in this case, lazy listener events or something like that, where you only know the CL when a cache operation is called, but for events this does not make sense and it'd be rather counter intuitive.
>>>>>>>
>>>>>>> The least we can do here is simply use the classloader associated with the cache/cachemanager depending on the granularity of the event.
>>>>>>>
>>>>>>> On Aug 30, 2011, at 2:20 PM, Pete Muir wrote:
>>>>>>>
>>>>>>>> Agreed, but what do others think, what problems are there?
>>>>>>>>
>>>>>>>> On 30 Aug 2011, at 13:01, Ales Justin wrote:
>>>>>>>>
>>>>>>>>> While working on OpenShift Flex Infinispan demo, we came across a TCCL setup issue.
>>>>>>>>>
>>>>>>>>> ---
>>>>>>>>>
>>>>>>>>> Looking at the stack trace, and how listener is registered,
>>>>>>>>> I don't see how Ispan+CDI integration can change this behavior:
>>>>>>>>>
>>>>>>>>> Imo, it should be Ispan's job to properly change this.
>>>>>>>>> e.g. wrap each listener invocation with listener' classloader as tccl
>>>>>>>>>
>>>>>>>>> ---
>>>>>>>>>
>>>>>>>>> as imo it's not cdi integration's job
>>>>>>>>> as it cannot change this
>>>>>>>>> at least i don't see how
>>>>>>>>> and same issue can happen for any other framework
>>>>>>>>> where listener gets invoked, and that framework used later in the execution chain, depends on the right tccl
>>>>>>>>> this issue only popped up due to cluster formation
>>>>>>>>> as the other node's code is invoked via Ispan' distribution mechanism
>>>>>>>>> 1:48
>>>>>>>>> in standalone you would always get this invoked via app' execution chain
>>>>>>>>>
>>>>>>>>> ---
>>>>>>>>>
>>>>>>>>> 12:01:24,243 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (Incoming-9,demo,matej-ntb-32416) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [java.
>>>>>>>>> lang.IllegalStateException] while invoking method [public void org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEven
>>>>>>>>> t)] on listener instance: org.infinispan.quickstart.jbossas7.LoggingListener@301f417
>>>>>>>>> at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:204) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:217) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:151) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:174) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:109) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:293) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.MarshalledValueInterceptor.visitPutKeyValueCommand(MarshalledValueInterceptor.java:140) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:162) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:129) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:114) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:104) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.IsMarshallableInterceptor.visitPutKeyValueCommand(IsMarshallableInterceptor.java:94) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:61) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:60) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:274) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:71) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:62) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.remoting.InboundInvocationHandlerImpl.handleInternal(InboundInvocationHandlerImpl.java:181) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithWaitForBlocks(InboundInvocationHandlerImpl.java:195) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.remoting.InboundInvocationHandlerImpl.handleWithRetry(InboundInvocationHandlerImpl.java:309) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:167) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:165) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:144) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.JChannel.up(JChannel.java:1484) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1074) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:477) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:263) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.FRAG2.up(FRAG2.java:189) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.pbcast.GMS.up(GMS.java:908) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:170) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:246) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.UNICAST.up(UNICAST.java:309) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:838) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:667) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.BARRIER.up(BARRIER.java:123) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:133) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.FD.up(FD.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:275) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.MERGE2.up(MERGE2.java:209) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.Discovery.up(Discovery.java:293) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.PING.up(PING.java:69) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.TP.passMessageUp(TP.java:1109) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1665) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1647) [jgroups-2.12.1.3.Final.jar:2.12.1.3.Final]
>>>>>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_23]
>>>>>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_23]
>>>>>>>>> at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
>>>>>>>>> Caused by: java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "org.jboss.as.clustering.infinispan:main" from local module loader @624b035d (roots: D:\java\runtime
>>>>>>>>> s\jboss-as-7.1.0.Alpha1-SNAPSHOT-B\modules)
>>>>>>>>> at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71)
>>>>>>>>> at org.jboss.weld.Container.instance(Container.java:58)
>>>>>>>>> at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:72)
>>>>>>>>> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
>>>>>>>>> at org.infinispan.quickstart.jbossas7.CacheEventsManager$Proxy$_$$_WeldClientProxy.addEvent(CacheEventsManager$Proxy$_$$_WeldClientProxy.java)
>>>>>>>>> at org.infinispan.quickstart.jbossas7.LoggingListener.observeAdd(LoggingListener.java:30)
>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
>>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
>>>>>>>>> at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:200) [infinispan-core-5.0.0.FINAL.jar:5.0.0.FINAL]
>>>>>>>>> _______________________________________________
>>>>>>>>> infinispan-dev mailing list
>>>>>>>>> [hidden email]
>>>>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> infinispan-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>>>
>>>>>>> --
>>>>>>> Galder Zamarreño
>>>>>>> Sr. Software Engineer
>>>>>>> Infinispan, JBoss Cache
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> infinispan-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> infinispan-dev mailing list
>>>>> [hidden email]
>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>
>>>> --
>>>> Galder Zamarreño
>>>> Sr. Software Engineer
>>>> Infinispan, JBoss Cache
>>>>
>>>>
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>
>>> --
>>> Manik Surtani
>>> [hidden email]
>>> twitter.com/maniksurtani
>>>
>>> Lead, Infinispan
>>> http://www.infinispan.org
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev