Sunday Apr 26, 2009

GlassFish V3 Remote Restart Now Available

GlassFish V3 is now sporting a brand new capability:  Remote Restart.

This feature is particularly handy for environments where the server machine is secured and difficult to get to.  With the right credentials you can now restart the server from anywhere in the world -- as well as from the same machine. 

It is very easy to use.  As of today there are two ways to call the restart-domain command with the third method coming online soon

(1) Use a URL in a browser: 


(2) Use asadmin like so:
   asadmin --host yourhost restart-domain

(3) Coming soon:  Admin Console GUI support for the command

The asadmin command, restart-domain, is what I like to call a "hybrid" command.  It is both a local and a remote command.  The local portion of the command's job is to block until it verifies that the server has completed its restart and is online and ready to go.  The remote portion does the actual restarting.


There are 3 main flavors of starting non-embedded V3.  Restart-domain works with all three:

  • Starting the server with the launcher (i.e. asadmin start-domain).  Restarting will stop the running server and once the JVM process is guaranteed to have exited the server will restart.  There are no special "watchdog" processes involved.  The server itself does the work itself in what I like to call "reincarnation".  This is easy to see by running jps during the restart.  You will see the process id change.  You can also watch the server log as the server restarts.
  • Starting the server with the launcher in verbose mode (i.e. asadmin start-domain --verbose).  The key point here is that we have to preserve the console that asadmin owns here.  So we do the restart a little differently.  Since the asadmin process is also running  on the server machine, we ask the already running asadmin process to restart the server for us.  asadmin does all the heavy lifting here.
  • Starting the server in implanted mode (e.g. java -jar glassfish.jar).  A new jvm will be started with exactly the same commandline arguments.  Note that if the server owns the console -- i.e. is running "in the foreground" and mirroring log messages -- the new server will lose control of the console.  We can not absolutely guarantee a clean shutdown without literally closing down the JVM itself.  Once that is done the console is out of reach.

Give it a try!

Tuesday May 01, 2007

Glassfish: Great AppServer or Greatest AppServer?

Fish for a Flat Screen TV
Blog about GlassFish for a chance to win a 52" LCD HD TV.

I'm a developer for Glassfish.  My area is Administration.  I am also a glassfish user.  I have a real-world web site that's been running continuously for 2 years

Now when I try to do something in a different area of the Appserver like Web Applications, I'm just as much of a helpless newbie as anyone else.

I developed a semi-cool way to publish lots and lots of pictures on my website with little manual intervention.  It works great.  One day I downloaded a ton of pictures  from my camera to the website.  I put the "magic URL" that causes a servlet to layout the pictures in a URL which worked fine.  When you click on any of these small pictures it displays  a large version of the picture.  But, wait!  I''d click and instead of seeing a picture, I'd get a download dialog from Firefox!  After looking around on the filesystem I located the problem.  The camera saves the pictures with an extension of JPG while all of my other pictures had an extension of jpg.

I posted a comment about it. Jan Luehe (super web-server guru) saw it, figured out the problem right away and filed a bug.  the bug was fixed in the very next build of glassfish.  Now that's service!

So -- Glassfish is fast, reliable, free, it has great clustering capability, it's open-source and there are very smart knowledgeable people listening in on all the posts and ready to jump into action to help you.  What else do you need?!?

This is why Glassfish gets my vote as World's Greatest Appserver.


<script src="" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-1764433-1"; urchinTracker(); </script>



« February 2015