There is a servlet filter (http://jakarta.apache.org/hivemind/filter.html)
built into the HiveMind framework that will put a HiveMind registry (the
"default registry") on each servlet request as it comes in.  Then, your
servlets can use the HiveMind-managed services by looking them up in the
registry...

// Inside your servlet...
Registry registry = HiveMindFilter.getRegistry( request );
MyService svc = ( MyService )registry.getService( MyService.class );
svc.someServiceMethod( someParameter );

-----Original Message-----
From: Jian Wu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 02, 2004 9:19 PM
To: [email protected]
Subject: Thoughts on how to put Hivemind inside a J2EE Container or Web
Container?

Hi,

Usually, J2EE/Web Container will instantiate EJB/Servlet Object for you.
Now, Hivemind will also instantiate these service object.

To integrate these two together, I can think that Hivemind is invoked
through ServletContextListener to set up the basic services before
Servlet get instantiated.

Any suggestion or best practice?

Thanks a lot!

Jian

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



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

Reply via email to