I have a question regarding this:
Should we aways use JGroups Multiplexor by default, or only when running under JBoss5?
I'm creating a new interface to perform JChannel creations called ChannelFactory. This interface is only used at DefaultClusteredPostOffice and its service.
Since I don't want to put everything on the same package as DefaultClusteredPostOffice, I have created a new package under postoffice.cluster, called jgroups which can be easily renamed/moved later if that's not the proper place.
I haven't committed my changes yet by the time of this post, but I will as soon as I have finished running testcases.
We will deploy JChannelFactory as part of jboss-messaging.sar for deployment under jboss-4, and we will use the default ChannelFactory under JBoss5.
I will add /META-INF/multiplexer-stacks.xml under jboss-messaging.sar, to use the exact same location jgroups.sar (forgot the exact name of the package under jboss-5). Under the source tree this will be located under /src/etc/META-INF (this was a perfect location for the testsuite also)
Also.. as there is an issue with JGroups and IPV6 (as documented on their WIKI page), I will add -Djava.net.preferIPv4Stack=true on ServerManagement.spawn and every start-rmi-clustering-service, as the new stacks introduced by ChannelFactory and multiplexer-stacks.xml are using IPV6.
Brian... what about this?
- We lookup for the JChannelFactory MBean...
- If not found, we create channels as we always used to do.
In our configurations we would aways have the MBean name by default, and the JGroups stack to be used case the MBean was not found.
This way, if jboss-messaging is deployed on 4.0, we would use the regular Channel, if on 4.2 or 5 we would use the multiplexor.
JBoss Cache actually basically does it that way. The downside to it is that it masks errors (if the JChannelFactory really should be found). For that reason I'm tempted to change the JBC behavior so it fails if it can't find a configured JChannelFactory. But it sounds like the JBM case is different from JBC in that you have a standard config file that you want to work in multiple environments. JBC doesn't have such a requirement. So, for JBM what you propose sounds reasonable.
I think we can always assume the MBean is there, therefore no need to create the channels ourself.
Clebert, I haven't changed a single word with Tim on the subject :)
This is re: our previous discussion ... :)