GlassFish Upgrade Story

Why do you want to upgrade?

Well!!! Lot of reasons!!! Take the example of a browser, mozilla. In the update center, you get to know some cool feature X has been released in the next version. You want to get the new version, but do not want to lose your current data and configuration, like bookmarks etc. Mozilla upgrades in the way we want to keep our customized data. When browser is restarted after an update, you see that cool feature X along with all your previous configuration.

Would this not be cool if something like this happens in the Application Server too. There are new versions of GlassFish coming up and you might want to do the same thing - upgrade from a previous version to the latest version. The good news is, you could do that!!! And i'm going to explain just that, with some links for you.

Some of the following terms speak a lot about the Upgrade tool of GlassFish.

Side-by-Side Upgrade:

Installing application server in different locations and performing an upgrade. For ex: SJSAS8 is installed in /opt/SJSAS8 and GlassFish is installed in /opt/GlassFish. When upgrade is performed from /opt/SJSAS8 to /opt/GlassFish, it is called a side-by-side upgrade.

In-place Upgrade:

Installing application servers in the same location. For ex: SJSAS8 is installed in /opt/Appserver and you would like to install GlassFish also in the same location, to save some space, the inplace upgrade happens.

Binaries Vs Configuration:

When you install GlassFish, you would see under the install root, "bin", "lib", "domains" etc. The "domains" directory would contain all the configuration information like "deployed applications" and customized settings pertaining to each of the domains under it. The other directories are the binaries of the application server you have installed, with which new features become usable. These include the "config", "bin", "lib" etc.

Upgrade:

When an upgrade is performed, the binaries and configuration, both have to be transferred. This could be done In-place or Side-by-side (explained above). In both the cases, the transfer of binaries is done by the GlassFish installer and the configuration transfer is done by the AS Upgrade Tool. This is clearly demarcated, in the sense that, a binary upgrade could be done with/without the configuration upgrade. The configuration is not affected unless the AS Upgrade Tool is invoked.

AS Upgrade Tool Functionality:

The Upgrade tool works in these simple steps. It could be invoked in the following ways :


  • Running asupgrade from the install_root/bin directory. This invokes the GUI mode of the tool.

  • Executing asupgrade -c from the install_root/bin directory. This invokes the CLI (Command Line Interface) mode of the tool.

  • asupgrade -c has some more options as well, for mentioning the source and target locations. For details, on this, refer the Upgrade tool manual.

When upgrade tool is invoked in one of the above modes, it prompts for the source and target locations. Here source location refers to the directory of the domain that needs to be upgraded. Target refers to the GlassFish application server domains root to which the configuration is to be upgraded. In an In-place upgrade, the domains root directory will be the same.

Apart from these, the admin credentials are also prompted for. When all these details are provided, upgrade tool creates the necessary domains, transfers the configuration, transfers the applications deployed, transfer the realms and logs all these into an upgrade.log. By all these what i mean is that, the domain.xml under domain config directory is modified to incorporate all the config changes from the source.

Links:

These are some of the links that could be useful to you.
1. Prasad's blog : http://blogs.sun.com/prsad/entry/upgrading_to_glassfish
2. AS Upgrade One Pager : http://www.glassfishwiki.org/gfwiki/attach/OnePagersOrFunctionalSpecs/upgrade-one-pager.html

Comments:

Thank you, this is very well written and simple. It answers my questions without making things complicated. Thanks!

Posted by ITVGuy2000 on August 02, 2007 at 05:44 AM IST #

Great article...

I am trying to upgrade from Glassfish v2 to v3. But I am getting the following error when running the asupgrade tool.

Enter the source domain directory:C:\\programs\\glassfish\\domains\\domain1
Enter the target domains root directory:C:\\programs\\glassfish\\domains\\domain1
While updating iiop-clusters end point port nos to iiop-listener, could not obtain Domain element
Unexpected error encountered while parsing

Any idea on this?

Posted by Satish on December 21, 2009 at 05:28 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

shalini_m

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today