mercredi sept. 02, 2009

Let GlassFish update itself (v3 preview refresh)

This blog has moved to
Follow the link for the most up-to-date version of this blog entry.

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 . 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 (                   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, you have not been notified because the preferred authority (IPS repository) has been set to by mistake. To fix this from the command-line:
% bin/pkg set-authority -P

(this assumes that there's already a 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 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).

jeudi août 20, 2009

Java EE 6 tutorial and samples straight to your GlassFish v3 install

While the Java EE 6 tutorial and the code samples it offers are still work in progress (expect a few rough edges), it's probably a great source for getting up to speed with this update to the Java EE platform. If you've installed the Preview of the Java EE 6 SDK you've probably been encouraged to download an update to the Java EE 6 tutorial:

If you've been using the GlassFish v3 Preview bits from then you may be wondering what this is all about as there is no "Tutorial" package or update showing up in the GlassFish updatetool. Whether this is a feature or a bug is yet to be decided but this is technically due to different repositories being wired in for the two different downloads (glassfish vs. SDK). You can check what your repository settings are with to following command (you can visit the URL for an HTML representation of the contents of the repository) :

% pkg authority
AUTHORITY                           URL                 (preferred)            

If you're using GlassFish promoted builds you have a preferred authority (repository) defined as If you're running GlassFish v3 Preview (released at JavaOne in May 2009), then it comes with a preferred repository defined as

In both cases, in order to be able to see and add the tutorial and sample packages, you simply need to add like this :
% pkg set-authority --enable -O

Once that's done, you can list the tutorial and samples packages available for install and proceed with the install :
% pkg list -a | grep javaee
javaee-firstcup-tutorial ( 2.0.1-4         known ----
javaee-javadocs (          3.0-47.2        known ----
javaee-samples-build (     0.9-2           known ----
javaee-samples-full (      0.9-2           known ----
javaee-samples-web (       0.9-2           known ----
javaee-tutorial (          6.0.1-9         known ----
% pkg install javaee-firstcup-tutorial javaee-javadocs javaee-samples-build javaee-samples-full javaee-samples-web javaee-tutorial

This will install 17MB worth of samples and tutorial documentation and place this all in your glassfish/samples and glassfish/docs directories.

if you're running GlassFish v3 Preview (which already comes a stable repository) it is important that you then either disable or remove the authority. Failing to do so will cause multiple packages conflict on the next update of GlassFish. Here's how to disable the repository:
% pkg set-authority --disable

Of course you can use the bin/updatetool to accomplish all of the above if you're CLI-averse.


This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected


« novembre 2015

No bookmarks in folder


No bookmarks in folder