Hi Robert,
I did it first using setAttribute in the rpcrouter Servlet's init-routine, however this approach seems to be quite dirty to me.
Thx for the idea of using a ServletContextListener instead, it should be much more cleaner.
thx
Johannes
Robert Dietrick <[EMAIL PROTECTED]>
06.01.2003 18:50
|
|
I'm not sure about accessing the init mehtod of rpcrouter, but there
alternative methods of initializing resources at startup. One way is to
write a ServletContextListener which initializes the resources and makes
them available to the rest of the application.
Basically, you would write a subclass of
javax.servlet.ServletContextListener, and initializes the DB connections
in the contextInitialized() method. You could make them available to
the rest of the servlets in your web app by assigning them to some
attribute of the ServletContext.
-rob
Johannes Fiala wrote:
>
> Hi there!
>
> Does anybody know how I can easily intercept the servlet
> initialization routine of the servlet rpcrouter?
> I'd like to extend it that way, that if the servlet is loaded, 10
> database connections will be opened, available for subsequent requests.
>
> So I'd need to include a kind of entry point class easily in the
> rpcrouter's initialization routine. Does anybody know how I can
> achieve this without having to fumble in the soap.war - Sourcefiles?
>
> Wouldn't it be a good idea to have such entrypoints at least in the
> rpcrouter serlvet's initializiation routine?
>
> thx alot
> Johannes
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>