1 of 1 people found this helpful
1. I'm willing to dynamically add the jars [only core java code, programming] to the JBoss 6.1 lib. So that I can initialize using reflection on the fly. Is it feasible? Presently I'm forced to restart the server and added jars in \WEB-INF\lib.
2. When I try to add jars to \WEB-INF\lib\MyFolder the Java Reflection throws ClassNotFoundException. Why? How to handle it?
3. Can I specify the my jars location other than \WEB-INF\lib?
1) 6.1? We're at 6.0_M2 atm. :-)
It depends on what are you trying to do.
Why are you forced to restart the server atm? Or why a simple re-deploy doesn't cut it?
2) MyLib folder isn't considered as part of class path -- should have .jar suffix.
See filter in WarStructure: http://anonsvn.jboss.org/repos/jbossas/trunk/server/src/main/java/org/jboss/web/deployers/WARStructure.java
And even then it would only pickup direct classes in the folder, not jars.
Put the jar into the lib, w/o MyFolder.
3) Sure. See jboss-structure.xml usage: http://community.jboss.org/wiki/JBoss5custommetadatafiles
Thank you, Ales!
Sorry, actually using Jboss 6.0. I'm adding jars at runtime not at deployment. Example: I want to provide a facility to user where he/she can upload jars/code and schedule it for execution in scheduler. And this needs to be dynamiclly/runtime. Any alternate?
Simultaneously, checking for Groove whether it can executed, stored in oracle db. Solution?