Package javax.naming

Examples of javax.naming.NamingException


        T obj = null;
        if (refAddr != null) {
            try {
                obj = (T) Serialization.loadObject((byte[]) refAddr.getContent());
            } catch (IOException e) {
                NamingException ne = new NamingException("Cannot load mail session properties object");
                ne.initCause(e);
                throw ne;
            } catch (ClassNotFoundException e) {
                NamingException ne = new NamingException("Cannot load mail session properties object");
                ne.initCause(e);
                throw ne;
            }
        }
        return obj;
    }
View Full Code Here


     */
    public void putObject(final Reference reference, final String propertyName, final Serializable o) throws NamingException {
        try {
            reference.add(new BinaryRefAddr(propertyName, Serialization.storeObject(o)));
        } catch (IOException e) {
            NamingException ne = new NamingException("Cannot get bytes from the to recipients object");
            ne.initCause(e);
            throw ne;
        }
    }
View Full Code Here

    answer = ((Class) answer).newInstance();
    ref = new NamedWeakReference(answer, className);
    factories.set(posn-1, ref)// replace Class object or null
    return answer;
      } catch (ClassNotFoundException e) {
    NamingException ne =
        new NamingException("No longer able to load " + className);
    ne.setRootCause(e);
    throw ne;
      } catch (InstantiationException e) {
    NamingException ne =
        new NamingException("Cannot instantiate " + answer);
    ne.setRootCause(e);
    throw ne;
      } catch (IllegalAccessException e) {
    NamingException ne = new NamingException("Cannot access " + answer);
    ne.setRootCause(e);
    throw ne;
      }
  }
    }
View Full Code Here

      return env.put(name, value);
   }

   public void bind(Name name, Object obj) throws NamingException
   {
      throw new NamingException("Unsupported op");
   }
View Full Code Here

   {     
   }

   public Name composeName(Name name, Name prefix) throws NamingException
   {
      throw new NamingException("Unsupported op");
   }
View Full Code Here

      throw new NamingException("Unsupported op");
   }

   public String composeName(String name, String prefix) throws NamingException
   {
      throw new NamingException("Unsupported op");
   }
View Full Code Here

      throw new NamingException("Unsupported op");
   }

   public Context createSubcontext(Name name) throws NamingException
   {
      throw new NamingException("Unsupported op");
   }
View Full Code Here

      throw new NamingException("Unsupported op");
   }

   public Context createSubcontext(String name) throws NamingException
   {
      throw new NamingException("Unsupported op");
   }
View Full Code Here

      throw new NamingException("Unsupported op");
   }

   public void destroySubcontext(Name name) throws NamingException
   {
      throw new NamingException("Unsupported op");
   }
View Full Code Here

      throw new NamingException("Unsupported op");
   }

   public void destroySubcontext(String name) throws NamingException
   {
      throw new NamingException("Unsupported op");
   }
View Full Code Here

TOP

Related Classes of javax.naming.NamingException

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.