On Thu, 2012-02-09 at 15:52 +0000, Sanne Grinovero wrote:
On 9 February 2012 15:37, Bela Ban <bban(a)redhat.com> wrote:
>
>
> On 2/9/12 3:24 PM, Sanne Grinovero wrote:
>> On 9 February 2012 14:09, Bela Ban<bban(a)redhat.com> wrote:
>>>
>>>
>>> On 2/9/12 3:01 PM, Dan Berindei wrote:
>>>> On Thu, Feb 9, 2012 at 2:45 PM, Manik Surtani<manik(a)jboss.org> Â
wrote:
>>>>>
>>>>> On 9 Feb 2012, at 09:53, Dan Berindei wrote:
>>>>>
>>>>> The JGroups channel you get from JGroupsTransport.getChannel() can
be
>>>>> used only by Infinispan.
>>>>>
>>>>>
>>>>> Why? Â If we changed our CommandAwareRpcDispatcher to ignore
messages that
>>>>> contain a certain header (say, INFINISPAN_IGNORE), then that channel
can be
>>>>> reused as long as the header is used on all messages.
>>>>>
>>>>
>>>> But how would you install the handler on the receiving end? You'd
>>>> still need a mechanism to register the Hibernate handler with our
>>>> CommandAwareRpcDispatcher...
>>>>
>>>> I think it's simpler the other way around: create the channel
outside
>>>> Infinispan, register your own receiver, and only pass to Infinispan
>>>> the messages that don't contain a certain header - kind of what the
>>>> muxing channel in AS7 does.
>>>
>>> Yes, this is already done in the MuxUpHandler written by Paul. If we can
>>> grab the JChannel, we can always insert ourselves into the Muxer, and
>>> thus invoke RPCs
>>
>> Is there an example of how I could use that (for a different problem) ?
>> Or pointers to the source code or tests would be appreciated as well.
>
>
> There are 2 tests in JGroups: MuxRpcDispatcherTest and
> MuxMessageDispatcherTest, both written by PaulF.
Thanks! But is this the same implementation used by AS7 ? I had
understood that there where two, and I would like to know specifically
how to use the (already muxed) channel provided by the application
server if I look it up from JNDI, so to have a way for applications to
reuse the already started JGroups instance.
No - there's only 1. AS7 just adds an JChannel extension that uses a
MuxUpHandler by default, and overrides the setUpHandler(...) method to
set ths MuxUpHandler's default handler rather than overriding the up
handler altogether (this is needed so that Infinispan's rpc dispatcher
doesn't mess with our existing up handler). AS6 used to have some
customization to handle muxing of state transfer - but that doesn't
exist in AS7.
Sanne
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev