commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Stansberry <>
Subject Re: [logging] J2EE Spec and classloader order (WAS: requirements and static binding)
Date Thu, 05 May 2005 18:36:37 GMT
Branching this discussion off, as I realize my
previous post forked a thread.

--- Simon Kitching <> wrote:

> On Wed, 2005-05-04 at 23:37 -0700, Brian Stansberry
> wrote:
> > A few semi-random points on parent-first vs.
> > parent-last classloading:
> > 
> > 1) EJBs, EARs and other non-webapp J2EE
> deployments
> > typically use parent-first loading.  I'd thought
> JBoss
> > offered a deployment descriptor option that
> allowed
> > the deployer to choose parent-last, but I was
> > mistaken.  Too bad; I was hoping the scope of the
> "if
> > you want control, use parent-last classloading"
> > approach would apply.
> Well, if the EJB spec is designed to prevent EJBs
> from overriding jars
> present in the parent classloader, who are we to
> argue?

Sorry, didn't "cross-pollinate" between a discussion I
was having on the JBoss forum and here.  I briefly
looked at the J2EE and EJB specs and didn't see
anything that *required* parent-first.  It really
doesn't say anything about it at all.  A comment by
Scott Stark at JBoss implies the same.

For the JBoss forum discussion, please see:

> In other words, if a JCL logging implementation is
> in the parent
> classloader, then why not just bind to it? 
> This doesn't give the EJB developer any control over
> what logging lib is
> used (though they don't typically need such
> control). 
> More controversially, it doesn't give any control to
> the "application
> assembler", as any jar they bundle will be ignored
> if the container
> provides an implementation. But that's the way the
> J2EE spec wants
> things to work it appears.
> And potentially even more controversially, it
> doesn't give any control
> to the "application deployer" unless they are also a
> system
> administrator for the container (and are willing to
> change the logging
> lib globally). But again, if the J2EE spec authors
> chose "parent first"
> as the only option, then that must be what they
> wanted to happen.
> Or is it just JBoss that has adopted this position
> for EJB deployment I
> wonder?

Could be (although my gut instinct says otherwise). 
Any BEA/Websphere/Geronimo/YourFavoriteAppServer
experts out there know of support for child-first
loading for EJBs?


Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site! 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message