users@connector-spec.java.net

[connector-spec-users] [jsr322-experts] Deployment annotations

From: Jesper Pedersen <jesper.pedersen_at_redhat.com>
Date: Fri, 11 Jan 2013 14:31:24 -0500

Hi,

A follow-up on our discussion about deployment annotations.

The current suggestion includes two annotations for deployment of a
connection factory and an admin object.

They contain a field 'resource-adapter-name' which references the
resource adapter deployment they belong to.

However, the actual deployment of the ResourceAdapter instance is done
as part of the vendor specific activation giving:

Configuration Annotations

   (CF) CF
     | |
    RA-------- resource-adapter-name ------
     | |
   (AO) AO

where 'Configuration' is the vendor specific part, and 'Annotations' is
the annotations defined in the specification.

The resource-adapter-name field must clearly identify which deployment
they belong to. The identifier is vendor specific though and may not
even be available depending on the vendors deployment model.

This results in that vendor specific overrides are required, since a
standard format of the field can't be specified. This limits the
usability of the annotations.

The annotation deployment must be able to tie against a precise
ResourceAdapter instance in order to fulfill the
ResourceAdapterAssociation requirements.

This can solved by having a deployment model for an entire resource
adapter deployment which is scoped, like

  @ResourceAdapterDeployment
  (
     resource-adapter="eis.rar"

     @ResourceAdapterConfiguration(
        config-properties=
          {{"raValue", "value1"}}
     )

     @ConnectionFactoryDefinitions(
       @ConnectionFactoryDefinition(

       )

       @ConnectionFactoryDefinition(

       )
     )

     @AdminObjectDefinitions(
       @AdminObjectDefinition(

       )

       @AdminObjectDefinition(

       )
     )
  )

with additional fields, of course, for a agreed upon baseline of
functionality.

Since we havn't covered standardized deployment in any of the previous
specifications I think we should push this issue to the next version of
the specification, so we aren't forced to work against a tight deadline.
We need to get this right for it to be used.

Users will continue to be able to use the

public class MyServlet ...
{
    @Resource(mappedName = "java:/MyCF")
    private MyConnectionFactory myCF;

    ...
}

way of obtaining a connection factory or admin object, using vendor
specific deployment tools.

Best regards,
  Jesper