How to run STCMS on new Glassfish as a Lifecycle module?

There was one interesting question as to how to run the STCMS as a lifecycle module in my new version of Glassfish not the one bundled in the Java CAPS default Application Server since if I can download and use the new GlassfishESB as in case of the Design time my runtime would also be the latest. Here is the answer:



  • Copy the STCMS folder that is under the application server to the glassfish\\domains\\domain1\\addons folder

  • Open the stcms.default.Properties file in the folder glassfish\\domains\\domain1\\addons\\stcms\\stcms1\\config and edit the hard coded properties like

    • STCMS.DB.Path

    • STCMS.Server.JournalPath

    • STCMS.Server.JournalStart

    • STCMS.Server.JournalClassPath

    • STCMS.AAS.SecurityFileName

    • STCMS.Trace.LogFileName

    • STCMS.SSL.CertificateFileName

    • STCMS.SSL.KeyFileName

    • STCMS.SSL.CAFilePath

    • STCMS.JAVA.ClassPath

    • few other properties as needed to the new values



  • Add the following to the config.xml in the new installation located at glassfish\\domains\\domain1\\config

    • for the lifecycle stuff add the following to the applications section:





    1: <!--STCMS lifecycle module added-->


    2: <lifecycle-module class-name="com.sun.caps.jms.StcmsLifecycleModule" enabled="true" is-failure-fatal="false" load-order="200" name="domain1stcms1" object-type="user">


    3: <description>Sun JMS IQ Manager Lifecycle Module 6</description>


    4: <property name="com.sun.caps.domain.name" value="domain1"/>


    5: <property name="com.sun.caps.jms.name" value="stcms1"/>


    6: <property name="com.sun.caps.jms.port" value="18007"/>


    7: <property name="com.sun.caps.jms.sslport" value="18008"/>


    8: </lifecycle-module>


    9: <!--STCMS lifecycle module complete-->




    • for the default connector resources add the following to the resources section:





    1: <connector-resource enabled="true" jndi-name="jms/tx/stcms1" object-type="user" pool-name="stcms1-tx">


    2: <description>Default Transactional pool for local STCMS (domain1stcms1)</description>


    3: </connector-resource>


    4: <connector-resource enabled="true" jndi-name="jms/tx/default" object-type="user" pool-name="stcms1-tx">


    5: <description>Default Transactional JMS Pool</description>


    6: </connector-resource>


    7: <connector-resource enabled="true" jndi-name="jms/notx/stcms1" object-type="user" pool-name="stcms1-notx">


    8: <description>Default Non-transactional pool for local STCMS (domain1stcms1)</description>


    9: </connector-resource>


    10: <connector-resource enabled="true" jndi-name="jms/notx/default" object-type="user" pool-name="stcms1-notx">


    11: <description>Default Non-Transactional JMS Pool</description>


    12: </connector-resource>


    13: <connector-resource enabled="true" jndi-name="jms/tx/jmq1" object-type="user" pool-name="jmq1-tx">


    14: <description>Default Transactional pool for local JMQ (default_JMS_host)</description>


    15: </connector-resource>


    16: <connector-resource enabled="true" jndi-name="jms/notx/jmq1" object-type="user" pool-name="jmq1-notx">


    17: <description>Default Non-transactional pool for local JMQ (default_JMS_host)</description>


    18: </connector-resource>




    • Add the following to the resources section for having the connection pools:





    1: <connector-connection-pool associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-definition-name="javax.jms.ConnectionFactory" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" fail-all-connections="false" idle-timeout-in-seconds="25000" is-connection-validation-required="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="true" max-connection-usage-count="0" max-pool-size="64" max-wait-time-in-millis="60000" name="stcms1-tx" pool-resize-quantity="4" resource-adapter-name="sun-jms-adapter" steady-pool-size="0" transaction-support="XATransaction" validate-atmost-once-period-in-seconds="0">


    2: <description>Default Transactional pool for local STCMS (domain1stcms1)</description>


    3: <property name="UserName" value="(domain1stcms1)"/>


    4: <property name="Password" value="auto"/>


    5: <property name="ConnectionURL" value="stcms://(domain1stcms1)"/>


    6: <property name="Options" value="JMSJCA.sep=,# Enter options here"/>


    7: </connector-connection-pool>


    8: <connector-connection-pool associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-definition-name="javax.jms.ConnectionFactory" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" fail-all-connections="false" idle-timeout-in-seconds="25000" is-connection-validation-required="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="true" max-connection-usage-count="0" max-pool-size="16" max-wait-time-in-millis="60000" name="stcms1-notx" pool-resize-quantity="4" resource-adapter-name="sun-jms-adapter" steady-pool-size="0" transaction-support="NoTransaction" validate-atmost-once-period-in-seconds="0">


    9: <description>Default Non-transactional pool for local STCMS (domain1stcms1)</description>


    10: <property name="UserName" value="(domain1stcms1)"/>


    11: <property name="Password" value="auto"/>


    12: <property name="ConnectionURL" value="stcms://(domain1stcms1)"/>


    13: <property name="Options" value="JMSJCA.sep=,# Enter options here"/>


    14: </connector-connection-pool>


    15: <connector-connection-pool associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-definition-name="javax.jms.ConnectionFactory" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" fail-all-connections="false" idle-timeout-in-seconds="25000" is-connection-validation-required="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="true" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="jmq1-tx" pool-resize-quantity="4" resource-adapter-name="sun-jms-adapter" steady-pool-size="0" transaction-support="XATransaction" validate-atmost-once-period-in-seconds="0">


    16: <description>Default Transactional pool for local JMQ (default_JMS_host)</description>


    17: <property name="UserName" value="(default_JMS_host)"/>


    18: <property name="Password" value="(default_JMS_host)"/>


    19: <property name="ConnectionURL" value="mq://(default_JMS_host)"/>


    20: <property name="Options" value="JMSJCA.sep=,# Enter options here"/>


    21: </connector-connection-pool>


    22: <connector-connection-pool associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-definition-name="javax.jms.ConnectionFactory" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" fail-all-connections="false" idle-timeout-in-seconds="25000" is-connection-validation-required="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="true" max-connection-usage-count="0" max-pool-size="8" max-wait-time-in-millis="60000" name="jmq1-notx" pool-resize-quantity="4" resource-adapter-name="sun-jms-adapter" steady-pool-size="0" transaction-support="NoTransaction" validate-atmost-once-period-in-seconds="0">


    23: <description>Default Non-transactional pool for local JMQ (default_JMS_host)</description>


    24: <property name="UserName" value="(default_JMS_host)"/>


    25: <property name="Password" value="(default_JMS_host)"/>


    26: <property name="ConnectionURL" value="mq://(default_JMS_host)"/>


    27: <property name="Options" value="JMSJCA.sep=,# Enter options here"/>


    28: </connector-connection-pool>


    29: <!--STCMS connector-resource in the resource section complete-->




    • Add the following to the servers section :





    1: <resource-ref enabled="true" ref="jms/tx/stcms1"/>


    2: <resource-ref enabled="true" ref="jms/tx/default"/>


    3: <resource-ref enabled="true" ref="jms/notx/stcms1"/>


    4: <resource-ref enabled="true" ref="jms/notx/default"/>


    5: <resource-ref enabled="true" ref="jms/tx/jmq1"/>


    6: <resource-ref enabled="true" ref="jms/notx/jmq1"/>




    • Add the jars you find in the folder appserver\\domains\\domain1\\lib installed version of Java CAPS to the new  glassfish\\domains\\domain1\\lib

    • Start the new Glassfish


    This completes the addition of the STCMS to the new GlassfishESB  and you are ready to Go with new version  !!!!.



       




Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

I was part of Sun R&D in Java CAPS and later Glassfish ESB. I moved from R&D to Consulting. I am currently working as a Solution Architect in Oracle Consulting Services (India). I was sharing my experience w.r.t. Java CAPS and other technologies during Sun period. Now in Oracle world I share my experiences with Oracle FMW product line as well as other Oracle Technologies and products.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
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
   
       
Today