0

I am newbe to Java EE, so far I have enjoyed Java SE development environment simple and neat. Now I am working in Java EE projects, I am using eclipse with glassfish server.

I am not feel happy with Java EE development environment. Every time starting & deploying projects are takes time, not straightforward.

My doubt is whether still people all over the world facing the same issue or any alternative is found to resolve this issue?

Here I mean issues are - Integrating Eclipse & Glassfish - Every time stop/start/deploy the project in to Eclipse - No consistency in the behaviour of Glassfish, many times I have to restart my Glassfish - etc.,

Beryllium
  • 12,808
  • 10
  • 56
  • 86
sokid
  • 813
  • 3
  • 10
  • 16
  • Integration between Eclipse and Glassfish is a nightmare in my experience. The glassfish connector is buggy, eclipse crashes randomly (Who knows what plugin or plugins causes that). OTOH I had no problems with IntelliJ IDEA, it has seamless integration for Glassfish. It isn't free however. Unfortunately not an option for me ATM, I would use that if I could. – Bártfai Tamás Sep 02 '13 at 18:30
  • Have you considered Netbeans? It is often bundled with Glassfish the integration is very good and you can enable compile on save: http://wiki.netbeans.org/FaqCompileOnSave#In_7.3_and_before unfortunately you may get to experience perm-gen issues. For this reason deploying to tomcat (which does a better job of forceably removing class objects, can remove that issue if it becomes an issue), both tomcat and glassfish can come in the same bundle and switching between in pretty trivial. – Quaternion Feb 07 '14 at 19:23

3 Answers3

2

You may use JRebel to reduce the deployment time. Using this eclipse plugin will drastically reduce your deployment time overhead. It's not free for commercial projects, but for open source and non-commercial projects you can get a free one year subscription. See their plans for details.

You also may wanna check out the options provided here.

Community
  • 1
  • 1
MD Sayem Ahmed
  • 28,628
  • 27
  • 111
  • 178
  • Any free alternatives? – sokid Sep 02 '13 at 07:30
  • 1
    @sokid: As far as I know, nope. I have also suffered for a long time for this. After switching to tomcat (we chose Spring later) the problem was reduced a little since its deployment time is far less than a full-blown application server. – MD Sayem Ahmed Sep 02 '13 at 07:31
1

When I redeploy medium-sized EJB project, it takes about 4s to package it using ant, and 4s for JBoss 7 to redeploy it (it contains five dependencies as .jar files).

To speed this up consider these options:

  • Use something like JRebel or Agent Smith (open source) which "hot swap" classes of a running application to minimize redeployments.

  • Separate your service functionality from a stateless session bean: Move the functionality in a normal Java class which you can call from a stand-alone application as well. This minimizes the number of deployments you need.

  • Separate backend (EJBs etc.) and client (JSPs, command-line applications), so that only one part needs to be re-installed.

  • Use scripting in your EJBs: In that mode the EJB uses something like BeanShell, gets the script from a database, and interprets it at run-time for example. So instead of redeployments you update the script in the database.

  • Only package .jars that you really need. I have completed a project in which I had to remove all open-source libraries, and this gave a big boost.

  • Have a look at Application client containers (ACC). A quote:

Compared to other Java EE containers, the ACC is lightweight.

Beryllium
  • 12,808
  • 10
  • 56
  • 86
0

You don't want to stop/start/deploy the server each and every time. you should do it only when you make a chage in a servlet or ejb side. if you do a change only in a jsp page then you don't want to stop/start/deploy the server.

Weli Nuwan
  • 105
  • 2
  • 2
  • 6
  • When we develop servlet or EJB modules, frequently we have to redeploy the project, it consumes more time. – sokid Sep 02 '13 at 07:30