Creating a new CAPS 6-ready GlassFish domain
By Louis Polycarpou on Jun 23, 2008
Firstly, after you install CAPS 6, just take a complete backup of the domain1 folder (and its subfolders) created for you in
.../JavaCAPS6/appserver/domains. This domain already has all the CAPS-specific runtime bits added to it and will make things a lot easier should you need to restore to a fresh instance. You should also do this as and when you install ESRs although at the time of writing this it's still a tad early to be talking about ESRs. You can take backups using an asadmin task, but I personally prefer good old fashioned tar/zip files.
NB: Ensure that the domain is stopped before you take the backup.
Steps to create a new CAPS 6 domain
Create the new domainEnsure the .../appserver/bin folder is in your path (for asadmin) and create a new domain "domain2" with:
asadmin create-domain --portbase 19000 domain2
When prompted, use either the following defaults or your preferred values:
Master Password =
Add STCMS to the new domain (optional)If you require STCMS (SeeBeyond JMS) support in the new domain, install embedded STCMS support into the new domain with:
asadmin create-stcms --domainname domain2 --stcmsport 19007 IQ_Manager_19007
Stcms instance created:
Domain Path: C:\\dev\\CAPS6\\appserver\\domains\\domain2
Domain Name: domain2
Stcms Name: IQ_Manager_19007
Stcms Port: 19007
Stcms SSL Port: 19008
Stcms Enabled: true
Start the new domainStart the new domain with:
asadmin start-domain domain2
NB: You may see a
NullPointerExceptionwhen starting up the domain for the first time. This is due to Access Manager not being set up correctly on the new domain (a known issue). You can suppress the NPE by adding the following entry:
into the file
domains/<domain-name>/config/domain-registrybefore starting the domain for the first time.
The first time you start the domain you will see the following message:
Error: Access Manager - Can't find the node /domain/applications/lifecycle-module[@name='AMConfiguratorLifeCycleModule']/@enabled
The operation DISABLE on the addon am-configurator is complete.
Subsequent starts will now not display the error.
Install Runtime InstallationInstall the extra bits for CAPS 6, known as the Runtime Installation.
You can do this either by configuring system properties or using a properties file. I choose to do this using the latter. For this, you need to locate and modify the
install.propertiesfile in your
Modify the following properties as necessary for your new domain. If you've used a different password, modify the relevant password fields also (the property names are self-explanatory).
# The name of the domain
# The admin http or https port
If you require UDDI support (a WAR file to be deployed):
# ----- UDDI ------------------------------------------------------------------Likewise, if you require STCMS (SeeBeyond JMS) support set the following:
# If the UDDI .war files need to be deployed, change this to true
# ----- STCMS -----------------------------------------------------------------
# If STCMS needs to be installed, change this to true
...and uncomment the required operating system for installation, e.g. for Windows:
Now, with domain2 running, execute the following to apply the CAPS 6 runtime using the new properties:
asant -f ../addons/caps/install.xml
NB: The above command assumes you are running it from the
Install JBI componentsIf you are using JBI components, you can install the required shared libraries, service engines and binding components individually from
JavaCAPS6\\appserver\\addons\\jbi-components. You should install the two shared libraries before installing any service engines and binding components.
To install shared libraries from the command line, use:
asadmin install-jbi-shared-library --port 19048 --user admin --passwordfile passwd.txt ..\\addons\\jbi-components\\<library_to_install>.jar
NB: If you do not supply a username or password file, but will be prompted to enter these each time you run the command. The port 19048 is the default admin port when a base port of 18000 is used for domain creation.
To install service engines and binding components from the command line, use:
asadmin install-jbi-component --port 19048 --user admin --passwordfile passwd.txt ..\\addons\\jbi-components\\<component_to_install>.jar
The contents of
passwd.txtshould reflect the passwords entered earlier:
If you want as close as possible a default CAPS domain installation, install all of the components. To do so, navigate to the .../appserver/addons/jbi-components directory and execute the following:
asadmin install-jbi-shared-library --port 19048 encoderlib.jar
asadmin install-jbi-shared-library --port 19048 sharedutillib.jar
asadmin install-jbi-component --port 19048 bpelserviceengine.jar
asadmin install-jbi-component --port 19048 filebc.jar
asadmin install-jbi-component --port 19048 jmsbc.jar
asadmin install-jbi-component --port 19048 sqlse.jar
asadmin install-jbi-component --port 19048 xsltserviceengine.jar
asadmin install-jbi-component --port 19048 etlserviceengine.jar
Modify VM properties in domain.xmlLocate the
...\\domains\\domain2\\configand make the following changes to JVM options:
- Remove the line
- Insert the line
- Remove the line
Install ETL MonitorFinally, if you chose to deploy the etl service engine, you should deploy the
etlse-monitor.warfile also located in the
jbi-componentsfolder. From the command line:
...\\addons\\jbi-components> copy etlse-monitor.war ..\\..\\domains\\domain2\\autodeploy
Hands up please those of you who would like to see a new domain manager or special asadmin command to do all of this for you...