Oracle Blog

Living Life in the Zone

Saturday May 12, 2007

This is a first. 5 days of JavaOne and I only attended 2.5 sessions. I spent time meeting customers, partners and doing booth duty. I've mentioned a couple of times the passion of the GlassFish team. While the sign-up sheet was split into 2-hour shifts, many worked the booth far more than that. Being new to the role of GlassFish Product Manager, I am eager to talk to folks. Here's a summary of what I saw and heard (in no particular order):

Many already using GlassFish in production, wanting to understand support options

Lots of interest from those with appservers already in production,
wanting to move to an open source Java EE application server. Most are evaluating
GlassFish, JBoss and Geronimo.

GlassFish Day was well attended. When you see Jerome getting into the gory details of GlassFish V3 modules and the room remaining packed, followed by him being overwhelmed at the podium afterwards, you know your on to something. This is a good leading indicator of what is to come from the growing GlassFish community.

Monday Jan 29, 2007

Non-blogging heathen Oscar and I presented a NetBeans update at the Southern California Code Camp yesterday. We didn't cover as much content we wanted to mostly because of the interest generated by the NetBeans developer collaboration capability. If you are a NetBeans user and don't know about this module, you really should take a look. There is a screencast you can use to "try and buy" the feature

Note, the developer collaboration feature requires you to use the Update Center to download and install the module. While you are there, check out the other modules or even add the nbextras update center to use community provided plugins.

Chhandomay points to the impressed Infoworld review team, who mentions the developer collaboration feature in their selection of NetBeans 5.5 as the Java Innovator Award recipient.

For those of you in Southern California, keep your eye on the Code Camp web site for the next event. This is a great service provided by developers for developers, and it is FREE.

Tuesday Jul 18, 2006

Following up on yesterday's entry, I thought I'd share how I improved my edit-debug-test cycle by cloning zones. In getting a repeatable process flushed out, I needed a way to go back and start fresh after each attempt. I mentally liken (not lichen) this to software version control. If I want to try something risky, I want fork a zone branch. The solution, of course, is zone snapshots.

Given the blog title, entry title and my fondness for zones, clones & snapshots, I'm sure your not exactly in suspense. I found myself cloning zones to run my tests. In fact, I'm doing this quite regularly for a variety of tasks.

I've got a zone I call "baseline" that I've never booted. In that zone I have Java Enterprise System bits, among other things, only taking the disk space hit once. All of my zones descend (inherit?) from baseline. For the configuration I wanted, I had created zones named das, app1 and app2. das contains the Sun Application Server 8.1 administration server while app1 and app2 contain application server node agents and instances. All of the above can be installed in th same zone, but there is simply no fun in that Once I installed the software and had a baseline configuration, I cloned each zone - das_ldap, das_app1, das_app2, which were to be used to test my adminstration LDAP configuration:

Ex.: zoneadm -z das_ldap clone das

Note, zonecfg must be run first to configure das_ldap.Note #2: diskbay is my zfs pool

Boot the das_ldap zone and ... wait a second ... it is building the SMF depenencies and running sysconfig to configure the zone. #(\*&@. That's not what I want. I want a new version of the same zone, not a similar-but-different zone. Hmm. Lightbulb over John's head. OK, time to break the rules (again). Manually edit /etc/zones files. What makes this not only possible but simple? Not using a binary registry

##################################################################WARNING: Running these steps will result in an unsupported zone, andperhaps an unsupported configuration##################################################################

Hopefully that warning will lessen the ire I am probably creating within the zones team for continually showing how to do neat things that are unsupportable

Instead of using zoneadm clone, and going through sysidcfg and ending up with the wrong host name, I ran the following steps:

Shut down zone das

copy /etc/zones/das.xml to /etc/zones/das2.xml, and change the zone name (das2) and zonepath (/zones/das2) - for simple zone configurations.

Edit /etc/zones/index, append a line with the new zone(das2:installed:/zones/das2)

If I screw up something in pretty major way (never happens), I simply rinse and repeat:

# zfs destroy diskbay/zones/das2# zfsclone diskbay/zones/das@version2 diskbay/zones/das2# zoneadm -z das2 bootKeep in mind that das and das2 can't be booted at the the same time since they have the same IP address.

I have been doing my best to automate any steps I take in das2. Unfortunately, there is no zoneadm merge command Instead, in das I play back the automated steps taken in das2 and go from there. Of course, there really is no need to go back to das. I could just keep using das2. However, my zfs snapshot/clone dependency tree is already longer than my family tree

Monday Jul 17, 2006

Petr has a blog entry on setting up LDAP for the Sun Application Server for user authentication via an LDAP Realm. However, what if you want to enable the Application Server administrator (admin) to authenticate via LDAP as well?

There are a few steps you have to take to accomplish this. The first is to install the latest Application Server patch. For the Solaris X86 package install, this is patch id 119167-16. If you check out the patch README, it should fix bug id 6338508.

Create an LDAP group called "asadmin". Unfortunately, this can't be changed. Grrr.

Create an LDAP user "admin" (under inetorgperson) which belongs to that group. Any user that belongs to the "asadmin" group will be able to authenticate.

Shut down all node agents

Run asadmin commands for server-config (below)

Restart DAS

Start nodeagents

Wait for nodeagents to actually have a status of "running" (if using SMF)

Run asadmin commands for default-config (below)

Run asadmin commands for node agents (below)

Run asadmin commands for application cluster configs (below)

Since I am interested in automating the task, as opposed to using the GUI, here are the steps via the CLI. First up are the asadmin commands for configuring the admin server itself (server-config). Note that my settings are particular to my laptop. Note, the commands setting a property with no value is intentional. That removes the given property. Modify the directory and base-dn properties to your values accordingly:

asadmin set server-config.security-service.auth-realm.admin-realm.classname=com.sun.enterprise.security.auth.realm.ldap.LDAPRealm

asadmin set server-config.security-service.auth-realm.admin-realm.property.file=

asadmin set server-config.security-service.auth-realm.admin-realm.property.directory=ldap://das:389

asadmin set server-config.security-service.auth-realm.admin-realm.property.base-dn=dc=West,dc=Sun,dc=COM

asadmin set server-config.security-service.auth-realm.admin-realm.property.jaas-context=ldapRealm

As noted in the high level steps, restart the DAS. Via SMF, that's "svcadm restart das". When SMF is showing a status of running (check via "svcs das"), then run the following:

asadmin set default-config.security-service.auth-realm.admin-realm.classname=com.sun.enterprise.security.auth.realm.ldap.LDAPRealm

asadmin set default-config.security-service.auth-realm.admin-realm.property.file=

asadmin set default-config.security-service.auth-realm.admin-realm.property.directory=ldap://das:389

asadmin set default-config.security-service.auth-realm.admin-realm.property.base-dn=dc=West,dc=Sun,dc=COM

asadmin set default-config.security-service.auth-realm.admin-realm.property.jaas-context=ldapRealm

Run the following for each node agent. Note, my node agent name below is app1-node-agent. I doubt your's is ( ), so modify accordingly:

asadmin set domain.node-agent.app1-node-agent.auth-realm.classname=com.sun.enterprise.security.auth.realm.ldap.LDAPRealm

asadmin set domain.node-agent.app1-node-agent.auth-realm.property.file=

asadmin set domain.node-agent.app1-node-agent.auth-realm.property.jaas-context=ldapRealm

asadmin set domain.node-agent.app1-node-agent.auth-realm.property.directory=ldap://das:389

asadmin set domain.node-agent.app1-node-agent.auth-realm.property.base-dn=dc=West,dc=Sun,dc=COM

Last, if you have any clusters configured, you will want to run the following commands on the cluster-configs. In the example below, my cluster config happens to be zone-cluster-config. Modify accordingly:

asadmin set zone-cluster-config.security-service.auth-realm.admin-realm.classname=com.sun.enterprise.security.auth.realm.ldap.LDAPRealm

asadmin set zone-cluster-config.security-service.auth-realm.admin-realm.property.file=

asadmin set zone-cluster-config.security-service.auth-realm.admin-realm.property.directory=ldap://das:389

asadmin set zone-cluster-config.security-service.auth-realm.admin-realm.property.base-dn=dc=West,dc=Sun,dc=COM

asadmin set zone-cluster-config.security-service.auth-realm.admin-realm.property.jaas-context=ldapRealm

That pretty much sums it up. Hopefully you see the pattern. If, after you run these commands you find yourself locked out, uummm, crap. Can't help you FYI, when figuring out how to do this, I utilized zfs snapshots just in case I screwed it up. Which I did I'll blog later this week (tomorrow?) on how I sped up the trial & error testing with ZFS snapshots.

Friday Jul 14, 2006

A free 10-week "AJAX Programming" online course is about to start
from August 4th, 2006. This course is for anyone who wants to learn
AJAX for the first time or increase their knowledge on AJAX. In this
10-week course, students learn basic concept of AJAX as well as how
to use various AJAX frameworks and toolkits such as Dojo toolkit, jMaki,
Google Web Toolkit, and AJAX-fied JavaServer Faces (JSF) components.

This course runs very much like a regular college course in
which the students are expected to do weekly homeworks after
studying the presentation material but it is free
and can be taken online. There is also class group alias where
students can ask/answer questions. The complete set of course
contents (StarOffice slides with detailed speaker notes and
flash demo files, hands-on labs, homework assignments, etc.)
are available on the website of the course. The only thing you
have to do in order to register for the course is sending an
blank email to

Thursday Jul 13, 2006

I've been running a few instances of the Sun Java System Application Server 8.1 Enterprise Edition in various zones on my laptop. I've been wanting to put them under the Service Management Facility for a while.

The good news is that the Glassfish supports SMF, and Kedar has documented how to create a service manifest using Glassfish. I'm running Application Server 8.1 for it's EE-ness. What I decided to do was download the latest Glassfish bits and create a manifest more-or-less following the steps that Kedar has layed out. I then simply utilized that manifest for Application Server 8.1.

The first step was to generate an SMF script for the DAS. Here's the command line:

Because I am running Nevada build 41, asadmin bombs out with an error saying that only Solaris 10 is supported. Yeah, right, like that's going to stop me Since asadmin is a script wrapping a java command, I edited the java command line to include -Dos.version=5.10.

Tuesday Jun 06, 2006

What is going on in this country? Road rage is a disorder? Get real. It's from too many people being voluntarily squeezed into too small an area. Road rage is human nature, and that is not a disorder. If you want a cure to road rage, move to Iowa. Having gone to college just miles from Iowa, I can tell you that, outside of the occasional slow-moving farm vehicle and animal crossing, traffic is not an issue.

Now if you want cure something, please address a true disorder: code rage. What is code rage? It's when the code a developer writes should work, it doesn't, and the developer then goes into an uncontrollable rage. That's me. When code "doesn't work", mild mannered John Clingan enters an uncontrollable state full of "colorful" words and exaggerated gestures who's meaning transcends cultures. I've pounded the desk and have gone through numerous keyboards. My face has gone through every 8-bit shade of red. Where are all the code rage studies to help me out? I'm a victim, dang it. It's not my fault, is it?

Yes, I'm being facetious. Code rage is not a disorder. Code rage is of my own doing. As is my middle finger in traffic. Perhaps I should move to Iowa.

Sunday May 21, 2006

I was one of the 800(?) other attendees at JavaOne to get my hands on the SaveJe platform, at the cost of $200. The phone itself (S20) is average, and was not the point of the purchase at all. It's what is running on the phone that is of interest. CDC. Yes, Swing development for your phone!

However, it is hard for me to decouple the SavaJe platform from the phone. I only have one SIM card, so I either use my older-but-still-capable Nokia 6260, or I can move the SIM card over to the S20. For that reason, I was hoping I could use the S20 as my primary phone for a while. There is some nasty bug, and hopefully not a feature, that puts the phone in this weird mode where I get LOUD feedback whenever I pick up the phone to talk, blowing my eardrum as well as that of the person at the other end. Feedback was great when I was in a middle-school rock band, but not for a cell phone. I'm pretty sure the speakerphone's input (not output) is enabled. I can't make the damn thing go away.

Using the NetBeans Mobility Pack I, very briefly, tried to write a "Hello World" (literally) application to run on the phone. While it worked in the emulator, it didn't run on the phone. Grrr. I didn't have time to debug and I wouldn't be surprised if the problem was me trying to rush through the docs. FYI, I did sign up as a developer for the SavaJe platform. The wiki, etc, is barren but that is to be expected on what I think is the public launch of their product. It's time to post some entries. Especially one on cell phone feedback.

Update: Yikes, I just saw the link to this entry from java.net, thanks to StatCounter. My rather anectdotal "report" was more of a "bummer" than anything else. I am getting great support from the SaveJe folks, who are exchanging my phone. From a platform perspective, I'll blog more about that when I get the new phone. I don't want to give the SaveJe folks a bum wrap before I even get started.

Tuesday May 16, 2006

I'm not exactly sure what the numbers
of attendees is, but I bet it's in the 15,000 range. The rumors of
Java's demise are greatly exaggerated. I'm sitting in the general
session on day 1, which is an excellent measuring stick for
estimating numbers. I'd say roughly ¾ of the seating after
collapsing empty seats, is utilized.

As usual, John Gage acts as moderator,
clarifying the new logistics plan. That is, pre-registering for
sessions and getting in line first. Those who don't register get
placed in a backup line. Any left over seating goes to that line.
This is an attempt to improve the quality of the JavaOne experience
by appropriately matching sessions to room capacity. We'll have to
see how this works out.

Jonathan then takes the stage as Chief
Java Evangelist. Jonathan is also asking for developers to join the
JCP. Any individual can join and participate. Ed Zander then took the
stage to talk about openness and mobility. This is the 3rd
year in a row that mobility has taken the front seat at JavaOne. An
interesting statistic that shows why: Motorola alone outships the PC
in a year: 200 million (Java enabled?) cell phones. Yesterday, Sprint
was on stage at NetBeans day showing mobile multimedia. Both Sprint
and Motorola have endorsed NetBeans, by the way.

Mark of Canonical Inc, stated that Java
will be easily available for Ubuntu, Debian and Gentoo Linux due to
some changes in the Java SE licenses. There were hints(?) of Ubuntu
being ported to the Niagara.

Marc Fluery then took the stage to
jointly announce that JBoss is joining the NetBeans community. Quite
a bit of applause ensued. There were hints of more to come in the
JBoss/ RedHat/Sun relationship. Note the Red "Hat" (Beret).

Rich was (again) asked the Open Source
Java by Jonathan. “There are two battling forces”. The first, is
top completely open up the platform. The other is that compatibility
matters. “The question isn't whether, the question is how”.
Join the JCP and help make it happen.

Jeff Jackson then talked about JEE 5's release and how it is ready for prime time. You can download the bits now.

Sunday May 14, 2006

Everyone prepares for JavaOne in their own way. Here's an out-take from my preparation steps:

Mental preparation. One must prepare oneself for a week of solid Java. People-Networking-Java. Techno-Java. Caffeine-Java. Booth-Java. Vendor-Java. Geek-Java. About 16 hours a day. By the end of the week, the mental sponge is beyond saturation.

Over the week, I will probably walk 20 miles. This includes, of course, joining in on the march of the penguins from the hotel(s) to the Moscone Center each morning. While physical conditioning is not of the upmost importance for JavaOne, it does help me with the I-don't-like-this-session-so-I'll-go-to-my-backup-session scenario. Why does the “backup session” always end up at the other end of the Moscone Center?

I have my plan mapped out of how to get from SFO to the Pickwick Hotel, and that's about it. Whups, there's the bloggers meeting on Tuesday, but the hands-on lab runs right into that. Well, then there is the rumor of beer at the JavaPosse BOF ...

I have no idea what sessions I will go to yet. Since I am a lowly Sun employee, I have to go to the back of the line for every session. You folks get in line first. Lucky Bastards. Hey, when it comes to standing in line at the restroom, I'm holding my ground.

This will be a working JavaOne. I have to work the hands-on labs Tuesday and Wednesday, about 6 hours in all. I also have quite a bit of customer work to do, so I'll be calling it a night early some days to get some of that work done at the expense of some BOFs. Someone to rename “Birds of a Feather”. Telling my wife I was up late BOFing the night before is a recipe for divorce.

To keep up the pace, I'll be drawn even closer to Starbucks. I've mapped out all of the Starbucks between my hotel, the Moscone center, and the hotels with parties and BOFs. I'll do my best to keep it down to two a day, which will be hard since there are 4 on every corner in San Francisco.

I've notified my wife that my daily calls home will become increasingly incomprehensible, due to lack of sleep (thanks to BOFing) propped up with caffeine

Friday May 12, 2006

I've spent the last two days in Menlo Park, along with some of my peers, being edumacated and providing feedback to various folks regarding all things Java. One of the things we were privvy to yesterday was Sun's JavaOne announcements. It's no surprise that Sun will make various announcements at JavaOne. We do it every year. Of course, I can't tell you what they are until after they are announced early next week. As always, it will be good to keep your nose close to the news next week.

Of course, Sun isn't the only company that makes announcements at JavaOne. Pretty much every company related to Java does. It's one of the most exciting weeks of the year, IMHO.

I'll do my best to blog on what's happening @ JavaOne this year on a day-by-day basis.