Skip to main content

[javaee-spec users] [jsr342-experts] Re: resource definition metadata for administered objects

  • From: Linda DeMichiel <linda.demichiel@...>
  • To: jsr342-experts@...
  • Subject: [javaee-spec users] [jsr342-experts] Re: resource definition metadata for administered objects
  • Date: Tue, 06 Mar 2012 13:17:24 -0800
  • List-id: <jsr342-experts.javaee-spec.java.net>
  • Organization: Oracle Corporation

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>


[javaee-spec users] [jsr342-experts] resource definition metadata for administered objects

Linda DeMichiel 03/06/2012

[javaee-spec users] [jsr342-experts] Re: resource definition metadata for administered objects

Antonio Goncalves 03/06/2012

[javaee-spec users] [jsr342-experts] Re: resource definition metadata for administered objects

reza_rahman@... 03/06/2012

[javaee-spec users] [jsr342-experts] Re: resource definition metadata for administered objects

Linda DeMichiel 03/06/2012
 
 
Close
loading
Please Confirm
Close