From: "Michael" <[EMAIL PROTECTED]>
> I'm working on exactly this.  I have it working so I can attach my
> source file.  I cut & pasted a lot of code from the ManagerServlet
> class.  I would like to propose refactoring the ManagerServlet class to
> separate the servlet specific parts and the non-servlet parts.  This
> would facilitate reuse outside a servlet engine.  I'm curious what James
> thinks about this.
>
> In the mean time, here is my code.  It's not pretty (I hardcoded some
> stuff just to get it working) but it will at least get you going.

I've been thinking about this also.

Right now there's a helper class that can be ran from the command line to
process a subscribe.xml to create multiple subscriptions here...

http://jakarta.apache.org/commons/sandbox/messenger/apidocs/org/apache/commo
ns/messagelet/Main.html

This works fine for MessageListener's though obviously, because its ran from
the command line, cannot easily dispatch to Servlets or JSP for processing.

I think it'd certainly be a good idea to refactor out the subscription
management code out of ManagerServlet so that it can easily be used from
outside of a Servlet engine. Also it could be worth patching the
MessageDrivenObject API so that the init() method takes a MessageletContext
interface rather than a ServletContext to break the direct dependency on the
Servlet engine.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to