Posts Tagged glassfish

Java EE Containers and Docker

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Given my long history with Java EE, it was natural for me to experiment the installation and deployment of popular Java EE containers using Docker.

Communities and Software vendors did not wait for me, and I discovered many prebuilt containers, ready to use.

The list below references official builds, i.e. the ones created and maintained by the software vendor. (by alphabetical list)

I also built my own Dockerfile for Glassfish.

Feel free to comment this post, I will update the list.  (Official builds only)

Enjoy !

, , , , , , ,

No Comments

GlassFish v3.1 High Availability screencast

A couple of weeks ago, during Devoxx 2010 conference, I was answering questions and demonstrating several new and upcoming products, amongst others : GlassFish v3.1

I created a very simple session fail over demonstration, involving two instances of GlassFish and a simple, open source, software load balancer.

The screen cast is available on YouTube in HD quality and from this post.

My colleague, Arun Gupta, from GlassFish engineering, also posted a similar screencast a couple of days ago. The more, the better.

Software mentioned in this screencast :

The source code for the demo application is available as a NetBeans project.

Enjoy !

, , , , ,

2 Comments

Put a Java Brain into your Lego Robot

Our JavaONE session today went very well.  The room was packed (roughly 150 persons), with people standing in the back.

All demos went well, after a few surprises and tuning 🙂

Comments and questions during the talk were very positive.

As promised to the attendees, here are the slides, the source code of the REST API (as a NetBeans project) and the source code of the iPad application (as an XCode project).

Feel free to leave comments and remarks here.  Thank you for attending and enjoy !

, , , , ,

No Comments

Playing with Lego’s Mindstorms, LeJOS, GlassFish and an iPad

I will co-present three different session, hands-on-lab and BOF during JavaONE 2010.

One of these has actually nothing to do with usual business, it just aims at being fun and at playing with geek toys : we are hosting a BOF about Java programming for the Lego’s Mindstorms, i.e. the LeJOS project.

Neither David or myself are directly involved with LeJOS community, we are just regular users willing to share our experiences with people discovering Lego’s Mindstorms kit and the LeJOS project.

So, if you happen to be around in San Francisco next Wednesday, be sure to stop 45 minutes at 02:15 pm in the Parc 55 Hotel (Room Divisidero)

David will demo how to interface Lego’s NXT brick with an Arduino device.

I will show how to create a iPad controller for a robot, using a REST interface hosted on GlassFish.

Does it sounds geeky enough ? A short videoshow all this in action.

, , , , ,

No Comments

GlassFish Open Source Edition 3.0.1 is released

The GlassFish community announced today the immediate availability of GlassFish Open Source Edition 3.0.1

Quoted from GlassFish web site : “GlassFish 3.0.1 is built on a modular, flexible runtime based on the OSGi standard. It enables organizations to create and deploy Web applications with the lightweight Java EE 6 Web Profile and to easily leverage the power of the full Java EE 6 platform for enterprise applications. Developers also benefit from the simplified programming model and productivity improvements offered by Java EE 6. The result is a flexible platform that can apply only what is needed to address the business problem, thereby reducing cost and complexity”

GlassFish is released under a dual CDDL and GPL v2 license.

GlassFish Open Source Edition is supported by the community (mailing lists, forum and documentation wiki).  Oracle is expected to release in the next few days an equivalent commercial version, GlassFish Enterprise Server 3.0.1.

If you are curious to know were the GlassFish community is going and what is brewing for next releases, be sure to read the roadmap.

,

No Comments

GlassFish Tools for Eclipse are available

Sun is making available GlassFish Tools for Eclipse (v0.9, final version to be release soon).  This is a pre-configured package containing Eclipse 3.4.1 alongside with GlassFish v2.1 and GlassFish v3 prelude and the required Eclipse plugins to effectively manage and deploy applications to GlassFish right from the IDE.

Q: Who is the target for this offering?
A: Developers or organizations that have already standardized on or prefer Eclipse over NetBeans.

Q: Why has Sun created this offering?
A: Sun has created a strong preference for GlassFish among NetBeans users. However, a large community of developers have chosen Eclipse as their IDE of choice.  Today those developers have to download open source products from multiple locations and configure them to work together (error prone), increasing the barrier to entry. This offering creates a positive feature-rich out-of-the-box experience for Eclipse developers. In additional, developers can now leverage the open source plugins created by competitive frameworks (Spring, SEAM, Hibernate, etc) within a GlassFish-focused IDE. This bundle will also improve the relationship between the community of Eclipse developers and Sun.

Q: Is Sun moving away from Netbeans towards Eclipse?
A: No. Sun is expanding its reach by embracing not just the NetBeans developer community, but also the Eclipse community. This is a consistent with Sun’s strategy of using open source to "lower the barrier to entry" – in this case to a large developer community.

, ,

No Comments

Using HermesJMS to browse GlassFissh’s JMS queues

GlassFish includes Sun’s implementation of JMS , known as OpenMQ . When developing SOA applications with Java CAPS or OpenESB , you will most probably end up using JMS queues and topics as loosely coupled communication mechanism between components of your application.

However, as great are GlassFish and OpenMQ, they lack a graphical tool allowing to browse queues and topic. Developing JMS applications without such a tool is a frustrating task, to say the least.

Here comes HermesJMS. Quoted from their web site :


HermesJMS is an extensible console that helps you interact with JMS providers making it easy to browse or search queues and topics, copy messages around and delete them. It fully integrates with JNDI letting you discover administered objects stored, create JMS sessions from the connection factories and use any destinations found”

Configuring HermesJMS to connect to OpenMQ is not intuitive at all and I found very few resources on the web explaining how to do it.

At this stage, I would like to thank Michael Czapski and Thomas Barrett for having showed me the steps required to configure HermesJMS and for all the work they did to prepare a great CEC 2008.

Step 1 : Start Hermes JMS

The easiest way to start Hermes JMS is using Java Web Start. You can do that from their web site or using the icon below (requires Java SE 6+, if you have older versions of Java, other links are provided on Hermes JMS’ web site)


Note that it will only work if your Java MQ is installed to use default port 7676.

Step 2 : Create a JavaMQ session


Replace <new> with JavaMQ and click the Apply button.


Step 3 : Add Java MQ JARs files to the classpath

Click on the Providers Tab on the bottom of the screen, right click anywhere inside the Classpath Groups pane and choose Add Group.


Name the group JavaMQCLasspahGroup (or whatever meaningful name you want). Right-click on the long button called Library and choose Add JAR(s).


Navigate to your GlassFish application server’s imq/lib directory. For OpenESB installed to OPENESB_HOME it will be something like : $OPENESB_HOME\glassfish-v2-ur2-b04-patch-20080929\imq\lib

This should work whether the imq/lib comes from Java MQ 4.1, OpenESB installation, GlassFishESB installation or Java CAPS 6 installation.

Choose the 10 following JARs. Not all may be required by we did not spend the time figuring out the minimum necessary set.

  • fscontext.jar

  • imq.jar

  • imqadmin.jar

  • imqbroker.jar

  • imqjmx.jar

  • imqutil.jar

  • imqxm.jar

  • jaxm-api.jar

  • jhall.jar

  • jms.jar

Allow Hermes to scan the JARs.

Once the JARs are scanned the Library will list all the JARs. Click the Apply button. Your screen should now look like this :


Click on Apply, then OK

Right-click the JavaMQ session and choose Edit to open configuration dialogue again.

Pull down the Loader menu and choose the JavaMQClasspathGroup. Pull down the Class menu and choose the com.sun.messaging.QueueConnectonFactory class. Click OK


Step 4 : Add an existing JMS queue / topic to your session

The last step is to actually add the queues and topics you want to monitor

Right-click JavaMQ session and choose New->Add queue …


and be sure to choose the name of an existing queue or topic.


Step 5 : Enjoy browsing your queues and topics

Once the Java MQ session is configured and queues of interest are configured we can interact with the Java MQ broker, view messages in destinations, truncate destinations (delete all messages) and so on. The functionality of Hermes JSM can be used as required.


UPDATE : OpenMQ FAQ now has a topic on HermesJMS Integration.  It also describes how to connect to a remote broker, not running on the localhost.

,

4 Comments