Learn how to "package once, stock anywhere," using JSR 124 Client network devices come in many shapes and sizes, and their functionality varies widely. Some are more capable than others; simple browser-based clients can work only with web pages, while others implement the Java virtual machine and can run interactive applications with a rich client side. Provisioning -- managing, upgrading, and tracking the content that the many different kinds of clients can use, supporting the user's discovery and selection of suitable applications, and delivering the selected applications to the client platform -- is a challenging task. Applications, services, and content are usually controlled by a provisioning server. When a wireless carrier or other provider deploys a provisioning server, a significant amount of work must be done to integrate it with location servers, personalization engines, and billing systems. The magnitude of this effort provides a strong motivation to standardize provisioning servers so they can be integrated in a portable way. The J2EE Client Provisioning Specification, developed within the Java Community Process (JCP) as JSR 124, aims to provide a framework and APIs for using the Java 2 Platform, Enterprise Edition (J2EE) to provision a variety of clients with applications, services, and other content. A reference implementation (RI) of this technology is available from Sun Microsystems. This article provides a quick overview of the J2EE Client Provisioning Specification, tells you why this technology is needed and how it works. Then the article gives you a taste of the effort involved in using JSR 124 to develop provisioning applications: server-based applications that provision network devices. To get the most value from this article, you should begin by downloading the J2EE Client Provisioning reference implementation. Overview of JSR 124
The J2EE Client Provisioning Specification is an extension of the J2EE platform to provide application servers with facilities for building provisioning applications. The architecture of this technology enables centralized automated distribution of content and applications through a web site. Developers submit their applications, services, and content in the form of client bundles that client devices will discover, and application servers will deliver. A provisioning server is much like a vending machine: Providers stock a machine with attractive products, consumers browse available content, select items they find appealing, and pay for them, and the machine delivers the selected products. JSR 124 was created by an expert group of wireless operators, device manufacturers, provisioning server vendors, and information technology vendors. It defines standard ways to handle the submission, discovery, and delivery phases of provisioning. Why JSR 124?
One can distribute applications, services, and content to be accessed through a browser simply by publishing their URLs. The challenge, however, lies in maintaining and upgrading these applications, services, and content. The J2EE Client Provisioning Specification defines a central repository of client applications, services, and content called a provisioning portal, which is responsible for managing the distribution of rich clients and their content. This centralized solution allows developers to update and enhance their applications and services easily. Users interact with this portal to discover applications, and the portal delivers selected content to the devices. JSR 124 technology aims to provide seamless access to a wide array of applications, services, and content of many kinds, from ringtones to images to informative text. It allows developers to package their applications once and deploy them anywhere. It takes full advantage of J2EE technology, which is a prominent standard for enterprise applications. Who Does What?
Three groups of people are involved in the provisioning process:
Using Adapters to Extend Provisioning Capabilities
The J2EE Client Provisioning Specification includes an extensible service provider interface (SPI) that enables operators to extend the provisioning server to provision new types of client devices. Server-side developers achieve each such extension by defining an adapter, a software component that implements a particular provisioning model. The provisioning model defines how client devices interact with the provisioning server during delivery. Provisioning models include J2ME MIDP over-the-air (OTA) and the Java Network Launching Protocol (JNLP). Such models define a network protocol for delivering client bundles to client devices. Note that a provisioning server may host one or more provisioning adapters. Supporting delivery to a new client device is a simple matter of extending the provisioning server, by configuring a suitable provisioning adapter for the new device. An adapter may be produced by the same company that develops the provisioning framework or by a third party. Figure 1 shows a high-level view of the J2EE Client Provisioning architecture.
The J2EE platform offers a reliable and flexible technology to integrate enterprise services including billing, location, presence, and user profiling into provisioning applications that use the J2EE Client Provisioning Specification, but you should note that JSR 124 doesn't define APIs to such services. Implementing JSR 124
The J2EE Client Provisioning Specification provides APIs that are exposed in the J2EE web container. These APIs enable J2EE developers to write provisioning portals. A low-end implementation of the specification could well be just a servlet that acts as the underlying platform. High-end implementations may provide a full J2EE platform as the underlying container. The reference implementation of JSR 124 available from Sun Microsystems is based on the J2EE application server RI, also available from Sun.
The J2EE Client Provisioning Reference Implementation
With the RI you also get a sample application, RI-Test, which demonstrates the JSR 124 specification and the RI. The test application includes a provisioning server into which you can upload client bundles and their associated metadata using a web browser interface. RI-Test also lets you search the bundle repository and download content files. To experiment with the RI, you need:
Note well: The JSR 124 RI was tested using Sun's J2EE reference implementation, which includes the Cloudscape database. You need to be aware that the configuration files are specific to the J2EE RI; if you wish to use a different application server in your experiments with the JSR 124 RI you'll need to configure it accordingly. Writing and Packaging Provisioning Applications
An earlier article, "Getting Started with the J2EE Client Provisioning Reference Implementation," shows how to set up the J2EE Client Provisioning RI so you can use it in either of two ways: with the J2ME Wireless Toolkit to demonstrate use of MIDP 2.0 OTA, or with Java Web Start to demonstrate the use of the JNLP protocol. That article also shows you how to set up and run RI-Test, which is the easiest way to get an idea of how provisioning applications work behind the scenes. Basically, a provisioning application contains one or more servlets that you write, or adapt, to allow client users to discover client bundles they may select for download. These servlets will then use the provisioning framework and APIs to deliver the bundles to the users' devices. The development process can be summarized in three steps:
Let's walk through each of these in turn:
Package the Application
You can test the newly created PAR file with the
The invocation command is:
Write the Servlets
Customize the Configuration Files
Two more files contain essential configuration information for the provisioning framework and supported adapters: Conclusion
The J2EE Client Provisioning Specification defines a programming framework that enables J2EE applications to interact with provisioning facilities for client devices in a standard way. It defines a central repository of client applications, services, and content called a provisioning portal, which is responsible for managing the distribution of rich clients and their content. Such a centralized approach allows developers to add features to their applications and services easily. Users interact with this portal to discover rich-client applications, and the portal delivers the items the user selects to their devices. The J2EE Client Provisioning Specification makes it much easier to provision J2ME devices. The JSR 124 RI implements the final version of the specification; it comes with three adapters and a sample application, RI-Test. As an exercise you may want to download, install, set up, and experiment with the RI. You can then go on to adapt RI-Test's servlets and configuration files for your own applications. For more information
Acknowledgment
Special thanks to David Bowen of Sun Microsystems, whose feedback helped me improve this article. About the Author
Qusay H. Mahmoud provides Java consulting and training services. He has published dozens of articles on Java, and is the author of Distributed Programming with Java (Manning Publications, 1999) and Learning Wireless Java (O'Reilly, 2002). | |||||||||||||||||||||||||||
|
| ||||||||||||