The inject manager isn't adding this class to the registered beans. I
have seen a few issues with Generic classes with matching classes but
this ones seems pretty straight forward.

Does anything anyone know why this isn't picked up and registered in
the inject manager?

public class InjectBeanHelper<T> {

        @Current Manager mgr;
        public InjectBeanHelper(){}
        public T getInstance(String clazz){
                T o = null;
                Class<? extends T> tc = null;
                try {
                        tc = (Class<? extends T>) Class.forName(clazz);
                        o = (T)mgr.getInstanceByType(tc);
                }catch(ClassNotFoundException e){}
                if(o==null) o = (T)mgr.getInstanceByName(clazz);
                return o;               
        public T getInstance(Class<? extends T> clazz){
                return this.mgr.getInstanceByType(clazz);

I'm still working against trunk :)

resin-interest mailing list

Reply via email to