users@connector-spec.java.net

[connector-spec-users] [jsr322-experts] Re: Re: Connector CF Resource Definition annotation - a proposal and request for comments.

From: Jesper Pedersen <jesper.pedersen_at_redhat.com>
Date: Wed, 19 Dec 2012 06:32:50 -0500

Hi,

On 12/17/2012 09:56 AM, Sivakumar Thyagarajan wrote:
>> Any value specified in the properties annotation element of the
>> ConnectorConnectionFactoryDefinition annotation can be overridden using
>> the deployment descriptor. So, even if the deployment environment uses a
>> different vendor's RA (whose MCF has different property names) or a
>> different contained that has a different property, this could be
>> overridden using the DD, right, thus obviating the need to define any
>> such schemes.
>>

The definition in the XML files would need to support the full
activation model, as described with the annotations.

I guess it would be slightly better, since the entire activation(s) are
now visible in one of the first places you would look. I'm failing to
see how an entire resource adapter activation helps when it is located
on a servlet or EJB instance.

I think the current mechanism of having a resource adapter archive with
a possible vendor specific activation file (ironjacamar.xml,
weblogic-ra.xml, ...) in META-INF

<ironjacamar>
   <config-property name="RaValue">Value</config-property>
   <transaction-support>NoTransaction</transaction-support>
   <connection-definitions>
     <connection-definition
        class-name="com.acme.eis.MyManagedConnectionFactory"
        jndi="java:/eis/MyConnectionFactory">
        <config-property name="McfValue">Value</config-property>
        <pool>
          <max-pool-size>10</max-pool-size>
        </pool>
        <security>
          <application/>
        </security>
     </connection-definition>
   </connection-definitions>
   <admin-objects>
     <admin-object class-name="com.acme.eis.MyAdminObjectImpl"
                   jndi="java:/eis/MyAdminObject">
        <config-property name="AoValue">Value</config-property>
     </admin-object>
   </admin-objects>
</ironjacamar>

, and then using

  @Resource(mappedName="java:/eis/MyConnectionFactory")
  private MyConnectionFactory cf;

is much more clear. Multiple activations of the same resource adapter
can be done using the vendor tools.

Furthermore leaving the activation to the vendor specific settings
allows for strong typing, since the XML files can then be validated
against the XSD schemas.

Using the "properties" map - or likewise in the XML - will be error
prone, and will lead to bloat when the application is suppose to be
portable across EE implementations.

So I think we should leave this area for the next revision of the
specification, and align the annotations / XML with our standardized
JNDI locations, component namespaces, default activation properties, and
so on.

However, if everybody else agrees that we should move forward on this,
then lets start to drill into each of the annotations to see what we can
agree on in the time frame left.

Best regards,
  Jesper