From Smart Phones to EJB 3

In the past six months, I had the opportunity to work with two leading firms in the Java world - Nokia and JBoss. Being the world's largest J2ME device vendor and most popular J2EE server developer, respectively, Nokia and JBoss come from the two ends of the Java technology spectrum, which traditionally have little to do with each other. Yet, I have learned that their visions about the future of the Java technology are strikingly similar. The core of this vision is to leverage "lightweight middleware" to deliver software services. Indeed, from Nokia Communicator phones to Eclipse-rich client applications on the desktop to EJB 3.0 application servers, lightweight middleware might be the biggest story across all Java domains in year 2005. As developers, you definitely need to know about it.

The focus on middleware in a J2ME editorial might come as a surprise to many readers. Shouldn't the hotspots in J2ME be mobile 3D games, Bluetooth P2P applications, and Internet-based mobile business forms applications? Well, yes, those are important areas of J2ME applications. However, as a platform, J2ME succeeds on the service delivery model it enables. A large part of the wireless industry is built upon service delivery. For instance, the operator-controlled mobile content delivery process enables the mobile phone ringtone download business to grow many times larger than the entire PC music business.

The importance of service delivery is clearly illustrated by the different fortunes of two J2ME products in the market place. MIDP (Mobile Information Device Profile) is phenomenally successful on mobile phones despite its numerous limitations; but the Personal Profile, a fully featured Java 2 environment for devices, is a market failure on PDA and handheld computers. Many people blamed Sun for failing to release a Personal Profile reference implementation on Pocket PC or Palm devices.

The real question here is: Why didn't PDA vendors rush to support J2ME Personal Profile as mobile phone vendors did for MIDP? MIDP's secret for success is that it enables developers and wireless operators to easily deliver valuable software services to the device users. The MIDP runtime environment manages the application life cycle, updates, and interaction with the outside world (e.g., the SMS message-triggered push registry). In other words, the MIDP follows a "middleware" model to deploy business components (a.k.a. the MIDlets) in managed containers. The J2ME Personal Profile environment does not provide such features and that is what has to change to revive J2ME on high-end mobile devices.

The proposed next generation architecture of J2ME (JSRs 232 and 249, led by Nokia, Motorola, and Vodafone) envisions advanced middleware services on high-end mobile devices. It focuses on remote provisioning of services, including applications, library APIs, and even system software updates, using the OSGi (Open Service Gateway initiative) micro-container on devices. This "client-side middleware" concept already has a proven track record. For instance, IBM Pervasive Computing has been selling OSGi-powered PDAs to enterprise customers for several years. In the desktop world, the popular Eclipse IDE framework uses an embedded OSGi microcontainer to run all plug-ins and rich client applications.

On the J2EE server side, while the value of middleware and service delivery have been well accepted, the existing middleware application models (e.g., EJB 2.1) are too complex for most developers and too heavyweight for most applications. Lightweight middleware is a key design concept behind the next generation EJB application servers (i.e., EJB 3.0). You can download and play with JBoss's EJB 3.0 preview software today to see what it's like. Besides EJB 3.0, it would be easy to implement OSGi services on top of the JBoss lightweight microkernel. In theory, we would then be able to deploy the same services to J2EE servers, Eclipse desktops, and J2ME devices. After years of separate development and fragmentation, J2ME and J2EE might eventually converge and unite under the vision of "lightweight middleware."

This is great news for all Java developers. Are you ready for it?

© 2008 SYS-CON Media