[jboss-dev-forums] [Design of JBossCache] - Channel creation - mux vs. old style
bstansberry@jboss.com
do-not-reply at jboss.com
Tue Jan 9 17:01:25 EST 2007
I think we are trying too hard not to fail in startService() if there is an issue with the mux configuration.
We do this:
1) If a JChannelFactory has been injected into the config, use it and propagate any exception.
2) If no JChannelFactory is injected, but there is a mux service ObjectName in the config, try to find a mux service in JMX and use it to create the channel.
3) If there is an error in #2, but there is an old-style channel config, use that to create the channel
4) If there is no old-style config, use the default properties to create the channel.
Three points:
1) #4 above is bogus. If they configured for mux and didn't specify an old-style config, failure to find the mux service should lead to an exception, not to a fallback on some default. The default properties should only be used if nothing else is configured. I'm going to change that.
2) Trying to find the channel in JMX is suspect, at least in JBoss AS where it can be dependency injected (even in 4.x). Manik put a comment in CacheImpl about that.
3) If we decide to keep the JMX lookup, if it fails, should we log a warn and fall back to the old style config, as in step 3 above, or rather throw an exception? (This is an irrelevant issue if we get rid of the JMX lookup).
(NOTE: please don't get rid of the JMX lookup yet, as I still need it in the AS integration. Want to get rid of the need for it, but haven't yet.)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999644#3999644
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999644
More information about the jboss-dev-forums
mailing list