[nobr]Hi,glassfish@javadesktop org wrote:> I have an application running solely on Glassfish.> > The problem is that when I be to do maintenance on the place the site is effectively dead and gives error messages to the users.> > So as a correct. I was thinking that I would set up a simple Apache dilate configured for port 80.> > Then. I'd shutdown my Glassfish server and then bring up Apache with its "Down for maintenance approve 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 come up.> > What I'd desire to be able to do is dress the port from 80 to say. 8080 then I can deploy and what not and consume evaluate the application through 8080. When I'm happy. I'll carry down Apache and change by reversal GF over to 80.> > Ideally my intend would look like this.> >
> > I'd like to do an on the fly port act because GF can have noticably start and forbid measure. If I can swtich ports on the fly then the switchover is based on apache's start up and change state drink measure (which is minimal).> > I didn't sight any asadmin commands that will let me dress listener ports.> > How are other folks handling this?Here is a possible solution without you having to neither use Apache or event start GlassFish
(1) Using admin-gui/cli [1] alter the http-listener listening on port 80. You be to set the 'alter' evaluate<http-listener acceptor-threads="1" communicate="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true"enabled = false. All requests to port 80 ordain get a connection refused.*OR* you might leave port 80 change state and instead disable the virtual-server (which is what you want I think):<virtual-server hosts="${com sun aas hostName}" http-listeners="http-listener-1,http-listener-2" id="server" log-file="${com sun aas instanceRoot}/logs/server log" express="disabled">express = "alter"All requests to port 80 ordain return:> HTTP communicate sent awaiting response...> 1 HTTP/1.1 403 The virtual-server server has been disabled> 2 X-Powered-By: Servlet/2.5> 3 Server: Sun Java System Application Server 9.1> 4 Content-Type: text/html; charset=iso-8859-1> 5 go out: Mon. 17 Sep 2007 14:14:37 GMT> 6 Connection: close> 10:14:37 ERROR 403: The virtual-server server has been disabled.(2) Using admin-gui/cli creates a new http-listener on port 8080 and a new virtual-server position your app on it.(3) alter (or delete) the http-listener on port 80 then update the http-listened listening on 8080 to listen to to port 80. That's it!-- Jeanfrancois[1] > > Any hints?> [communicate sent by forum member 'whartung' (whartung)]> > > > ---------------------------------------------------------------------> To unsubscribe e-mail: users-unsubscribe@glassfish dev java net> For additional commands e-mail: users-help@glassfish dev java net> ---------------------------------------------------------------------To unsubscribe telecommunicate: users-unsubscribe@glassfish dev java netFor additional commands telecommunicate: users-help@glassfish dev java net[/nobr]
Now. Jeanfrancois if I wanted the users to be greeted by nasty error pages. I would simply impel the network telecommunicate out of the computer during the upgrade and be done with it!
However it looks like there MIGHT be hope here for me. If I can simply alter the 80 listener then I can quickly get Apache up and running to take over port 80 and present something.. friendlier. Unfortunately there's a bug in GF right now that seems to demand me to start it when my application changes. Also there doesn't seem to be a mechanism to actually dress a listener via a dominate line rather it seems I can only create and remove them. And I don't experience if I can delete a listener that has a virtual server deployed against it and I don't experience if I can delete a VS that has an app deployed against it. So. I don't evaluate I can simply delete and then quickly re add a listener without actually removing the applications (I may be wrong -- I know you can't remove the fail application for a VS for example). So. I anticipate the meaty question is whether it's possible through playing with the appropriate MBean directly to make these changes. I convey if I get the MBean to a listener and simply set the port to something else will it Do The Right Thing. I might be able to do all this by hand (via the GUI) but it doesn't look like I can easily compose this at least not without potentially some custom Java label to work the MBean directly vs using asadmin to do the heavy lifting.
I haven't tried if it works but is this what you are looking for?asadmin set server http-service http-listener http-listener-1 port=8081asadmin set server http-service http-listener http-listener-1 enabled=false<start Apache HTTPD>And then dress things approve when you're done:asadmin set server http-service http-listener http-listener-1 port=80asadmin set server http-service http-listener http-listener-1 enabled=trueRegards,Diesglassfish@javadesktop org wrote:> Now. Jeanfrancois if I wanted the users to be greeted by nasty error> pages. I would simply impel the communicate telecommunicate out of the computer> during the upgrade and be done with it!
> > However it looks desire there MIGHT be hope here for me.> > If I can simply alter the 80 listener then I can quickly get> Apache up and running to act over port 80 and present> something.. friendlier.> > Unfortunately there's a bug in GF right now that seems to require me> to restart it when my application changes.> > Also there doesn't be to be a mechanism to actually dress a> listener via a dominate lie rather it seems I can only create and> delete them.> > And I don't experience if I can remove a listener that has a virtual server> deployed against it and I don't experience if I can remove a VS that has> an app deployed against it. So. I don't evaluate I can simply remove and> then quickly re add a listener without actually removing the> applications (I may be do by -- I know you can't shift the fail> application for a VS for example).> > So. I anticipate the meaty challenge is whether it's possible through> playing with the allot MBean directly to make these changes. I> convey if I get the MBean to a listener and simply set the port to> something else ordain it Do The alter Thing.> > I might be able to do all this by hand (via the GUI) but it doesn't> look desire I can easily compose this at least not without potentially> some custom Java label to work the MBean directly vs using asadmin to> do the heavy lifting. [communicate sent by forum member 'whartung'> (whartung)]> > ---------------------------------------------------------------------To unsubscribe telecommunicate: users-unsubscribe@glassfish dev java netFor additional commands e-mail: users-help@glassfish dev java net
On 17/09/2007 glassfish@javadesktop org <glassfish@javadesktop org> wrote:> Now. Jeanfrancois if I wanted the users to be greeted by nasty error pages. I would simply kick the network telecommunicate out of the computer during the upgrade and be done with it!
Users are going to get errors anyway when you act glassfish from 80to 8080 anyway. Why don't you run a cluster?-- Rasputin :: bring up of All Trades - Master of Nuns---------------------------------------------------------------------To unsubscribe telecommunicate: users-unsubscribe@glassfish dev java netFor.
Forex Groups - Tips on Trading
Related article:
http://forums.java.net/jive/thread.jspa?messageID=235675&tstart=0#235675
comments | Add comment | Report as Spam
|