Articles
Java Platform, Standard Edition
|
|
| By Mandy Chung and Dana Nourie, June 2008 |
|
Use Sun Service Tags to track and manage your registered Sun products, such as the JDK, GlassFish application server, and NetBeans IDE.
Contents
Product registration provides the ability to register product installations through Sun Connection using the Sun Service Tags technology. The Java SE Development Kit (JDK), the GlassFish Application Server, Sun Java System Application Server (commercial version of the GlassFish application server), and the NetBeans IDE provide the ability to register in their recent releases.
With product registration support, you can track and manage your registered products at the Sun Connection Inventory Channel. The Inventory Channel is one of the Sun Connection services, and it is a free inventory management portal that provides a centralized repository to organize and manage the deployed products on your systems. You can also add your own service tags.
Just what is a Sun Service Tag? A Sun Service tag is a digital identifier to enable product registration by way of an XML-based unique identifier containing basic information about a product instance on a system. A service tag enables automatic discovery of systems, software, and services (gear). The tag uniquely identifies each tagged piece of gear, and allows information about the gear to be shared over a local network. Discoverable products are registerable at the Sun Connection Inventory Channel. For more information, see the Service Tag FAQ.
Each JDK instance has a service tag for registering, represented in the table below.
|
Table 1. Service Tags for Registering JDK Instances
|
|
|
Field
|
Value
|
Description
|
|---|---|---|
instance_urn |
urn:st:16f1e569-c583-4190-85ab-42339d984449 |
Unique identifier for the product instance
|
product_name |
Java SE 6 Development Kit |
Product name
|
product_version |
1.6.0_04-ea |
Product version
|
product_urn |
urn:uuid:b58ef9a8-5ae8-11db-a023-080020a9ed93 |
Product identifier
|
product_parent_urn |
urn:uuid:fdc90b21-018d-4cab-b866-612c7c119ed3 |
Product parent ID
|
product_parent |
Java Platform Standard Edition 6 (Java SE 6) |
Product parent name
|
product_defined_inst_id |
id=1.6.0_04-ea-b07 x86 |
Product defined instance ID
|
product_vendor |
Sun Microsystems |
Product vendor
|
platform_arch |
x86 |
Targeted product architecture
|
source |
Windows JDK i586 installer |
Source of the product instance
|
container |
global |
OS container (e.g. Zonename)
|
The product_urn field of Sun products is in the format urn:uuid: followed by a 32-character long UUID. This field is not required by Sun Service Tags. You can also embed additional information about a product in the product_defined_instance_id field.
JDK product registration is part of Sun's larger effort to support registration across its hardware and software products. The NetBeans IDE, the GlassFish application server, Sun Java System Application Server, and many other Sun offerings also provide the ability to register. You can track and manage your registered products at the Sun Connection Inventory Channel. The Inventory Channel is one of the Sun Connection services, and it is a free inventory management portal that provides a centralized repository to organize and manage the deployed products on your systems.
Registering the JDK and other products enables Sun to provide you with faster and more efficient services and collaboration. For example, registration provides these benefits:
By way of example, the JDK registration process generates a service tag for the JDK. The service tag information is then uploaded to Sun Connection during registration. If the JDK is installed on a Service Tags enabled system (that is, the Service Tags software has been installed on your system), the JDK service tag is created in the service tag registry and the JDK is discoverable with the Registration Manager client tool.
Sun Service Tags enable automatic discovery of the tagged systems and software on your systems or on a local network. Beginning with Java SE 6 Update 4, the JDK and JRE become discoverable when installed on Solaris and Linux service tag enabled systems. However, the use of Sun Service Tags is not limited to Sun products. You can create the service tags for your own products (hardware, software, or services) and leverage the discovery capability for your environment to use, which is explained later in this article.
The registration process begins after the JDK installation is completed, when you see the last panel that provides the information about JDK registration.
|
Figure 1. Product Registration
|
Figure 1 shows a new panel (introduced in JDK 6 Update 5) in the Windows installer at the end of JDK installation. When you click Finish, the system completes the following steps.
Step 1:
Product registration data is collected for the installed JDK, including:
The complete list of collected data is described at the JDK Product Information page.
Step 2:
The JDK registration data is posted to to Sun Connection through https. The data is temporarily stored in a Sun Connection server until the JDK is registered. The data is purged after a short period of time after it is received from the HTTPS POST if JDK registration is not completed.
Step 3:
The default desktop browser is launched and the JDK Registration Login page is opened. Each JDK registration has a unique identifier that is passed as part of the URL parameters, and the Sun Connection registration web application uses the identifier to look up the registration data it receives from the HTTPS POST in Step 2.
Known limitation: On Solaris and Linux systems, the JDK registration implementation is dependent on Gnome libraries. If those libraries are unavailable, no browser is opened. See the Swing Tutorial about java.awt.Desktop API for details.
To complete JDK registration, you need to log in to your existing Sun Developer Network or other Sun online account. If you do not have an existing account, you can create one during the registration process. After you log in and the JDK is registered, you see a "Thank You" page, as shown in the following figures.
|
Figure 2. JDK Registration Login Page
Click the image to enlarge it. |
|
Figure 3. Thank-You Page
Click the image to enlarge it. |
|
Figure 4. Offline JDK Registration Page
Click the image to enlarge it. |
Step 4:
A new file, <JDK>/register.html, and its localized versions ( register_ja.html and register_zh_CN.html) are generated in the JDK installation directory. This file is an offline JDK registration page that combines Step 2 and Step 3 in HTML form. The offline JDK registration page can be used to register your JDK at any time. You might see this page opened in the browser in Step 3 if your system doesn't have an Internet connection or fails to post the registration data in Step 2, for example due to the network or firewall configuration.
Step 5:
After the browser is launched, the JDK installation process will finish and exit. At this point, the JDK is not registered until you log in to your Sun Developer Network account or other Sun Online Account. If you choose not to register, no data is saved in the Sun Connection database.
The GlassFish server and NetBeans IDE support product registration in a similar way to the JDK. The registration process includes these steps:
See the GlassFish application server and NetBeans IDE documentation for details.
There are many benefits to developers for registering the JDK through Sun Connection, either when installing or at any time after installation by opening the register.html file located on your system. JDK registration is free and is designed to be easy, so that you can quickly receive the following benefits:
In addition, by joining the Sun Developer Network when you register, you'll also receive all the benefits of being an SDN member:
portal.sun.comFor more information about the exclusive benefits of becoming an Sun Developer Network member, check out the SDN offers page.
The Sun Connection Inventory Channel is a free offering from Sun Microsystems that provides a centralized repository to organize the deployed products on your systems and report on them using the reporting tool.
One of the most basic and difficult problems IT departments have today is to simply know what systems, software, and even services they have. Systems and software are installed by various team members at different times. Systems are shut down and new software is upgraded. Sun Service Tags and the Inventory Channel give IT new tools to manage this complexity. For example, you can quickly determine which JDK and JRE instances (for Java SE 6 Update 4 and later releases) are installed on systems in your environment.
The Sun Connection Inventory Channel can help you:
The major elements to the Sun Connection Inventory Channel are:
To fully enable service tags technology (allowing for discovery and bulk registration of gear), you need to install the Service Tags Software, which consists of:
/var/sadm/servicetag/registry/servicetag.xml on Solaris and Linux systems or c:\Program Files\Sun\servicetag on Windows systems (or [ProgramFilesFolder]\Sun\servicetag if you have a different folder for program files).tclient utility: A command-line utility to add, update, and remove a service tag from the ST registry.Some Sun products (including the JDK, NetBeans IDE, and GlassFish server) are able to complete registration even if the Service Tag Software is not installed on the system. Other products bundle the software.
After you enable Service Tags on your system, you can add a service tag for any hardware, software, or anything else you want to be tagged. The example below creates a service tag for MyToyApp by using the stclient utility. You can do it in an interactive mode or with the -a option.
c:\Program Files\Sun\servicetag>.\stclient > a Enter instance URN (optional): Enter product (e.g. Sun Web Server): MyToyApp Enter version (e.g. 6.1): 3.6 Enter product URN: A-unique-ID-for-MyToyApp Enter product parent URN: A-unique-ID-for-its-parent Enter product parent (e.g. JES): Free software Enter product defined instance id: Enter product vendor (e.g. Sun): Cool company Enter platform arch (e.g. SPARC): x86 Enter container (e.g. zone 0): global Enter source (e.g. genesis patch): MyToyAppSetup.exe MyToyApp 3.6 added Product instance URN=urn:st:1f158110-de82-11dc-a0f1-000f1f14443e Press enter to continue |
The stclient command creates an entry in the ST registry that contains the given information, and it will assign a product instance URN if not specified. You can run the stclient -g -i command to get the service tag of a given product instance URN, or run stclient -x to view all service tags in the ST registry. The following XML entry is added in the ST registry for MyToyApp.
<service_tag>
<instance_urn>urn:st:1f158110-de82-11dc-a0f1-000f1f14443e</instance_urn>
<product_name>MyToyApp</product_name>
<product_version>3.6</product_version>
<product_urn>A-unique-ID-for-MyToyApp</product_urn>
<product_parent>Free software</product_parent>
<product_parent_urn>A-unique-ID-for-its-parent</product_parent_urn>
<product_defined_inst_id></product_defined_inst_id>
<product_vendor>Cool company</product_vendor>
<platform_arch>x86</platform_arch>
<timestamp>2008-02-19 00:32:16 GMT</timestamp>
<container>global</container>
<source>MyToyAppSetup.exe</source>
<installer_uid>0</installer_uid>
</service_tag>
|
To discover the tagged products on your system, start the Registration Manager client tool. (A Java Web Start application is also available.)
ST discoverer and listener services allow the system to be discovered through the Registration Manager client tool. These network services communicate only the service tag information with the Registration Manager client tool and do not communicate with any other services on your system.
The following screen shots are examples of the Registration Manager client tool looking up tagged products.
|
Figure 5. First Example Product Registration Page
Click the image to enlarge it. |
|
Figure 6. Second Example Product Registration Page
Click the image to enlarge it. |
The first screen shot shows that you can configure the Registration Manager client tool to perform the discovery on a local subnet or on one or more specified systems. Note that the Registration Manager performs no communication with Sun until you decide to perform the registration step.
The second screen shot shows the list of tagged products on your system including the MyToyApp example tag. Many Sun hardware and software products including the JDK and NetBeans IDE are discoverable, and more are being added over time. A service tag for the Windows OS is also created as part of the Service Tags software installation.
| Mandy Chung is a senior staff engineer at Sun Microsystems. She leads the product registration support for Java SE and also designs the Java API for Sun Service Tags support. |
| Dana Nourie is a Sun Microsystems staff writer and editorial manager of the Java SE, the New to Java Programming Center, Java Technology Fundamentals, and Core Java Technologies Tech Tips. She also gives chats for developers in the SLurl in Second Life (Official site of the 3D online virtual world). |