Examples of InvalidNameException


Examples of javax.naming.InvalidNameException

        return handler.createEJBObjectProxy();
    }

    public Object lookup(String name) throws NamingException {

        if (name == null) throw new InvalidNameException("The name cannot be null");
        else if (name.equals("")) return new JNDIContext(this);
        else if (name.startsWith("java:")) name = name.replaceFirst("^java:", "");
        else if (!name.startsWith("/")) name = tail + name;

        String prop = name.replaceFirst("comp/env/", "");
View Full Code Here

Examples of javax.naming.InvalidNameException

    public Object lookup(Name name) throws NamingException {
        return lookup(name.toString());
    }

    public NamingEnumeration<NameClassPair> list(String name) throws NamingException {
        if (name == null) throw new InvalidNameException("The name cannot be null");
        else if (name.startsWith("java:")) name = name.replaceFirst("^java:", "");
        else if (!name.startsWith("/")) name = tail + name;

        JNDIRequest req = new JNDIRequest(RequestMethodCode.JNDI_LIST, name);
        req.setModuleId(moduleId);
View Full Code Here

Examples of javax.naming.InvalidNameException

      DBObjectQuery<MembershipTypeImpl> query = new DBObjectQuery<MembershipTypeImpl>(MembershipTypeImpl.class);
      query.addEQ("MT_NAME", name);
      MembershipTypeImpl mt = loadUnique(query.toQuery());
      if (mt == null)
      {
         throw new InvalidNameException("Can not remove membership type" + name
            + "record, because membership type does not exist.");
      }

      if (broadcast)
      {
View Full Code Here

Examples of javax.naming.InvalidNameException

    */
   public void createMembership(Membership membership, boolean broadcast) throws Exception
   {
      if (service.getMembershipTypeHandler().findMembershipType(membership.getMembershipType()) == null)
      {
         throw new InvalidNameException("Can not create membership record " + membership.getId()
            + " because membership type " + membership.getMembershipType() + " not exists.");
      }
     
      if (service.getGroupHandler().findGroupById(membership.getGroupId()) == null)
      {
         throw new InvalidNameException("Can not create membership record " + membership.getId() + ", because group "
            + membership.getGroupId() + " does not exist.");
      }

      if (service.getUserHandler().findUserByName(membership.getUserName()) == null)
      {
         throw new InvalidNameException("Can not create membership record " + membership.getId() + ", because user "
            + membership.getGroupId() + " does not exist.");
      }

      // check if we already have membership record
      if (findMembershipByUserGroupAndType(membership.getUserName(), membership.getGroupId(),
View Full Code Here

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

Examples of javax.naming.InvalidNameException

      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

Examples of javax.naming.InvalidNameException

        }

        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

Examples of javax.naming.InvalidNameException

    */
   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

Examples of javax.naming.InvalidNameException

   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

Examples of javax.naming.InvalidNameException

    */
   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
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.