Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar}

Excerpt

You can deploy JMS resources with deploy command (without Web console).

When you want to create a group of resources consisting of ConnectionFactory, topics and queues you only have to deploy a geronimo-activemq-ra connector (RA means "ResourceAdapter") with an deploy plan like this...

Code Block
xml
xml
borderStylesolid
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <dep:moduleId>
    	<dep:groupId>console.jms</dep:groupId>
    	<dep:artifactId>jmsResources</dep:artifactId>
    	<dep:version>1.0</dep:version>
    <dep:type>rar<type>car</dep:type>
  	</dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>org.apache.geronimo.configs</dep:groupId>
        <dep:artifactId>activemq-broker</dep:artifactId>
        <dep:type>car</dep:type>
      </dep:dependency>
    </dep:dependencies>
  </dep:environment>
  <resourceadapter>
    <resourceadapter-instance>
      <resourceadapter-name>jmsResources</resourceadapter-name>
      <workmanager xmlns="http://geronimo.apache.org/xml/ns/naming-1.2">
        <gbean-link>DefaultWorkManager</gbean-link>
      </workmanager>
    </resourceadapter-instance>
    <outbound-resourceadapter>
      <connection-definition>
        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
        <connectiondefinition-instance>
          <name>IHCIConnectionFactory</name>
          <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
          <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
          <connectionmanager>
            <xa-transaction>
              <transaction-caching />
            </xa-transaction>
            <single-pool>
              <max-size>10</max-size>
              <min-size>0</min-size>
              <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
              <idle-timeout-minutes>0</idle-timeout-minutes>
              <match-one />
            </single-pool>
          </connectionmanager>
        </connectiondefinition-instance>
      </connection-definition>
    </outbound-resourceadapter>
  </resourceadapter>

  <!-- ElementSupportData topic-->
  <adminobject>
    <adminobject-interface>javax.jms.Topic</adminobject-interface>
    <adminobject-class>org.apache.activemq.command.ActiveMQTopic</adminobject-class>
    <adminobject-instance>
      <message-destination-name>ElementSupportData</message-destination-name>
      <config-property-setting name="PhysicalName">ElementSupportData</config-property-setting>
    </adminobject-instance>
  </adminobject>
   
  <!-- Sample Queue --> 
 
    <adminobject>
    <adminobject-interface>javax.jms.Queue</adminobject-interface>
    <adminobject-class>org.apache.activemq.command.ActiveMQQueue</adminobject-class>
    <adminobject-instance>
      <message-destination-name>SampleQueue</message-destination-name>
      <config-property-setting name="PhysicalName">SampleQueue</config-property-setting>
    </adminobject-instance>
  </adminobject>
  
</connector> 

Now you only have to deploy it with this following command (name the deploy plan above as JmsResources.xml) using for this example :java -jar <geronimo_home>/bin/deployer.jar --user system --password manager --host localhost deploy JmsResources.xml <GERONIMO_HOME>on a Unix-based system:

No Format
borderStylesolid

jeff@jeff:~/Geronimo/Tomcat6-2.2/bin$ ./deploy.sh deploy $GERONIMO_HOME/repository/org/apache/geronimo/modules/geronimo-activemq-ra/2

...

.2-SNAPSHOT/geronimo-activemq-ra-2.2-SNAPSHOT.rar JMSResource.xml 
Using GERONIMO_HOME:   /home/jeff/Geronimo/Tomcat6-2.2
Using GERONIMO_TMPDIR: var/temp
Using JRE_HOME:        /opt/ibm/java-i386-60/jre
    Deployed console.jms/jmsResources/1.0/car

Note that the path or name of 0.2.rarRemember that geronimo-activemq-ra-2.0.2-SNAPSHOT.rar path or name can change be different according to the geronimo 2.x Geronimo installation that you have.

If you want to undeploy it, use the deploy command works well, in Geronimo Web Console, select JMS Resources will appear a new JMS Resource group named jmsResources (command line as followed:

No Format
borderStylesolid

jeff@jeff:~/Geronimo/Tomcat6-2.2/bin$ ./deploy.sh --user system --password manager --host localhost undeploy console.jms/jmsResources/1.0

...

/car
Using GERONIMO_HOME:   /home/jeff/Geronimo/Tomcat6-2.2
Using GERONIMO_TMPDIR: var/temp
Using JRE_HOME:        /opt/ibm/java-i386-60/jre
    Module console.jms/jmsResources/1.0/

...

If you want to undeploy it, you can do it from Geronimo Web Console -> J2EE connectors or with deploy command in this manner...

...

car unloaded.
    Module console.jms/jmsResources/1.0/car uninstalled.

    Undeployed console.jms/jmsResources/1.0/

...

car
Info
titleremote deploy Tips

Remember to set RemoteDeployHostname

...

in <GERONIMO_

...

HOME>\var\config\config-substitutions.properties if you want to do remote deploy (when --host parameter is not the localhost).