Post date: Jul 29, 2016 11:48:44 AM
Steps to download and install GlassFish Server :
Open https://glassfish.java.net/download.html url and download glassfish-4.1.1.zip under Java EE 7 Full Platform. JDK 8 u60 or above is recommended for GlassFish 4.1.1.
Unzip the downloaded file to the path where you would like to install glassfish.
Go the glassfish4/bin/ and open command prompt in that location.
Run asadmin file. For linux: sh asadmin. For Windows: asadmin.bat
To start server use command start-domain and to stop server use stop-domain.
Steps to Configure Triniti Applications on GlassFish Server :
First of all go to your glassfish server location and navigate to the /home/glassfish4/glassfish/domains/domain1/config/domain.xml.
Open domain.xml file and edit the port number to your respective instance’s port number in the below tag and save the file. For ex : port=”8080” to port=”9999”.
<network-listener protocol="http-listener-1" port="9999" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp"></network-listener>.
3) Add below <system-property-name> tag in <config name="server-config"> tag to declare TRINITI_HOME as constant to use it for Deployment path at all places in domain.xml and change the value.
For ex : value=”home/TrinitiApps28”
<system-property name="TRINITI_HOME" value="/software/Tri2ProductionHome/TrinitiApps28"></system-property>.
For reference screenshot is attached. Add the tag to the highlighted portion in the screenshot :
4) Also add the below changes to the domain.xml file in <applications> tag to add the context name.If <applications> tag is not there then add it after </system-applications> tag.
<applications>
<application context-root="/tas" object-type="user" name="tas" directory-deployed="true" location="file:${TRINITI_HOME}/infrastructure/tas/">
<property name="appLocation" value="file:${TRINITI_HOME}/infrastructure/tas/"></property>
<property name="preserveAppScopedResources" value="false"></property>
<property name="defaultAppName" value="tas"></property>
<module name="tas">
<engine sniffer="webservices"></engine>
<engine sniffer="security"></engine>
<engine sniffer="web"></engine>
</module>
</application>
</applications>
Copy paste the same and change the context name to your respective context name like tas,tab,tabimpl,fdt,viewer,etc to add more contexts.
5) Also need to increase maxpermsize to 1024m in <jvm-options> tag.
Search for the “<jvm-options>-XX:MaxPermSize” and change the size.
For ex : <jvm-options>-XX:MaxPermSize=1024m</jvm-options>.
Search for the “<jvm-options>-Xmx” and change the size to 4096m.
For ex : <jvm-options>-Xmx4096m</jvm-options>.
6) Add application reference in <servers> in domain.xml.
<application-ref ref="tas" virtual-servers="server"></application-ref>
And change the ref to your context name.
For ex : ref=”tas” or ref=”tab” ,etc.
7) Now go the below path /home/glassfish4/glassfish/domains/domain1/docroot/
Open index.html file and search for “go to the Administration Console”.
Change the url from localhost to respective url.
For ex : localhost to hltappsd.global.triniti.com.
8) Place all the jars from /TrinitiApps28/common/ and jars from /TrinitiApps28/common/ googleapi/ to /glassfish4/glassfish/domains/domain1/lib/.
9) Check web.xml file in all contexts where all the <servlet> tags has to be first and all the <servlet-mapping> tag after that.
For Reference screenshot is attached .