Nicolai:
Are you also tracking [EMAIL PROTECTED] Thre are some recent posts on the HTTP subject which are more than relevant to this subject.
Steve.
Nicolai Wadstrom wrote:
-----Original Message-----
From: Stephen McConnell [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 7:37 PM
To: Avalon framework users
Subject: Re: Webapp example
I'm a little bit confused (but its late).
If I was going to access a component via JNDI I would embed merlin in the JNDI provider. Can you explain a little bit the setup/approach/architecture your using?
Stephen.
Sure, at this point it's just a prototype, to test an architectural design I am looking into:
I have a singleton Component which expose a service named "Manager", which I bind to the local JNDI context in startup, I have built a Tag Library class that use this service, lookup works fine, retrieving it works fine but when trying to access it I get ClassNotFoundException for the implementation classes for the service. So basically I bootstrap Merlin from the init() method in a servlet which also loads the component exposing the service, and then I want to access a Avalon/Merlin service from a servlet's service()-method or a JSP-page.
If I would expose the Merlin kernel I would require putting a big part of the Avalon framework and and the kernel .jars in the /WEB-INF/lib/ directory to be able to access the service, which I would like to avoid (I would like to keep as much as possible of the .jars in the repository).
Maybe I am missing something here, but I think the problem might be (no matter if I look up the kernel or root block via JNDI and retrieve the service from there or retrieving the service reference directly), that the HTTP request thread (executing the service()-method or JSP page) does not include the Merlin classloader that loaded the component from the repository and this can not access the implementation classes. Maybe Tomcat would allow manipulation of the classloader in that thread, but for example WebSphere won't..
If this is the case some kind of remoting or "thread-switch" might be needed
to get this to work properly...
/ Nicolai
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/merlin/distributions/latest | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
