Good to know but bad for programmers.
Actually I do not see why a resource adapter bean is not considered as
an application component: It is a component, it is under the control of
the application server, and last but not least it is part of the EAR,
and such is part of a particular application. Moreover, it uses JNDI to
lookup managed resources like JDBC connections and EJBs. So I do not see
any difference between a SB and a RA.
From my point of view, the spec authors should think over their decision
and allow @Resource and @EJB inside of the bean class and the connection
classes, as all of them are under full control of the application
server.
Regards
Markus
-----Original Message-----
From: Sivakumar.Thyagarajan_at_Sun.COM
[mailto:Sivakumar.Thyagarajan_at_Sun.COM]
Sent: Dienstag, 27. Mai 2008 07:08
To: users_at_glassfish.dev.java.net
Subject: Re: @Resource in Resource Adapter
Hi Markus
>>> Is it possible in JavaEE 5 to replace JNDI lookups by @Resource
inside
>>> of a Resource Adapter, and if it is possible, can it be done in any
>>> class inside of the .rar or only in the ResourceAdapterBean class?
Though resource adapter ease of development is being considered as part
of JSR 322 (Connectors 1.6), @Resource annotations within a RA however,
is not being considered for the following reason: The RA is not an
application component like EJB/Servlets and does not have the ability to
define resource-references to managed resources in the container
runtime.
The ResourceAdapter javabean (or a class within the RAR) can always
choose to perform a JNDI lookup on the "physical" JNDI name of a
configured resource, and this would work in GlassFish, but this usage is
non-portable and may not work in other application servers.
Thanks
--Siva.
Sahoo wrote:
> JCA spec was not updated in Java EE 5 release, so no, RARs can't use
> annotations in Java EE 5. I believe it is being worked in the next rev
> of JCA spec likely to be part of Java EE 6.
>
> Thanks,
> Sahoo
>
> Markus Karg wrote:
>>
>> Is it possible in JavaEE 5 to replace JNDI lookups by @Resource
inside
>> of a Resource Adapter, and if it is possible, can it be done in any
>> class inside of the .rar or only in the ResourceAdapterBean class?
>>
>>
>>
>> Thanks
>>
>> Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net