Hey

Aaron Mulder wrote:
>         Well, as a general problem this is unpleasant.  We need a servlet
> container to let us share a ClassLoader for EJBs in the same web app as
> the servlets.  That either means we use its, or it uses ours, and both of
> those are unpleasant solutions (since the servlet one needs to be able to
> load stuff from WARs or directories, and the EJB one needs to be able to
> load stuff from JARs or directories).  Either we need to ask it for a
> "native" ClassLoader, and then return a CL that wraps both its and ours,
> or we need it to tell us what directories and/or JARs/WARs to use and we
> create one giant combined URLClassLoader or whatever.  Either way, we
> probably need some coordinating "framework" beyond just an interface.

Nope. Look at the J2EEDeployer which deploys EAR's in an efficient in-VM
manner. The solution to the above is to have one parent classloader
which the servlet and EJB classloaders are children to. That way they
will have the same namespace, but the servlet and EJB implementations
don't know about each other *at all*. The way we implement the "sending"
of the parent CL into the servlet and EJB implementations is to set it
as context classloader on deploy. Very clean, and it's the right way to
go I think.

>         However, this does not provide any configurability at all.  In
> reality, we'd like some way to control the servlet engine (deploy a new
> EAR into WARs and JARs, for example), we need some interface for sharing
> security information (login once to both products), we probably want to
> share a JNDI implementation, log to the same place, etc.

Again, look at the J2EEDeployer. It does most of the above already. The
rest is doable :-)

>         Personally, I think a simple answer is right out the door.  I
> think we should be thinking about a product like Avalon, which aims to
> provide exactly this.  However, it is a non-trivial project in and of
> itself.  So for my two cents, if the licensing prevents us from an easy
> but not featureful integration, let's work on a hard but much better
> integration with Avalon.

Can someone point to any docs on just what Avalon provides? All I've
seen are some "this would be cool" docs, but nothing like an API or
similar. What does it do?

regards,
  Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


Reply via email to