Populating a GlassFish application with asadmin

Is it possible to reload a web application in GlassFish 4 using the asadmin command line tool? The GlassFish Web Console has a "reload" button that you can click to do this. Is there an equivalent for asadmin? I know there is a dynamic reload where you change the file and it reloads, but I just deployed a war file and now want to reload it so that it reconnects to the external socket server (no code has changed and since it was a war. I don't think there is a file to tap - then I disabled dynamic reloading on the production server). If I use the use of "redeploy" that works too, but you have to specify the war file, which is annoying since that means I have to leave it in a fixed location and make sure it is in sync with the onewhich is actually deployed.

+3


source to share


2 answers


It seems that asadmin does not have a reload subcommand (all subcommands listed on this page: http://docs.oracle.com/cd/E18930_01/html/821-2417/gihzw.html ).



Perhaps using "asadmin disable {applicationName}" followed by "asadmin enable {applicationName}" will have the same effect, perhaps this is what Glassfish does when you press the restart button.

+3


source


Another option is to do this touch .reload

in the Glassfish application directory.



glassfish4/glassfish/domains/{domain-name}/applications/{application-name}/

      

+1


source







All Articles