Re: resource injection in java EE webservice
gk wrote:
Yes. I am comfortable with "dependency injection" . I have gone
through that section in Spring Framework . setter Injection and
Constructor Injection .
I have come to detest Spring.
However, my query is on resource injection (not dependency injection).
Stop! Think for a minute! Do you really think Arved would have mentioned it
if it weren't relevant? Resource injection /is/ dependency injection, where
the dependency is a resource.
I don't think resource injection = dependency injection. I did not
find a suitable match in google. I wish to know this wording meaning.
Resource injection is dependency injection, where the dependency injected is a
resource handler (well, a pointer to the handler).
See the documentation at
<http://download.oracle.com/javase/6/docs/api/javax/annotation/Resource.html>
for example.
JPA uses resource injection - the '@PersistenceContext' annotation, for
example, injects a reference to a connection manager instance. (The runtime
environment must support this, as with all dependency injection.)
Have you considered taking a Java course, perhaps at a local community
college? Is that available to you?
I commend you for your persistence in learning Java.
--
Lew