Package javax.annotation

Examples of javax.annotation.Resource.mappedName()


    }

    @Override
    protected String getResourceName(InjectionPoint injectionPoint) {
        Resource resource = injectionPoint.getAnnotated().getAnnotation(Resource.class);
        String mappedName = resource.mappedName();
        String lookup = resource.lookup();
        if (!lookup.isEmpty()) {
            return lookup;
        }
        if (!mappedName.isEmpty()) {
View Full Code Here


            Class clazz = (Class)_classes.get(i);
            Resource resource = (Resource)clazz.getAnnotation(Resource.class);
            if (resource != null)
            {
               String name = resource.name();
               String mappedName = resource.mappedName();
               Resource.AuthenticationType auth = resource.authenticationType();
               Class type = resource.type();
               boolean shareable = resource.shareable();
              
               if (name==null || name.trim().equals(""))
View Full Code Here

                    throw new IllegalStateException(m+" is not a java bean compliant setter method");
    
                //allow default name to be overridden
                String name = (resource.name()!=null && !resource.name().trim().equals("")? resource.name(): defaultResourceNameFromMethod(m));
                //get the mappedName if there is one
                String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);      
                Class type = m.getParameterTypes()[0];
                //get other parts that can be specified in @Resource
                Resource.AuthenticationType auth = resource.authenticationType();
                boolean shareable = resource.shareable();
View Full Code Here

                    throw new IllegalStateException(m+" is not a java bean compliant setter method");
    
                //allow default name to be overridden
                String name = (resource.name()!=null && !resource.name().trim().equals("")? resource.name(): defaultResourceNameFromMethod(m));
                //get the mappedName if there is one
                String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);      
                Class type = m.getParameterTypes()[0];
                //get other parts that can be specified in @Resource
                Resource.AuthenticationType auth = resource.authenticationType();
                boolean shareable = resource.shareable();
View Full Code Here

                    throw new IllegalStateException(m+" is not a java bean compliant setter method");
    
                //allow default name to be overridden
                String name = (resource.name()!=null && !resource.name().trim().equals("")? resource.name(): defaultResourceNameFromMethod(m));
                //get the mappedName if there is one
                String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);      
                Class type = m.getParameterTypes()[0];
                //get other parts that can be specified in @Resource
                Resource.AuthenticationType auth = resource.authenticationType();
                boolean shareable = resource.shareable();
View Full Code Here

                        &&
                        (!IntrospectionUtil.isTypeCompatible(type, resource.type(), false)))
                    throw new IllegalStateException("@Resource incompatible type="+resource.type()+ " with field type ="+f.getType());
               
                //get the mappedName if there is one
                String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);
                //get other parts that can be specified in @Resource
                Resource.AuthenticationType auth = resource.authenticationType();
                boolean shareable = resource.shareable();
           
                //check if an injection has already been setup for this target by web.xml
View Full Code Here

                        &&
                        (!IntrospectionUtil.isTypeCompatible(type, resource.type(), false)))
                    throw new IllegalStateException("@Resource incompatible type="+resource.type()+ " with field type ="+f.getType());
               
                //get the mappedName if there is one
                String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);
                //get other parts that can be specified in @Resource
                Resource.AuthenticationType auth = resource.authenticationType();
                boolean shareable = resource.shareable();
           
                //check if an injection has already been setup for this target by web.xml
View Full Code Here

                        &&
                        (!IntrospectionUtil.isTypeCompatible(type, resource.type(), false)))
                    throw new IllegalStateException("@Resource incompatible type="+resource.type()+ " with field type ="+f.getType());
               
                //get the mappedName if there is one
                String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);
                //get other parts that can be specified in @Resource
                Resource.AuthenticationType auth = resource.authenticationType();
                boolean shareable = resource.shareable();
           
                //check if an injection has already been setup for this target by web.xml
View Full Code Here

    }

    @Override
    protected String getResourceName(InjectionPoint injectionPoint) {
        Resource resource = injectionPoint.getAnnotated().getAnnotation(Resource.class);
        String mappedName = resource.mappedName();
        String lookup = resource.lookup();
        if (!lookup.isEmpty()) {
            return lookup;
        }
        if (!mappedName.isEmpty()) {
View Full Code Here

            RouteType routeType = (routing == null) ? RouteType.BOTH : routing.value();
            Route route = new RouteImpl(routeType).id(routeId);
            boolean isResourced = m.isAnnotationPresent(Resource.class);
            if (isResourced) {
                Resource r = m.getAnnotation(Resource.class);
                log.debug("Loading resource " + r.mappedName());
                route.addDestinationJndiName(r.mappedName());
            }

            /* in this case, each method has one non destination and multiple
             * destinations.  this can take the form of resources or qualified
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.