GlassFish usage
The great thing about GlassFish is that it is the Reference Implementation (RI). So, whenever you have a new version of Java EE, being a developer, you already have the respective GlassFish version to try it.
Getting ready
First, you need to download it to your environment. At the time of writing, GlassFish 5 is the only Java EE 8 server that has been released.
To download it, just visit https://javaee.github.io/glassfish/download. This recipe in based on version 5 (Java EE 8 compatible).
Wherever possible, we will focus on doing the tasks using the configuration files.
How to do it...
Refer to the following detailed tasks.
Deploying EAR, WAR, and JAR files
For EAR and WAR files, the deployment folder is:
$GLASSFISH_HOME/glassfish/domains/[domain_name]/autodeploy
Usually domain_name
is domain1
, unless you've changed it in the installation process.
For JAR files, the folder is:
$GLASSFISH_HOME/glassfish/lib
Creating datasources and a connection pool
To create a datasource and a connection...