[jboss-dev-forums] [JBoss AS Development Deployment Framework] - Class def not found in jboss as 7.X when using classloader for custom jar
Chaturvedi Dewashish
do-not-reply at jboss.com
Sun Feb 3 13:44:52 EST 2013
Chaturvedi Dewashish [https://community.jboss.org/people/ddewashish] created the discussion
"Class def not found in jboss as 7.X when using classloader for custom jar"
To view the discussion, visit: https://community.jboss.org/message/795816#795816
--------------------------------------------------------------
I have a project structure as
eardirectory.Ear
lib/
my-custom-classes.jar
.....
.....
my-custom-ejb.jar
META-INF/
....
//Now I tried to load classes from classloader as
ClassLoader cl = Thread.currentThread().getContextClassLoader();
clazz = Class.forName(my-custom-classes.class1.class.getName(), true, cl);
Esper uses this way to load events type for pojo classes, but this will not work as current thread is of jboss and jboss has not any identification of my-custom-classes.jar.
*So my question is how this can be done with jboss?* I have to have to load class definition at runtime. Is there any way in *"jboss-deployment-structure"* I can define how to load classes before deploying EAR?
I also tried moving class definition from *my-custom-classes.jar* to *my-custom-ejb.jar* and loading class definition on to current thread, but this also didn't work.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/795816#795816]
Start a new discussion in JBoss AS Development Deployment Framework at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2072]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130203/3e0fa0d7/attachment.html
More information about the jboss-dev-forums
mailing list