Bill,
Fair comment, especially around requiring to use the channel for your
own purposes.
In terms of approach though, I'd rather this channel be injected via
the RuntimeConfig rather than being passed in through the factory as
this is where other services (e.g., TransactionManagers) get injected
by IOC frameworks.
So what you'd do is something like:
cache = DefaultCacheFactory.createCache(config, false);
cache.getConfiguration().getRuntimeConfiguration().setChannel
(myChannel);
cache.start();
Does this make sense?
Cheers,
Manik
On 20 Apr 2007, at 17:31, Bill Middleton wrote:
Hi Manik, thanks for taking the time to look at this. To answer
your question, the simple reason for allowing this change is to
make the cache independent of an mbean server. I would argue that
there are plenty of older j2se apps out there that could make use
of the cache, but are perhaps not ready to make the jump to a full AS.
But there are other reasons.
Consider, for example, the case where a given application can
deploy on and obtain firewall permissions for only one tcp port.
If that application needs to provide jgroups functionality of both
the sync and async type, then there's little choice but to
multiplex a single jchannel. Since I want to use JbossCache, I
have little choice but to grab the cache's Rpcdispatcher and send
my own messages, since I cant get a jchannel out of jbosscache either.
I guess that's both ends of the argument. Either solution would
work, either allow us non-AS folks to inject our own channel to the
cache, or provide us a means to fetch one out. My patch, which is
working ok for me here, does the former. The single additional
method on the factory requires a complete configuration, which will
hopefully discourage all but the most stubborn from trying to use it.
But I think you'll win some new cache customers if you provide it.
Regards,
Bill Middleton
On 4/20/07, Manik Surtani <manik(a)jboss.org> wrote:Sorry for being
so late jumping in on this.
Bill, I see you've had most of your questions answered already, but I
still don't quite get the need for injecting your own JGroups
Channel, perhaps you could help clarify this for me?
Cheers,
Manik
On 12 Apr 2007, at 20:51, Bill Middleton wrote:
> I've opened a jira feature request for this now.
>
>
http://jira.jboss.com/jira/browse/JBCACHE-1023 <<< Good number
>
> Thanks again!
>
> Bill
>
> On 4/12/07, Brian Stansberry <brian.stansberry(a)redhat.com> wrote:
> Thanks much for this, Bill. Sorry for the slow reply. I'm going to
> wait and let Manik Surtani comment on this, as I know he's thought
> a lot
> more than I have about how he wants the factories and the CacheImpl
> constructor to work.
>
>
> _______________________________________________
> jbosscache-dev mailing list
> jbosscache-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/jbosscache-dev
--
Manik Surtani
Lead, JBoss Cache
JBoss, a division of Red Hat
Email: manik(a)jboss.org
Telephone: +44 7786 702 706
MSN: manik(a)surtani.org
Yahoo/AIM/Skype: maniksurtani
--
Manik Surtani
Lead, JBoss Cache
JBoss, a division of Red Hat
Email: manik(a)jboss.org
Telephone: +44 7786 702 706
MSN: manik(a)surtani.org
Yahoo/AIM/Skype: maniksurtani