[jboss-user] [Beginner's Corner] - Custom class loader?

Andrea Giovannini do-not-reply at jboss.com
Thu Sep 16 09:42:52 EDT 2010

Andrea Giovannini [http://community.jboss.org/people/jova73] created the discussion

"Custom class loader?"

To view the discussion, visit: http://community.jboss.org/message/562182#562182

I have an existing J2EE application without any dependency injection, so if class A uses class B then in class A I have
public class A {}
    . . .
    B b = new B();
    . . .
and if I want to sobstitute B with C (which extends B) I have to modify class A.
I don't want to modify the entire application but I'd like to intercept class loading in order to replace on the fly class B with class C. Is this possible in JBoss? Can I replace the class loader with a custom one?
Thanks in advance,

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100916/c8b9555f/attachment.html 

More information about the jboss-user mailing list