]
Ron Sigal commented on JBREM-1285:
----------------------------------
Client.addListener() now checks for LocalClientInvoker before deriving the transport from
the server's InvokerLocator. Changes applied to branches 2.2 and 2.x.
Tests: New unit test
org.jboss.test.remoting.transport.local.LocalCallbackConnectorTestCase. Waiting for
results in hudson.
Callback Connector for in-jvm connection should create a
LocalServerInvoker
---------------------------------------------------------------------------
Key: JBREM-1285
URL:
https://issues.jboss.org/browse/JBREM-1285
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 2.5.4.SP1, 2.2.4
Reporter: Ron Sigal
Assignee: Ron Sigal
Fix For: 2.5.4.SP2, 2.2.4.SP1
When the org.jboss.remoting.Client method
public void addListener(InvokerCallbackHandler callbackhandler, Map metadata) throws
Throwable;
or one of its variants is called, it checks if the ClientInvoker is an instance of
BidirectionalClientInvoker as part of its determination of whether to set up push or pull
callbacks. If the server is in the same jvm, and the parameter "force_remote"
is not set to true, then the ClientInvoker will be an instance of LocalClientInvoker,
which implements BidirectionalClientInvoker, so that push callbacks will be configured.
That means that a callback Connector will be created, whose transport, if not configured
in the metadata map, will be derived from the server's InvokerLocator. If, for
instance, the transport in the InvokerLocator is "http", the callback Connector
will create an instance of CoyoteInvoker. But CoyoteInvoker will create a ServerSocket,
which is completely useless since callback invocations will be made by reference.
Client.addListener() should check that its ClientInvoker is a LocalClientInvoker, in
which case it should use the "local" transport, before deriving the transport
from the servers InvokerLocator.
Shout out to Justin Bertram for tracking down this problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: