<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    RejectedExecutionException on distributed cache environment
</h3>
<span style="margin-bottom: 10px;">
    reply from <a href="http://community.jboss.org/people/girishadat">Girish Adat</a> in <i>JBoss Cache</i> - <a href="http://community.jboss.org/message/544018#544018">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I am also getting similar exceptions as follows.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1) Following exception occured during the run without calling any API of cache in current node. This happened 21 times.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>ERROR [org.jboss.cache.cluster.ReplicationQueue] failed replicating 3 elements in replication queue</p><p>java.util.concurrent.RejectedExecutionException</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1477)</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:384)</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:856)</p><p>&#160;&#160;&#160; at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:45)</p><p>&#160;&#160;&#160; at org.jboss.cache.marshall.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:210)</p><p>&#160;&#160;&#160; at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:744)</p><p>&#160;&#160;&#160; at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:712)</p><p>&#160;&#160;&#160; at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:717)</p><p>&#160;&#160;&#160; at org.jboss.cache.cluster.ReplicationQueue.flush(ReplicationQueue.java:170)</p><p>&#160;&#160;&#160; at org.jboss.cache.cluster.ReplicationQueue$2.run(ReplicationQueue.java:114)</p><p>&#160;&#160;&#160; at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)</p><p>&#160;&#160;&#160; at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)</p><p>&#160;&#160;&#160; at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)</p><p>&#160;&#160;&#160; at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)</p><p>&#160;&#160;&#160; at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)</p><p>&#160;&#160;&#160; at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)</p><p>&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:595)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2) Following happened when I tried to call the removeNode operation of core cache. This happened for ~10K times on a run with approximately 6 million removeNode() operations. But I think each time the executor skipped the entire replication queue containing large number of elements. We are using removeNode() core cache API to prevent the internalFqns to stay in cache, after the pojocache.detach() operation.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>ERROR [org.jboss.cache.cluster.ReplicationQueue] failed replicating 500 elements in replication queue</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>java.util.concurrent.RejectedExecutionException</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1477)</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:384)</p><p>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:856)</p><p>&#160;&#160;&#160; at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:45)</p><p>&#160;&#160;&#160; at org.jboss.cache.marshall.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:210)</p><p>&#160;&#160;&#160; at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:744)</p><p>&#160;&#160;&#160; at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:712)</p><p>&#160;&#160;&#160; at org.jboss.cache.RPCManagerImpl.callRemoteMethods(RPCManagerImpl.java:717)</p><p>&#160;&#160;&#160; at org.jboss.cache.cluster.ReplicationQueue.flush(ReplicationQueue.java:170)</p><p>&#160;&#160;&#160; at org.jboss.cache.cluster.ReplicationQueue.add(ReplicationQueue.java:145)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:145)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:135)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:107)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.ReplicationInterceptor.handleCrudMethod(ReplicationInterceptor.java:160)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.ReplicationInterceptor.visitRemoveNodeCommand(ReplicationInterceptor.java:125)</p><p>&#160;&#160;&#160; at org.jboss.cache.commands.write.RemoveNodeCommand.acceptVisitor(RemoveNodeCommand.java:125)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)</p><p>&#160;&#160;&#160; at org.jboss.cache.commands.AbstractVisitor.visitRemoveNodeCommand(AbstractVisitor.java:75)</p><p>&#160;&#160;&#160; at org.jboss.cache.commands.write.RemoveNodeCommand.acceptVisitor(RemoveNodeCommand.java:125)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:301)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:283)</p><p>&#160;&#160;&#160; at org.jboss.cache.commands.AbstractVisitor.visitRemoveNodeCommand(AbstractVisitor.java:75)</p><p>&#160;&#160;&#160; at org.jboss.cache.commands.write.RemoveNodeCommand.acceptVisitor(RemoveNodeCommand.java:125)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)</p><p>&#160;&#160;&#160; at org.jboss.cache.commands.AbstractVisitor.visitRemoveNodeCommand(AbstractVisitor.java:75)</p><p>&#160;&#160;&#160; at org.jboss.cache.commands.write.RemoveNodeCommand.acceptVisitor(RemoveNodeCommand.java:125)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.InvocationContextInterceptor.visitRemoveNodeCommand(InvocationContextInterceptor.java:88)</p><p>&#160;&#160;&#160; at org.jboss.cache.commands.write.RemoveNodeCommand.acceptVisitor(RemoveNodeCommand.java:125)</p><p>&#160;&#160;&#160; at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:287)</p><p>&#160;&#160;&#160; at org.jboss.cache.invocation.CacheInvocationDelegate.removeNode(CacheInvocationDelegate.java:478)</p><p>&#160;&#160;&#160; at org.jboss.cache.invocation.CacheInvocationDelegate.removeNode(CacheInvocationDelegate.java:485)</p><p>&#160;&#160;&#160; at [removed custom code from stack trace]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am using CoreCache 3.2.4 GA, with JGroups 2.7.0 GA. POJO Cache version is 3.0.3 GA. I am also using 4.6.0 GA of JBossTS as transaction manager for distributed transactions.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/544018#544018">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Cache at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>