Skip to content

Commit

Permalink
[WFLY-5403] Handle ejb remote invocations using ejb-client's RemoteSe…
Browse files Browse the repository at this point in the history
…rver
  • Loading branch information
tadamski committed Dec 13, 2016
1 parent 74f266e commit 0cf23c6
Show file tree
Hide file tree
Showing 5 changed files with 392 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java
Expand Up @@ -865,8 +865,8 @@ public interface EjbLogger extends BasicLogger {
void couldNotWriteMethodInvocation(@Cause Throwable cause, Method invokedMethod, String beanName, String appName, String moduleName, String distinctName);

@LogMessage(level = ERROR)
@Message(id = 151, value = "Exception while generating session id for component %s with invocation id: %s on channel %s")
void exceptionGeneratingSessionId(@Cause Throwable cause, String componentName, short invocationId, Channel channel);
@Message(id = 151, value = "Exception while generating session id for component %s with invocation id: %s")
void exceptionGeneratingSessionId(@Cause Throwable cause, String componentName, int invocationId);

@LogMessage(level = ERROR)
@Message(id = 152, value = "Could not write out message to channel due to")
Expand Down
Expand Up @@ -41,6 +41,7 @@
import org.jboss.as.network.ClientMapping;
import org.jboss.as.remoting.RemotingConnectorBindingInfoService;
import org.jboss.as.server.suspend.SuspendController;
import org.jboss.ejb.protocol.remote.RemoteServer;
import org.jboss.marshalling.MarshallerFactory;
import org.jboss.marshalling.Marshalling;
import org.jboss.msc.inject.Injector;
Expand All @@ -62,7 +63,6 @@
import org.xnio.OptionMap;

/**
* TODO Elytron - transaction client integration
* @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a>
*/
public class EJBRemoteConnectorService implements Service<EJBRemoteConnectorService> {
Expand Down Expand Up @@ -102,7 +102,8 @@ public EJBRemoteConnectorService(final byte serverProtocolVersion, final String[
public void start(StartContext context) throws StartException {

// Register an EJB channel open listener
final OpenListener channelOpenListener = new ChannelOpenListener();
OpenListener channelOpenListener = RemoteServer.createOpenListener((server) ->
new EJBRemoteServerAssociation(deploymentRepositoryInjectedValue.getValue(),remoteAsyncInvocationCancelStatus.getOptionalValue(),executorService.getOptionalValue()));
try {
registration = endpointValue.getValue().registerService(EJB_CHANNEL_NAME, channelOpenListener, this.channelCreationOptions);
} catch (ServiceRegistrationException e) {
Expand Down

0 comments on commit 0cf23c6

Please sign in to comment.