Sunday, May 27, 2007

A little more Glassfish please...

Today I'm going to talk about my experience with the latest (build 41 at the time of this writing) version of Glassfish, and open source Java application server.

Getting the Software

Glassfish can be obtained from several sources. You can get it directly from https://glassfish.dev.java.net/downloads/v2-b41d.html and also packaged with Netbeans 6.0 which can be obtained at http://dlc.sun.com/netbeans/download/6.0/milestones/latest/
Note that Glassfish may be referred to as Sun Java System Application Server 9.1 Beta 2 b41d on the Netbeans site...same product with an alternate name. For this review I used both methods.

Installation
If you decide to download it stand alone outside of NetBeans, then just follow the instructions at https://glassfish.dev.java.net/downloads/v2-b41d.html and choose either clustered or non-clustered version. Also, don't forget to set java_home as mentioned in the instructions. For this review, I chose to install a clustered version using this procedure and installed a non-clustered version with the Netbeans 6.- package. For many, the that approach might be best, and it gives you one heck of a nice IDE to use that integrates with Glassfish (and other Java app servers) very well.

I did run into a small snag when installing though. On my machine, the port that Glassfish defaults to (8080) was in use, so I changed the setup-cluster.xml file to use port 8081 instead. I set up the non-clustered version to point here as well...this will be no problem since I will only be running one at a time. After changing the port, the install succeeded.

Starting Up Glassfish.
As mentioned earlier, one of the nice things about NetBeans is how well it integrates with various application servers. The non-clustered version of Glassfish was already set up for me, and it was very simple to add the clustered version to the list of application servers my NetBeans installation knew about. To me, using an IDE like NetBeans to interact (start/stop/access the console/etc.) makes a lot of sense, but you can always use the command line if you wish. Information on how that is done can be found here: https://glassfish.dev.java.net/downloads/quickstart/index.html.

For this review, I'll be doing things the easy way...though NetBeans. With that in mind, the way you start up Glassfish, or any application server using NetBeans, is to select the Runtime tab, expand the Servers entry, right click on the application server of your choice, and then click Start. This is what I did to start the non-clustered version.




I then stopped that, and started the clustered version to make sure it too was installed correctly...it was.
Side note: Another nice thing about NetBeans is that it gives you a new tab in the output window for each app server you bring up. This window shows you what is going on with the server....taking a look at this output, all is well.

Viewing the Admin Console
Through NetBeans, I selected the Admin Console by right clicking on clustered version of Glassfish (same location we used to start it). This brings up a web page to log into. Just give it the username and password you used when installing Glassfish (default is admin, with password adminadmin).

Upon doing this you will be presented with a very nice looking home page. All I can say is WOW...this looks much nicer look than the old SJAS8.1 I'm used to (let along...well...nothing for another open source application server I've used. :).



When I get a new toy....err....piece of software, I'm not one for reading every line of documentation before I try it out, and Glassfish is no exception. So, played around with it a little...”kicked the tires” so to speak. Here are a few observations:

I tried to create a stand alone instance: From Common Tasks (first page) under Enterprise Tasks, select Create New Stand-Alone Instance. Doing that though I noticed that the Node Agent drop down was not populated.. I'll have to check into that later...must be some additional setup needed first...for now I just created a new cluster by selecting the option above the one I just mentioned...that worked just fine

Creating clustered instance worked fine.

I left the clustered version's Admin Console and then stopped the server, then started up the non-clustered version instead. Since I have no plans of running in a clustered environment at this installation, I'll be focusing on the non-clustered version from here on out.
...
Same procedure starting the Admin Console as before....
Looking at this version you can see that the options related to clustering are gone but other than that, the same nice looking interface is still there. The more I see the more impressed I am
with the level of maturity this version has. Seems very well laid out and easy to navigate.
I viewed the log...surprised at the number of warnings, but looking at them they
make sense. Yes, I said the messages actually make sense! For example, one message was “This operation failed, because it could not be handled by this domain. An example of such an operation is creating application server instances or clusters when they are not supported by the given domain. The actual error is: MBean instance not found”.

Note that they give you the ability to filter messages too. I could really have used that in times past.

The help system is very nice. The only thing I would like to see is the ability to get pdf versions of the content.

I did note one minor glitch...noticed the icon wasn't displayed for System Properties under Configuration in the Common Tasks area. Other than that, everything seems to be exactly as it should.

Well, that's all I have time for today. Next I'll set up a database and maybe run some tests...perhaps even compare performance between this version and an older one.

Saturday, May 26, 2007

Glassfish.


Well, after a LONG vacation from blogging here, I found something worth writing about...the new version of Glassfish, the open source Java application server.

Over the next few weeks I'll review this tool...should be interesting!