SUN finished off 2009 with a release of Glassfish v3 – a high visibility Open Source implementation of Java Enterprise 6 – and the NetBeans 6.8 IDE.
Combined, these releases significantly reduce the barrier to entry for writing and deploying Java Enterprise applications. However, the documentation is sparse at best, and misleading at worst (some cases in point). This post documents getting Glassfish running with sensible parameters – unlike the defaults – covering:-
- Admin panel with secure connection and password
- mod-jk delegation from Apache
- Enabling the Security Manager
- Registering a PostgreSQL JDBC connection through JNDI
- Hibernate to access the JNDI via JPA, whilst allowing persistence in J2SE
mainmethods and tests.
Glassfish is much easier to configure than the perplexing Servlet Container, Apache Tomcat. With support for Ruby on Rails and PHP Web Applications, there is no good reason why anybody should still be using Tomcat – if anything, you should be asking yourself why you’re still using Apache HTTPD!