users@glassfish.java.net

Any way to change a Listener port on the fly?

From: <glassfish_at_javadesktop.org>
Date: Sat, 15 Sep 2007 13:01:58 PDT

I have an application running solely on Glassfish.

The problem is that when I need to do maintenance on the site, the site is effectively dead and gives error messages to the users.

So, as a remedy, I was thinking that I would set up a simple Apache instance configured for port 80.

Then, I'd shutdown my Glassfish server, and then bring up Apache with its "Down for maintenance, back soon" page.

But my problem then is that I can't redeploy my app and test it, since Glassfish is tied to port 80 as well.

What I'd like to be able to do is change the port from 80 to, say, 8080, then I can deploy and what not, and smoke test the application through 8080. When I'm happy, I'll bring down Apache, and switch GF over to 80.

Ideally, my plan would look like this.

<ul>
<li>Glassfish running on port 80.</li>
<li>On the fly move of GF from 80 to 8080.</li>
<li>Start up Apache on 80.</li>
<li>redpeploy, reconfigure, bounce GF as necessary</li>
<li>Restart GF in "production" mode on 8080</li>
<li>down Apache</li>
<li>Switch GF to 80</li>
<li>Live happily ever after</li>
</ul>

I'd like to do an on the fly port move because GF can have noticably start and stop time. If I can swtich ports on the fly, then the switchover is based on apache's start up and shut down time (which is minimal).

I didn't notice any asadmin commands that will let me change listener ports.

How are other folks handling this?

Any hints?
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=235531