Package com.caucho.config.program

Examples of com.caucho.config.program.ValueGenerator


    String loc = getLocation(javaField);
   
    String jndiName = javaField.getDeclaringClass().getName() + "/" + javaField.getName();
    Class<?> bindType = javaField.getType();
   
    ValueGenerator gen = generateContext(loc, bindType, jndiName, resource);
   
    return new FieldGeneratorProgram(field.getJavaMember(), gen);
  }
View Full Code Here


    String jndiName = (javaMethod.getDeclaringClass().getName()
                       + "/" + javaMethod.getName());
   
    Class<?> bindType = javaMethod.getParameterTypes()[0];
   
    ValueGenerator gen = generateContext(loc, bindType, jndiName, resource);
   
    return new MethodGeneratorProgram(method.getJavaMember(), gen);
  }
View Full Code Here

    String name = resource.name();
    String mappedName = resource.mappedName();
    String lookupName; // = resource.lookup();

    lookupName = name;
    ValueGenerator gen = lookupJndi(loc, bindType, lookupName);
   
    if (gen != null) {
      bindJndi(null, gen, fullJndiName);
    }
    else {
View Full Code Here

   
    if (Object.class.equals(bindType))
      throw new ConfigException(L.l("{0}: @EJB beanInterface() attribute is required for @EJB on a class.",
                                    location));
   
    ValueGenerator gen = bindGenerator(location, ejb, bindType);

    if (name != null && ! "".equals(name)) {
      bindJndi(name, gen, name);
    }
   
View Full Code Here

   
    String location = getLocation(javaField);

    Class<?> bindType = javaField.getType();
   
    ValueGenerator gen = bindGenerator(location, ejb, bindType);

    if (name != null && ! "".equals(name))
      bindJndi(name, gen, name);
   
    bindJndi(javaField, gen);
View Full Code Here

    // ejb/2005
    if (! Object.class.equals(ejb.beanInterface())) {
      bindType = ejb.beanInterface();
    }
   
    ValueGenerator gen = bindGenerator(location, ejb, bindType);

    if (name != null && ! "".equals(name))
      bindJndi(name, gen, name);
   
    bindJndi(javaMethod, gen);
View Full Code Here

    if (! javaField.getType().isAssignableFrom(EntityManager.class)) {
      throw new ConfigException(L.l("{0}: @PersistenceContext field must be assignable from EntityManager.",
                                    getLocation(javaField)));
    }
   
    ValueGenerator gen;
   
    if (PersistenceContextType.EXTENDED.equals(type))
      gen = generateExtendedContext(location, pContext);
    else
      gen = generateTransactionContext(location, pContext);
View Full Code Here

    String loc = getLocation(javaField);
   
    String jndiName = javaField.getDeclaringClass().getName() + "/" + javaField.getName();
    Class<?> bindType = javaField.getType();
   
    ValueGenerator gen = generateContext(loc, bindType, jndiName, resource);
   
    bindJndi(javaField, gen);
   
    return new FieldGeneratorProgram(field.getJavaMember(), gen);
  }
View Full Code Here

    String jndiName = (javaMethod.getDeclaringClass().getName()
                       + "/" + javaMethod.getName());
   
    Class<?> bindType = javaMethod.getParameterTypes()[0];
   
    ValueGenerator gen = generateContext(loc, bindType, jndiName, resource);
   
    bindJndi(javaMethod, gen);
   
    return new MethodGeneratorProgram(method.getJavaMember(), gen);
  }
View Full Code Here

   
    if (Object.class.equals(bindType))
      throw new ConfigException(L.l("{0}: @Resource beanInterface() attribute is required for @Resource on a class.",
                                    location));
   
    ValueGenerator gen = generateContext(location, bindType, null, resource);

    if (name != null && ! "".equals(name)) {
      bindJndi(name, gen, name);
    }
  }
View Full Code Here

TOP

Related Classes of com.caucho.config.program.ValueGenerator

Copyright © 2018 www.massapicom. 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.