Let GlassFish update itself (v3 preview refresh)

If you were a little scared to switch your preferred repository from “stable” to “dev” as explained in my previous entry, you now have the ability to simply update your GlassFish v3 Preview installed image as we’ve just pushed out an update to the GlassFish stable repositories (both for the Java EE SDK and for GlassFish). See Abhijit’s announcement <!–and the TA post –>. We carried out more tests than for typical promoted releases posted on the “dev” repository to allow people to upgrade their 3-month old GlassFish v3 release.

The new stable version is build 57 and reasons to upgrade include :
• Hudson no longer has deployment issues.
• You get the OSGi declarative services (see Jerome’s blog)
• Jersey moved from 1.0 to 1.1
• tons of bugs fixes
• lots more new Java EE 6 features implemented (the exact delta is hard to compute)
• the update tool itself and its CLI have been updated from 2.1 to 2.2

If you’re using the SDK you probably have already been offered to upgrade.
If you don’t mind using the command-line, it’s easy as this single command :

% bin/pkg image-update
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  50/50   3392/3392   72.62/72.62 

PHASE                                        ACTIONS
Removal Phase                                131/131
Install Phase                                474/474
Update Phase                               3544/3544
PHASE                                          ITEMS
Reading Existing Index                           9/9
Indexing Packages                              52/52

You’ll see that the new version for GlassFish is 3.0-57 (build 57) and that the bits are now up-to-date (no ‘u’ in the UFIX column).

% bin/pkg list
NAME (PUBLISHER)                              VERSION         STATE      UFIX
ant (contrib.glassfish.org)                   1.7.1-0.6       installed  ----
felix                                         1.8.0-0         installed  ----
glassfish-amx                                 3.0-57.1        installed  ----
glassfish-appclient                           3.0-57          installed  ----
glassfish-branding                            3.0-57          installed  ----
glassfish-branding-gui                        3.0-57          installed  ----
glassfish-cmp                                 3.0-57          installed  ----
glassfish-codegen                             3.0.0-20        installed  ----
glassfish-common                              3.0-57          installed  ----
glassfish-common-full                         3.0-57          installed  ----
glassfish-corba                               3.0.0-20        installed  ----
glassfish-corba-omgapi                        3.0.0-20        installed  ----
glassfish-ejb                                 3.0-57          installed  ----
glassfish-ejb-lite                            3.0-57          installed  ----
glassfish-grizzly                             1.9.15-0        installed  ----
glassfish-gui                                 3.0-57          installed  ----
glassfish-hk2                                 3.0-57          installed  ----
glassfish-jca                                 3.0-57          installed  ----
glassfish-jcdi                                3.0-57          installed  ----
glassfish-jdbc                                3.0-57          installed  ----
glassfish-jdbc-gui                            3.0-57          installed  ----
glassfish-jms                                 3.0-57          installed  ----
glassfish-jpa                                 3.0-57          installed  ----
glassfish-jsf                                 2.0.0-14        installed  ----
glassfish-jta                                 3.0-57          installed  ----
glassfish-jts                                 3.0-57          installed  ----
glassfish-management                          3.0-57          installed  ----
glassfish-nucleus                             3.0-57          installed  ----
glassfish-registration                        3.0-57          installed  ----
glassfish-scripting                           3.0-57          installed  ----
glassfish-web                                 3.0-57          installed  ----
glassfish-web-gui                             3.0-57          installed  ----
javadb                                    installed  ----
javaee-firstcup-tutorial                      2.0.1-4         installed  ----
javaee-javadocs                               3.0-57          installed  ----
javaee-samples-build                          0.9-4           installed  ----
javaee-samples-full                           0.9-4           installed  ----
javaee-samples-web                            0.9-4           installed  ----
javaee-tutorial                               6.0.1-9         installed  ----
jersey                                        1.1.1-1.0       installed  ----
metro                                         2.0-14          installed  ----
mq-bin-sh                                     4.4-11.5        installed  ----
mq-config-gf                                  4.4-11.5        installed  ----
mq-core                                       4.4-11.5        installed  ----
mq-locale                                     4.4-11.5        installed  ----
mq-server                                     4.4-11.5        installed  ----
pkg                                           1.111.3-30.2311 installed  ----
pkg-java                                      1.111-30.2311   installed  ----
python2.4-minimal                    installed  ----
sdk-branding-full                             3.0-57          installed  ----
updatetool                                    2.2.2-30.2311   installed  ----
wxpython2.8-minimal                           2.8.8-30.2311   installed  ----

If you’ve downloaded GlassFish from http://glassfish.dev.java.net, you have not been notified because the preferred authority (IPS repository) has been set to contrib.glassfish.org by mistake. To fix this from the command-line:

% bin/pkg set-authority -P stable.glassfish.org

(this assumes that there’s already a stable.glassfish.org repository defined. It only sets it as the preferred).

From there you can simply issue a :

% bin/pkg image-update

and you’ll be in for a 74MB download to update your existing install as shown above.

To fix the preferred repository issue from the Update Tool (bin/updatetool), simply select the image and chose “File > Image Properties” to select stable.glassfish.org as the preferred repository. You can then select “Available Updates” and do the update from there.

If you want things like the RESTful admin and monitoring, you’ll need to be running a more recent build (promoted build 60 and above in this case).

Author: alexismp

Google Developer Relations in Paris.

3 thoughts on “Let GlassFish update itself (v3 preview refresh)”

  1. Hi Alexis, the instructions above for updating GFv3 seem not to be sufficient. Trying the CLI I get:
    -bash-3.00# bin/pkg set-authority -P stable.glassfish.org
    pkg: set-publisher: publisher does not exist. Use -O to define origin URI for new publisher.
    Trying the update tool with a repository at http://stable.glassfish.org did not work either. Looking at the properties of the repositories already defined in the update tool suggests that the URL should contain ‘pkg’.
    So, what is the URL of the repository at stable.glassfish.org?

  2. Also, what does :
    % bin/pkg authority
    The initial command in the blog post assumes there’s already a stable.glassfish.org repository defined. It’s just a matter of setting the proper preferred repository.

Comments are closed.

%d bloggers like this: