geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Hillmann" <>
Subject Re: How to define a JCA connection pool / jndi address?
Date Thu, 20 Sep 2007 01:27:44 GMT
On 9/20/07, Ed Hillmann <> wrote:
> Hi all.  I'm in the middle of deploying a JCA adapter into a Geronimo
> 2.0.1 container.  I've ensured that my adapter meets the spec (which
> it hadn't before... many thanks to those on this group who helped me
> with that), and the RAR file has been able to deploy successfully
> within the container.  When the Geronimo server starts up, I can see
> the RAR module started.
> Fantastic.  Now, I want to configure a few connection pools / jndi
> addresses, so I can execute my existing test cases against the
> Geronimo server.  And I can find any doco about how to set this up.
> Other servers have spiffy little areas in their Web console that, once
> the RAR module is deployed, I can create the pools via the admin
> console very easily.  It doesn't appear that the Geronimo Admin
> Console allows me to do that (or I just don't know the right place to
> look, which is a completely realistic option).  I can see where, in
> the Admin Console, you can add Database Pools and JMS Resources, but
> it's not a really good fit.
> I tried going through Database Pools.  I can see my RAR in the "Driver
> JAR" list, and can select it.  But when I try to test it, it complains
> about not providing a Driver Class.  Which I didn't, as I don't want a
> driver class.  So, that didn't work for me.
> And going through the JMS resources didn't make any sense either.  I
> don't want to set a JMS resource.
> The online documentation seems pretty sparse on this as well.  If
> anyone knows of some decent info regarding this, I'd be all ears.
> Thanks for any help,
> Ed

I'm still digging around.  I've found this link

So, reading this, the deployment plan not only helps deploy the RAR
module, but also defines the Connections and how they are exposed to
the application components?  Is this right?  I've been able to deploy
the RAR module, but I can't see any Resource in the JNDI tree.  And if
I attempt to configure a connection with Properties that aren't
mandatory, I get errors like:

    No ModuleID or TargetModuleID provided.  Attempting to guess based
    on the content of the plan.
    Attempting to use ModuleID
    Stopped com.intecbilling.singleview/svConnector/1.0/rar
    Unloaded com.intecbilling.singleview/svConnector/1.0/rar
    Uninstalled com.intecbilling.singleview/svConnector/1.0/rar
    Error: Operation failed:
    org.apache.geronimo.common.DeploymentException: The plan is trying
    to set attributes: [UserName, Password]

In this case, my Adapter requires two attributes (machineName and
port), and these are defined in the ra.xml.  There are other
properties (among which are UserName and Password) which are not
mandatory Properties.  They are not defined in the ra.xml, but there
are getters and setters on the ManagedConnectionFactory implementation
to manage these properties.  In this case, I don't want these
properties mandatory, as they could be specified by the user of the
Connection (provided by a ConnectionSpec implementation).

When I look at section 17.3.1 of the JCA 1.5 spec, it says that the
descriptor must provide

Configurable properties per ManagedConnectionFactory instance: The
resource adapter provider specifies the name, type, description, and an
optional default value for the properties that have to be configured on a per
ManagedConnectionFactory instance.

So, "properties that have to be configured" to me equates to
"mandatory properties".  Geronimo seems to imply that any property
that can be set against a JCA connection pool (and subsequently
against the ManagedConnectionFactory) must be specified in the
Deployment Descriptor.  Isn't this a bit overkill?  The spec seems to
require this for mandatory properties, but Geronimo is enforcing it
for all properties (mandatory and optional).

View raw message