Skip to main content

Insight into How the JVM Launcher and SailFin CAFE Work

Posted by editor on January 26, 2010 at 5:56 AM PST

Today I had some trouble selecting just one topic to blog about, so I'm giving in and highlighting two items on today's home page: Joe Darcy's What is the launcher? and Ramesh Parthasarathy's REST'ing @ SailFin CAFE.

Lately, I'm finding interesting documentation of how things work "under the hood" -- for example, Adam Bien's description of the address space utilized by JavaFX, in his interview with Janice Heiss, which I wrote about yesterday. If you're in a position like mine, where your job is to survey the breadth of what's happening in the Java/JDK world, you can end up having a somewhat superficial awareness of a great many technologies, knowing the most publicized facts, but not really understanding how the technology works on the inside, how all those great publicized capabilities were actually implemented at the code level.

Yet, I've spent three decades working in that interior, low-level coding, development realm. So, I find knowing just the shiny exterior facts such as appear in announcements of new releases frustrating at times. I find myself wanting to grab some code and run with it, make some demo apps, and see what it's really like to work with these new technologies. Indeed, I am planning to do that, and write some genuinely technical blogs, and perhaps some small articles, soon!

Anyway, it's that curiosity about how things work on the inside that piques my interest in Adam's JavaFX statements, Joe Darcy's depiction of the Java launcher, and Ramesh's description of SailFin's REST API.

Java's "run anywhere" capability is obviously made possible by the Java Virtual Machine, which creates an operational platform that is consistent across various operating systems and hardware types and configurations. The launcher is a piece of C code that runs on the native platform and launches the JVM. Joe Darcy, who was the lead launcher maintainer for JDK 1.4.2 through JDK 6, describes it this way:

One surprisingly tricky piece of the Java platform is the launcher, the set of C code that uses the JNI invocation API to get the JVM started and begin running the main class. While conceptually simple, the launcher is complicated by straddling the boundary between the host system and the JVM, often wrestling with native platform issues like thread configuration that need to be managed before starting the JVM. The launcher's tasks include selecting which VM to run (client, server, etc.) and running in the requested data model, 32-bit or 64-bit.

Joe closes his entry by noting that Kumar Srinivasan, who took over launcher maintenance for JDK 7, has fixed "a long-standing launcher flaw concerning the Unix exec system call and LD_LIBRARY_PATH." Just last week I was debugging a problem involving exactly those areas, in a C application that seemed to suddenly stop working after a Solaris operating system was patched. So, I'll be interested in reading the upcoming post about Kumar's fix that Joe promises.

Meanwhile, Ramesh Parthasarathy blogged about how SailFin CAFE facilitates communication management through its REST API:

Converged (Http/SIP) applications gives users the flexibility of creating or accessing information about their communications (call/conferences/im ...) over the web. To make this possible a typical converged application would contain an entry point for all the Http requests, which is mostly an Http Servlet... From a developers perspective its desirable if the converged application development framework provides a means of exposing these common tasks rather than having to write a htttp servlet for it. It also helps if these are exposed as an API, that is portable as well as open standards compliant.

SailFin CAFE solves this problem by exposing these through a REST API. When a CAFE application is deployed (with some information added to web.xml descriptor), all the regular tasks of creating and managing the communication are exposed as REST URIs and the required resources provisioned automatically. Build >v1-b24 of CAFE comes with REST resources implementation of Call and Conference.

Kumar then provides an example web.xml deployment descriptor, states that "the REST resources are implemented using the Jersey JSR 311 (Figure 2) implementation that is bundled with SailFin," and provides links to more information. A very interesting and informative post!

In other Java Today news, Geertjan Wielenga has found 40 NetBeans Platform Projects on

I wandered around the other day and came across this very interesting tag: Click that link and find yourself in the midst of a great set of NetBeans Platform projects. Sure, some of them are plugins for NetBeans IDE, but many others are fullblown NetBeans Platform projects. Here are some interesting titles, just snapshots of the whole collection, randomly from the first few I saw there...

Dennis Gesker reviews the new book "Glassfish Administration" by Xuekun Kou:

"Glassfish Administration" by Xuekun Kou is accurate, concise and useful. Computer manuals comprise an odd segment of the publishing industry. I suppose that this is because the books published in this segment generally have both a narrowly defined audience and scope and a short window of usefulness driven by the speed of evolution of the products they seek to address. This, sadly, seems to result in books of this kind falling into two general categories...

In today's other Weblogs, John Reynolds asks Is Go a Java replacement?:

Is Go a Java replacement? Of course not, but I do wonder what Google's up to...

And Erik van der velden announces [CAFE] UserProcedures integrated in trunk:

Last week we have merged the userprocedures branch into the trunk of sailfin-cafe. This blog will give a bit of background on what the userprocedures are, how they work in generally and what you can expect in the future. There will be some separate blogs highlighting the different procuedures individually...

In the Forums, icordoba is having a Problem deploying same SSB class in different apps on Glassfish v3: Hi there, I need to deploy multiple apps in the same glassfish instance (v3) previously working on JBoss. I am having the following naming exception: Caused by: javax.naming.NameAlreadyBoundException: Use rebind to override ...

nicolasnn has a question regarding Pipes between different networks: hi!! I just started working with JXTA and am a bit lost. I've read some tutorials and I've seen some examples but I have a question. I'm looking at the examples...

In the LWUIT forum, raki_j2me asks How to increase Menu's Height in order to fit menu items ?: Hi Guys, I have a lot of menu items and i cannot use the concept of Sub-Menu's because they are all very different, so i tried this :- UIManager.getInstance().getLookAndFeel().setTouchMenus(true) ...

Our current Spotlight is Janice Heiss's interview with Java Champion Adam Bien on JavaFX. Adam's opening statement: "Good UI controls and layout are the key to success. JavaFX was very strong from the beginning in effects and graphics. It was, however, initially lacking in good, "skinnable" components, but this was fixed with version 1.2. JavaFX requires writing less code while it integrates very well with existing business logic written in Java. A reason to go the JavaFX route is better maintainability, and faster development with less code..."

This week's Poll asks What's the most important project going forward?. Voting will be close on Friday.

We've just published a new Feature Article, Maven Repository Managers for the Enterprise, by John Smart. We're also featuring Jeff Friesen's Reading Newsfeeds in JavaFX with FeedRead, in which Jeff demonstrates how to apply JavaFX's RSS and Atom newsfeed capabilities to create a snazzy little JavaFX app that can run stand-alone or in a browser.

The latest Java Mobility Podcast is Java Mobile Podcast 92: MIDP 3.0 in Depth: Tutorials and Demonstrations: Excerpts from the JavaOne 2009 MIDP 3.0 In Depth: Tutorials and Demonstrations session with Roger Riggs, Lakshmi Dontamsetti and Stan Kao.

Current and upcoming Java Events:

Registered users can submit event listings for the Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.

Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of it will be archived along with other past issues in the Archive.

-- Kevin Farnham

O'Reilly Media