[jbosscache-dev] Re: JGroups Shared Transport support in JBC

Brian Stansberry brian.stansberry at redhat.com
Mon Mar 3 13:13:29 EST 2008


Bela Ban wrote:
> 
> 
> Brian Stansberry wrote:
>> In JGroups 2.6.2, the JGroups team is introducing the shared transport 
>> as a (superior) alternative to the multiplexer.  Want to touch off a 
>> discussion of how to take advantage of that in JBC.
>>
>> Currently in JBC, user can inject a ChannelFactory into their cache 
>> configuration, and configure a MultiplexerStack (string).  If both are 
>> set, JBC calls ChannelFactory.createMultiplexerChannel(), which 
>> returns a MuxChannel.
>>
>> So, how can JBC get a regular JChannel w/ a shared transport instead 
>> of a MuxChannel?  Couple solutions come to mind:
>>
>> 1) Add a configuration property ChannelStack to the JBC config.  If 
>> present, JBC calls JChannelFactory.createChannel(String) instead of 
>> ChannelFactory.createMultiplexerChannel().  Basically, the user 
>> indicates what they want by how they configure.  This IMHO is the 
>> cleanest and simplest.
>>
>> Problem is the createChannel(String) method is not exposed in the 
>> ChannelFactory interface; it's only in the JChannelFactory 
>> implementation.  JBC needs to use the interface.  Bela, can this 
>> method be added to the interface in 2.6.2?
> 
> I changed this in the 2.6 branch, however, as 2.6.2 was released 
> yesterday I cannot add it to 2.6.2...
> 

Being able to handle this in JBC 2.1.0 is a bit more of an issue due to 
a bug in the way JBM handles a Channel.connect() call 
(http://jira.jboss.com/jira/browse/JBMESSAGING-1244).  The bug basically 
means JBM will fail if it calls 
ChannelFactory.createMultiplexerChannel() and the call doesn't return a 
MuxChannel.  So, my intended approach for AS 5 (override 
createMultiplexerChannel()and return a regular JChannel if it's 
configured for shared transport) breaks JBM.

Maybe they'll get JBMESSAGING-1244 fixed in time for AS 5; maybe not. 
If we can get a JGroups 2.6.3 and JBC 2.1.0.GA able to call 
ChannelFactory.createChannel(), then I can just let JBM get a MuxChannel.

-- 
Brian Stansberry
Lead, AS Clustering
JBoss, a division of Red Hat
brian.stansberry at redhat.com



More information about the jbosscache-dev mailing list