Hi,
My suggestion is to implement the interface ServletContextListener,
and the contextInitialized method in particular can be used to
register your objects with jabsorb.
The lifecycle of jabsorb is bound to the servlet container and not to
the EJB container in any way. Whenever the servlet context is
destroyed/reloaded, you need to register your object again. Choosing
the approach above, the initialization code will be run by the servlet
container whenever needed, so you do not have to worry.
I hope this is enough to get you started. A word of warning:
It will seem straightforward to look up the SLSB and register it with
the bridge, however, this might not be a good idea depending on your
configuration and needs:
If you are using (or plan to use) clustering on the EJB tier, you
might need to add a thin wrapper for your SLSBs to your web
application code that will take care of looking up the JNDI resources
each time. Depending on your appServer and configuration, you might
not be allowed to cache/store the stub without loosing failover
capability. Some application servers provide stubs which are clever
enough to transparently handle failover, while others do not.
Cheers,
T