Package javax.resource.spi

Examples of javax.resource.spi.InvalidPropertyException


            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


   {
      super.validate();

      if (m_lAge < 0)
      {
         throw new InvalidPropertyException("Age cannot be negative");
      }

      if (m_nSubdirectoryLevels < 0)
      {
         throw new InvalidPropertyException("Subdirectory levels cannot be negative");
      }

      if (m_lScanInterval < 0)
      {
         throw new InvalidPropertyException("Scan interval cannot be negative");
      }
   }
View Full Code Here

         {
            factoryClass = Class.forName(sFactory.substring(BEAN_SCHEME.length()));
         }
         catch (Throwable t)
         {
            throw new InvalidPropertyException("Invalid connection factory \"" + sFactory + "\"", t);
         }

         if (JMSPlatformAdapter.class.isAssignableFrom(factoryClass))
         {
            try
View Full Code Here

      {
         m_trustedCertificate = CertificateUtil.parseCertificate(sTrust);
      }
      catch (Exception e)
      {
         throw new InvalidPropertyException("Invalid trust certificate: \"" + sTrust + "\"", e);
      }
   }
View Full Code Here

   {
      super.validate();

      if (m_nLocalPort < TCPResourceAdapter.MIN_PORT || m_nLocalPort > TCPResourceAdapter.MAX_PORT)
      {
         throw new InvalidPropertyException("Port not within the range "
            + TCPResourceAdapter.MIN_PORT + " - " + TCPResourceAdapter.MAX_PORT + ".");
      }

      if (m_nSenderBufferSize < 0)
      {
         throw new InvalidPropertyException("Send buffer size cannot be negative.");
      }

      if (m_nReceiverBufferSize < 0)
      {
         throw new InvalidPropertyException("Receive buffer size cannot be negative.");
      }

      // create the key store
      if (m_sCertificateStore != null)
      {
         try
         {
            m_certificateStore = CertificateUtil.parseKeyStore(m_sCertificateStore, m_sPassword);
         }
         catch (Exception ex)
         {
            throw new InvalidPropertyException("Invalid key store", ex);
         }
       }
   }
View Full Code Here

    */
   public void validate() throws InvalidPropertyException
   {
      if (m_nMaxPoolSize < -1)
      {
         throw new InvalidPropertyException("MaxPoolSize is less than -1");
      }
   }
View Full Code Here

      {
         m_nAckMode = Session.DUPS_OK_ACKNOWLEDGE;
      }
      else
      {
         throw new InvalidPropertyException("Invalid acknowledgement mode \"" + m_sAckMode +
            "\" (expected \"Auto-acknowledge\" or \"Dups-ok-acknowledge\")");
      }

      if (m_sDurability == null || m_sDurability.equals("NonDurable"))
      {
         m_bDurable = false;
      }
      else if (m_sDurability.equals("Durable"))
      {
         m_bDurable = true;
      }
      else
      {
         throw new InvalidPropertyException("Invalid subscription durability \"" + m_sDurability +
            "\" (expected \"Durable\" or \"NonDurable\")");
      }

      if (m_sDestinationType == null || m_sDestinationType.equals("javax.jms.Queue"))
      {
         m_bBroadcast = false;

         if (m_bDurable)
         {
            throw new InvalidPropertyException("Destination type \"" +
               m_sDestinationType + "\" cannot be durable");
         }
      }
      else if (m_sDestinationType.equals("javax.jms.Topic"))
      {
         m_bBroadcast = true;
      }
      else
      {
         throw new InvalidPropertyException("Invalid destination type \"" + m_sDestinationType +
            "\" (expected \"javax.jms.Queue\" or \"javax.jms.Topic\")");
      }

      if (m_sDestination == null)
      {
         throw new InvalidPropertyException("Missing destination name");
      }

      if (m_sConnectionFactory == null)
      {
         throw new InvalidPropertyException("Missing connection factory name");
      }

      if (m_sConnectionFactoryProperties != null && m_sConnectionFactoryProperties.trim().length() != 0)
      {
         try
         {
            m_connectionFactoryProperties = PropertyUtil.fromString(m_sConnectionFactoryProperties);
         }
         catch (IOException e)
         {
            throw new InvalidPropertyException("Invalid connection factory properties syntax", e);
         }
      }
      else
      {
         m_connectionFactoryProperties = null;
      }

      if (m_sDestinationProperties != null && m_sDestinationProperties.trim().length() != 0)
      {
         try
         {
            m_destinationProperties = PropertyUtil.fromString(m_sDestinationProperties);
         }
         catch (IOException e)
         {
            throw new InvalidPropertyException("Invalid destination properties syntax", e);
         }
      }
      else
      {
         m_destinationProperties = null;
      }
     
      if (m_lSelectorUpdateInterval <= 0)
      {
         throw new InvalidPropertyException("Invalid message selector update value");
      }
   }
View Full Code Here

   {
      super.validate();

      if (m_nTransactionTimeout < 0)
      {
         throw new InvalidPropertyException("TransactionTimeout is negative");
      }
   }
View Full Code Here

   {
      super.validate();
     
      if (m_nPort < 0 || m_nPort > 0xFFFF)
      {
         throw new InvalidPropertyException("Port not within the range 0..65535");
      }
     
      if (m_nMaxPacketSize <= 0)
      {
         throw new InvalidPropertyException("MaxPacketSize not positive");
      }
   }
View Full Code Here

         HornetQRALogger.LOGGER.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.