Testing your Update Center module
Before you "host" your module on a server for others to download, it would be wise to test it out yourself.
This blog describes how you can test your update center module locally on your GlassFish container through the updatetool client. Hopefully you already know how to create and package your update center module.
Here's what you do to "host" the module on your local running instance of GlassFish. Updatetool is available from GlassFish v2 onwards.
Trivia: Did you know that a Netbeans module or .nbm extension is just a fancy name for a .jar?
Important contact information: If you are interested in hosting your application on GlassFish Update Center repository, do touch base with the GlassFish Update Center team at: dev@updatecenter.dev.java.net and they'll be happy to work with you.
Posted at 12:10PM Jun 19, 2007 by Manveen Kaur in Sun | Comments[0]
Packaging your update center module
Once you've created a GlassFish Update center installer.jar, you would want to package it in the format that update center tool would like. Here is how your update center jar should look like.
File system layout for downloadable module file (equivalent of NetBeans NBM file) will be jar archive file with following structure:
module_xx.jar
|
+- info
| |
| +- info.xml
|
+- module
|
|
+- locale (optional, for localized packages)
|
|
+-installer_xx.jar or installer_xx.zip
installer_xx.jar can be addon component installer or configurator jar file as specified in Addon installer and configurator plug-in imported interfaces.
The DTD for info.xml is here.
Posted at 03:47PM Jun 15, 2007 by Manveen Kaur in Web 2.0 | Comments[0]
Creating your own update center addon module
To try GlassFish Update Center, install GlassFish V2 (screencast). Then go to install-root/glassfish/updatecenter/bin and invoke updatetool (or updatetool.bat). You'll see a list of addon modules available for installation.
But what's an addon?
An addon is a companion product or runtime component installed on top of Sun Java System Application Server.
Right, but how do you create such a module?
To start with, you need to implement an com.sun.appserv.addons.Installer interface. You may also need a com.sun.appserv.addons.Configurator interface implementation.
What's the difference between and installer and a configurator plugin?
If addon requires installation of shared files which are not specific to a particular application server domain, installation and initial configuration of such files must be handled by installer plugin. The installer plugin has read-write access to installation root directory (INSTALL_ROOT) of the appserver.
Installer plugin is invoked either at the end of appserver installation or when the CLI command asadmin install-addon addon_name_installer.jar is executed.
The configurator plugin should assume read-only access to INSTALL_ROOT and read-write access to root directory of the domain (DOMAIN_DIR). The configurator will be invoked once, prior to starting application server domain. The configurator will access application server configuration files like DOMAIN_DIR/config/domain.xml, DOMAIN_DIR/config/server.policy etc. and make necessary changes.
Where can I get the installer plugin API?
From MavenHow do I package the installer plugin?
addon_name_installer.jar
|- META-INF/services/com.sun.appserv.addons.Installer
|- InstallerImpl.class (implements Installer)
|- InstallerUtil.class
|- InstallerMore.class
|- addon_name_configurator_01_01_00.jar
|- META-INF/services/com.sun.appserv.addons.Configurator
|- ConfiguratorImpl.class (implements Configurator)
|- Another.class
|- More.class
|- Util.class
How do I invoke and test the installer plugin?
Installer plugin is invoked either at the end of appserver installation or when the CLI command
asadmin install-addon addon_name_installer.jar
Posted at 03:28PM Jun 15, 2007 by Manveen Kaur in Web 2.0 | Comments[0]
Why should I look at GlassFish?
In case you missed going to the GlassFish PoD during this year's JavaOne, and have some questions left unanswered, Nazrul has written an excellent blog answering the most popular questions asked.
Take a look.
Posted at 11:58AM May 21, 2007 by Manveen Kaur in Sun | Comments[2]
jMaki series - 1
There has been quite some buzz about jMaki and Web 2.0 this Java One. There were atleast 7 or 8 talks/sessions or BoFs! That sure is a lot!
Well I've been trying to get started with using jMaki in my own space too. I thought I'd write my blogs as a series of journals as I go along.
First we need to setup the environment. We need an IDE, a jMaki plugin, and an application server.
Here are my preferences-
Now using the update center, I installed jMaki plugin in my NetBeans IDE. There is also a screencast that you can watch.
Now I'm all set to start writing applications using jMaki.
Posted at 02:56PM May 09, 2007 by Manveen Kaur in Sun | Comments[0]