Sunday Oct 18, 2009

GlassFish v3: Elements of Administrative Security ...

Takes you on the tour of administrative security of GlassFish v3.[Read More]

Wednesday Aug 05, 2009

Adding an implementation to a Java Interface ...

Kudos to Kohsuke for implementing Mixins for Java.[Read More]

Thursday Nov 22, 2007

GlassFish Podcast about GlassFish Deployment ...

Check out my GlassFish Podcast on this subject ...


Sunday Oct 07, 2007

GlassFish Clustering Article on ...

Check out the clustering article on that I co-authored.

Thursday Apr 05, 2007

Sun Application Server Builds and Clustering ...

I think there is some confusion in this regard. I think I must clarify certain things here. This post is about which distributions of Sun's application server have clustering support "out-of-the-box".

Simple answer: ALL .

Long Answer:

Following distributions of application server all have clustering support built into them:

The reason this is possible is because the core application server code base is exactly the same in all the distributions. It is the various other 3PP (third party products) that differ. For example, the SDK bundle (it has different official name, check out for details) has other software like access manager and portal server support, whereas the EE bundle has HADB to store the state and has NSS and Load-balancer plugin among other things.

The features that enable this (amazing, IMO) feat are:

  • In-memory replication of conversational state.
  • Usage Profiles.
  • IIOP failover.
So, next time you need clustering support, don't look for EE, PE, SDK and GlassFish builds do the job. I will post more in this regard soon ...

Monday Jun 26, 2006

A GlassFish Quiz Question ...

asadmin start-domain and asadmin stop-domain ....[Read More]

Friday Jun 23, 2006

GlassFish Administration: The real driver ...

This post discusses the details of the component that makes the admin console and admin command line interface tick. This (often unsung hero) is called the admin infrastructure.[Read More]

Thursday Apr 06, 2006

Tech Tip Demonstrating JMX MBeans and GlassFish ...

The integration between JMX and GlassFish is tighter than ever ;).

This means that you can develop your MBeans and test them quickly. Here are a couple of tips that will help you get going.

  • Nandini's recently published Enterprise Java Technical Tip --
  • A NetBeans Project in GlassFish source repository that we use to quickly develop and test our MBeans in GlassFish runtime! --
This is a nice alignment with Jean Francois Denise's NetBeans JMX Module that is now in stable status and most likely will be a part of NetBeans 5.5 download ...

Check it out ...

Saturday Apr 01, 2006

App server and Solaris 10 SMF: A Happy Marriage ...

Ingredients of a Happy Marriage

If the Server Market is a game of Chess, Solaris 10 is the King.

Predictive Self Healing in Solaris 10 is a well thought out feature that's ready for prime time.

When Jonathan speaks, industry listens. According to him, if there is some kind of a race for Open Source Software impact on Enterprises, then GlassFish is the front runner .

It would be a surprise if GlassFish had not leveraged the new way of looking at Services support in Solaris (SMF). The stars were so aligned that this marriage could only be a success :)

Integration of GlassFish with Solaris 10 SMF is one of those features that makes GlassFish unique in terms of ease of use and system level integration. It is something that developers and serious System Administrators alike are going to like.

Recipe for the Impatient

Here you go:
  1. Become root. (Remember, you are impatient, it is \*not\* required that you become root).
  2. Create a directory for domains -- mkdir /glassfish/domains
  3. Issue the command -- asadmin create-domain --adminport 8080 --instanceport 80 --domaindir /glassfish/domains smfdomain
  4. Create a file like "/glassfish/domains/smfdomain/passwordfile" to store your password safely ...
    • #Required by smfdomain's auto startup ...
    • AS_ADMIN_USER=admin
    • AS_ADMIN_PASSWORD=adminadmin
    • Create the SMF service for this domain -- use asadmin create-service command as below: asadmin create-service --passwordfile /glassfish/domains/smfdomain/passwordfile /glassfish/domains/smfdomain
    • As instructed in output of above command, administrator now just needs to enable the service using svcadm enable smfdomain .
    • That's it. Your domain, smfdomain is running!
    • Note that the moment the service is put into SMF database, its life cycle will be managed by Solaris 10! So, I am going to go to the extreme here and reboot the machine remotely as I write this blog entry :) From my desk at home, I can hear machine in my office going down and coming back up again. The initial tries to connect fail as the SMF is bringing up my app server instance.

      and then ....

Like it?

Details of the Seamless Integration

The idea is that under the covers, we are talking to SMF and asking it to register the GlassFish domain as an SMF managed service! And what you do is a bunch of commands. No text editor is needed to be used by you to edit complex scripts. Agreed that you are a system administrator and that means you are used to all these things. But why not make your life simpler?

SMF manifest for GlassFish domain is created, it is imported into SMF database and enabled by a single command. Ease of use is the order of the day and GlassFish has acted accordingly.

One more \*very\* important thing you'd be able to achieve -- if you are not a root user and still want to use the privileged ports (<1024). SMF provides a hook called "net_privaddr" , you'd be able to listen on privileged ports! You can just pass this flag on --serviceproperties on the create-service command line like: create-service --serviceproperties netaddr_priv ...

Yet another important feature of this GlassFish administrative command is that it helps you get there if you make any mistake. Give it a try and you'll agree with what I say. I am sure when you'll try the command you'll run into problems. Please let me know what the error messages say and whether they are helpful to you. I hope they are. If not, file a bug at the GlassFish IssueTracker .

The smf-iteam folks at Sun were immensely helpful when I implemented this feature.

I have not seen such a seamless integration of an Enterprise Server with SMF. You can let me know if I am wrong.

All the rituals for a long lasting marriage have been performed. GlassFish and S10. Long live the marriage!

Friday Mar 24, 2006

Niceties with build41

GlassFish build 41 is out.

Deadline for FCS is approaching. So, what are some of the goodies in this build?

There are many and I have a hard time categorizing them.

Well, the most important one is Security Manager is turned OFF by default on GlassFish Server. Although this was in b40, I think I need to highlight it. It seems all the frameworks and popular applications will now run out of the box (at least not fail with the infamous AccessControlException).

A significant change has gone in into setting up the domain/server itself. When you run ant -f setup.xml after exploding the glassfish-image.jar, you will see the following: This means that since you are a developer (well, primarily), you will not be bothered to enter the routine admin user and password for the asadmin commands!

What do you do next?

Start the Domain/Server:

glassfish/bin/asadmin start-domain

This is what you see ...

This is a long time request serviced. You now know your whereabouts. You are going to love this.

There is talk of Java EE 5 Persistence everywhere. To try out your persistence units, what you need to start is the default database called the "Java DB" that is bundled in GlassFish.

When you do "asadmin start-database" (Although a second time -- this is a bug), you see the coordinates of the bundled database! There is no need to go hunt for what version of JDBC driver, JDBC specification etc. is supported. It is \*right\* there. Now, you deploy your applications you would like to see how your JVM is behaving. But your affinities are already decided. You don't want a GUI. No JConsole (great tool, but I want to show you the power of asadmin). So, all you do is asadmin generate-jvm-report :

First, you start with all the system properties that the JRE has, sorted lexically : Then, on to memory, using asadmin generate-jvm-report --type=memory and more memory But you are interested in how your threads are doing: asadmin generate-jvm-report --type=thread:



Welcome to my blog where mostly my work related thoughts are expressed.


« July 2016