Re: [Resin-interest] Class load order in a WAR

2009-08-24 Thread Scott Ferguson

On Aug 24, 2009, at 11:57 AM, Jeff Schnitzer wrote:

 In a war file, why can't I seem to replace classes in a WEB-INF/lib
 jar file simply by creating them in WEB-INF/classes?  Do the classes
 in WEB-INF/lib override WEB-INF/classes?  Is there a way to change
 this order?

The order is decided by the class-loader configuration, with the  
default defined in app-default.xml.  Just checking on it, it looks  
like the WEB-INF/classes should be searched first.

It's not exactly an override, it's just a first-found search.

 I'm including a third-party jar that has some undesirable behavior in
 one class.  I'd like to replace it with my own implementation.  What's
 the easiest way to do this?

The WEB-INF/classes should work.  You could also modify the class- 
loader in app-default.xml (although that's generally not recommended.)

 FWIW, I'm integrating JSR299 into Resteasy, but Resteasy doesn't
 currently have the right hooks.

Very cool.  Although, the main annotations are changing because of  
JSR-330.  This spec is pretty rough on early adopters.

-- Scott



 Thanks,
 Jeff


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Class load order in a WAR

2009-08-24 Thread Jeff Schnitzer
On Mon, Aug 24, 2009 at 12:17 PM, Scott Fergusonf...@caucho.com wrote:

 The WEB-INF/classes should work.  You could also modify the class-
 loader in app-default.xml (although that's generally not recommended.)

Oops, heh.  Apparently I had overlooked my own debug message; it was
working.  Thanks.

 Very cool.  Although, the main annotations are changing because of
 JSR-330.  This spec is pretty rough on early adopters.

I saw that in the svn history, no worries.  @Default and @Qualifier
make more sense to me than @Current and @BindingType anyways.

Jeff


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest