pyVision
A Machine Learning and Signal Processing toolbox

Download .zip Download.tar.gz View on GitHub


Glassfish application deployment from commandline

**Application Deployment **

To deploy application from commandline we need to run the following commands

filename=/tmp/a.war
basename=`basename $war`
basename="${filename%.*}"
context=/test
${GLASSFISH}/bin/asadmin --user admin --passwordfile  /opt/password.txt deploy --contextroot $context --name $bname $filename 

where /opt/password.txt is the password file for admin user. The $filename is variable containing the war file

Application Undeployment

To undeploy the application we can run the command

filename=/tmp/a.war
basename=`basename $war`
basename="${filename%.*}"
context=/test
${GLASSFISH}/bin/asadmin --user admin --passwordfile  /opt/password.txt undeploy $basename 

Application Redeploy

filename=/tmp/a.war
basename=`basename $war`
basename="${filename%.*}"
context=/test
adadmin --user admin --passwordfile  /opt/password.txt redeploy --contextroot $context --name $basename --properties keepSessions=false --force ${filename} 

References

  • https://docs.oracle.com/cd/E19798-01/821-1750/gijmb/index.html -https://blogs.oracle.com/alexismp/entry/glassfish_tip_have_your_application
  • https://docs.oracle.com/cd/E19798-01/821-1750/gijmq/index.html
blog comments powered by Disqus