objectledge/ledge — pull request #2 by mklew (2012-11-18 21:29:32+00:00)
Title: Integrate Jersey with Picocontainer

I integrated Jersey with Pico container so that REST services can be beans managed by pico and of course dependency injection works like a charm.

Requirements

1. REST service must be added to container config
2. JerseyRestValve must be configured
3. REST Service must be annotated with `@Singleton` annotation

Example of service:
```java
@Singleton
@Path("/hello")
public class HelloRest
{
...
}
```

Beans to be managed are recognized by `PicoComponentProviderFactory` using patterns. Pattern is java regex expression and is checked against class name. To put it simply, class name of service must match some pattern.

Example configuration of service `com.example.rest.services.Service`
```xml

com.example.rest.services.*
there can be many patterns
if any matches then this bean should be provided by pico

```