I understand your point, but on the other hand, we have had the notion of resource-env-ref's for
administered objects around for quite some time, so people should be at least somewhat aware
of the concept (I hope). I will leave it to the Connector MR lead to fine tune the documentation,
but I think the inserted text below (lifted from the Connector spec) should help.
On 3/6/2012 1:15 AM, Antonio Goncalves wrote:
> I like the idea but I'm just wondering if this is not too generic and that developpers would start using
> @AdministeredObjectDefinition to define datasources, JMS factories or mail session ?
>
> Antonio
>
> ------------------------------__-------------
>
>
> /**
> * Annotation used to define a Connector administered object to be
> * registered in JNDI.
> *
* Administered objects are specific to a messaging style or message provider
> * Once defined, an administered object may be referenced
> * by a component using the lookup element of the
> * Resource annotation.
> *
* @see javax.resource.spi.AdministeredObject
> */
> @Retention(RUNTIME)
> @Target({TYPE})
> public @interface AdministeredObjectDefinition {
>
> /**
> * Description of the administered object.
> */
> String description() default "";
>
> /**
> * JNDI name of the administered object being defined.
> */
> String name();
>
> /**
> * Type of the administered object.
> */
> String className();
>
> /**
> * Name of the resource adapter.
> */
> String resourceAdapterName() default "";
>
> /**
> * Properties of the administered object. These may be
> * vendor-specific properties.
> */
> String[] properties() default {};
> }
>
>
> XML example:
>
> <administered-object>
> <description>Sample Admin Object definition</description>
> <name>java:app/MyAdminObject</__name>
> <class-name>com.extraServices.__AdminObject</class-name>
> <resource-adapter-name>myESRA<__/resource-adapter-name>
> <property>
> <name>Property1</name>
> <value>10</value>
> </property>
> <property>
> <name>Property2</name>
> <value>20</value>
> </property>
> </administered-object>
>
>
>
>
>
> --
> Antonio Goncalves
> Software architect and Java Champion
>
> Web site <http://www.antoniogoncalves.org> | Twitter <http://twitter.com/agoncal> | Blog
> <http://feeds.feedburner.com/AntonioGoncalves> | LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG
> <http://www.parisjug.org>