Search in sources :

Example 16 with MQRuntimeException

use of com.sun.messaging.jms.MQRuntimeException in project openmq by eclipse-ee4j.

the class JMSContextImpl method recover.

@Override
public void recover() {
    checkNotClosed();
    disallowSetClientID();
    try {
        session.recover();
    } catch (IllegalStateException e) {
        throw new MQIllegalStateRuntimeException(e);
    } catch (JMSException e) {
        throw new MQRuntimeException(e);
    }
}
Also used : IllegalStateException(jakarta.jms.IllegalStateException) JMSException(jakarta.jms.JMSException) MQIllegalStateRuntimeException(com.sun.messaging.jms.MQIllegalStateRuntimeException) MQRuntimeException(com.sun.messaging.jms.MQRuntimeException)

Example 17 with MQRuntimeException

use of com.sun.messaging.jms.MQRuntimeException in project openmq by eclipse-ee4j.

the class JMSContextImpl method createQueue.

@Override
public Queue createQueue(String queueName) {
    checkNotClosed();
    disallowSetClientID();
    try {
        return session.createQueue(queueName);
    } catch (JMSException e) {
        throw new MQRuntimeException(e);
    }
}
Also used : JMSException(jakarta.jms.JMSException) MQRuntimeException(com.sun.messaging.jms.MQRuntimeException)

Example 18 with MQRuntimeException

use of com.sun.messaging.jms.MQRuntimeException in project openmq by eclipse-ee4j.

the class JMSContextImpl method createStreamMessage.

@Override
public StreamMessage createStreamMessage() {
    checkNotClosed();
    disallowSetClientID();
    try {
        return session.createStreamMessage();
    } catch (JMSException e) {
        throw new MQRuntimeException(e);
    }
}
Also used : JMSException(jakarta.jms.JMSException) MQRuntimeException(com.sun.messaging.jms.MQRuntimeException)

Example 19 with MQRuntimeException

use of com.sun.messaging.jms.MQRuntimeException in project openmq by eclipse-ee4j.

the class JMSContextImpl method createObjectMessage.

@Override
public ObjectMessage createObjectMessage(Serializable object) {
    checkNotClosed();
    disallowSetClientID();
    try {
        return session.createObjectMessage(object);
    } catch (JMSException e) {
        throw new MQRuntimeException(e);
    }
}
Also used : JMSException(jakarta.jms.JMSException) MQRuntimeException(com.sun.messaging.jms.MQRuntimeException)

Example 20 with MQRuntimeException

use of com.sun.messaging.jms.MQRuntimeException in project openmq by eclipse-ee4j.

the class JMSContextImpl method setExceptionListener.

@Override
public void setExceptionListener(ExceptionListener listener) {
    checkNotClosed();
    try {
        connection.setExceptionListener(listener);
    } catch (JMSException e) {
        throw new MQRuntimeException(e);
    }
    disallowSetClientID();
}
Also used : JMSException(jakarta.jms.JMSException) MQRuntimeException(com.sun.messaging.jms.MQRuntimeException)

Aggregations

MQRuntimeException (com.sun.messaging.jms.MQRuntimeException)29 JMSException (jakarta.jms.JMSException)29 MQInvalidDestinationRuntimeException (com.sun.messaging.jms.MQInvalidDestinationRuntimeException)8 InvalidDestinationException (jakarta.jms.InvalidDestinationException)7 MQMessageFormatRuntimeException (com.sun.messaging.jms.MQMessageFormatRuntimeException)6 MessageFormatException (jakarta.jms.MessageFormatException)6 MQIllegalStateRuntimeException (com.sun.messaging.jms.MQIllegalStateRuntimeException)5 IllegalStateException (jakarta.jms.IllegalStateException)5 MQInvalidSelectorRuntimeException (com.sun.messaging.jms.MQInvalidSelectorRuntimeException)2 MQMessageNotWriteableRuntimeException (com.sun.messaging.jms.MQMessageNotWriteableRuntimeException)2 MQTransactionInProgressRuntimeException (com.sun.messaging.jms.MQTransactionInProgressRuntimeException)2 MQTransactionRolledBackRuntimeException (com.sun.messaging.jms.MQTransactionRolledBackRuntimeException)2 MessageNotWriteableException (jakarta.jms.MessageNotWriteableException)2 AdministeredObject (com.sun.messaging.AdministeredObject)1 MQInvalidClientIDRuntimeException (com.sun.messaging.jms.MQInvalidClientIDRuntimeException)1 MQSecurityRuntimeException (com.sun.messaging.jms.MQSecurityRuntimeException)1 BytesMessage (jakarta.jms.BytesMessage)1 IllegalStateRuntimeException (jakarta.jms.IllegalStateRuntimeException)1 InvalidClientIDException (jakarta.jms.InvalidClientIDException)1 InvalidClientIDRuntimeException (jakarta.jms.InvalidClientIDRuntimeException)1