It would be nice if there was a method on Registry or ObjectLocator:
List<Object> findServicesWithMarker(Class<? extends Annotation>
annotationClass);

Alternately, adding a way to expose the ServiceDefs for all services (they
are immutable).  You can collect service interface and marker information
there.

Also, some kind of post-construction callback would be nice; you could do
this using a decorator method.


On Tue, Nov 4, 2008 at 8:06 AM, Lubor Gajda <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I'm currently working on T5-IOC and BlazeDS integration and I'm looking for
> some simple declarative way how to automatically register application
> services as BlazeDS destinations.
>
> What I want to achieve is to be able to automatically detect all services
> in
> T5-IOC registry annotated by my custom @Destination annotation and register
> them using BlazeDS API. To implement this logic I'm using following
> algorithm:
>
> 1. First of all I need to get list of all service definitions available in
> the T5-IOC registry. The only solution how to do this, I've found so far,
> is
> to use ServiceActivityScoreboard.getServiceActivity().
>
> Is ServiceActivityScoreboard really the only way how to list all services
> available in T5-IOC registry or is there any better way how to do this?
>
> 2. Once I have the list of all available services I need to check
> annotations on implementation class of each of them. The problem here is
> that service definition provides information about service interface only
> and not about service implementation class.
>
> Is there any way how to do this and detect if any of service
> implementations
> (or any of its methods) is annotated  by some specific annotation (without
> service instantiation)?
>
> Thanks,
> Lubor
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

Reply via email to