简体   繁体   中英

JBoss ejb3.0 instant hot deployment

I am newbie with jboss-eclipse. I have to work on javaEE5 with JBoss AS 5.1.0.GA. I don't want to use JRebel at the moment.

I installed "Eclipse Java EE IDE" with "JBoss Tools". I added the JBoss 5.1 Runtime server on eclipse and added a new ear project with :

  • an EJB3.0 class in ejb project;
  • a javabean class and index.jsp in web project.

I noticed when I make a modification in the jsp file, I can see instantly the changes after refreshing the web browser. That's ok.

When I modify EJB and javabean classes, there is no instant hot deployment. I have to restart the ear application (without restrating jboss server) or "full publish" the ear via eclipse to see changes.

Is there any way to have instant hot deployement for EJB and javabeans?

PS: I tried "incremental" publish but it hasn't worked.

Thank you!

You do need 3rd party tools for that, the most notable being JRebel . Without advertising I have to say this tool has saved me lots and lots of hours already while developing EE applications.

In jboss AS 7.1.1 you just have to go to the as admin console at localhost:9990 and select: Profile -> Core -> Deployment Scanners -> Auto-Deploy Exploded . You might also want to change the scan interval to something smaller. Afterwards, you may deploy your application for the first time by selecting "Run on Server". From this time on, your application will get automatically deployed whenever you change a file and it manages to compile.

I do not know if Jboss 5.1 has this feature, and if I were you I'd consider using 7.1.1 for development when it does not have it.

The hot deployment works fine with JBoss when publishing new files in your deploy folder, only class exchange will not happen in your currently deployed application.

That's why you see changes to all static content like HTML files immediately, but not changes to your java code.

In order to do activate them, you'll have to restart your application (not the whole JBoss, only your application, done for example in JBoss server view).

I have no practical experience with JRebel and I do believe that it saves you time, but you have to be careful with such tools, as they can introduce new problems which you spend much times in debugging, ending up in restarting the container and everything works fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM