...
Code Block |
---|
language | java |
---|
title | Feature definition |
---|
|
@Named("MyFeature")
public class MyFeature extends AbstractFeature {
...
}
|
Endpoint with inlined injections
Code Block |
---|
language | java |
---|
title | Endpoint |
---|
|
@WebService
public class MyServiceImpl implements MyService {
@Inject MyRessource res1; // Inject arbitrary user ressources
@Inject @Named("MyFeature") Feature feature1; // Inject named feature
@Inject List<Feature> features; // Inject all features known to this context
...
}
|
We might also support some kind of Endpoint description classes to separate endpoint definition from the actual implementation. Not sure how to wire this with CDI. Any ideas?
For the proxy I am not sure which is the best annotation based approach. One idea is to have one or more factories for producers.
Code Block |
---|
language | java |
---|
title | Annotation based Proxy definitions |
---|
|
public class MyServiceProducer {
@Produce MyService createMyService() {
return new JAXWSProxyFactory("http://myserver:8080/myService");
}
@Produce @MyMarker // CDI Qualifiers to distinguish services of the same interface type
MyService createMyService() {
}
}
|
Code Block |
---|
language | java |
---|
title | XML based proxy definition |
---|
|
|
Code Block |
---|
language | java |
---|
title | Annotation based JAXRS Endpoint definition |
---|
|
|