Bistro!
Alexis Moussine-Pouchkine's Weblog
public enum Topic { Java, GlassFish, Tools, Sun, InFrenchInZeText, SDPY }

20091109 lundi novembre 09, 2009

La présentation du séminaire GlassFish

( nov. 09 2009, 03:02:00 PM CET ) Permalink Comments [0]

20091106 vendredi novembre 06, 2009

IzPack and GlassFish v2.1.1

My friend Julien announces that IzPack 4.3.2 has just been released.
As a cherry on the cake, he also refreshed the GlassFish v2 IzPack installer to v2.1.1 which was just release a few days ago. Thanks Julien!

( nov. 06 2009, 02:42:16 PM CET ) Permalink Comments [0]

20091103 mardi novembre 03, 2009

Webinar GlassFish - aujourd'hui à 16h

La présentation en ligne GlassFish est toujours prévue pour aujourd'hui (mardi 3 novembre) à 16h00 (heure de Paris, amis francophones du monde entier vous êtes les bienvenus!). Il n'est pas trop tard pour s'inscrire.

Jérôme Dochez (l'architecte de GlassFish) et Didier Burkhalter (la cheville ouvrière de nombreux projets GlassFish en entreprise) seront là pour m'aider à répondre au question pendant et après la présentation qui sera relativement courte (environ 30 minutes). A tout à l'heure.

( nov. 03 2009, 08:26:21 AM CET ) Permalink Comments [0]

20091031 samedi octobre 31, 2009

Bug hunting and FishCAT'ing

If anything, the traffic on the "issues" GlassFish mailing list should be a hint on the stabilization work going on before v3 is declared final later this year.

At the same time the FishCAT team is also busy testing the latest releases.

( oct. 31 2009, 11:29:33 PM CET ) Permalink Comments [1]

20091029 jeudi octobre 29, 2009

GlassFish v2.1.1 est là

Je ne sais pas si c'est pour fêter la sortie de GlassFish v2.1.1, mais Oracle vient de publier des nouvelles largement rassurantes sur GlassFish dans une nouvelle FAQ sur l'avenir de plusieurs produits Sun dans l'eco-système Oracle une fois l'acquisition finalisée. Il y est entre autre question de continuer un support actif à la communauté et aux clients GlassFish ainsi que d'alignements technologiques entre GlassFish Enterprise et Weblogic. Pour qui connaît les deux offres, je pense que cela apparaîtra assez naturel.

On notera qu'aujourd'hui déjà GlassFish utilise EclipseLink (l'implémentation de référence de JPA) alors que WebLogic 10g et 11g utilisent de multiples technologies de GlassFish comme en témoigne ces pages de modifications apportées par Oracle.

Quoi qu'il en soit, comme je le disais en début de billet, c'est la version 2.1.1 qui est rendue aujourd'hui disponible en même temps que Sun GlassFish Communication Server 2.0 (Sailfin 2.0), l'offre de serveur d'application Telco (SIP, Diameter, etc...) développée avec Ericsson. En attendant la version 3 en décembre, voici donc une version pour tous les clients actuels de GlassFish qui attendent avant tout des évolutions mineures (pour eux, plus de 200 bugs corrigés ce n'est pas mineur) pour leurs systèmes en production plus que des nouveautés comme v3 en apportera. Rarement l'équipe GlassFish aura été aussi sollicitée.

GlassFish 2.1.1 est une mise à jour de la version la plus largement déployée de GlassFish en production (niveau d'API Java EE 5). On y trouve de nouvelles versions de composants importants (Java MQ 4.4 / Jersey 1.0.3 / JSF 1.2_13 / Grizzly 1.0.30 / Metro 1.1.6), le support de AIX 6 et de mod_jk ainsi qu'une nouvelle option de partage de charge (par connexion) dans l'ORB. Enfin, le méchanisme de gestion de groupe Shoal propose des améliorations des node agents pour une meilleure détection (plus rapide, plus fiable) des noeuds d'un cluster. Bien entendu cette version continue de proposer une extreme simplicité pour la mise en place d'un cluster et les outils de gestion production GlassFish Enterprise Manager.

Téléchargement de GlassFish 2.1.1 ici: https://glassfish.dev.java.net/downloads/v2.1.1-final.html et n'oubliez pas le séminaire en ligne GlassFish de la semaine prochaine.

( oct. 29 2009, 08:39:57 AM CET ) Permalink Comments [3]

20091028 mercredi octobre 28, 2009

Oracle's take on GlassFish

On don't think this will quite stop people from asking (me and others on the team) the same question, but this new FAQ from Oracle certainly has some positive information on GlassFish's future. The blogosphere and twitosphere have been quite active on that news today...

( oct. 28 2009, 11:55:28 PM CET ) Permalink Comments [2]

Séminaire en ligne GlassFish la semaine prochaine

Avec l'activité autour de GlassFish (sortie imminente de v2.1.1, v3 dans quelques semaines avec Java EE 6) et le succès du livre blanc, il nous a semblé opportun d'organiser un séminaire en ligne pour faire le point sur l'avancement du projet et pour répondre à vos questions. Ce sera donc le

Mardi le 3 novembre 2009 (dans une semaine) à 16h00

Le format est classique: 45 minutes de présentation et le reste de questions/réponses. N'oubliez pas de vous inscrire pour obtenir les détails (URL et mot de passe).

( oct. 28 2009, 09:47:46 AM CET ) Permalink Comments [1]

20091007 mercredi octobre 07, 2009

Recent GlassFish endorsements

Servlet 3.0 (JSR 315) support in Maia
How to install and use JRebel with Glassfish and Eclipse IDE
ColdFusion - Installation, deployment, and platforms
New Java-monitor probe for Glassfish users.
I think I also saw something recently on either EHCache or TerraCotta as well...

( oct. 07 2009, 03:20:06 PM CEST ) Permalink Comments [0]

Attending and presenting at Java2Days this week in Sofia

I'll be attending the Java2Days conference at the end of this week in Sofia, Bulgaria.

The conference is quite geared towards server-side Java with Spring and Java EE getting great coverage with SpringSource employees and Java EE expert group member Reza Rahman.

My first talk on Thursday is on GlassFish v3 while the second is on portability of J2EE/JavaEE applications (lessons learned while migrating customer applications to GlassFish). Should be fun!

( oct. 07 2009, 10:13:50 AM CEST ) Permalink Comments [0]

20091005 lundi octobre 05, 2009

Using the EJBContainer API with or without Maven (but with GlassFish v3)

Updated this blog on October 28th as you no longer need to have a full GlassFish install to test EJBs
The typical way to start GlassFish is to use $asadmin start-domain but you could also start it using java -jar modules/glassfish.jar. Both start a standalone instance of GlassFish. The following paragraphs discuss GlassFish Embedded (i.e. start it using an API).

There are at least two ways to start GlassFish in embedded mode: using org.glassfish.api.embedded.Server and associated classes but also using the (now standard in EJB 3.1) EJBContainer.createEJBContainer() API. Let me describe here the latter one and reserve the more general embedded case for a later blog entry.

The goal is to write something like as simple as this to test your EJB :

    EJBContainer c = EJBContainer.createEJBContainer(); // new in EJB 3.1!
    Context ic = c.getContext();
    SimpleEjb ejb = (SimpleEjb) ic.lookup("java:global/sample/SimpleEjb");
    ejb.sayHello();

EJB's found in the classpath of the running code above will automatically be deployed and made available via lookups.

Calls to EJBContainer.createEJBContainer() are likely to be made from your tests. If you're making those calls by constructing yourself the execution classpath, then you simply need to add glassfish/lib/embedded/glassfish-embedded-static-shell.jar, an empty jar with a Class-Path: listing the required jars and that is part of the GlassFish distro. In fact, if you're using recent builds of NetBeans 6.8 (and the soon-to-be-released beta), the IDE does this for you when GlassFish is the target server. If you are using Maven, it's a bit trickier.

To use EJBContainer.createEJBContainer() from Maven tests, you'll need to add the following dependency to your POM (updated to promoted b70):

     <groupId>org.glassfish.extras</groupId>
     <artifactId>glassfish-embedded-all</artifactId>
     <version>3.0-b70</version>
     <scope>test</scope>

You could restrict this to a smaller set of GlassFish artifacts but for non-trivial tests (if you use JPA for instance), you would start to have a fairly long list of dependencies so the above sounds like a reasonable thing to do. This will require Maven to download the GlassFish All-in-one JAR file (40MB or so). The reason I wrote it would be trickier with maven is that you need to pass a property during the createEJBContainer() call indicating the location of a GlassFish v3 install. The above Java code would need to read something like this:

     Map p = new HashMap();
     p.put ("org.glassfish.ejb.embedded.glassfish.installation.root",
           "/path/to/glassfish"); // include trailing "/glassfish"
     ec = EJBContainer.createEJBContainer(p);

As of build 69 (maybe 70?), this is no longer needed - i.e. you can simply have glassfish-embedded-all.jar as a dependency or simply in your classpath. A full install of GlassFish is no longer required (although it may be interesting if you want to use JDBC configurations). Read this blog by Thomas for another interesting approach: Nice follow-up blog here: http://ctpjava.blogspot.com/2009/10/unit-testing-ejbs-and-jpa-with.html

Starting the appserver this way (with or without Maven) exercises the actual GlassFish code, not another implementation or a customized fork. There are some limitations to what you can run and in particular port configuration is ignored (not listening on any) and only local EJB interfaces are available (the spec only requires EJB 3.1 lite support). On the other hand, JPA calls are very much possible.

This should all work with v3 promoted build 66 (I just tested this with promoted build 70, see above simplification). Adam Bien beat me to covering that topic, but I hope you get some additional info here. In my case the start-up, setup, deploy and shutdown of GlassFish Embedded are worth about 6 seconds. Note that there is no OSGi involved here.

For a complete working example with JPA calls, check out this sample code.
The EJB 3.1 specification has a chapter (#22) on "Embeddable Usage". Check it out for further details about EJBContainer.

( oct. 05 2009, 05:40:10 PM CEST ) Permalink Comments [3]

20090928 lundi septembre 28, 2009

"Le futur de Java" ce jeudi à l'OpenWorldForum

Ce jeudi, vous êtes conviés à venir à l'Open World Forum qui se tient à Paris (Eurosites George V dans le 8ème) et en particulier à la series de courtes sessions autour de Java.

Avec l'imminence du rachat par Oracle de Sun, un point sur Java semblait intéressant et utile. Au programme, le chemin parcouru par Java SE depuis sa mise en Open Source et les avancées prochaines de JDK7, une table ronde sur les langages dynamiques sur la JVM (Groovy, Scala, Fan, et Clojure, ou Jython, JRuby et PHP?), et enfin un point sur Java EE 6 et son implémentation de référence GlassFish v3. Notre Guillaume Laforge sera de la partie pour la table ronde.

Ce sera bref (1h30 au total), mais une occasion concrète de faire le point sur les travaux en cours et sur ce que le futur proche nous réserve.

• Programme: http://openworldforum.org/program/floss-java.
• Enregistrement, c'est ici: http://openworldforum.org/Register.

( sept. 28 2009, 09:02:24 AM CEST ) Permalink Comments [1]

20090918 vendredi septembre 18, 2009

GlassFish tip: customize directory listings

With GlassFish being a very capable HTTP server out of the bowser (thank you Grizzly!), it was time for v3 to offer the ability to configure directory listings. It is now possible to have pages listing files per NAME (default), SIZE, or LAST_MODIFIED.

Configuration can be done inside web.xml (in the form of an additional init-param to the DefaultServlet servlet called sortedBy). This would hold true for a given application and support dynamic reloading (no full redeploy, no restart to take changes into account).

You might find it more convenient to have it be part of default-web.xml (located in domains/domain1/config/). Of course that would require restarting the container. In both cases, the listing should be explicitly allowed or else the user will see a 404 Not Found error. Here's an example to configure the listing presentation in either config files :

  <servlet>
    <servlet-name>default</servlet-name>
    <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>listings</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>sortedBy</param-name>
     <param-value>LAST_MODIFIED</param-value>

    </init-param>  
    <load-on-startup>1</load-on-startup>
  </servlet>

Of course there's also the XSLT approach to have yet more control over the presentation. Check the use of localXsltFile and globalXsltFile in the default-web.xml file itself.

( sept. 18 2009, 04:03:15 AM CEST ) Permalink Comments [0]

20090916 mercredi septembre 16, 2009

JavaZone presentation posted (video)

My GlassFish v3 presentation from last week's JavaZone is already posted along with many others. If you're interested in the demos, feel free to skip right to them:
Demo #1 (developer features) @ 7:01
Demo #2 (Java EE 6) @ 21:00
Demo #3 (GlassFish à la carte) @ 26:00
Demo #4 (OSGi) @ 36:50
Demo #5 (RESTful admin) @ 49:00

There's also an offline version (close to 200MB of MPEG-4 for QuickTime in 640x480 format).

( sept. 16 2009, 11:06:04 AM CEST ) Permalink Comments [2]

20090911 vendredi septembre 11, 2009

Which GlassFish v3 download bundle is right for me?

You may have read the (recently updated) page comparing GlassFish v2 and v3 and decided to go with v3. The next question you might ask yourself is which bundle should I download? Why is the zip archive bigger than it "installer" equivalent? Here is some data to help you decide.

First of all, it's only a matter of packaging. The product (the actual bits) remains the same in all cases.

Zip or installer?
The zip installer is new in v3. As the name implies, unzipping is all you need to do. A default domain1 is already available. If you use the installer (now open source, which makes the difference between community and Sun-branded version even smaller, but see later paragraph on that), you'll be able to change port, JDK, install, etc. This "installer" bundle comes in two flavors - windows and Unix-like (an .sh script which works on Linux, Solaris, and the Mac). The installer also let's you do silent installs with a statefile which can be produced without doing any actual install.

The IPS/pkg/updatetool feature of GlassFish (which I've been talking about it a fair bit on this blog) is quite unique for an appserver, and as you may already know this is written in python and thus ships with a "native" minimal python runtime. As a consequence, to avoid having lots of different artifacts (one per platform), the ZIP or installer bundles do not contain this by default. The zip version will require the user to install pkg and updatetool the first time the command is invoked (network access is required). The installer will offer to do that as part of laying out the bits.

You may also note that the ZIP bundle is actually bigger (25% to 30%) than the installer archive. This is because pack200 (un-)compression (much more efficient on JAR files than PKZIP) kicks in as part of the installer process.

Web or Full profile?
That's an easy one since no matter which one you chose, you can install or remove packages to get the feature-set offered by the other profile. The download page (for instance on glassfish.org) has the details of what's included in which profile. With only 30 MB, the smallest download is a Web profile installer. The largest is the zip archive of the full profile at 70MB.

GlassFish (Community) or GlassFish Enterprise?
Technically speaking, the differences are minimal. The license and the branding (a new feature in v3, the software is fully brand-able) are the two notable differences (another minor one is the different IPS repositories). Feature-wise, the two distributions are the same. Of course, the big difference lies in the fact that only the Sun-branded version (GlassFish Enterprise) is supported. But again, this is one and the same product and you will in fact be able to morph a community install into a GlassFish Enterprise instance to avoid any reinstalls. More on that in a later blog.

At this time, since v3 isn't final just yet, only the community bits are available, while GlassFish Enterprise v3 will be available on the Sun.com GlassFish page. In the meantime you can download the Java EE SDK.

( sept. 11 2009, 07:31:34 PM CEST ) Permalink Comments [0]

20090909 mercredi septembre 09, 2009

GlassFish v3 at JavaZone - slides, demos and screencasts

Here are the slides that I presented on GlassFish v3 at the JavaZone conference today. All five demos went fine (some with the help of the audience), and I even got questions at the end. I'm not sure what the plans are for making the conference talks available (delay, format), so here are the five demos (almost identical) in various screencasts :

Painless development with GlassFish (deploy on change, session preservation, etc...). Use it today on any GlassFish v3 install.
Painless Java EE 6 development (James Gosling himself, only using NetBeans, not Eclipse like I did). Starts at 12:21. Same as above - any v3 version.
• GlassFish à la Carte - Part 1, Part 2, Part 3 (the closest to what I showed) - Same as above, IPS has been there from day one (much improved in recent builds though).
Extending GlassFish v3, OSGi-style (by Jerome Dochez, the GlassFish architect), note that recent promoted builds of GlassFish v3 now ships with the Felix OSGi declarative service bundle by default, no need to install it manually.
• (I don't know of a screencast showing the RESTful admin, but Rajeshwar blog would be a good start and Ludo's JavaFX demo a fun illustration). Using recent promoted builds is recommended.

Update: the video is available (streaming + QT format). Demo timing are documented here.

Let's enjoy the rest of the conference now...

( sept. 09 2009, 04:35:44 PM CEST ) Permalink Comments [2]


GlassFish Podcast
Get GlassFish V3 Preview
Support GlassFish Enterprise

Today's Page Hits: 1767




bea conference glassfish groovy ips java javaee javafx javaone javazone jug metro mysql netbeans openesb openoffice opensource paris performance pkg podcast presentation sdpy sun swing techdays tips updatecenter v3 webservices
Links