adam bien's blog

Netbeans 6.7m2 aka 7.0, The Magic Switch, GF v3 EA, The 40ms EJB Deployment And The Fat Container 📎

The new look and feel is not the only nice feature of Netbeans 6.7m2. If you are interested in Java EE 5/6 you should try the following switch:

-J-Dorg.glassfish.v3.enableExperimentalFeatures=true

(in netbeans.conf - thanks to Vince for the hint).  After setting this property and restarting netbeans 6.7m2, you will be able to install Glassfish v3 EA (not prelude) straight from the IDE (it took 11 minutes in my case with a bad internet connection). Then the fun begins - some observations:

  • EJB 3.1 can be deployed from EJB-modules and WARs
  • @Singleton, @Startup deployment works
  • Dependency Injection between EJB 3.1 (e.g. no-interface view) and EJB-Servlets works
  • The EJB container is now shipped with GF. There is no need to install it separately. The container comes with two JARs (688kB + 8kB = 796kB), so it grew significantly. Now it is really "fat", comparing it to the 420kB in prelude :-).
  • The initial deployment of a WAR or EJB takes about 1.5 seconds. The redeployment, however, is faster - it takes between 20ms and 50ms. An excerpt from the log file:

INFO: DOL Loading time4
INFO: Portable JNDI names for EJB StatelessBean : [java:global/EJB3GF3/StatelessBean, java:global/EJB3GF3/StatelessBean!com.abien.StatelessLocal]
INFO: ==> Uses Timers? == false
INFO: [**]Singleton partial order:
INFO: Deployment of EJB3GF3 done is 33 ms
INFO: DOL Loading time7
INFO: Portable JNDI names for EJB StatelessBean : [java:global/EJB3GF3/StatelessBean, java:global/EJB3GF3/StatelessBean!com.abien.StatelessLocal]
INFO: Portable JNDI names for EJB StartupService : [java:global/EJB3GF3/StartupService!com.abien.StartupService, java:global/EJB3GF3/StartupService]
INFO: ==> Uses Timers? == false
INFO: [**]Singleton partial order: StartupService*
INFO: --------------- starting
INFO: Deployment of EJB3GF3 done is 45 ms
INFO: DOL Loading time10
INFO: Portable JNDI names for EJB StartupService : [java:global/EJB3GF3/StartupService!com.abien.StartupService, java:global/EJB3GF3/StartupService]
INFO: Portable JNDI names for EJB StatelessBean : [java:global/EJB3GF3/StatelessBean, java:global/EJB3GF3/StatelessBean!com.abien.StatelessLocal]
INFO: ==> Uses Timers? == false
INFO: [**]Singleton partial order: StartupService*
INFO: --------------- starting
INFO: Deployment of EJB3GF3 done is 37 ms
INFO: DOL Loading time16
INFO: Portable JNDI names for EJB StatelessBean : [java:global/EJB3GF3/StatelessBean, java:global/EJB3GF3/StatelessBean!com.abien.StatelessLocal]
INFO: Portable JNDI names for EJB StartupService : [java:global/EJB3GF3/StartupService!com.abien.StartupService, java:global/EJB3GF3/StartupService]
INFO: ==> Uses Timers? == false
INFO: [**]Singleton partial order: StartupService*
INFO: --------------- starting
INFO: Deployment of EJB3GF3 done is 54 ms
INFO: DOL Loading time5
INFO: Portable JNDI names for EJB StartupService : [java:global/EJB3GF3/StartupService!com.abien.StartupService, java:global/EJB3GF3/StartupService]
INFO: Portable JNDI names for EJB StatelessBean : [java:global/EJB3GF3/StatelessBean, java:global/EJB3GF3/StatelessBean!com.abien.StatelessLocal]
INFO: ==> Uses Timers? == false
INFO: [**]Singleton partial order: StartupService*
INFO: --------------- starting
INFO: Deployment of EJB3GF3 done is 26 ms
INFO: DOL Loading time5
INFO: Portable JNDI names for EJB StartupService : [java:global/EJB3GF3/StartupService!com.abien.StartupService, java:global/EJB3GF3/StartupService]
INFO: Portable JNDI names for EJB StatelessBean : [java:global/EJB3GF3/StatelessBean, java:global/EJB3GF3/StatelessBean!com.abien.StatelessLocal]
INFO: ==> Uses Timers? == false
INFO: [**]Singleton partial order: StartupService*
INFO: --------------- starting
INFO: Deployment of EJB3GF3 done is 29 ms

The redeployment is so fast, that I thought it is broken...

 I will use NB 6.7m2 + GF v3 EA in JavaLand, as well as at the CommunityOne in New York. I will have to change the title of my session :-)