Follow these steps:
- First, we are deploying EAR, WAR, and JAR files. For EAR and WAR files, the deployment folder is the following:
$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.
- To create a datasource and a connection pool to help you use databases in your project, edit the $GLASSFISH_HOME/glassfish/domains/[domain_name]/config/domain.xml file. Inside the <resources> node, insert a child node like this one:
<jdbc-connection-pool pool-resize-quantity="4" max-pool-size="64" max-wait-time-in-millis="120000" driver-classname="com.mysql.jdbc.Driver" datasource-classname="com.mysql.jdbc.jdbc2.optional ...