geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Hillmann" <ed.hillm...@gmail.com>
Subject Re: How to define a JCA connection pool / jndi address?
Date Thu, 20 Sep 2007 06:02:43 GMT
On 9/20/07, David Jencks <david_jencks@yahoo.com> wrote:
> OK, you're right.  I opened https://issues.apache.org/jira/browse/
> GERONIMO-3480.
>
> Meanwhile you will have to modify your ra.xml to list all the config
> properties you want to use, and we don't complain if you don't set some.
I can deal with that.  I just prefer not treating every property as
mandatory.  One, because there doesn't seem to be a clean way to
define a null value to the property.  Another reason, is because our
DD would end up being rather large if all the optional properties
required declaration ahead of time.

>
> In geronimo you need to use a plan to deploy a resource adapter
> instance, and that plan specifies the pooling parameters.  You can
> deploy as many MCFs/pools as you want in one plan using the same
> resource adapter.  There is no way to do this from the console at
> this time.
>
> If you are still having trouble figuring out a working plan please
> post what you have and some indication of the problems you are seeing.
>
I am.  This plan is the same plan that is used when deploying the RAR
module, yes?

This is what I have so far:

<?xml version="1.0" encoding="UTF-8"?>
<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>com.intecbilling.singleview</dep:groupId>
      <dep:artifactId>svConnector</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>rar</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>com.intecbilling.singleview</dep:groupId>
        <dep:artifactId>enterprise-java-interface</dep:artifactId>
        <dep:version>6.01.05.01</dep:version>
        <dep:type>jar</dep:type>
      </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <resourceadapter>
    <resourceadapter-instance>
      <resourceadapter-name>Singl.eView Inbound Resource
Adapter</resourceadapter-name>
      <workmanager>
        <gbean-link>DefaultWorkManager</gbean-link>
      </workmanager>
    </resourceadapter-instance>
    <outbound-resourceadapter>
      <connection-definition>
        <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
        <connectiondefinition-instance>
          <name>jca/SVConnector1</name>
          <config-property-setting
name="ServerName">wallaby</config-property-setting>
          <config-property-setting
name="PortNumber">10551</config-property-setting>
          <config-property-setting
name="UserName">tpsysadm</config-property-setting>
          <config-property-setting
name="Password">tpsysadm</config-property-setting>
          <connectionmanager>
            <single-pool>
              <max-size>10</max-size>
              <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
              <match-one/>
            </single-pool>
          </connectionmanager>
        </connectiondefinition-instance>
      </connection-definition>
    </outbound-resourceadapter>
  </resourceadapter>
</connector>

I guess, in this case, I was expecting to see "jca/svConnector1" in
the JNDI tree of the server.  Simply because I didn't see anywhere
else I was supposed to declare the JNDI address of the
ConnectionFactory.

What I'm trying to do is this.  I have written an Inbound Adapters
that, when its endpoint is being registered, will get a Connection
using a JNDI address defined as part of it's ActivationSpec.  This
connection will be used to handler incoming events.

So, in the scope of the jca-plan.xml file, is this two
<resourceadapter> nodes: one for the connection pool (containing the
<outbound-resourceadapter> element), and a second for the
<resourceadapter-instance> (which contains the JNDI address of the
first entry in the plan).

Or can this be described using a single <resourceadapter> node?

Less importantly, are there any plans to make this a little easier via
the Admin Console?  I don't want to whine.  But I can, if you like...
:)

Thanks,
Ed

Mime
View raw message