[jboss-jira] [JBoss JIRA] (WFCORE-2113) ResourceAdapter#endpointActivation called twice because of SuspendController activation
Ondra Chaloupka (JIRA)
issues at jboss.org
Tue Dec 13 07:47:00 EST 2016
Ondra Chaloupka created WFCORE-2113:
---------------------------------------
Summary: ResourceAdapter#endpointActivation called twice because of SuspendController activation
Key: WFCORE-2113
URL: https://issues.jboss.org/browse/WFCORE-2113
Project: WildFly Core
Issue Type: Bug
Components: Server
Reporter: Ondra Chaloupka
Assignee: Jason Greene
I do experience that call of my implementation {{ResourceAdapter#endpointActivation}} is called twice. Which is difference against behavior before (<=7.1.0.DR8) and I think that that method should be called just once. My RAR implementation uses the method {{endpointActivation}} for opening a socket and second call then causes a {{ResourceException}} being thrown and ERROR log message appears in server log
{code}
ERROR [org.jboss.as.server] (ServerService Thread Pool -- 66) WFLYSRV0215: Failed to resume activity org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent$1 at 43ab957d. To resume normal operation it is recommended that you restart the server.
{code}
By my investigation it's caused by the fact that {{SuspendController}} launches {{resume}} method of {{ServerActivity serverActivity}} at {{org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent}}.
I think it's caused because method {{SuspendController#setStartSuspended}} sets state to {{SUSPENDED}} regardless of boolean parameter value.
https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/suspend/SuspendController.java#L68
I tried to do a small fix (I'm not sure if it's correct one) and that way the endpoint activation is launched just once as I expect.
https://github.com/ochaloup/wildfly-core/commit/4d6ac5777414088c9f39605e9b049c10527e5f77
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list