I suppose it depends on if https://issues.jboss.org/browse/CDI-110 makes
it into the specification.
This sounds equivalent to the solder @ServiceHandler annotation,
although @ServiceHandler has another layer of indirection, so you do not
need to specify the implementation class directly on the bean.
I think this is a useful feature.
Stuart
Romain Manni-Bucau wrote:
Hi,
wonder if we want the "already bridged proxy feature" (i'll explain don't
worry ;)).
There are cases where the implementation is boring and pretty obvious and
defining an interface has the benefit to creates a semantic but the
implementation itself is pretty useless (ex: spring-data, cdi-query, ...)
We can of course do "as usually" and create proxy for all features needing
it specifically.
However i think this proxy feature is generic enough and could be pushed to
the user if he wants to do so.
Here some functional cases i think about which could use this feature:
1) (already cited) a cdi-query like
2) accessing JMX information (locally or not) without needed to use JMX API
(
http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/dynamic-proxy-to-access-mbean/src/test/java/org/superbiz/dynamic/mbean/DynamicMBeanClient.java
for
instance)
3) creating a rest api easily from method name (getUserList -> GET
/user/list for instance)
4) ....
it can go further allowing multiple handlers by interface
wdyt?
*Romain Manni-Bucau*
*Twitter: @rmannibucau*
*Blog: http://rmannibucau.wordpress.com*