]
Tim Fox updated JBMESSAGING-1120:
---------------------------------
Fix Version/s: 1.4.0.SP1
Data channel from MultiplexerChannelFactory prevents state transfers
from other users of the shared channel
-----------------------------------------------------------------------------------------------------------
Key: JBMESSAGING-1120
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-1120
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core Distributed Support
Affects Versions: 1.4.0.GA
Reporter: Brian Stansberry
Assigned To: Tim Fox
Fix For: 1.4.0.SP1
JBM's usage of the JGroups JChannelFactory is causing the startup of the AS to hang.
Problem is JBM's MultiplexerChannelFactory creates the data channel as follows:
public Channel createDataChannel() throws Exception
{
return (Channel) server.invoke(this.channelFactory, MUX_OPERATION,
new Object[]{dataStack, uniqueID + "-DATA", Boolean.TRUE, uniqueID},
MUX_SIGNATURE);
}
The Boolean.TRUE argument tells the JGroups multiplexer that a getState() call will be
invoked for this service. JBM never calls getState(), so it *must not* pass Boolean.TRUE.
Valid usages are:
public Channel createDataChannel() throws Exception
{
String[] simpleMuxSignature = new String[] {"java.lang.String",
"java.lang.String"};
return (Channel) server.invoke(this.channelFactory, MUX_OPERATION,
new Object[]{dataStack, uniqueID + "-DATA"}, simpleMuxSignature);
}
or
public Channel createDataChannel() throws Exception
{
return (Channel) server.invoke(this.channelFactory, MUX_OPERATION,
new Object[]{dataStack, uniqueID + "-DATA", Boolean.FALSE, null},
MUX_SIGNATURE);
}
The former invokes a convenience method that delegates to the latter.
Passing true for the "register_for_state_transfer" param tells JGroups that you
will call getState(). If several services create MuxChannels based on the same underlying
JChannel, JGroups will try to group together their state transfer calls. If several
callers have created mux channels, it will block any initial getState() call until all of
the callers call getState(), executing the state transfer when all the getState calls have
been invoked. (Each service gets only its own state; the above just describes how JGroups
attempts to coordinate things internally.)
When JBM creates a mux channel with register_for_state_transfer=true and then never calls
getState(), any other service that later creates a mux channel on the same underlying
channel will not be able to properly execute a state transfer when it calls getState().
I'll open a JGroups JIRA to get proper javadoc for this interface. It's obviously
pretty complex.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: