本文整理了Java中javax.jms.IllegalStateException.getMessage()
方法的一些代码示例,展示了IllegalStateException.getMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IllegalStateException.getMessage()
方法的具体详情如下:
包路径:javax.jms.IllegalStateException
类名称:IllegalStateException
方法名:getMessage
暂无
代码示例来源:origin: org.jboss.seam/jboss-seam
@Destroy
public void destroy() throws JMSException
{
try
{
queueConnection.stop();
}
catch (javax.jms.IllegalStateException e)
{
// as for JEE v5 specs, section EE 6.6
// At least WebSphere v7 enforce this
log.warn("queueSession.stop() called during @Destroy in an invalid context for this container. Msg={0}", e.getMessage());
}
queueConnection.close();
}
代码示例来源:origin: org.ow2.joram/joram-client-jms
public void stop() {
try {
if (connection == null) throw new JMSException("Underlying connection is closed");
connection.stop();
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException("Unable to close context", e.getMessage(), e);
} catch (JMSException e) {
throw new JMSRuntimeException("Cannot stop connection", e.getMessage(), e);
}
}
代码示例来源:origin: org.ow2.joram/joram-client-jms
public void rollback() {
connection.lockClientID();
try {
session.rollback();
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException(e.getMessage());
} catch (JMSException e) {
throw new JMSRuntimeException(e.getMessage());
}
}
代码示例来源:origin: org.ow2.joram/joram-client-jms
public void commit() {
connection.lockClientID();
try {
session.commit();
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException(e.getMessage());
} catch (JMSException e) {
throw new JMSRuntimeException(e.getMessage());
}
}
代码示例来源:origin: org.ow2.joram/joram-client-jms
public void recover() {
connection.lockClientID();
try {
session.recover();
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException(e.getMessage());
} catch (JMSException e) {
throw new JMSRuntimeException(e.getMessage());
}
}
代码示例来源:origin: org.ow2.joram/joram-client-jms
public void acknowledge() {
connection.lockClientID();
try {
session.acknowledge();
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException("Unable to acknowledge", e.getMessage(), e);
} catch (JMSException e) {
logger.log(BasicLevel.ERROR, "Unable to acknowledge", e);
throw new JMSRuntimeException(e.getMessage());
}
}
代码示例来源:origin: de.mhus.lib/mhu-lib-jms
public void sendJmsOneWay(Message msg) throws JMSException {
open();
prepareMessage(msg);
if (interceptorOut != null)
interceptorOut.prepare(msg);
log().d("sendJmsOneWay",dest,producer.getTimeToLive(),msg);
try {
producer.send(msg);
} catch (IllegalStateException ise) {
log().i("reconnect",getName(),ise.getMessage());
producer = null;
open();
producer.send(msg);
}
}
代码示例来源:origin: de.mhus.lib/mhu-lib-jms
producer.send(msg, deliveryMode, getPriority(), getTimeToLive());
} catch (IllegalStateException ise) {
log().i("reconnect",getName(),ise.getMessage());
producer = null;
open();
代码示例来源:origin: org.ow2.joram/joram-client-jms
public void setClientID(String clientID) {
try {
if (lockClientID)
throw new IllegalStateException("ClientID is already set by the provider.");
if (connection == null) throw new JMSException("Underlying connection is closed");
connection.setClientID(clientID);
lockClientID = true;
} catch (InvalidClientIDException e) {
throw new InvalidClientIDRuntimeException(e.getMessage(), e.getErrorCode(), e);
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException(e.getMessage(), e.getErrorCode(), e);
} catch (JMSException e) {
throw new JMSRuntimeException(e.getMessage(), e.getErrorCode(), e);
}
}
代码示例来源:origin: org.ow2.joram/joram-client-jms
session.close();
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException("Unable to close context", e.getMessage(), e);
} catch (JMSException e) {
throw new JMSRuntimeException("Unable to close context", e.getMessage(), e);
connection.close();
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException("Unable to close context", e.getMessage(), e);
} catch (JMSException e) {
throw new JMSRuntimeException("Unable to close context", e.getMessage(), e);
代码示例来源:origin: de.mhus.lib/mhu-lib-jms
producer.send(msg);
} catch (IllegalStateException ise) {
log().i("reconnect",getName(),ise.getMessage());
producer = null;
open();
代码示例来源:origin: org.ow2.joram/joram-client-jms
throw new InvalidDestinationRuntimeException(e.getMessage());
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException(e.getMessage());
} catch (JMSException e) {
throw new JMSRuntimeException(e.getMessage());
代码示例来源:origin: org.ow2.joram/joram-client-jms
public JMSConsumer createDurableConsumer(Topic topic, String name, String selector, boolean noLocal) {
connection.lockClientID();
try {
MessageConsumer consumer = (MessageConsumer) session.createDurableConsumer(topic, name, selector, noLocal);
return new JMSConsumer(consumer);
} catch (InvalidDestinationException e) {
throw new InvalidDestinationRuntimeException(e.getMessage());
} catch (InvalidSelectorException e) {
throw new InvalidSelectorRuntimeException(e.getMessage());
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException(e.getMessage());
} catch (JMSException e) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Unable to instantiate a JMSConsumer" + e.getMessage());
throw new JMSRuntimeException("Unable to instantiate a JMSConsumer");
} finally {
if (connection.getAutoStart())
connection.start();
}
}
代码示例来源:origin: org.ow2.joram/joram-client-jms
public javax.jms.JMSConsumer createSharedConsumer(Topic topic,
String sharedSubscriptionName, String messageSelector) {
connection.lockClientID();
try {
return new JMSConsumer(session.createSharedConsumer(topic, sharedSubscriptionName, messageSelector));
} catch (InvalidDestinationException e) {
throw new InvalidDestinationRuntimeException(e.getMessage(), e.getErrorCode(), e);
} catch (InvalidSelectorException e) {
throw new InvalidSelectorRuntimeException(e.getMessage(), e.getErrorCode(), e);
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException(e.getMessage(), e.getErrorCode(), e);
} catch (JMSException e) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Unable to crate shared consumer " + e.getMessage());
throw new JMSRuntimeException("Unable to create shared consumer " + e.getMessage(), e.getErrorCode(), e);
} finally {
if (connection.getAutoStart())
connection.start();
}
}
代码示例来源:origin: org.ow2.joram/joram-client-jms
public javax.jms.JMSConsumer createSharedDurableConsumer(Topic topic,
String name, String messageSelector) {
connection.lockClientID();
try {
return new JMSConsumer(session.createSharedDurableConsumer(topic, name, messageSelector));
} catch (InvalidDestinationException e) {
throw new InvalidDestinationRuntimeException(e.getMessage(), e.getErrorCode(), e);
} catch (InvalidSelectorException e) {
throw new InvalidSelectorRuntimeException(e.getMessage(), e.getErrorCode(), e);
} catch (IllegalStateException e) {
throw new IllegalStateRuntimeException(e.getMessage(), e.getErrorCode(), e);
} catch (JMSException e) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Unable to crate shared durable consumer " + e.getMessage());
throw new JMSRuntimeException("Unable to create shared durable consumer " + e.getMessage(), e.getErrorCode(), e);
} finally {
if (connection.getAutoStart())
connection.start();
}
}
内容来源于网络,如有侵权,请联系作者删除!