users@connector-spec.java.net

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

From: Sivakumar Thyagarajan <sivakumar.thyagarajan_at_oracle.com>
Date: Thu, 20 Dec 2012 23:57:56 +0530

Hi Jesper

On Wednesday 19 December 2012 05:02 PM, Jesper Pedersen wrote:
> 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.

By activation, I assume you mean "a deployment of a resource adapter
module in the application server/connector container". If yes, this is
okay and in line with my response in the sub-thread
"Support for Resource Adapter Configuration/Deployment through annotations?".

However I see you tieing the deployment of a resource adapter and the
creation of resources (CFs, AOs) above. A vendor-specific approach to do
this is fine, but the resource definition annotation approach in EE is
working towards having a portable way to create the resources.

> 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.

Agreed.

> 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.

Let us discuss this in the "Specification of Properties" sub-thread.

> 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.

The current proposed annotations have meant to not overdo standardizing of
these entities, but still provide a useful mechanism for developers to
handle their common-case scenarios.

> 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.

Sure, thanks. Could others please pitch in with your thoughts?

Thanks
--Siva.