Package javax.resource.spi

Examples of javax.resource.spi.InvalidPropertyException


  private String parentDirectory;
 
  @Override
  public BasicConnectionFactory createConnectionFactory() throws ResourceException {
    if (this.parentDirectory == null) {
      throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$
    }
    return new BasicConnectionFactory() {
     
      @Override
      public BasicConnection getConnection() throws ResourceException {
View Full Code Here


  public void validate() throws InvalidPropertyException
  {
    if (destinationType != null
        && ! destinationType.equals("javax.jms.Queue")
        && ! destinationType.equals("javax.jms.Topic"))
      throw new InvalidPropertyException("Invalid destination type: "
                                         + destinationType);

    if (destination == null)
      throw new InvalidPropertyException("Missing destination property.");

    if (acknowledgeMode != null
        && ! acknowledgeMode.equals(AUTO_ACKNOWLEDGE)
        && ! acknowledgeMode.equals(DUPS_OK_ACKNOWLEDGE))
      throw new InvalidPropertyException("Invalid acknowledge mode: "
                                         + acknowledgeMode);

    if (subscriptionDurability != null) {

      if (subscriptionDurability.equals("Durable")
          && destinationType.equals("javax.jms.Queue"))
        throw new InvalidPropertyException("Can't set a durable subscription "
                                           + "on a JMS queue.");

      if (subscriptionDurability.equals("Durable")
          && subscriptionName == null)
        throw new InvalidPropertyException("Missing durable subscription name.");
    }
  }
View Full Code Here

         HornetQActivationSpec.log.trace("validate()");
      }

      if (destination == null || destination.trim().equals(""))
      {
         throw new InvalidPropertyException("Destination is mandatory");
      }
   }
View Full Code Here

        this.asStringProperty = asStringProperty;
    }
   
    public void validate() throws InvalidPropertyException {
        if ("FAIL".equals(asStringProperty)) {
            throw new InvalidPropertyException("FAIL");
        }
    }
View Full Code Here

            b.append("Invalid settings:");
            for (Iterator<String> iter = errorMessages.iterator(); iter.hasNext();) {
                b.append(" ");
                b.append(iter.next());
            }
            InvalidPropertyException e = new InvalidPropertyException(b.toString());
            final PropertyDescriptor[] descriptors = propsNotSet.toArray(new PropertyDescriptor[propsNotSet.size()]);
            e.setInvalidPropertyDescriptors(descriptors);
            throw e;
        }
    }
View Full Code Here

     @param delimiter - the delimiter to tokenize.
     */
    public CustomTokenizer(String stringToken, String delimiter)
    throws InvalidPropertyException {
        if (!checkForMatchingQuotes(stringToken))
            throw new InvalidPropertyException("UnclosedString");
       
        if (stringToken != null && delimiter != null)
            tokenIterator = populateList(stringToken, delimiter);
        else
            throw new InvalidPropertyException("CouldNotCreateCliTokenizer");
    }
View Full Code Here

        }
        size = tokenList.size();
        try {
            return tokenList.listIterator();
        } catch (java.lang.IndexOutOfBoundsException ioe) {
            throw new InvalidPropertyException(ioe);
        }
    }
View Full Code Here

                (quoteBeginIndex < hasDelimiter)) {
            //get index of the end quote in the string token
            final int quoteEndIndex = strToken.indexOf(QUOTE_STRING, quoteBeginIndex+1);
           
            if (quoteEndIndex == -1)
                throw new InvalidPropertyException("UnclosedString");
            if (quoteEndIndex != (strToken.length()-1)) {
                return getStringDelimiterIndex(strToken, delimiter, quoteEndIndex + 1);
            } else {
                return -1;
            }
View Full Code Here

         HornetQRALogger.LOGGER.trace("validate()");
      }

      if (destination == null || destination.trim().equals(""))
      {
         throw new InvalidPropertyException("Destination is mandatory");
      }
   }
View Full Code Here

         HornetQActivationSpec.log.trace("validate()");
      }

      if (destination == null || destination.trim().equals(""))
      {
         throw new InvalidPropertyException("Destination is mandatory");
      }
   }
View Full Code Here

TOP

Related Classes of javax.resource.spi.InvalidPropertyException

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.