Barracuda: Automatic creation of ListenerFactories?

Ron Alsobrook <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
This may have come up before, but has anyone given any thought to having the 
ApplicationAssembler automatically create ListenerFactories based on the 
assembly descriptor file?

For instance, instead of having a lot of lines like this in my gateways:

private ListenerFactory doUpdateAccountFactory = new DefaultListenerFactory() 
{public BaseEventListener getInstance() {return new 
DoUpdateAccountHandler();}    public String getListenerID() {return 
getID(DoUpdateAccountHandler.class);}};

I would love to put something like this into my descriptor instead:

<event-interest handler="DoUpdateAccountHandler" 
factoryClass="DefaultListenerFactory" 
event="com.eb5.website.events.DoUpdateAccount" />

...and have the ApplicationAssembler create the factories for me.  Or maybe 
the factory should be seperate to better support multiple listeners/events 
like this:

<factory name="doUpdateAccountFactory" handler="DoUpdateAccountHandler" 
factoryClass="DefaultListenerFactory" />

Then the <event-interest>s would stay as they are now:

<event-interest factory="doUpdateAccountFactory" 
event="com.eb5.website.events.DoUpdateAccount" />

One thing to note, my handler classes are usually inner classes of the gateway 
and I don't know how that would affect things.  Thoughts anyone?  

Ron

_______________________________________________
Barracuda mailing list
[email protected]
http://www.enhydra.org/mailman/listinfo.cgi/barracuda
FAQ - http://www.jguru.com/faq/Barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.