Package org.springframework.jndi

Examples of org.springframework.jndi.TypeMismatchNamingException


  private <T> T doGetSingleton(String name, Class<T> requiredType) throws NamingException {
    synchronized (this.singletonObjects) {
      if (this.singletonObjects.containsKey(name)) {
        Object jndiObject = this.singletonObjects.get(name);
        if (requiredType != null && !requiredType.isInstance(jndiObject)) {
          throw new TypeMismatchNamingException(
              convertJndiName(name), requiredType, (jndiObject != null ? jndiObject.getClass() : null));
        }
        return (T) jndiObject;
      }
      T jndiObject = lookup(name, requiredType);
View Full Code Here


  private Object doGetSingleton(String name, Class requiredType) throws NamingException {
    synchronized (this.singletonObjects) {
      if (this.singletonObjects.containsKey(name)) {
        Object jndiObject = this.singletonObjects.get(name);
        if (requiredType != null && !requiredType.isInstance(jndiObject)) {
          throw new TypeMismatchNamingException(
              convertJndiName(name), requiredType, (jndiObject != null ? jndiObject.getClass() : null));
        }
        return jndiObject;
      }
      Object jndiObject = lookup(name, requiredType);
View Full Code Here

  private <T> T doGetSingleton(String name, Class<T> requiredType) throws NamingException {
    synchronized (this.singletonObjects) {
      if (this.singletonObjects.containsKey(name)) {
        Object jndiObject = this.singletonObjects.get(name);
        if (requiredType != null && !requiredType.isInstance(jndiObject)) {
          throw new TypeMismatchNamingException(
              convertJndiName(name), requiredType, (jndiObject != null ? jndiObject.getClass() : null));
        }
        return (T) jndiObject;
      }
      T jndiObject = lookup(name, requiredType);
View Full Code Here

  private <T> T doGetSingleton(String name, Class<T> requiredType) throws NamingException {
    synchronized (this.singletonObjects) {
      if (this.singletonObjects.containsKey(name)) {
        Object jndiObject = this.singletonObjects.get(name);
        if (requiredType != null && !requiredType.isInstance(jndiObject)) {
          throw new TypeMismatchNamingException(
              convertJndiName(name), requiredType, (jndiObject != null ? jndiObject.getClass() : null));
        }
        return (T) jndiObject;
      }
      T jndiObject = lookup(name, requiredType);
View Full Code Here

TOP

Related Classes of org.springframework.jndi.TypeMismatchNamingException

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.