]
Stuart Douglas moved WFCORE-2113 to WFLY-7790:
----------------------------------------------
Project: WildFly (was: WildFly Core)
Key: WFLY-7790 (was: WFCORE-2113)
Component/s: EJB
(was: Server)
Affects Version/s: (was: 3.0.0.Alpha13)
ResourceAdapter#endpointActivation called twice because of
SuspendController activation
---------------------------------------------------------------------------------------
Key: WFLY-7790
URL:
https://issues.jboss.org/browse/WFLY-7790
Project: WildFly
Issue Type: Bug
Components: EJB
Reporter: Ondra Chaloupka
Assignee: Stuart Douglas
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@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/...
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/4d6ac5777414088c9f39605e9...