geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <ja...@laskowski.net.pl>
Subject Re: Configure and Deploy JMS Resources in Geronimo 2.0.2
Date Tue, 06 Nov 2007 09:30:55 GMT
On 11/6/07, ivanrc <iriano@indra.es> wrote:

>  I´m trying to configure and deploy JMS Resources in Geronimo 2.0.2. I´ve
> got the connector xml file below that is for geronimo 1.1
>
> I want to know what I have to change in this file and how to deploy it,
> because i trying to use...
>
> deploy.bat deploy my-JMS-resources-plan.xml
> repository/activemq/rars/activemq.rar
>
> ... and It in this version doesn´t work.

Hi,

my-JMS-resources-plan.xml:

<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: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>SampleJMSResources</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>SampleConnectionFactory</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>
  <adminobject>
    <adminobject-interface>javax.jms.Topic</adminobject-interface>
    <adminobject-class>org.apache.activemq.command.ActiveMQTopic</adminobject-class>
    <adminobject-instance>
      <message-destination-name>SampleTopic</message-destination-name>
      <config-property-setting
name="PhysicalName">SampleTopic</config-property-setting>
    </adminobject-instance>
  </adminobject>
  <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>

The command to deploy the file is as follows:

jlaskowski@dev /cygdrive/c/geronimo-jetty6-jee5-2.0.2
$ ./bin/deploy.sh --user system --password manager deploy
my-JMS-resources-plan.xml
repository/org/apache/geronimo/modules/geronimo-activemq-ra/2.0.2/geronimo-activemq-ra-2.0.2.rar
Using GERONIMO_BASE:   c:\geronimo-jetty6-jee5-2.0.2
Using GERONIMO_HOME:   c:\geronimo-jetty6-jee5-2.0.2
Using GERONIMO_TMPDIR: c:\geronimo-jetty6-jee5-2.0.2\var\temp
Using JRE_HOME:        c:\apps\java5\jre
    Deployed default/geronimo-activemq-ra-2.0.2.rar/1194341150421/rar

and you can see the managed objects deployed to Geronimo in the web console:

  http://localhost:8080/console/portal/services/services_jms

SampleJMSResources (default/geronimo-activemq-ra-2.0.2.rar/1194341150421/rar)
Type 	Name 	Deployed As 	State 	Actions
Connection Factory 	SampleConnectionFactory 	Server-wide 	running 	
Queue 	SampleQueue 	Server-wide 	running 	
Topic 	SampleTopic 	Server-wide 	running

These managed objects are server-wide so all applications can use it.
If you want to "bind" these managed objects to your application, place
the xml file within geronimo-application.xml of your application.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Mime
View raw message