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

...

The root XML element in the geronimo-connector-1.2.xsd schema is the <connector> element. The top-level XML elements of the <connector> root element are described in the sections below. The deployment plan should always use the Connector namespace, and it typically requires elements from Geronimo System namespace. A typical deployment for geronimo-ra.xml can be presented as follows:

Code Block
xml
borderStylesolid
titlegeronimo-ra.xml Example
borderStylesolid
xml
<conn:connector xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
                xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
                ...
</conn:connector>

...

An example geronimo-ra.xml file is shown below using the <sys:environment> elements:

Code Block
xml
borderStylesolid
title<sys:environment> exampleborderStylesolid
xml
<conn:connector xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
  xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
  <dep:environment>
    <dep:moduleId>
      <dep:groupId>connector</dep:groupId>
      <dep:artifactId>ConnectorProj</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>jar</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>org.apache.geronimo.configs</dep:groupId>
        <dep:artifactId>sharedlib</dep:artifactId>
        <dep:type>car</dep:type>
      </dep:dependency>
    </dep:dependencies>
  </dep:environment>
</conn:connector>

...

This element is used to define a single JDBC connector or JMS connection factory. The <resourceadapter-instance> element provides resource adapter instance specific information like configuration properties and workmanager implementation. The <outboundresource-adapter> specifies information about an outbound resource adapter. The information includes fully qualified names of classes and interfaces required as part of the connector architecture specified contracts for connection management, level of transaction support provided, one or more authentication mechanisms supported and additional required security permissions. If there is no authentication mechanism specified as part of the resource adapter element, then the resource adapter does not support any standard security contract. The application server ignores the security part of the system contracts in this case.

Code Block
xml
borderStylesolid
title<resourceadapter> exampleborderStylesolid
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:moduleId>
      <dep:groupId>console.dbpool</dep:groupId>
      <dep:artifactId>AuthorConnectionsPool</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>rar</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>org.apache.derby</dep:groupId>
        <dep:artifactId>derby</dep:artifactId>
        <dep:version>10.1.1.0</dep:version>
        <dep:type>jar</dep:type>
      </dep:dependency>
    </dep:dependencies>
  </dep:environment> 
  <resourceadapter>
    <outbound-resourceadapter>
      <connection-definition>
        <connectionfactory-
interface>javax.sql.DataSource</connectionfactory-interface>
        <connectiondefinition-instance>
          <name>AuthorConnectionsPool</name>
          <config-property-setting name="Password">APP</config-property-
setting>
          <config-property-setting
name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting>
          <config-property-setting name="UserName">APP</config-property-
setting>
          <config-property-setting
name="ConnectionURL">jdbc:derby:wroxauthors</config-property-setting>
          <connectionmanager>
            <local-transaction/>
            <single-pool>
              <max-size>10</max-size>
              <min-size>0</min-size>
              <match-one/>
            </single-pool>
          </connectionmanager>
        </connectiondefinition-instance>
      </connection-definition
    </outbound-resourceadapter>
  </resourceadapter>
</connector>

...

  • The <adminobject-interface> element is used to specify the fully qualified name of the implemented Java interface of the admin object. One example of this is javax.jms.Topic.

  • The <adminobject-class> element specifies the full qualified name of the Java class of the admin object.

  • The <adminobject-intstance> element contains the configuration for this specific instance of the administered object type, with a unique name, and values for any configuration properties necessary for that administered object type. Two elements for defining the instance of the admin object are provided. The <message-destination-name> element can be referred to by other deployment plans by using the <naming:message-destination> element. This is also used as a unique object name of the GBean for the instance. The <config-property-setting> specifies the set of properties for the admin object instance.
Code Block
xml
borderStylesolid
title<adminobject> exampleborderStylesolid
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:moduleId>
      <dep:groupId>console.dbpool</dep:groupId>
      <dep:artifactId>AuthorConnectionsPool</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>rar</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>org.apache.derby</dep:groupId>
        <dep:artifactId>derby</dep:artifactId>
        <dep:version>10.1.1.0</dep:version>
        <dep:type>jar</dep:type>
      </dep:dependency>
    </dep:dependencies>
  </dep:environment> 
  <resourceadapter>
    <inbound-resourceadapter>
      <messageadapter>
        <messagelistener>
          <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
          <activationspec>
            <activationspec-class>org.apache.activemq.ra.ActiveMQActivationSpec</activationspec-class>                     
            <required-config-property>
              <config-property-name>destination</config-property-name>
            </required-config-property>
            <required-config-property>
              <config-property-name>destinationType</config-property-name>
            </required-config-property>
          </activationspec>
        </messagelistener>
      </messageadapter>
    </inbound-resourceadapter>
    <adminobject>
      <adminobject-interface>javax.jms.Queue</adminobject-interface>
      <adminobject-class>org.apache.activemq.command.ActiveMQQueue</adminobject-class>
      <config-property>
        <config-property-name>PhysicalName</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
      </config-property>
    </adminobject>
    <adminobject>
      <adminobject-interface>javax.jms.Topic</adminobject-interface>
      <adminobject-class>org.apache.activemq.command.ActiveMQTopic</adminobject-class>
      <config-property>
        <config-property-name>PhysicalName</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
      </config-property>
    </adminobject>
  </resourceadapter>
</connector>

...