Hi.  I've been working on a Resource Adapter, and as part of it, I
want to support two types of inbound adapters.  The mechanisms by when
calls into the container are substantially different, so it does not
make sense for a single inbound resource adapter to handle this.

When reading the JCA 1.5 specification, I came across section 17.3.1,
which states:

Inbound resource adapter information

    * Message listener type: The resource adapter provider must specify one or
      more message listener types supported by a messaging resource adapter. The
      message listener type is the fully qualified name of the Java
type of a message
      listener interface.
    * ActivationSpec class: The resource adapter provider must specify the fully
      qualified Java class name of the activation specification class. The
      implementation of this class must be a JavaBean. An ActivationSpec
      specifies an activation specification per message listener type. The
      ActivationSpec is configured by a message endpoint deployer during
      application deployment.

So, I've interpreted this as that a Resource Adapter can specify more
than one message listener types.  Each message listener type declares
its ActivationSpec implementation class.

So, I've got different listener types (equating to different Java
interfaces), and each type has its own ActivationSpec implementation.
So I've done that.  but when I attempt to deploy my connector module,
I get the following error:

15:08:49,735 ERROR [Deployer] Deployment failed due to
org.apache.geronimo.common.DeploymentException: Could not parse ra.xml
descriptor
        at 
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.createModule(ConnectorModuleBuilder.java:200)
        at 
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.createModule(ConnectorModuleBuilder.java:167)
        at 
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder$$FastClassByCGLIB$$a535b6aa.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
        at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at 
org.apache.geronimo.j2ee.deployment.ActivationSpecInfoLocator$$EnhancerByCGLIB$$96eec940.createModule(<generated>)
        at 
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:295)
        at 
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
        at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at 
org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$bf40cfd5.getDeploymentPlan(<generated>)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:234)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126)
        at 
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
        at 
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at 
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
        at 
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.xmlbeans.XmlException: Invalid deployment
descriptor: errors:

error: cvc-complex-type.2.4a: Expected elements
'[EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee
[EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee' instead of
'[EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee' here in
element [EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee

Descriptor:
<connector version="1.5" xmlns="http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd";>
  <display-name>Singl.eView Connector"</display-name>
  <vendor-name>Intec</vendor-name>
  <eis-type>Singl.eView Server</eis-type>
  <resourceadapter-version>1.0</resourceadapter-version>
  <resourceadapter>
    
<resourceadapter-class>com.intecbilling.connector.SVResourceAdapter</resourceadapter-class>
    <!--Can define config-property entries here, if you settings that
are constant across the Resource Adapter-->
    <outbound-resourceadapter>
      <connection-definition>
        
<managedconnectionfactory-class>com.intecbilling.connector.SVManagedConnectionFactory</managedconnectionfactory-class>
        <config-property>
          <config-property-name>ServerName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>wallaby</config-property-value>
        </config-property>
        <config-property>
          <config-property-name>PortNumber</config-property-name>
          <config-property-type>java.lang.Integer</config-property-type>
          <config-property-value>10000</config-property-value>
        </config-property>
        <config-property>
          <config-property-name>UserName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>user</config-property-value>
        </config-property>
        <config-property>
          <config-property-name>Password</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>password</config-property-value>
        </config-property>
        
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
        
<connectionfactory-impl-class>com.intecbilling.connector.SVConnectionFactory</connectionfactory-impl-class>
        
<connection-interface>javax.resource.cci.Connection</connection-interface>
        
<connection-impl-class>com.intecbilling.connector.SVConnection</connection-impl-class>
      </connection-definition>
      <transaction-support>LocalTransaction</transaction-support>
      <reauthentication-support>false</reauthentication-support>
    </outbound-resourceadapter>
    <inbound-resourceadapter>
      <messageadapter>
        <messagelistener>
          
<messagelistener-type>com.intecbilling.connector.TreEventListener</messagelistener-type>
          <activationspec>
            
<activationspec-class>com.intecbilling.connector.TreEventActivationSpec</activationspec-class>
            <required-config-property>
              <config-property-name>ServerName</config-property-name>
            </required-config-property>
            <required-config-property>
              <config-property-name>PortNumber</config-property-name>
            </required-config-property>
            <required-config-property>
              <config-property-name>UserName</config-property-name>
            </required-config-property>
            <required-config-property>
              <config-property-name>Password</config-property-name>
            </required-config-property>
            <required-config-property>
              <config-property-name>EventPatterns</config-property-name>
            </required-config-property>
          </activationspec>
        </messagelistener>
      </messageadapter>
    </inbound-resourceadapter>
    <inbound-resourceadapter>
      <messageadapter>
        <messagelistener>
          <messagelistener-type>com.adc.tre.srv.Invoke</messagelistener-type>
          <activationspec>
            
<activationspec-class>com.intecbilling.connector.TreProxyActivationSpec</activationspec-class>
            <required-config-property>
              <config-property-name>ProxyPort</config-property-name>
            </required-config-property>
          </activationspec>
        </messagelistener>
      </messageadapter>
    </inbound-resourceadapter>
    <security-permission>
      <description>Permissions allowed to the Singl.eView
Connector</description>
      <security-permission-spec/>
    </security-permission>
  </resourceadapter>
</connector>

        at 
org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.validateDD(XmlBeansUtil.java:223)
        at 
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.convertToConnectorSchema(ConnectorModuleBuilder.java:276)
        at 
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.createModule(ConnectorModuleBuilder.java:197)
        ... 31 more


So, jave I misinterpreted the spec?  Should I be able to do this, or
will I need to break these out into multiple RAR files?

Thanks for any help,
Ed

Reply via email to