[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

--------------------------------------------------------------
Hi,
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();
    b.doSomething();
    . . .
}
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,
Andrea 
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/562182#562182]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- 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