Laurent Rieu wrote:
Hi all,
It's been quite a long time but I'm back from holidays (and other not-so-funny things) and looking at Merlin again. The whole stuff seems to have undergone a few changes, that's why I'm asking the same question : is anything provided / planned to bootstrap the kernel in a J2EE environment (ie Application Server) ?
There are three things needed to achieve this:
1. an implementation of the org.apache.avalon.merlin.kernel.KernelContext interface based on information derived from a webservice configuration
2. some updating of the meta data directive for <repository> (under classloader) so that we can include the implementation classname for the repository.
3. an implementation of org.apache.avalon.repository.Repository that is capable of handling the sourcing of jar resources from a war file and establishing concrete URLs relative to <resource id="test:test"/> style entries in the container classloader.
This would eliminate any distrintion between a classic application and a webservice style deployment scenario.
Is the MerlinServlet still ok ?
No - it needs updating to use an instance of KernelContext.
If nothing has been done, what would be the best way to have Merlin run in an Application Server ? I can think of writing a simple bootstrap class similar to the CLI one but I need to know what parameters are needed to create the KernelContext and instantiate the Kernel.
Take a look at the constructor for DefaultKernelContext but please keep in mind that I'm also thinking about how we can simply this class in two areas - (a) removal of the block url install sequence, and (b) removal of the server/execute mode flag. Both of these are things should should be applied to an established kernel as opposed to the current approach of applying them as initialization arguments.
And what about these merlin.properties packed in the bootstrap jar file ? Can I use the same jar file and its embedded properties to bootstrap Merlin in a J2EE environment ?
In principal yes - however the bootstrap class is kind of closely associate with the CLI loader requirements. In a web app context if may make more sense to supply the bootstrap parameters as a configuration to a servlet - the servlet then builds the api, spi and impl classloaders based on the servlet configuration and constructs a J2EE based implementation of KernelContext directly.
Cheers, Steve.
Thanks !
Laurent
************************************************************************ Ce message a ete inspecte par un anti-virus
Nous vous rappelons que la taille des messages ne doit pas depasser 1.5 Mo ************************************************************************
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
Sent via James running under Merlin as an NT service. http://avalon.apache.org/sandbox/merlin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
