Česky   |  Deutsch   |  English   |  Español   |  Français   |  Indonesia   |  日本語   |  한글   |  Polski   |  Português (BR)   |  Türkçe   |  中文   |  正體中文   |  Your Language  
PlanetNetbeans
Planet NetBeans regroupe les articles concernant NetBeans dans la Blogosphere.
Flux
[RSS 1.0 Feed] [RSS 2.0 Feed]
[FOAF Subscriptions] [OPML Subscriptions]
Avez vous un blog sur NetBeans? Ajoutez votre blog à PlanetNetBeans
Inscription aux flux

Powered by:    Planet

Dernière Mise à Jour:
July 02, 2009 11:18 PM
All times are UTC

sponsored by Sun Microsystems

visit NetBeans website
Polyglot NetBeans - June 30, 2009 02:24 PM
NetBeans 6.7 is here!

"Netbeans IDE 6.7 is here...You can download it now

NetBeans IDE 6.7 is integrated with Project Kenai, a collaborative environment for developers to host open-source projects. NetBeans also builds on the success of NetBeans 6.5 with native support for Maven; GlassFish, issue tracker and Hudson integrations; and enhancements to Java, PHP, Ruby, Groovy and C/C++. Highlights of the 6.7 release include support for JavaScript 1.7, Ruby Remote Debugging, and integration of the Java ME SDK 3.0.

If you want to know more about some of the new features read the posts below. And watch short videos about Kenai, Maven, Java Applications and so on...

New version is available in 20 languages. Some of them are fully supported by NB globalization team, some are product of community.

We hope you will enjoy new Netbeans and it will help you to create lot of successful programs :)." Blanka

Bistro! - June 29, 2009 08:16 AM
Which GlassFish version is right for me?

GlassFish has several versions that you may have heard of. Each one attempts to address different needs. I've had several people in the last couple of weeks ask me which one they should use, so here's a quick list of features and reasons to use one more than the other.

GlassFish v2.1: current JavaEE 5-certified and supported product. Offers centralized admin, clustering. v2.0 was released in September 2007 and v2.1 in March 2009 with the Enterprise Manager value add. All major IDE's (NetBeans, Eclipse, IntelliJ) have plugins to deploy to this version. GlassFish v2.1 update 3 is the latest version available for supported customers.

GlassFish v3 Prelude: interesting if you want a lightweight Java EE 5 web container (no EJB, JMS, etc...) with admin tools. This is the first release using the modular OSGi architecture, IPS packaging format, and developer features such as preserve session across redeployments. This was released in November 2008 and is a supported product (although not a long-lived as traditional software at Sun). It also offers native deployment of Grails and Rails applications. Some people use this version in development and deploy to v2.1.

GlassFish v3 Preview: while not yet a supported product, this is a more recent version building on the same foundation as the above "Prelude" version, only it now offers both a Web distribution and a full Java EE 6 (Preview) distribution. It has a number of improvements over the "Prelude" version (IPS and updatetool for instance) and certainly much closer to a fully-featured application server. The final version should ship in September 2009 and offer a JavaEE 6, single-instance architecture. At that point this will become a supported product. The centralized administration will come in the v3.1 release which will mean feature parity with v2.1. If you like bleeding edge stuff, promoted builds for v3 are here.

For more details on the releases, including sustaining (restricted) releases, please visit http://blogs.sun.com/GlassFishForBusiness/

Bistro! - June 29, 2009 03:57 AM
Présentations de l'aquarium d'été - JavaOne, Java EE 6, GlassFish, Metro, OpenDS, Cloud, OpenSolaris

Voici les présentations faites à la troisième édition de l'Aquarium Paris :
Versions PDF.
• Les mêmes sur slideshare.net

Merci à tous les participants et en particulier à Jacky de Cap Gemini pour son retour sur GlassFish et son déplacement de Lille.
Pour ceux déçus par l'absence d'une présentation dédiée à JavaFX, je vous invite à vous rendre au ParisJUG ce 7 Juillet ou il en sera question en détails.

Bistro! - June 25, 2009 08:53 AM
GlassFish et Java EE 6 à Niort mercredi prochain

Antonio pour la partie Java EE 6 et votre serviteur pour GlassFish v3. Détails ICI.
Comme le dit Wadael, espérons que GlassFish y gagnera en assurances! ;-)

Bistro! - June 24, 2009 05:00 AM
GlassFish v3 (custom) distributions with IPS

In the last part of my 'GlassFish à la carte' series of blogs and screencasts there is a missing piece if you were to try to reproduce the scenario - the GlassFish v3 IPS package containing the definition of my custom distribution (a distribution could be thought as a product/implementation of the notion of a profile as defined in Java EE 6).

That custom distro is the set of core GlassFish v3 packages which are required by my application (in this case it was using JAX-RS and EJB 3.1). While most GlassFish packages are meant to contain some sort of artifact (most likely a collection of JAR files as explained in these posts), this "distro" package for GlassFish has no such artifact but rather a key depends section of the package prototype file.

You can find the source for building the package on the glassfish-repo project site. As you can see there, the list of required modules is simply expressed :

"depends" : {
     "pkg:/felix@1.8.0" : {"type" : "require"},
     "pkg:/glassfish-amx@3.0-51" : {"type" : "require"},
     "pkg:/glassfish-common@3.0-51" : {"type" : "require"},
     "pkg:/glassfish-corba-omgapi@3.0.0-20" : {"type" : "require"},
     "pkg:/glassfish-ejb-lite@3.0-51" : {"type" : "require"},
     "pkg:/glassfish-grizzly@1.9.15-0" : {"type" : "require"},
     "pkg:/glassfish-hk2@3.0-51" : {"type" : "require"},
     "pkg:/glassfish-jca@3.0-51" : {"type" : "require"},
     "pkg:/glassfish-jsf@2.0.0-13" : {"type" : "require"},
     "pkg:/glassfish-jta@3.0-51" : {"type" : "require"},
     "pkg:/glassfish-management@3.0-51" : {"type" : "require"},
     "pkg:/glassfish-nucleus@3.0-51" : {"type" : "require"},
     "pkg:/glassfish-web@3.0-51" : {"type" : "require"},
     "pkg:/jersey@1.1.0-1.0" : {"type" : "require"},
     },

Note that this requires using the http://pkg.glassfish.org/v3/dev repository which hosts the promoted builds of GlassFish v3. With a stable build (once GlassFish v3 is declared final), the explicit implementation could go away (mostly the -51's in the example above which refer to promoted build 51). Finally, the glassfish-jca module listed above should really not be required if it wasn't for a silly bug (that is fixed in the next promoted build).

So there it is, a really simple way to make sure a given set of packages will be present before you deploy your application. Of course the packages that make up a distribution do not need to all be core GlassFish package. In particular one could imagine including the Spring container as demoed here and discussed there.
Maybe we should create two such packages for the two official Web and Full distributions Sun offers for GlassFish v3.

Bistro! - June 22, 2009 04:29 PM
GlassFish at the Jazoon Conference

The GlassFish Day at Jazoon was really well attended (significantly more than last year) and is now over, so the rest of the conference can now start. This is a good time to go thru the list of GlassFish-related talks at the conference, so here it goes:

James Gosling's Keynote
Roberto on Java EE 6
Jérôme and Ludo on GlassFish v3
Java EE 6 BOF
Hudson talk
Ed's JSF 2.0 presentation
Harold on Metro Web Services
Ludo again, this time on JavaFX+GlassFish v3
Ed on JavaFX+JavaEE

Slides for the GlassFish Day are being posted here.

Bistro! - June 21, 2009 09:32 PM
L'aquarium d'été - ce vendredi 26 juin 2009

La nouvelle édition de l'aquarium à Paris c'est cette semaine! Vendredi 26 juin, une journée pleine de contenu!
N'oubliez pas de vous inscrire: http://fr.sun.com/sunnews/events/2009/jun/open_source/
Nouvelle adresse: Capital 8 - 32, rue de Monceau.

Bistro! - June 19, 2009 02:42 PM
GlassFish v3 a la carte screencast - Part 3 - Jersey and EJBs

In the first screencast, I installed a minimal GlassFish v3 from a small bootstrap (IPS toolkit), created a domain and started the server. The second entry did something actually useful with GlassFish and two containers: Java Web and Spring. In this screencast, I layer a custom distribution on top of a GlassFish kernel. Enough to deploy a JAXR-RS / EJB 3.1 (lite) application.

For the sake of brevity this screencast is mostly command-line. It starts with the 5MB ips bootstrap and installs a pre-defined custom distribution which is enough to deploy the jersey-ejb sample application. The custom distribution is essentially an IPS package with no artifact, only a set of dependencies on other packages. For the curious out there, here is the step-by-step for the screencast :

bin/pkg set-publisher -P --enable -O http://pkg.glassfish.org/v3/dev dev.glassfish.org
bin/pkg set-publisher --enable -O http://localhost:10001 localRepo
bin/pkg install sample-distro
bin/asadmin create-domain --instanceport 8080 --adminport 4848 mydomain
bin/asadmin start-domain
bin/asadmin deploy ~/jersey/jersey/samples/jersey-ejb/target/jersey-ejb.war
open http://localhost:8080/jersey-ejb/

I hope this series of screencasts demystifies the IPS/packaging side of GlassFish and shows the interesting possibilities it offers to end-users.

Bistro! - June 18, 2009 09:27 AM
GlassFish at Lyon JUG

JUG's in France have been popping up here and there at an amazing rate in the past 18 months since Antonio and the team have started the Paris JUG. I think we're somewhere in the 12 JUGs or so. For a country that didn't have any really active one only 2 years ago that's just amazing.

I was down in Lyon earlier this week for a JUG meeting (this was only their third meeting) on Groovy and GlassFish where over 60 people showed up. Come to think of it, when adding up all the JUGs, I think we average about 1000 attendees very months, that's the equivalent of a pretty decent conference. The feedback I've received was pretty good. I did a demo-heavy presentation focused on GlassFish v3 (most importantly the modularity and extensibility) and the 30-minute Q&A session took me to demo v2 (Enterprise Manager), explain the pricing model and monetization strategy, discuss more generally the Java EE and app server statuses, and deflect the best I could some Oracle-related questions...

My slides are here and you can read some notes on the event here (in French).

Bistro! - June 17, 2009 01:51 PM
Livre Java EE 6 (in english in the text) en dédicace ce samedi à Paris

Antonio Goncalves :
" Je vous propose de nous retrouver samedi 20 juin à la librairie Le Monde En Tique de 15h50 à 18h pour une séance de dédicace. Le principe est simple : vous venez, vous achetez un exemplaire du livre (ou plusieurs exemplaires pour offrir à votre femme et à vos parents), et je vous écris un petit mot doux. C’est un bon deal non ? "

Détails ici.

Bistro! - June 12, 2009 11:32 AM
GlassFish v3 a la carte screencast - Part 2

In the first screencast, I installed a minimal GlassFish v3 from a small bootstrap (IPS toolkit), created a domain and started the server. This entry will actually do something useful with GlassFish and two containers: Java Web and Spring.

The Spring DM (OSGi) part of the demo is described in Jerome's GlassFish V3 Extensions, part 3 : Spring, Java EE 6 and OSGi blog entry. In the screencast, the manual install of the Spring bits is replaced by adding a new repository definition (a local one) and installing a single package from there. For the rest, the demo demonstrates how to extend GlassFish without using any GlassFish API and how to invoke an OSGi bundle service without using any OSGi API - the servlet injects the service by name using a standard @Resource annotation. Note that Jerome's most recent blog entry covers OSGi Declarative Services for a somewhat simpler approach.

The screencast was done using the dev/ repository, so your experience may vary as the boundaries of the IPS packages and their dependencies are still being worked. Also, instead of the default Felix console briefly shown, you could use the web console described by Sahoo.

The full-size (and offline) video is available here (15MB, video/x-m4v).
The next screencast will show how one can seamlessly add more GlassFish v3 features to obtain a "full" Java EE application server and still benefit from the modular architecture in terms of pay-as-you-grow (startup time, load-on-demand, memory consumption, ...).

Bistro! - June 11, 2009 06:54 AM
How many bytes does it take to update a full GlassFish install?

The answer is 24MB.
... and that's for an initial full install weighting 63MB. The reason for it being small (other than the fact that you *can* do such a full update) is that IPS, the packaging system behind GlassFish v3 works at the file level rather than with package granularity.

Your mileage may vary depending on the jump you're trying to make (in my case this was from b47 to b49).
Here's a quick replay of my experience :
% bin/pkg set-authority -P -O http://pkg.glassfish.org/v3/dev --enable dev.glassfish.org
% bin/pkg image-update
DOWNLOAD PKGS FILES XFER (MB)
Completed 32/32 198/198 24.10/24.10

PHASE ACTIONS
Removal Phase 64/64
Install Phase 39/39
Update Phase 193/193
PHASE ITEMS
Reading Existing Index 9/9
Indexing Packages 41/41

Voilà !

Bistro! - June 10, 2009 12:00 PM
Lyon(JUG) mardi prochain - GlassFish, JavaOne, ...

Je suis invité mardi prochain par le LyonJUG pour présenter GlassFish (détails et inscription, lieu). L'autre partie de la soirée (la première en fait) sera consacrée à Groovy.

J'y parlerai essentiellement de GlassFish v3 Preview disponible depuis JavaOne et en particulier des ses fonctionnalités pour développeurs et son extensibilité OSGi.

Bistro! - June 10, 2009 06:18 AM
GlassFish v3 a la carte screencast - Part 1

Given the modular approach taken in GlassFish v3 (170+ OSGi bundles in v3 Preview) and the IPS/pkg(5) tooling provided, I created a first screencast showing the following :
• install the IPS toolkit image (download), a 5MB bootstrap
• define the repository to get to the GlassFish v3 bits (pkg.glassfish.org/v3/dev/ in this case)
• install the minimum set of packages required to create and start a domain (using the pkg command-line and the graphical updatetool)

The full-size (and offline) video is available here (15MB, video/x-m4v).
Further screencasts will show how one can add selected features (containers) to deploy specific applications.

Of course you don't have to be fiddling around with the various GlassFish v3 packages and could also be downloading one of two GlassFish v3 Preview distributions: web profile and full Java EE 6. Even then you'll only pay for what you use.

Bistro! - May 31, 2009 08:00 AM
Pre-versions GlassFish v3 et Java EE 6 disponibles

Avec quelques heures d'avance sur le démarrage de JavaOne 2009, Sun vient d'annoncer la sortie de GlassFish v3 Preview (à ne pas confondre avec Prelude sorti l'année passée) qui propose une implémentation de Java EE 6 en attendant le mois de septembre et les versions finales.

GlassFish v3 Preview est disponible en deux versions pour refléter le profil Web défini par la spec Java EE 6 (la modularité du serveur et son updatetool permet de passer facilement d'une version à l'autre). Cette version propose une implémentation complète d'un appserver (contrairement à Prelude qui ne proposait qu'un web container). On y trouve donc un conteneur EJB 3.1 (local ou distant), JSR 299 et Bean Validation (merci JBoss), JAX-RS (Jersey), JSF 2.0 (Mojarra), JAX-WS 2.2 (Metro), et d'autres encore.

Bien entendu, le socle technique reste basé sur OSGi (par défaut Felix dans le cas de v3 Preview), l'extensibilité reste offerte par HK2 (pour n'avoir qu'une seule ligne de commande, un seul fichier de config et une seule console d'admin web extensible quels que soient les modules présents) et les fonctionnalités de productivité (temps de démarrage, deploy on change, préservation des sessions sur redéploiement) sont là et élargies à Eclipse (3.4) en plus de NetBeans (6.7 RC). Mon petit doigt me dit que tout ceci sera démontré lors de la technical keynote de JavaOne du mardi après-midi.

Il y a également le support des langages et frameworks dynamiques: Groovy/Grails et jRubyOnRails, mais aussi désormais Jython (encore en Release Candidate) et Django. Tous sont disponibles sur l'updatecenter (ou on trouve également un package hibernate). Au delà des profils Java EE 6, la modularité de GlassFish v3 permet de se monter un serveur à la carte et d'imaginer par exemple une solution légère alliant Grizzly et Jersey (une combinaison populaire).

Et maintenant, place à JavaOne!

Bistro! - May 29, 2009 05:04 PM
GlassFish unconference - this Sunday

What do Ted Goddard, Eduardo Pelegri-Llopart, Paul Sandoz, Kohsuke Kawaguchi, Bill Shannon, Jeanfrancois Arcand, Larry Cable and Jerome Dochez have in common? They've all registered to attend the GlassFish Unconference this coming Sunday in San Francisco (1pm Hall A at Moscone Center, details in the previous link).

As a reminder this is a free event and the content will be based on the interest of the people who show up. So don't be shy and make sure you take this opportunity to pick the brains of the development team, provide feedback, and understand where the community and products are going. Here's some background on unconferences.

So far, popular topics include GlassFish (v3), OpenESB, Hudson, and REST/JAX-RS/Jersey.
Registration is recommended.

Bistro! - May 25, 2009 11:41 AM
GlassFish @ Java AppServer Day (Genova)

I was lucky to visit Genova last week for the Java AppServer Day organized by the local JUG. I tend to blindly trust the organizers of JUG-initiated events and this event was yet another good reason to keep on doing this.

The event had exactly 100 attendees and the format was 30-minute sessions with a round-table at the end. I went first and focused on GlassFish v3 since this was mostly a developer audience and clearly had no time to also cover the clustering/operations side of GlassFish in half an hour. I did try to do as many demos as possible around startup time, dynamic startup/shutdown of services, Deploy on save in NetBeans, Session preservation across redeploys with a non-trivial application, extending GFv3 with a Spring container (available right from a local update center repository) to demonstrate OSGI-based GlassFish v3 extensibility as detailed in Jerome's latest blog entry.

JBoss' Alessio (Web Services lead) alluded to JBoss 5.1 being very close to being released (and indeed it has been since). Now waiting for the supported version ;) He also mentioned OSGi as being a priority for the next releases. Of course having Oracle in the room made the exercise quite interesting. I met Paolo, an Oracle "veteran" and a likely future colleague :) and got to listen to an Oracle middleware presentation (I hadn't seen one in ages and certainly not since the BEA integration). Paolo focused on the operations side (which arguably WebLogic does fairly well) including Coherence, JRockit and Work Manager. Finally Alef, a SpringSource founder (but no longer an employee) focused on OSGi and dmServer. I think his presentation was more didactic than mine on the OSGi front, but our demos certainly felt very similar.

Thanks to Paolo and the rest of the organizers, this was a great event, I wish I could have stayed a bit longer, the city looks beautiful!

Bistro! - May 15, 2009 04:10 PM
GlassFish Prague Workshop - Done!

This 2-day GlassFish workshop in beautiful Prague is now over and a good chunk of the slides are now available from the event wiki.

With 50 people in the room we had a full house with people from the Czech Republic, Hungary, Poland, France, Spain, Slovakia, UK, Norway, Sweden, Switzerland, Belgium, Netherlands, etc... I believe the content (thanks to all the presenters) and the format were good and I certainly enjoyed the great conversations during and after the presentations. The welcome reception at the end of the first day was certainly a nice moment (check out the photo of the 2 self-cooling kegs of beer, 20 liters/5+ gallons each!).

What made the event interesting also to me was the mix of Sun employees (product engineers, pre-sales, consultants, support engineers, even sales reps), but also partners and customers. We certainly tried to be open about many things, from the way we build the software and the community to the way to how we do business (not sharing any customer information without their consent of course). Also the refreshing part of this workshop was that actually very little time was spent talking about Oracle ;)

We will be running a similar event in Zurich during the first day of Jazoon (free event as well, only one-day long and probably no hands-on-lab). Details and registration here: GlassFish Day, June 22nd. Zurich.

Bistro! - May 10, 2009 05:15 PM
GlassFish European workshop kicking off tomorrow in Prague

GlassFish has had a couple of workshops in California and it's now time to swim to Prague for two days starting tomorrow. Registration for the workshop was carried out pretty quietly given the maximum number of people we could easily accomodate here in the Sun office (less than 100) and the rate at which seats were going out.

Nevertheless this should be a great occasion to cover various GlassFish topics, from Portfolio to hands-on labs for clustering, centralized admin, OpenESB (Fuji really), and more by John Clingan (Product Manager), Jerome Dochez (GlassFish Architect) and other very fine speakers. As always I'm confident that the best part will be the socializing and I look forward to finding out more about uses of GlassFish around Europe and discussing the future of the product and community.

Now is also probably a good time to remind you that we'll have a free GlassFish Day in Zurich at the Jazoon conference on Monday 22nd June and the Java Application Server day on May 21st in Genova later this month.

Bistro! - May 07, 2009 03:43 PM
Java Application Server Day 2009

The Genova Java User Group is organizing the App Server Day in two weeks in Genova and have been invited to represent GlassFish.

I think App Servers are exciting again. I like to compare it to how dull operating systems were before zfs, dtrace, and more generally virtualization came along. All the participants to this event have real innovations to offer and this should be a fun day comparing and contrasting the various approaches!

Make sure you register. The organizers seem to be really on top of this and I'm looking forward to my first time in Gênes.

Bistro! - May 02, 2009 09:56 AM
SDPY - Java EE 5 is 3 years old

Java EE 5 is 3 years old. GlassFish v1 will hit the same milestone in a few days.
Java EE 6 and GlassFish v3 are scheduled for the fall with an interim release of the app server at JavaOne next month.

Polyglot NetBeans - April 28, 2009 01:08 PM
Python and NetBeans


Introduction to Python support in NB prepared by Blanka:




"Some time ago you could notice that in the main download page new menu item appeared.

It is Python Early Access.

Python is a dynamic object-oriented programming language that can be used for many kinds of software development. You can download it by clicking on that item or is also available as a plugin for NetBeans 6.5 in Tools - Plugins.

Let's go thought creating a new project. Python is displayed as the project when only the Python EA version of the IDE has been installed on your machine. Other categories may appear if Python EA was added to the IDE as a plugin. New Project wizard offers you creating of a new python project from a template, or importing existing projects.

In the next step you enter the Project Name and select the version of Python you want to use from the drop down list. You can manage this at any time in the Properties of the project (right click on the project). Then click Finish to create the project.

Note that the project is open in the Source Editor of the IDE, displaying basic information, as seen in the following image. Netbeans IDE automatically documents the author and date of the project along with providing a short sample print "Hello" program.


The NetBeans editor for Python supports Smart Indent, Outdent, and Pair matching, additional to syntactic and semantic highlighting, code folding, instant rename refactoring, mark occurrences, finding undefined names, and Quick Fixes. Code completion is available for local function and variable names as well as Python keywords. The editor also assists you by inserting and fixing import statements.


If you want to try more than just creating the new project, you can follow Python tutorials on the netbeans pages: Developing a Python Application Using NetBeans IDE or Introduction to Python EA in NetBeans IDE."


Bistro! - April 27, 2009 10:59 AM
SDPY - Happy 5th B-day BSC!

According to my archives, blogs.sun.com is turning 5 today. So much has happened in this period of time and I can only think of positive benefits this service brought to Sun, both the employees and the company.

Bistro! - April 26, 2009 08:04 PM
Antonio's book on Java EE 6 (and GlassFish v3)

Antonio Goncalves seems to have just shipped his work for his new Java EE 6 book. It sounds like the very first one to cover this topic which is quite a challenge given the specification will be final only in a few months. In the mean time, I wish Antonio the best for JavaOne sales! He's certainly very well positioned to write such a book - at the heart of the matter, yet not a "vendor" but rather a exemplary Java community member.

GlassFish v3 as covered in this book (great to have GlassFish be part of the title!) is also a moving target since "Prelude" was released last year with a Java EE 5 web container and previews of EJB 3.1 and JSF 2.0 available via the update center. In the mean time, only promoted builds of the Java EE 6 work have been made available, so I hope Antonio will have a chance the refresh the content when Java EE 6 and GlassFish v3 ship later this year in a second edition of the book.

Bistro! - April 22, 2009 03:22 PM
Different strategies for building different packages (for GlassFish v3)

In my previous two posts (related to building packages for GlassFish), I covered the basics of the Update Center for GlassFish v3 and the underlying IPS/pkg(5) technology and what it takes to build a Hibernate package for GlassFish v3.

One key part that is still missing is the process (or social) side of things - how does one get to commit to the glassfish-repo project, and maybe more importantly, how does a community package make its way to the pkg.glassfish.org/v3prelude/contrib/ repository that is wired into every single GlassFish v3 distribution? This part needs a little more fine tuning and I will cover it soon in a dedicated post. In the mean time, I encourage you to join the glassfish-repo project as a developer.

In this post I'll cover the different possible natures for GlassFish v3 packages beyond the (rather simple) Hibernate example described earlier and available here to study. As you will see the spectrum of packages for GlassFish can be quite large.

1/ Frameworks and libraries
Examples include web frameworks, JDBC drivers, and any other technology that simply requires a set of JAR files to be available from the application running in GlassFish. Such JAR libraries should be placed into GLASSFISH_HOME/glassfish/lib. There is no need to restart GlassFish unless this is a new version of a library with the same JAR file name (individual applications may need to be restarted though). Note it is recommended that you do not touch the default GLASSFISH_HOME/glassfish/domains/domain1 domain. This is because putting any IPS-controlled file in that directory and having GlassFish (or the developer) modify or remove it will show up as a "partially installed" package.
This package use-case is the simple approach discussed in the previous Hibernate use-case.

2/ Applications running in GlassFish
Assuming an application packaged in a WAR, JAR, or EAR has no external resource dependency (connection pool, JMS queue, etc..), the IPS package can simply place the artifact in the autodeploy directory of a domain. As stated above the issue is that there is no guaranty that domain1 exists. One approach is to create IPS packages with a dependency on another IPS package responsible for creating a generic "updatecenter" domain (name TBD) thus installing that package/domain if it's not already there. This would also avoid each application shipping with its own domain causing unnecessary space to be used, additional admin tasks to manage the domains, and potential port conflicts. Notable exceptions would be packages requiring considerable setup of the domain (specific jvm options, data-sources or other resources pre-configured, etc.). In this case, shipping the application with a pre-configured domain actually makes more sense.

With the approach of placing the application in the updatecenter/autodeploy directory, removing the package will delete the archive from the autodeploy directory and thus cause the application to be undeployed. Removing the "updatecenter" package will cause the applications depending on it to be no longer available as the domain directory would be deleted. Ideally the domain needs to be stopped first.

3/ Applications independent of GlassFish
Applications running in a separate process can be installed as top level directories and thus be quite independent from the GlassFish v3 runtime bits. Sample packages include monitoring applications, tools, databases, etc. In this case, laying out files at the root of the target/stage staging area will result in a top level install sitting next to GlassFish, similar to JavaDB in the current GlassFish v3 builds. Such a tool can then reference the glassfish v3 install using ../glassfish. You may also want to add binaries to glassfish/bin referencing your application or tool. In the case of JavaDB, there is even an additional ../glassfish/bin/asadmin command (start-database) and that takes us to the next type of GlassFish packages: extensions to the runtime and admin tools.

4/ GlassFish extensions (HK2/OSGi components)
Being modular in its own right, GlassFish supports placing JAR files under the glassfish/modules directory. Of course the artifacts placed there need to adhere to certain rules fairly well documented in the Add-On Component Development Guide (especially the "Writing HK2 Components" and "Adding Container Capabilities" sections). Note you can also extend the admin console, the CLI, and add monitoring capabilities. All of these tasks are quite orthogonal to the (rather lightweight) effort of producing the actual IP package placing the artifacts into the GlassFish modules directory (check the above "Frameworks and libraries" section for how to drop files into a specific directory).

A word on (post-)install scripts
As you can see in the discussion above, it's all about laying out files on disk. GlassFish/IPS packages cannot start/stop processes or run scripts during or after time install by default (if you really need pre/post actions, read this and this). Of course you can (and are actually encouraged) to provide instructions in the package description (in the prototype file), a README.txt file that remains on disk after install, and possibly scripts to be manually executed after the install (to pass some asadmin commands) or prior to some uninstall (like stopping a domain). Remember though that factory configs are best (albeit not always possible).

You should note that the above are merely suggestions for how to build packages for GlassFish v3, not quite best practices at this point, so we're more than happy receiving feedback and suggestions! As you can see the spectrum of packages for GlassFish can be quite large.

There should be at least two more part to this series: how to get your package into the public contrib/ repository and a more complex package example requiring a domain (and thus a dependency on another IPS package).

Bistro! - April 15, 2009 12:08 PM
More with "deploy --libraries" in GlassFish

A few months back Sahoo mentioned the use of "asadmin deploy --libraries" in the comments section as an effective way to deal with libraries. I recently had two people ask me about the behavior of GlassFish when multiple applications are deployed with --libraries pointing to the set jar file so I thought I'd share here what I found (this is for GlassFish v2.x). Thanks to Siva and Hong for the help there.

When multiple applications have --libraries pointing to the same jar, the classloading infrastructure tries to "share" the jar by loading it in the same classloader.

A side effect of this is that modifications to the jar require the undeployment and deployment of the application (along with its --libraries option) for it to use the updated version of the library. A simple deployment will trigger a ClassNotFoundException.

Note that it is your responsibility to keep track of all the applications using a given library and to do an undeploy/deploy for all of them as you may otherwise end up having different applications using different versions of the library.

The other option, which doesn't require the keep track of the applications using a given library, is to update the library bits and simply restart the server. Of course that has other drawbacks...

Bistro! - April 15, 2009 03:06 AM
Sample Hibernate Community Package for GlassFish v3

This is the second of a series of entries for people interested in producing packages for GlassFish v3 and hosting them on a live repository. The previous entry is IPS/pkg(5) crash-course for GlassFish v3 community package developers - Part 1. The next entry is here: Different strategies for building different packages (for GlassFish v3).

In this entry, we'll go through the various parts required to make the Hibernate library available to end-users via the GlassFish v3 Update Center. This enables developers to add this library with a single step, thus avoiding various well-known jar/classloader issues. In a team of multiple developers, all can install the library in the same manner. This provisioning/install approach can be extended beyond the simple use of a library, but let's start with something simple (more in other entries).

As introduced in the previous entry the glassfish-repo project is where it all happens. It provides a bootstrapping mechanism to abstract away the low-level details of creating and publishing IPS packages. Looking at the code hosted on glassfish-repo, you'll find a top-level directory called packager/ which has sub-directories, each corresponding to an IPS package for GlassFish v3.

Setup
There's a bit of setup described here for the following:
Update Center 2.x toolkit image. This is the cross-platform bootstrap code needed for creating, publishing, installing, and installing IPS packages. Get it from http://wikis.sun.com/display/IpsBestPractices/Downloads. You will need to add pkg/bin and pkg/python2.4-minimal/bin to your PATH
and pkg/python2.4-minimal/lib and pkg/vendor-packages to LD_LIBRARY_PATH. You will not manipulate this toolkit yourself, a Maven plugin will do it for you.
>• Subversion (to check out the project code). This is not needed if you create your own local directory structure and don't intend to publish back to this glassfish-repo project (although we'd love for you to share as much as you possibly can).
Maven 2.0.9 (everything is built using Maven2 in GlassFish v3 btw).
JDK 6

Key files and directories
There are really three key files and a directory for building an IPS package (this is documented here, so inlining it here for brevity) :
packager/package-name/pom.xml, the Maven config file to describe any dependency used when building the IPS package and the Maven profile/plugin that does all the packaging magic for you.
packager/package-name/build.xml, the ANT script that lays out the files on disk as they should be installed on the target GlassFish instance.
packager/package-name/src/main/resources/pkg_proto.py is called the prototype file and it contains the metadata required to build the package (name, version, license, and various attributes). The file format is well-documented here.
packager/package-name/target/stage is the staging area where the above ANT script should layout the files (with proper permissions) required by the IPS package. This is the root of a glassfish v3 install.

Before looking at the Hibernate example, consider studying packager/sample-package and using it as a template for your own packages.

Authoring the Hibernate IPS package example
The Hibernate package artifacts available from the glassfish-repo project has the following interesting content (click on the filenames to see the entire content):

packager/package-name/pom.xml contains the existing Maven profile and plugin definition encapsulating the IPS logic and adds a dependency to the hibernate-ips artifact (version 3.4.0.1) hosted on the java.net Maven2 repository :
   <dependency>
     <groupId>org.glassfish-repo.packager</groupId>
     <artifactId>hibernate-ips</artifactId>
     <version>3.4.0.1</version>
     <type>zip</type>
  </dependency>


packager/package-name/build.xml simply creates the target/stage directory and places the various libraries required by Hibernate into the lib/ directory, thus making the framework available to all the applications deployed in a domain or instance related to the GlassFish install for which users will be installing this package. Check this link for how to best use the "Common Class Loader" and decide where you need to place your jar files. Optionally you can use the <attachArtifact> tag to create an .ipstgz file (also discussed here) to archive the work done by this script.

packager/package-name/src/main/resources/pkg_proto.py contains pretty self-explanatory metadata for the IPS package (name, version, summary, description, and classification). In particular this is where you reference the location of the LICENSE.txt file (name and location can be different). dirtrees offers a way to take a subset of what is in the staging area by explicitly listing the directories that should be considered as being part of the IPS package. More documentation on the format of the file can be found here. Most of this is presented to the user when listing or installing the package. There is no dependency specified for this package. If you are not familiar with the Python syntax, I would suggest you look at IDE's (such as NetBeans) offering Python support (color-syntaxing, etc...) to avoid debugging issues late in the build process.

packager/package-name/target/stage contains a single "glassfish" subdirectory that corresponds to the top-level directory in a GlassFish v3 prelude install and all the Hibernate JAR files are placed into the lib/ directory of the appserver install. This translates into having them placed in GLASSFISH_V3_INSTALL/glassfish/lib. Note that you shouldn't assume the presence of any particular domain such as "domain1" (more on that in another post).

Publishing and testing
Building and publishing is really a single-step process with IPS so you need to start a local repository using:
$ pkg.depotd -d ips-toolkit-dir/pkg -p 10000 --rebuild (running on part 10000. Full documentation here.

At that point, you can simply invoke maven from the package directory root (packager/hibernate in our case) with the appropriate repository URL, the path to the python binary, and the "ips" profile name :
$ mvn -Drepo.url=http://localhost:10000 -Dpython=ips-toolkit-dir/pkg/python2.4-minimal/bin/python -P ips

Once the package is successfully packaged, you can use GlassFish's Update Tool (GF_V3_INSTALL/bin/updatetool) or the pkg CLI to :
• add http://localhost:10000 as an additional repository
• test the package

Another post will soon cover how packages can make their way on to the "live" repository.

If you're interested in the maven-makepkgs-plugin logic/magic used build the IPS on your behalf, read the project's main page, and this post by Kohsuke. You'll find out how to build a package with a single src/proto.py file (no ANT) and getting most of it's metadata straight from Maven.

Going further...
Upcoming entries will covers the process to actually publish your packages to the GlassFish http://pkg.glassfish.org/v3prelude/contrib/ repository. This entry covers Different strategies for building different packages (for GlassFish v3). Expect also more entries on building more advanced packages.

Bistro! - April 14, 2009 07:12 PM
GlassFish swimming to CommunityOne North (April 15th), and a beer meetup

CommunityOne North is happening tomorrow is Oslo, Norway. A single day (free of charge and totally sold out) really packed with many sessions on many different topics (as in any good C1 conference). Simon Phipps (Sun) and Håkon Wium Lie (Opera) are the two keynote speakers.

GlassFish and Java EE are well represented with sessions on GlassFish v3, migrating to and writing with Java EE 5, a session on Sailfin by Ericsson, Hudson for performance testing, and more.

Whether or not you are attending the conference (and if you're not attending the MamaMia musical) on Wednesday evening and are at all interested in GlassFish, you should consider coming to the GlassFish Meet-Up at Hard-Rock Café (map) from 4:30pm-6:pm. Courtesy of the Sun GlassFish team! Please add a comment to this blog post or send email if you plan on joining.

Polyglot NetBeans - April 08, 2009 08:55 PM
NetBeans 6.7 Milestone 3 and its new features

Recently Blanka was playing with the newest build of NetBeans 6.7. The IDE in version 6.7, which is still under development, achieved its Milestone #3!
Here are Blanka's comments on few new NB M3 features:


"What is new in NetBeans 6.7

NetBeans team releases NB 6.7 Milestone 3, that offers new interesting features like Kenai Integration or new features in PHP, C/C++, Profiler or Maven. Let's have a look at the most interesting ones. First of all you can Download NetBeans IDE 6.7 Milestone 3.

First you will register some changes in the main menu. Instead of items “Profile” and “Versioning”, there is only “Team”. Also some sub-menus differed.





Totally new thing is that the IDE now integrates with Kenai.com to support typical developer workflow. You can find it under the new item “Team - Kenai”.
To start playing with the Kenai integration in the IDE, you can first try to search and open existing projects on Kenai and get their sources, which does not require login. To get more involved, create an account on Kenai.com, and bookmark some projects or ask for membership. To create your own project, you need to ask for project creation permission first (will not be required when NB 6.7 is released).
More you can see in the Kenai window (Kenai under the item “Window” in the main menu), get projects' sources, issues, and other associated services and information or open, edit and create issues for given Kenai projects, directly in the IDE.

Maven is a framework that provides help with managing the project lifecycle, including building and managing dependencies. Maven projects follow a set of standards that are described with a project object model (POM) to ensure consistency between projects. You can create new project “File – New Project – Maven”.
New multi-tabbed artifact details viewer is now available, accessible from Maven Repository Browser (“Window – Other – Maven Repository Browser”) or Maven section of Quick Search toolbar field.
"Basic" tab shows basic artifact's info, versions and related artifacts.
"Project" tab shows artifact project's info like links to bug tracking, source management, mailing lists etc.
"Classpath" tab shows direct dependencies in lists
"Graph" tab shows transitive dependency graph, see special section below





Hudson monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Hudson focuses on the following two jobs: Building/testing software projects continuously and Monitoring executions of externally-run jobs

Start by specifying the location of your Hudson server under “Window - Services” and there should be Hudson.

If you don't have a job for your project, the IDE can help you make one. Currently Maven and Java SE project types are supported, as are Subversion and Mercurial for the SCM. You can right-click your server node, or use “Team - New Continuous Build”. Browse your hosted jobs and their builds. You can also browse the job's workspace, and artifacts from a build. The console from a build can be viewed in the IDE's output window. You should also get notifications in the status bar when a build fails."

Bistro! - April 06, 2009 10:52 AM
IPS/pkg(5) crash-course for GlassFish v3 community package developers - Part 1

This is the first of a series of entries for people interested in producing packages for GlassFish v3 and hosting them on a live repository. Part 2 describing the Hibernate package is here. Part 3 discussing different strategies for building different packages is there.

GlassFish v3 (starting with the "Prelude" release from last Fall) uses IPS, aka pkg(5), to manage the various bits and pieces (modules or packages) of the application server. IPS stands for Image Packaging System and comes from the OpenSolaris land and gives GlassFish v3 a graphical (bin/updatetool) and CLI (bin/pkg) tools to manage packages, those that come with GlassFish and the ones available from IPS repositories. The new web admin console also integrates an IPS client. These tools let you browse, install, update, and remove packages very similar to Synaptic/apt, Eclipse, or NetBeans (note that this is different from the technology used for the update center in GlassFish v2). This "Getting Started" is a great intro to using the Update Center.

If you're interested in IPS, there's a bunch of resources around IPS and this IPS primer by Kohsuke is one such good resource for a pragmatic view and tools such as makepkgs, and recommandations for testing packages and moving them around. This current blog entry focuses on the GlassFish perspective and in particular for people interested in creating they're own packages to add features or applications to GlassFish. In the case of GlassFish v3 Prelude, existing packages are listed directly on the various repositories:
pkg.glassfish.org/v3prelude/dev/
pkg.glassfish.org/v3prelude/contrib/
pkg.sun.com/glassfish/v3prelude/contrib/
"% bin/pkg authority" lists registered repositories while "% bin/updatetool" provides an equivalent but graphical view.

There are potentially really different sorts of packages that can be installed via IPS and the GlassFish Update Center: frameworks, Java EE applications, standalone applications, and GlassFish extensions. Future blogs will go into each of those but, in a nutshell, it's all about laying out files on disk and adding some extra metadata to the package itself (name, license, etc...).

IPS is also used throughout the middleware organization at Sun to deliver its software and updatecenter2.dev.java.net is the project that defines a portable (not just OpenSolaris) environment and tools to make this happen. In particular, you will most likely need a pre-installed Toolkit Image specific to the platform used for producing the packages (IPS is written in Python and this toolkit contains the pkg binary, a minimal Python 1.4 runtime, and a number of Java APIs).

The first thing you probably need to know is that glassfish-repo.dev.java.net is the place to start to avoid having to understand the intricacies of IPS. This is where you will be asked to provide :
• your artifacts (the actual files or a Maven dependency expressed in pom.xml)
• license and readme files
• a simple python file containing additional meta-data: version, description, dependencies, and more
• a build.xml ANT script laying out the bits in a staging area

My next entry in this series walks through the existing "hibernate" package available in source format on glassfish-repo and already live in the contrib GlassFish v3 Prelude repository.

Bistro! - April 03, 2009 10:55 AM
GlassFish l'aquarium in Paris - Presentation Slides

The latest GlassFish Community Day in Paris dubbed "l'aquarium" took place this past Monday. The agenda covered Java EE 6, GlassFish Portfolio (including ESB and WebSpace) but also MySQL and OpenSSO. The other interesting part is the large number (almost half) of non-Sun speakers. Here are the slides for the various presentations (some in French, most in English). Thanks to all the speakers and to the attendees (I hope you like the new GlassFish shirt!).

"Bienvenue et Introduction GlassFish Portfolio", Jean-Yves Pronier (SlideShare, PDF)
"Java EE 6", Roberto Chinnici (SlideShare, PDF)
"GlassFish v3, en route Java EE 6", Alexis Moussine-Pouchkine (SlideShare, PDF)
"GlassFish Web Space", Patrice Goutin (SlideShare, PDF)
"Retour d'expérience OpenMQ (1)", Jérôme Molière, Mentor/J (SlideShare, PDF)
"GlassFish Enterprise 2.1, production", Didier Burkhalter, Alexis Moussine-Pouchkine (SlideShare, PDF)
"Transaction support, guaranty of delivery and consistency with Glassfish ESB BPEL", Paul Perez et Bruno Sinkovic, Pymma Consulting (Source from Pymma Consulting)
"Retour d'expérience OpenMQ (2)", François Ostyn (SlideShare, PDF)
"Authentification Web unique, Fédération d'identité et sécurisation de services Web .Net et Java avec OpenSSO", Alain Barbier, Sun Microsystems et Stève Sfartz, Microsoft (SlideShare, PDF)
"MySQL HA Solutions", Lenz Grimmer (SlideShare, PDF)

Bistro! - April 01, 2009 12:40 PM
Grails 1.1 for GlassFish v2 (via the UC)

Vivek and team are bringing you the recently released Grails 1.1 via the GlassFish v2 Update Center (GLASSFISH_INSTALL/updatecenter/bin/updatetool).

Bistro! - March 30, 2009 09:16 PM
L'aquarium de printemps...

... c'est demain mardi (enfin peut-être aujourd'hui pour ceux qui ne sont pas scotchés à leur ordinateur) : http://www.solutionslinux.fr/cycle_specifique.php?pg=4_17&track=3. Ne loupez pas la première session sur Java EE 6 et la dernière sur MySQL (solutions de mise en haute dispo). Entre les deux le contenu me parait solide : retours d'expérience, interop identité avec Microsoft, nouveautés GlassFish v2.1, tour du nouveau produit WebSpace, et ESB avancé avec Pymma consulting. Presque 50% d'intervenants externes à Sun!

Bistro! - March 24, 2009 07:02 PM
Outils Eclipse pour GlassFish

Sébastien l'annonce sur l'Aquarium - un ensemble intégré pour développer avec Eclipse et déployer vers GlassFish (v2 ou v3). Il s'agit d'une version 0.9.9 (Release Candidate), version 1.0 d'ici quelques jours.
A lire également: les billets de John et Ludo. Tous les deux sont à EclipseCon, dont Sun est sponsor Gold.

http://download.java.net/glassfish/eclipse/ pour le téléchargement et les release notes.

Bistro! - March 19, 2009 01:13 PM
Agenda de l'aquarium de printemps le 31 mars 2009

L'agenda quasi-définitif a été publié sur le site de Solutions Linux : Java EE 6, GlassFish v3, portail WebSpace, témoignage client, retour d'expérience MQ, interop identité avec Microsoft, OpenESB, BPEL, et solutions de HA pour MySQL...

L'événement est gratuit, mais les places limités. N'oubliez pas de vous inscrire.

Bistro! - March 19, 2009 09:04 AM
Recent JCP interview on JavaWorld podcast

Andrew Glover's latest JavaWorld interview is a discussion with Patrick Curran the chair of the JCP. Patrick does a good job explaining where the organization stands and what it's doing about the typical concerns raised by the community. He also has some interesting figures and statistics I had not heard before.

Andrew does a good job conducting those interviews. It takes work to get to this result. Been there done that.

Bistro! - March 16, 2009 05:48 PM
The Aquarium, now en français

Comme si je n'avais pas encore assez de blogs, voici, GlassFish et l'aquarium. En Français!

Bistro! - March 08, 2009 11:05 AM
Lastest episode of the GlassFish Podcast available - asadmin

The latest episode of the GlassFish podcast is an edited version of the GlassFish TV session (archive) from a couple of weeks ago.

For the sake of the length of the podcast, I've arbitrarily edited out parts of the session. I hope it does not degrade the value of the content. Feedback welcome.

Bistro! - March 07, 2009 02:03 PM
GlassFish et Java EE indolores à Nantes ce jeudi 12 mars

Je ne sais pas si Nantes est en Bretagne et si le Breizh JUG va bientôt annexer le Nantes JUG, mais j'y présente ce jeudi une présentation intitulée "GlassFish v3, en route pour Java EE 6 et le développement Java indolore!".

RDV à 19h à l'école des mines de Nantes le 12 mars 2009.

Bistro! - February 21, 2009 08:55 PM
IceFaces one step closer to GlassFish Users

IceFaces Push Server and several samples are the latest addition the the GlassFish AppStore Update Center. See Ted's blog for more.
This is available today for GlassFish v2 users. Simply run GLASSFISH_HOME/updatecenter/bin/updatetool and follow the instructions.

Note there's also a recent (Feb 13th) Jersey 1.0.2 update available there.

Bistro! - February 21, 2009 04:13 AM
CommunityOne Olso - April 15th 2009 - Call for Papers

The CommunityOne conference is said to be heading East to New York (March 18 - 19, 2009) and West to San Francisco (June 1 - 3, 2009), so I'm not sure what direction it's heading when going to Olso...
Update: the site is online (has been a little while in fact): http://no.sun.com/communityone

So there it is : CommunityOne Oslo is happening on April 15th 2009 and the call for papers is open. Simply a 150-word (max) abstract to CommunityOne-Oslo-AT-sun.com. The keynote speaker will be Ian Murdock, now Vice President of Cloud Computing Strategy at Sun.

Suggested topics include :
• Development and deployment in the cloud and virtualization
• Social networks and Web 2.0 trends
• RIAs, scripting, and tools
• Dynamic languages, databases, and Web and application servers
• Open-source projects, business models, and trends
• And more

I understand this will be held in the heart of Oslo in a very nice place and that there will be a (social) GlassFish get together at some point in the day.

Bistro! - February 20, 2009 11:43 AM
L'aquarium Paris, v2.0 + appel à communication

La première réunion "L'aquarium à Paris" aura lieu le mardi 31 mars 2009, toute la journée en parallèle de la conférence Solutions Linux.

L'agenda n'est pas encore finalisé (cf. l'appel à communication ci-dessous), mais Roberto Chinnici, le spec lead de Java EE 6 sera là et les sujets ne manquent pas avec GlasFish Enterprise 2.1, GlassFish Web Space, GlassFish ESB et GlassFish Web Stack (tous composants de GlassFish Portfolio). Une place sera également faite aux retours d'expérience (similaires à ceux-ci).

Appel à communication !

Vous souhaitez intervenir dans un format de 10 minutes (Quickie) ou de 45 minute sur un sujet lié à GlassFish (intégration technique, retour d'expérience), ou bien si vous souhaitez suggérer des sujets, une seule adresse de courriel: aquarium-paris-AT-sun.com

Bistro! - February 18, 2009 02:15 PM
Quoi de neuf dans GlassFish 2.1? Enterprise Manager!

Même en cherchant bien, vu d'avion pas grand chose de neuf dans GlassFish v2.1.

En réalité la motivation première pour cette version c'était la sortie annoncée de Sailfin 1.0, la version "Telco" de GlassFish développée conjointement avec Ericsson. Les contraintes de déploiement d'applications SIPServlet 1.x en matière de clustering, de montée en charge, et de partage de charge ont nécessité des améliorations au coeur même de GlassFish (notamment dans la partie frontale Grizzly pour gérer de la qualité de service). Ainsi, il y a de nombreux correctifs intégrés dans cette version 2.1 et un dispositif de clustering + partage de load-balancing capable de tenir en charge plusieurs centaines de milliers de sessions SIP. Des détails sur Sailfin par écrit et en podcast.

En réalité la vraie nouveauté fonctionnelle de GlassFish v2.1 s'appelle "GlassFish Enterprise Manager". Il s'agit de trois nouveaux outils pour gérer GlassFish en production.

Support SNMP - le nom décrit bien la fonctionnalité. L'objectif est de proposer aux entreprises qui possèdent des outils de supervision SNMP d'intégrer la production de GlassFish dans leurs consoles existantes. Techniquement il s'agit d'implémenter une MIB standard pour J2EE (JSR 77) très complète au travers d'un pont entre JMX et SNMP. Les blogs d'Olivier Rivat et de Marc Kossa sont d'excellentes ressources sur le sujet.

Performance Advisor - Il y a deux parties en réalité. D'un part c'est un outil statique de recommendations de tuning (JVM, AppServer) sur la base de quelques questions relatives au matériel utilisé et aux attentes de "qualité de service" de l'application. D'autre part c'est une outil de gestion d'alertes et de "self-monitoring". L'infrastructure est en place depuis GlassFish v1, mais ces règles et alertes pour la gestion de production sont nouvelles : JVM (temps GC, usage mémoire, ..) logs, pools JDBC, CPU, et bande passante. Tout ceci s'intègre dans la console web d'administration de GlassFish.

Performance Monitor - il s'agit d'un outil indépendant (construit sur VisualVM) pour présenter graphiquement l'instrumentation JMX présente dans GlassFish depuis quelque temps et jusque là accessible avec un navigateur de MBeans ou asadmin get. L'outil permet le monitoring d'instance locales ou distante d'instances ou de clusters. Les données disponibles sont fonction du niveau de log des éléments de GlassFish: web container, web services, HTTP, pools JDBC, pools de threads, JVM, ORB, ConnectorService, etc...

Pour en savoir plus :
• Le billet de Nazrul propose une liste exhaustive de pointeurs: documentation, videos, blogs détaillés, etc.
Documentation GlassFish Enterprise Manager 1.0
• D'autres billets sur le sujet

Les deux première captures d'écran appartiennent à la console web, les deux suivants sont issus du Performance Monitor qui est construit sur VisualVM et donc un outil indépendant.

GlassFish Enterprise Manager est disponible sur sunsolve.com pour les clients titulaires d'une souscription GlassFish.
Contactez-moi (mail, commentaire, ...) si vous souhaitez évaluer Enterprise Manager.

Voilà, c'était mon billet #800.

Bistro! - February 17, 2009 06:13 PM
Ils parlent de GlassFish - Nuxeo, SFR

"Developer Zone SFR - RED"
SFR, Cyrille Manente.

Les planches de la présentation sont sur slideshare.net.

Pour en avoir plus sur cette expérience de GlassFish en production chez SFR, vous pouvez lire ce billet et le questionnaire associé.

"10 reasons why Nuxeo is using GlassFish"
Nuxeo, Stefane Fermigier.

Les planches de la présentation sont sur slideshare.net.

Bistro! - February 17, 2009 09:37 AM
Migrating back from Athens

I spent a couple of day in Athens and presented for the first time my "Is my J2EE/JavaEE application portable? Should I care?" presentation to the local Java user group, JHUG. It seemed to be well received but I probably need to make some edits for a better flow of information (maybe less technical details, more demoing).

The take away is really that J2EE/JavaEE is a safe bet if you don't go overboard in using proprietary product features. This is because the investment is done on an open standard, not on a specific implementation or product. The "verifier" (part of every GlassFish install) is a great way to get an idea of where you stand in terms of portability. Sekhar has more in this blog entry.

You can read Paris' report on the event (OpenSolaris, JPA, RIA, and Maven 2 were the other talks) here: http://www.jhug.gr/?p=349

viv's blog - February 11, 2009 04:05 PM
NetBeans tip : replier un bloc de code

Question assez récurente lorsque des utilisateurs venant d'environnement .NET découvrent NetBeans :

Est-ce qu'il est possible de réduire un bloc de code dans une classe, comme le fait Visual Studio avec ses régions ?


La réponse est oui. cette fonctionnalité de NetBeans est basée sur une balise XML placée dans des commentaires, la balise <editor-fold>.

Petit exemple :
Il est maintenant possible de replier ce bout de code sur lui même, et il sera remplacé par le texte ....

Il est possible de configurer le texte qui sera affiché lorsque le bloc de code sera replié (au lieu de ...). Pour cela, il suffit de spécifier l'attribut desc dans la balise <editor-fold> :

Bistro! - February 10, 2009 10:06 PM
GlassFish Portfolio related podcasts

I've just released a new episode of the GlassFish Podcast discussing with Paul Hinz the GlassFish v2.1 release and its new Enterprise Manager.

A few more will follow in the next few days: Sailfin with Sreeram Duvur, GlassFish partner HubCity Media with Steve Giovannetti, and GlassFish community with Eduardo. Stay tuned. iTunes link is here (if that's what you use).

Update: all four podcasts have now been released. Sreeram's interview on Sailfin (GlassFish Communication Server), and full versions (short versions are available from the GlassFish Portfolio page) of discussions with Steve Giovanetti (GlassFish partner talking about system integrator migrations to GlassFish and their business model) and Eduardo Pelegri-Llopart (how the community is structured and how it's doing).

Bistro! - February 10, 2009 02:00 PM
GlassFish Portfolio en bref

Sun annonce aujourd'hui la disponibilité de GlassFish Portfolio, la plate-forme applicative unifiée de Sun.

En deux mots, y'a quoi dedans?

Vu d'avion, GlassFish Portfolio c'est quatre produits: GlassFish Enterprise (appserver), GlassFish ESB (distrib supportée d'OpenESB), GlassFish WebSpace (Portail conçu avec Liferay), et GlassFish Web Stack (pile LAMP). En grattant un peu on y trouve aussi Sun Message Queue, Sun Web Server, et Sun Proxy Server.

C'est pas un peu du repackaging marketing cette annonce?

Oui et non. Oui, car l'investissement de Sun dans ces différents secteurs technologiques et dans l'open source n'est pas nouveau: serveur web (le produit de volume de Sun avant même l'open source), portail (en production chez de nombreux clients), etc... Non, parce que GlassFish v2.1 apporte pour la première fois GlassFish Enterprise Manager (SNMP, performance advisor, performance monitor), une suite d'outils pour la gestion de GlassFish en production, et un portail de nouvelle génération issu du partenariat avec Liferay. Enfin il y a le mode de vente (pricing), simple et très abordable.

"Enterprise Manager", ca sonne comme MySQL Enterprise Manager....

Oui et ce n'est pas un hasard. GlassFish Enterprise Manager en soit mérite un ou plusieurs billets. En attendant que je trouve le temps de les écrire, je vous invite à consulter ce lien qui devrait au fil de la journée regrouper des billets qui traitent des différentes facettes de ce nouvel outil.

Autre chose?

Oui, deux choses :
1/ L'Update Center existant de GlassFish va prendre de l'ampleur pour servir d'outil de provisioning (certains parleront d'AppStore) pour l'ensemble du portfolio. L'outil sert déjà à proposer des mises à jours et des version "preview" de Java EE 6, il permettra bientôt de proposer des extensions du portfolio et des solutions de partenaires. Pour l'aspect provisioning, voici une petite video pour se fixer les idées.
2/ Au delà de GlassFish Portfolio, il y a bien entendu MySQL (les similitudes dans le mode de vente et l'intégration technique ne sont pas fortuits), l'offre d'identité (en particulier OpenSSO Enterprise), mais aussi le nouveau GlassFish Communication AppServer (SIP & co.), construit avec Ericsson et le reste de la communauté Sailfin sur la base de GlassFish 2.1.

Enfin pour l'anecdote, vous trouverez sur le site GlassFish Portfolio deux interviews que j'ai réalisé (paragraphe "Podcasts") d'une part avec un partenaire intégrateur spécialisé dans la migration vers GlassFish et d'autre part avec Eduardo Pelegri Llopart sur la communauté GlassFish. Des versions longues seront en ligne bientôt sur le Podcast GlassFish. Je commence à maîtriser Audacity! :)

Bistro! - February 06, 2009 08:51 AM
1001 speakers au Paris JUG ce mardi 10

Soirée anniversaire du Paris JUG ce mardi 10 février. Attention, le lieu est différent: FIAP. Quickies, 45 minutes de buffet, Stephan "JavaPolis" Janssen et parait-il surprises et goodies. Il va falloir que je négocie ma soirée!

Bistro! - February 04, 2009 10:44 AM
Future talks - Athens and Paris

I'll be participating in the next "Valentine's day" (!) Athens' JUG event, this coming Saturday, February 14th.

This will be the first time I present on "Migrating J2EE/JavaEE applications" (to new containers). The goal of the presentation is to understand whether J2EE/JavaEE buys you vendor-independence or not and what the typical pitfalls are.

This is based on the team's recent experiences helping customers migrate to GlassFish off of WebLogic, WebSphere, and others. While examples are taken from migration use-cases to the GlassFish application server, they are all real-life scenarios and provide technical details that most people will face when moving from on vendor product to another.

As a reminder, I'm also participating in tomorrow's Sun University Day in Paris and will also present on GlassFish and Java EE at this evening event with our training partner Demos.

Now back to writing and polishing the slides!

Bistro! - February 02, 2009 05:09 AM
Tutoriel Java EE avec NetBeans et GlassFish sur developpez.com

A part l'usage de JEE par endroits au lieu de Java EE (casquette Sun oblige), je ne vois pas quoi reprocher à ce nouveau tutoriel de Serge Tahé: "Construire un service web Java EE avec Netbeans 6.5 et le serveur Glassfish". Très didactique.

Bistro! - January 29, 2009 12:29 PM
Jersey episode on the GlassFish podcast

I posted a new episode of the GlassFish podcast, a Jersey presentation by Paul Sandoz. You can listen to a previous interview of Paul in episode 10. Make sure you also look at the 5 short demos Paul created here (bottom of the page).

I have about five more episodes coming out in the next few weeks. Getting to know Audacity real well now :)

Bistro! - January 29, 2009 09:50 AM
GlassFish Embedded progress

Seen on the GlassFish forum, giving it a bit more spotlight here:

There are many ways to use GFE (Embedded GlassFish) Here is the easiest possible way to get you started:

Get http://download.java.net/glassfish/v3-prelude/embedded/nightly/latest.jar
$ java -jar latest.jar --help
*******************************************************************************
******* Welcome to Embedded GlassFish *************
*******************************************************************************

Below are a list of valid options.
To use the longname, prepend it with '--'.
To use a short name prepend it with '-'.
The webapp war file names should be supplied after all the options.
You can enter as many web apps as you like.

Example to start an Embedded GlassFish Server with a web app packaged in a jar:

java -jar glassfish-embedded-all-3.0-Prelude-SNAPSHOT.jar myapp.war

Same example but listen at port 80 instead of the default 8888

java -jar glassfish-embedded-all-3.0-Prelude-SNAPSHOT.jar -p 80 myapp.war


Description Long Name Short Name Default Required

HTTP Port --port -p 8888 true
Filesystem Installation Directory --installDir -d false
Filesystem Instance Directory --instanceDir -i false
domain.xml filename or URL --xml -x false
Admin HTTP --adminport -q 4848 true
JMX System Connector Port --jmxport -j 8686 true
Help --help -h false true
Create the server and then exit. --create -c false true
Verbose Mode --verbose -v true true
Send logging to instance-root/logs/server.log --log -l true true
Automatically delete Filesystem --autodelete -a true true

Looking at the forum, blogs, and people already using it, there is a lot of interest for this new feature in GlassFish v3 (still in development) and I would encourage you to keep sending requirements and bug reports, ideally here but sharing them on the mailing list of forum also works.

Bistro! - January 28, 2009 05:28 PM
Skype chat rooms

With mail, phone, blogs, twiter, skype, and IRC alone there are many way to communicate online. I'll admit being a heavy Skype user but mostly for its chatting aspect (my unlimited SIP account does the rest - hours of concalls every week). One thing that I've been using recently is group chats.

Skype group chats (not public, but with a selected set of participants) feel a lot like IRC to me, expect it doesn't have a server (one person at least must be connected). I think I like it mostly - history is integrated, topic can be changed, and moving to private messages is easy. Of course you need to change the notification settings given how much more traffic you may get. I stopped using IRC a while back and even with today's nifty IRC clients, it's just one too many application running on my desktop. As proprietary as Skype can be, it does the job for me.

Bistro! - January 27, 2009 08:27 PM
"Sun University Day" à Paris le 5 février 2009

Si vous êtes étudiant et sur Paris le 5 février après-midi, Sun organise un "Sun University Day” dans son Customer Briefing Center au 42, avenue d'Iéna (Paris 16).

Le format est de type "portes ouvertes" avec de nombreux stands sur les technologies Sun: GlassFish, NetBeans, OpenESB, MySQL, OpenDS, VirtualBox, OpenSolaris, JavaFX, Java temps réel, et SunSPOT. Les animateurs des stands sont des experts de tous ces domaines, certains venant du centre de R&D de Grenoble. On y trouvera aussi des présentations des programmes pour étudiants et de partenariat avec les écoles d'ingénieurs et universités.

Entré libre (mais inscription nécessaire: maelle.pernelle-AT-sun.com) à partir de 13 heures.

Bistro! - January 21, 2009 09:54 AM
BarCamp Java à Paris le 31 janvier

Après les éditions précédentes organisées par octo, voici un troisième BarCamp Java à Paris organisé par Valtech dans les locaux de Sun à Paris le 31 janvier. Inscriptions: http://barcamp.org/JavaCampParis3. Be there or be square! I'll be square :(

Bistro! - January 19, 2009 05:08 PM
Random Java performance podcast comments

I was recently listening to this JavaWorld podcast on Java scalability and was surprised to hear a few things (hopefully well paraphrased here) :

"Java is not the best choice given its threading model and synchronizing". I just don't understand that statement. Still Java 5's concurrency API is still under-used by many IMO.

"30 seconds GC pauses are common". Really? This sounds like 2000. Are you still seeing GC pauses above 10 seconds? There's now multiple GC algorithms to chose from and default options now provide really good performance in a large majority of setups.

"Real-time Java is around the corner and will fix many latency issues". Real-time java is really not the issue to most web site scalability or latency issues. Maybe the garbage-first GC scheduled for Java 7 will be an easier answer than the current required JVM tuning.

"ORM's are not needed, straight JDBC is better for scalability". I can't help but think that this can apply to only a handful of popular web sites. For everyone else, frameworks like JPA are just no-brainers.

"More generally speaking, frameworks are bad for performance and scalability". I think some stack-traces can be indeed intimidating. Frameworks should strike a good balance between productivity and out-of-the-box performance. Tuning expertise for a given framework is usually a function of the popularity of that framework while some popular frameworks are known to have scalability issues.

"Application servers are not a good idea because they mix business logic and web requests... a JVM should suffice". I am a strong believer in multi-tiered architectures and stateful applications so this sounds very wrong to me. The notion of a container is one of the most important break-through in recent years for productivity, transactions, persistence, and scalability. Clearly I don't buy or even really understand this assertion.

Performance and scalability objectives can justify to de-normalize the architecture (much like you would for database schemas) but while this podcast has value, I don't believe most developers should follow every recommandation in this podcast right off the bat.

Bistro! - January 16, 2009 01:48 PM
Two JUG events in two days

I presented on Tuesday at the Paris JUG. As previously reported by JBoss' Sacha, this JUG is really doing well - great attendance (200+ every single month), very fine question during and after the the talks, and several people reporting in details what they heard and learned in various blogs (this one for instance). Luckily the beamer Gods were with us and almost all demos worked. Antonio Goncalves (JUG leader, book author, and JSR EG member) presented on Java EE 6 before I took the stage with a GlassFish v3 Prelude presentation. The combination of compile-on-save, deploy-on-change and session preservation across redeployments was what most people liked it seems. From the questions and comments I think more people realize that in those difficult times, the Open Source application server alternatives are very real and that GlassFish has a lot of thinks going for it.

On the next day I was at the inaugural Riviera JUG meeting. Not as crowded as the Paris event but some very good discussions. The Lunatech Research guys (organizing the event and the JUG) are clearly very JBoss-friendly but I think I got them pretty excited about GlassFish (the question during diner was along the lines of "should we switch to GlassFish?"). There were several technical questions asked (OSGi, session preservation, etc..) and a business one around the commercial (I wish I could share all the customer wins, some are really significant...). eXo's Julien Viet did a nice presentation with a full section on integration between portlets and various web frameworks. With his JBoss background and connections he's of course always an interesting guy to talk to even if I'm not sure I agree with his analysis "JBoss has a superior kernel design" assertion! :)

Time spent in JUG meetings as a speaker or as an attendee seems to be always well spent! Slides are posted here: http://www.parisjug.org/xwiki/bin/view/Meeting/20090113

Blogs on the Paris evening (in French): #1, #2, #3, #4

Bistro! - January 12, 2009 02:54 PM
AppServer killed, no log! (reloaded)

In response to my previous blog about calling System.exit() from code hosted in an app server, Nicoz reminded me that this is one of the things security managers are meant for.

By default in the "developer" profile of GlassFish, there is no security manager in place, but there is a policy file ready to use in (with the appropriate -Djava.security.policy= option in domain.xml).

To add a security manager, simply start GlassFish with this additional startup option: -Djava.security.manager
(edit domain.xml or better yet, use asadmin create-jvm-options -Djava.security.manager)

Any subsequent attempt to call System.exit() will trigger the following error message:
java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)
... with the stack trace leading back to the faulty code.

Update: as a reminder on security managers, they can be very useful (if not life saviors) but they do come at a performance price. Check out this short GlassFish documentation page to understand the implications of using a security manager.

Bistro! - January 12, 2009 01:53 PM
Java EE 6 et GlassFish demain au Paris JUG


Antonio Goncalves "himself" nous parlera demain (mardi 13) de Java EE 6 au Paris JUG. Quant à moi, je vous présenterai en deuxième partie GlassFish v3 "Prelude". Un petit cadeau pour ceux qui seront là lors du buffet (en espérant en avoir assez pour tout le monde!). Details sur la soirée ici.