Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse -> Glassfish won't incrementally deploy - JBOSS does

I've started in a new job developing Java EE 6 apps with an Ubuntu workstation.

Glassfish is the main App Server I've been using for a year or so now and am quite familiar with it. I've also tried JBoss to debug this problem. I'm developing with Eclipse and have also tried Netbeans to debug this problem.

  • Incremental deploy does not work for Eclipse / Glassfish.
  • It works for Eclipse / JBoss.
  • It works for Netbeans / Glassfish.
  • It works for Eclipse / Glassfish at home on my Mac.

I have the Glassfish Tools for Eclipse Juno installed and I've set up a glassfish server adapter. I've reinstalled Glassfish (3.1.2.2).

Eclipse Auto-build is on and indeed the target .class or .xhtml files are created / updated.

But these modified files are not copied to the app directory in Glassfish. They are to the equivalent location under JBoss when using it instead.

Glassfish > Domain > Applications Configuration > Reload is enabled (but the .class / .xhtml etc are not even getting there anyway).

A number of people have asked similar questions with few replies so I don't think I will get a solution. However I would like some help in debugging this problem.

Is there any log level I can increase to see what is happening; or is there something else I can look at? Or any other thoughts?

Any helpful feedback appreciated.

ps. I tried to use the tag 'incremental-deploy' but I don't have enough reputation. Could someone fix that?

like image 611
HankCa Avatar asked Jun 18 '13 07:06

HankCa


2 Answers

Got it!

The Server Adapters / Connectors have a Publishing configuration found by double-clicking on the Adapter listed under the Servers tab. This needs to be set to 'Automatically publish when resources change' to see the changes immediately (See footnote). If its set to Never Publish Automatically then a full-manual redeploy needs to be done. Each and every time :(

Every server adapter that I know has such a configuration.

  • footnote - Glassfish and all App Servers have an option to dynamically reload applications - this needs to be enabled and you can set the reload poll interval. This can be found on Glassfish by going to admin (http://localhost:4848 by default) > Domain > Application Configuration

How to set Eclipse to publish to Glassfish

Required configuration on the Glassfish server

like image 163
HankCa Avatar answered Oct 16 '22 08:10

HankCa


there was decision not to use the automatic deployment by default because it is not desirable for bigger projects. But ir works fine for small experimental projects so you can always turn it on.

like image 44
piotrik Avatar answered Oct 16 '22 10:10

piotrik