views:

4180

answers:

3

Hello ! I'm using Jboss tools (3.0.0 alpha, on Eclipse 3.4) to hot deploy my war on Jboss 4.2.3. My war depends on another project (packed inside a jar) I 'm working on. But, when I save a file in this project(the jar project), Jboss Tools republish the compiled classes of the war project, but does not re deploy the classes changed in the jar project.(actually the war project is deployed "exploded" in the deploy directory, but the jar project is deployed, as a jar, in the WEB-INF/libs directory) I would like eclipse and JBoss tools to republish the classes from the jar project, like they do for the JSPs and classes inside the war project... Thank you for your help ! Anthony

+1  A: 

Use JavaRebel. They use Java Instrumentation API (javaagent) to reload classes when they change on the file system.

mhaller
JavaRebel is a commercial solution, isn't it?
Gennady Shumakher
Yes, JavaRebel is commercial. If it's the proper tool for the problem and within budget, he should try it. I don't use it, because restarting Tomcat is fast enough for me :)
mhaller
+1  A: 

For that to happen you need your jar to be a dependent utility jar so when the packaging via web tools happens it will package the jar changes too.

If that is not enough flexibility for you then consider using the Project Archives functionality of JBoss Tools which allows you to define the dependencies as you want it.

p.s. using solutions like JavaRebel does not help if the problem is about getting the proper files copied.

Max Rydahl Andersen
A: 

Hey Max,

I have a similar issue hot deploying on JBoss4.2.3.GA. The server does not redeploy the application when i update web.xml file. Is it that only classes changed will make the server to redploy the application ? If this is the case how do I redeploy non-class files ?

Please advice. Thanks, Saquib

If the server is not redeploying when you touch web.xml file you most likely have hotdeployment disabled. Redeploy of non-class files such as html and xhtml is done by the embedded tomcat and jsf libraries - they just pick changes up automatically when you have deployed in exploded form (i.e. directories instead of .zip/.jar)
Max Rydahl Andersen