The Source for Java Technology Collaboration
User: Password:



Mandy Chung's Blog

Mandy Chung Mandy Chung is a senior staff engineer at Sun Microsystems. She is working on the Java SE monitoring and management and other serviceability technologies. She leads the design and the implementation of the java.lang.management API, out-of-the-box manageability, and also the JConsole monitoring tool. Prior to joining Sun, she was the lead engineer working in the linker and dynamic loader project in Hewlett Packard.



JavaOne 2008

Posted by mandychung on May 05, 2008 at 10:31 PM | Permalink | Comments (0)

There are the Java Modularity session and BOF on Wednesday (5/7/2008)at JavaOne:

TS-6185: Modularity in the Java™ Platform
Wednesday 5/7/2008
10:50 AM -11:50 AM

BOF-5032: Modularity in the Java™ Platform
Wednesday 5/7/2008
8:30pm - 9:20pm

At the session, Stanley and Alex, the spec leads of JSR 277, will share the technical details of the Java Module System. At the BOF, we will show some simple demos of the JAM modules and also show a JAM module importing OSGi bundles using the JDK built from the OpenJDK modules project and then open for Q&A. Looking forward to meeting you there.

For those who are not attending JavaOne, we will update you in our future blogs.



Supporting OSGi Bundles in the Java Module System

Posted by mandychung on April 28, 2008 at 10:38 PM | Permalink | Comments (1)

A draft specification for supporting OSGi bundles in the Java Module System is put together based on the past EG discussion in particular the proposals and inputs from Glyn Normington, Richard Hall, and Bryan Atsatt. It is expected to evolve based on further inputs from the JSR 277 Expert Group.

With the OSGi expertise from the JSR 277 EG and their contributions, we expect that this specification can be finalized soon. Your feedback is welcome and please send them to jsr-277-comments@jcp.org.

Just to highlight a few main points:
1. One or more module system implementations can run on a single Java virtual machine (e.g. JAM module system and OSGi module system).
2. A Java module can import an OSGi bundle.
3. OSGi bundles are exposed as ModuleDefinitions in the Java Module System.
4. Other module system can find OSGi bundles via the repository delegation model.
5. OSGi bundles are resolved by the OSGi module system using its own algorithm.

One thing noteworthy:

JSR 277 defines the framework and API for the Java Module System and also defines the JAM module system as the default module system implementation for the Java SE platform and the JAM file format as its distribution format.

JSR 277 Early Draft (EDR2) is being updated to clearly separate the distinction between the Java Module System framework and the JAM module system implementation.

We recognized the issue with the JSR 277 EDR that didn't clearly separate the framework/abstraction from the JAM module system implementation that led to confusion and also skeptic about the OSGi interoperability support. Bryan Atsatt also identified and raised this concern to the EG. We hope that the EDR2 will be available in a few weeks after JavaOne. In the mean time, the draft spec includes some spec clarification relevant for this support.

In addition, Bryan has a nice blog about JSR 277 interoperation that serves very well to set up the context ready for the coming discussion (thanks Bryan). I'd also like to blog more about this work but probably after JavaOne when I get some time.



JSR 277 and OSGi interoperability

Posted by mandychung on April 18, 2008 at 11:54 AM | Permalink | Comments (1)

I recently take on a new challenge and join the JSR 277 project working on JSR 277 and OSGi interoperability. There are lots to learn and I am trying to come up to speed as quickly and effectively as I can. Thanks to all the interests and excitements around this topic! I appreciate in advance the participation and contribution from the JSR 277 and 291 Expert Groups and the OSGi experts.

Our goal is to ensure that existing OSGi bundles can be used in Java SE 7. Like everywhere else, resource has always been tight. But we are revamping the effort to move forward quickly.

Stay tuned and please be patient with this new member on board :)

Digress:
Although I won't have time to work on Java SE serviceability, monitoring and management technologies in the near future, I'd still like to meet with you all at JavaOne 2008 to talk about these areas. I highly recommend to check out VisualVM (the next generation of Java SE troubleshooting GUI tool) at the Java SE booth. Very cool!

Hope we can show a demo on using VisualVM to monitor and manage Java modules some time soon!

New JDK Registration Capability in Java SE 6u5

Posted by mandychung on March 06, 2008 at 03:23 PM | Permalink | Comments (5)

JDK product registration is one of the most significant features in the new Java SE 6u5 release. This provides the ability to register the JDK installations through Sun Connection. Registering the JDK is optional. We would like the JDK registration to provide mutual benefits to both Sun and the developers.

JDK Installation Experience

There is a change in the JDK installation flow for this feature.
install.PNG

The above is the new panel of the Windows installer at the end of JDK installation. When you click "Finish", the JDK Registration Login page will be opened in a browser. To complete JDK registration, you will need to login 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 login and the JDK is registered, you will see a "Thank You" page.

jdk-register.PNG
JDK Registration Login page
thankyou-page.PNG
Thank You page
offline-reg-page.PNG
Offline JDK Registration Page

There is an offline JDK registration page located in the JDK install directory (<JDK>\register.html) along with two localized versions (Japanese and simplified Chinese) that allows you to register your JDK any time after installation.

Technical Details

The registration process begins after the JDK installation completes where you get the last panel providing the information about JDK registration. When you click "Finish", the following happens:

Step 1:
Collect the product registration data about the installed JDK including:

  • JDK service tag. See "What is a Service Tag" in my previous blog
  • System information including hostname, OS name, version and architecture.

The completed list of data being collected is described at the JDK Product Information page. In the next release, additional system information may be collected and the JDK Product Information page will be updated accordingly.

Step 2:
Post the JDK registration data to Sun Connection via https and the data will be temporarily stored in a Sun Connection server until the JDK is registered. The data will be purged after a short period of time after it is received from the HTTP POST and if the JDK is not registered.


Step 3:
Launch the default desktop browser and open the JDK Registration Login page. Each JDK registration has a unique identifier which will be passed as part of the URL parameters and the Sun Connection registration web application will use it to look up the registration data it receives from the HTTP POST in step 2.

Thanks to the new java.awt.Desktop API added in Java SE 6 release which helps the implementation a lot.

Known limitation: On Solaris and Linux, the JDK registration implementation is dependent on Gnome libraries. If those libraries are unavailable, the Desktop API is not supported and no browser will be opened. See the Swing Tutorial for details.

Step 4:
A new file, <JDK>/register.html, and its localized versions (register_ja.html and register_zh_CN.html) will be generated in the JDK install directory. We call this file as an offline JDK registration page which combines step 2 and step 3 in an HTML form. This offline JDK registration page can be used to register your JDK any time. You may see this page opened in the browser in step 3 if your system doesn't have internet connection or fails to post the registration data in step 2 for example due to the network or firewall configuration.

Step 5:
Once the browser is launched, the JDK installation process will finish and exit. At this point, the JDK is not registered until you login your Sun Developer Network account or other Sun online account. If you do not register, no data will be saved in Sun Connection database.

JDK Registration and Service Tags

My previous blog gave an overview of the Service Tags technology. Service tag is a digital product identifier to enable product registration. JDK registration process generates a service tag for the JDK. The service tag information will then be uploaded to Sun Connection during registration. If the JDK is installed on a Service Tags enabled system (i.e. the Service Tags software has been installed on your system), the JDK service tag will be created in the service tag registry and the JDK will be discoverable with the Registration Manager client tool.

Benefits

JDK product registration is part of Sun's larger effort to support registration across its hardware and software products. NetBeans, Glassfish and many other Sun products also provide the ability to register the products. You can track and manage your registered products at Sun Inventory Channel. Sun 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 your deployed products on your systems.

Registering the JDK and other products will enable us to provide faster and efficient services and collaboration, for example:

  • provide you more customized updates including new releases, security fixes, and news relevant to your deployed products.
  • inform you when a change in one version of a product on your system would have an impact on other products you have running (related to performance, compatibility or security, for example).
  • enable us to better test and optimize performance for your system.
  • effectively communicate our product or service offerings based on the software you have installed on your system.

References



Sun Service Tags and Inventory Channel

Posted by mandychung on February 19, 2008 at 12:05 AM | Permalink | Comments (1)

Recently I have been working on a new Java SE project related to a Sun Connection Technology called Service Tags. I'd like to give a short introduction of the Sun Service Tags technology that you may find various interesting ideas of leveraging it.

Sun Service Tags

The Sun Service Tags enable automatic discovery of the tagged systems and softwares on your systems or a local network. The JDK and JRE 6 update 4 will become discoverable when installed on Solaris and Linux service tag enabled systems. The Sun Service Tags are not limited for Sun products. You can create the service tags for your own products (hardwares, softwares, or services) and leverage the discovery capability for your environment to use.

Discoverable products are registerable at Sun Connection Inventory Channel. I'll talk about the JDK product registration next in a couple of weeks.

What is a Service Tag?

Sun Service Tag is a XML-based unique identifer of a product instance containing a set of basic information about the product instance on a system. Below represents a service tag of a JDK instance.

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 this format "urn:uuid:" followed with a 32 character long UUID but is not required by Sun Service Tags. You can also embed additional information about a product besides the basic one in the product_defined_instance_id field.


Service Tag Enabled System

To enable service tags technology, you need to install the Service Tags Software that consists of:

  • Service Tags (ST) Registry: A XML-based registry that contains all service tags on a system locating at /var/sadm/servicetag/registry/servicetag.xml on Solaris and Linux or c:\Program Files\Sun\servicetag on Windows (or [ProgramFilesFolder]\Sun\servicetag if you have a different folder for program files).
  • A stclient utility: A command-line utility to add, update, and remove a service tag from the ST registry.
  • ST discoverer and listener: Two network services facilitating auto discovery,

Create your own service tag

Once 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. For example, I have created a service tag for Skype just as an example by using the stclient utility (I installed Skype on my laptop for making international calls to my mom in Hong Kong) . 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): Skype
   Enter version (e.g. 6.1): 3.6
   Enter product URN: A-unique-ID-for-Skype
   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): Skype
   Enter platform arch  (e.g. SPARC): x86
   Enter container (e.g. zone 0): global
   Enter source (e.g. genesis patch): SkypeSetup.exe
   Skype 3.6 added
   Product instance URN=urn:st:1f158110-de82-11dc-a0f1-000f1f14443e
   Press enter to continue

stclient will create an entry in ST registry containing 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 stclient -x to view all service tags in the ST registry. Below is the XML entry in the ST registry I added for Skype.

  <service_tag>
    <instance_urn>urn:st:1f158110-de82-11dc-a0f1-000f1f14443e</instance_urn>
    <product_name>Skype</product_name>
    <product_version>3.6</product_version>
    <product_urn>A-unique-ID-for-Skype</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>Skype</product_vendor>
    <platform_arch>x86</platform_arch>
    <timestamp>2008-02-19 00:32:16 GMT</timestamp>
    <container>global</container>
    <source>SkypeSetup.exe</source>
    <installer_uid>0</installer_uid>
  </service_tag>


Discovery

To discover the tagged products on your system, you can start the Registration Manager client tool (a Java web start application also available at https://sunconnection.sun.com/inventory).

ST discoverer and listener services allow the system to be discovered via the Registration Manager client tool. These network services only communicate the service tag information with the Registration Manager client tool and do not communicate with any other services on your system.

These are the screenshots of the Registration Manager client tool looking up the tagged products on my laptop:

regclient.PNG regclient.PNG

The first screenshot shows that you can configure the Registration Manager client tool to perform the discovery on a local subnet or one or more specified systems. Note that the Registration Manager performs no communication with Sun until you decide to perform the "registration" step. I will blog about product registration later.

The second screenshot shows the list of tagged products on your system including my tagged Skype. Several Sun hardware and software products including 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.

Inventory Channel


Sun Connection Inventory Channel is a free offering from Sun that provides a centralized repository to organize the deployed products on your systems and report on them using the report generation tool. My next blog about JDK product registration will cover more about it.

One of the most basic and difficult problems IT departments have today is to simply know what systems, softwares, and even services they have. Systems and softwares are installed by various team members at all times. Systems are shut down and new software is upgraded. Sun Service Tags and Inventory Channel give IT new tools to manage this complexity. For example, you can quickly determine what JDK and JRE instances (Java SE 6 update 4 and later releases) are installed on which systems in your environment.

For More Information



May 2008
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31


Search this blog:
  

Categories
J2SE
JavaOne
Archives

May 2008
April 2008
March 2008
February 2008
October 2007
May 2007
December 2006
August 2006
May 2006
February 2006
November 2005

Recent Entries

JavaOne 2008

Supporting OSGi Bundles in the Java Module System

JSR 277 and OSGi interoperability



Powered by
Movable Type 3.01D


 Feed java.net RSS Feeds