Package javax.jms

Examples of javax.jms.JMSException


      reliableClass = "org.objectweb.joram.client.jms.tcp.ReliableTcpClient";
    }
    try {
      tcpClient = (ReliableTcpClient) Class.forName(reliableClass).newInstance();
    } catch (ClassNotFoundException exc) {
      JMSException jmsExc =  new JMSException("TcpConnection: ClassNotFoundException : " + reliableClass);
      jmsExc.setLinkedException(exc);
      throw jmsExc;
    } catch (InstantiationException exc) {
      JMSException jmsExc =  new JMSException("TcpConnection: InstantiationException : " + reliableClass);
      jmsExc.setLinkedException(exc);
      throw jmsExc;
    } catch (IllegalAccessException exc) {
      JMSException jmsExc = new JMSException("TcpConnection: IllegalAccessException : " + reliableClass);
      jmsExc.setLinkedException(exc);
      throw jmsExc;
    }
    tcpClient.init(params, identity, params.cnxPendingTimer > 0);
    tcpClient.addServerAddress(params.getHost(), params.getPort());
  }
View Full Code Here


      throw new JMSSecurityException("Invalid user identification: " + exc);
    } catch (javax.resource.spi.CommException exc) {
      throw new IllegalStateException("Could not connect to the JORAM server: "
                                      + exc);
    } catch (javax.resource.ResourceException exc) {
      throw new JMSException("Could not create connection: " + exc);
    }
  }
View Full Code Here

      proxyId = gpin.getProxyId();
    } catch (Exception exc) {
      if (logger.isLoggable(BasicLevel.DEBUG))
        logger.log(BasicLevel.DEBUG, "", exc);
      localConnections.increaseFailedLoginCount();
      throw new JMSException(exc.getMessage());
    }

    OpenConnectionNot ocn = new OpenConnectionNot(false, 0);
    try {
      ocn.invoke(proxyId);
      ctx = (StandardConnectionContext) ocn.getConnectionContext();
      creationDate = new Date();
    } catch (Exception exc) {
      if (logger.isLoggable(BasicLevel.DEBUG))
        logger.log(BasicLevel.DEBUG, "", exc);
      JMSException jmse = new JMSException(exc.getMessage());
      jmse.setLinkedException(exc);
      throw jmse;
    }

    localConnections.addLocalConnection(this);
    try {
View Full Code Here

    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    if (deliveryMode != javax.jms.DeliveryMode.PERSISTENT
        && deliveryMode != javax.jms.DeliveryMode.NON_PERSISTENT)
      throw new JMSException("Can't set invalid delivery mode.");

    this.deliveryMode = deliveryMode;
  }
View Full Code Here

  public synchronized void setPriority(int priority) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    if (priority < 0 || priority > 9)
      throw new JMSException("Can't set invalid priority value.");

    this.priority = priority;
  }
View Full Code Here

      if (logger.isLoggable(BasicLevel.DEBUG))
        logger.log(BasicLevel.DEBUG, "initIdentity : identity = " + identity);
    } catch (ClassNotFoundException e) {
      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "EXCEPTION:: initIdentity", e);
      throw new JMSException(e.getClass() + ":: " + e.getMessage());
    } catch (InstantiationException e) {
      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "EXCEPTION:: initIdentity", e);
      throw new JMSException(e.getClass() + ":: " + e.getMessage());
    } catch (IllegalAccessException e) {
      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "EXCEPTION:: initIdentity", e);
      throw new JMSException(e.getClass() + ":: " + e.getMessage());
    } catch (JMSException exc) {
      throw exc;
    } catch (Exception e) {
      // Wrap the incoming exception.
      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "EXCEPTION:: initIdentity", e);
      throw new JMSException(e.getClass() + ":: " + e.getMessage());
    }
  }
View Full Code Here

      // Selects the message containing the reply.
      String correlationId = requestMsg.getJMSMessageID();
      while (true) {
        replyMsg = consumer.receive(requestTimeout);
        if (replyMsg == null)
          throw new JMSException("Interrupted request");

        if (correlationId.equals(replyMsg.getJMSCorrelationID())) break;

        if (logger.isLoggable(BasicLevel.WARN))
          logger.log(BasicLevel.WARN, "AdminRequestor.request() bad correlation identifier.");
View Full Code Here

      throw new JMSSecurityException("Invalid user identification: " + exc);
    } catch (javax.resource.spi.CommException exc) {
      throw new IllegalStateException("Could not connect to the JORAM server: "
                                      + exc);
    } catch (javax.resource.ResourceException exc) {
      throw new JMSException("Could not create connection: " + exc);
    }
  }
View Full Code Here

      throw new JMSSecurityException("Invalid user identification: " + exc);
    } catch (javax.resource.spi.CommException exc) {
      throw new IllegalStateException("Could not connect to the JORAM server: "
                                      + exc);
    } catch (javax.resource.ResourceException exc) {
      throw new JMSException("Could not create connection: " + exc);
    }
  }
View Full Code Here

    case org.objectweb.joram.shared.messages.Message.BYTES:
      return new BytesMessage(session, momMsg);
    case org.objectweb.joram.shared.messages.Message.ADMIN:
      return new AdminMessage(session, momMsg);
    default:
      throw new JMSException("Unknow message type: " + momMsg.type);
    }
  }
View Full Code Here

TOP

Related Classes of javax.jms.JMSException

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.