users@jersey.java.net

IoC-integration: injection based on annotation implemented (spring-integration branch)

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Sat, 12 Apr 2008 14:55:29 +0200

Hi,

the spring-integration branch now supports annotation based injection.

There's one annotation defined by jersey, that pulls instances from the
component provider: @Inject. So it's possible to have a resource class
that is managed by jersey with dependencies managed by some
IoC-framework.
@Paul: I defined the @Inject annotation in the package
"com.sun.ws.rest.spi.resource". Is this ok, or is there a better place
for it?

Additionally it's possible to add an injectable per annotation to the
WebApplication, so one could create its own @DAO annotation :)

These tests show and test both use scenarios:
- com.sun.ws.rest.impl.inject.AnnotationInjectableTest
- com.sun.ws.rest.impl.inject.InjectAnnotationInjectableTest

The spring subproject in the spring-integration branch now contains
tests (still some missing) - these tests make also use of the inject
annotation.

When I find some time I will add some notes about spring integration to
the wiki...

Cheers,
Martin