Package javax.naming

Examples of javax.naming.InvalidNameException


    */
   public void linkMembership(User user, Group group, MembershipType mt, boolean broadcast) throws Exception
   {
      if (user == null)
      {
         throw new InvalidNameException("Can not create membership record because group is null");
      }

      if (group == null)
      {
         throw new InvalidNameException("Can not create membership record for " + user.getUserName()
            + " because group is null");
      }

      if (mt == null)
      {
         throw new InvalidNameException("Can not create membership record for " + user.getUserName()
            + " because membership type is null");
      }

      if (log.isDebugEnabled())
      {
View Full Code Here


      query.addLIKE("MEMBERSHIP_ID", id);
      Membership membership = loadUnique(query.toQuery());

      if (membership == null)
      {
         throw new InvalidNameException("Can't find membership with id " + id);
      }

      return membership;
   }
View Full Code Here

        }

        orgService.flush();

        if (g == null) {
            throw new InvalidNameException("Can not create membership record for " + user.getUserName()
                    + " because group is null");
        }

        if (mt == null) {
            throw new InvalidNameException("Can not create membership record for " + user.getUserName()
                    + " because membership type is null");
        }

        if (orgService.getMembershipTypeHandler().findMembershipType(mt.getName()) == null) {
            throw new InvalidNameException("MembershipType doesn't exist: " + mt.getName());
        }

        String plGroupName = getPLIDMGroupName(g.getGroupName());

        String groupId = getIdentitySession().getPersistenceManager().createGroupKey(plGroupName,
View Full Code Here

    */
   public Object lookup(String name) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      Object obj = getBindings().get(name);
      if (obj instanceof Reference)
      {
         synchronized (obj)
View Full Code Here

   protected void bind(String name, Object value, boolean checkIfExists) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      // Call getStateToBind for using any state factories
      value = NamingManager.getStateToBind(value, NAME_PARSER.parse(name), this, getInternalEnv());

      if (value instanceof Context)
View Full Code Here

    */
   public void unbind(String name) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      synchronized (getMutex())
      {
         Map<String, Object> tmpObjects = new HashMap<String, Object>(getBindings());
         if (tmpObjects.remove(name) == null)
View Full Code Here

    */
   public void rename(String name1, String name2) throws NamingException
   {
      if (name1.isEmpty() || name2.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      Object value;
      synchronized (getMutex())
      {
         Map<String, Object> tmpObjects = new HashMap<String, Object>(getBindings());
View Full Code Here

    */
   public Object lookup(String name) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      Object obj = getBindings().get(name);
      if (obj instanceof Reference)
      {
         synchronized (obj)
View Full Code Here

   protected void bind(String name, Object value, boolean checkIfExists) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      // Call getStateToBind for using any state factories
      value = NamingManager.getStateToBind(value, NAME_PARSER.parse(name), this, getInternalEnv());

      if (value instanceof Context)
View Full Code Here

    */
   public void unbind(String name) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      synchronized (getMutex())
      {
         Map<String, Object> tmpObjects = new HashMap<String, Object>(getBindings());
         if (tmpObjects.remove(name) == null)
View Full Code Here

TOP

Related Classes of javax.naming.InvalidNameException

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.