org.springframework.jms.MessageFormatException Java Examples
The following examples show how to use
org.springframework.jms.MessageFormatException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JmsUtils.java From spring-analysis-note with MIT License | 4 votes |
/** * Convert the specified checked {@link javax.jms.JMSException JMSException} to a * Spring runtime {@link org.springframework.jms.JmsException JmsException} equivalent. * @param ex the original checked JMSException to convert * @return the Spring runtime JmsException wrapping the given exception */ public static JmsException convertJmsAccessException(JMSException ex) { Assert.notNull(ex, "JMSException must not be null"); if (ex instanceof javax.jms.IllegalStateException) { return new org.springframework.jms.IllegalStateException((javax.jms.IllegalStateException) ex); } if (ex instanceof javax.jms.InvalidClientIDException) { return new InvalidClientIDException((javax.jms.InvalidClientIDException) ex); } if (ex instanceof javax.jms.InvalidDestinationException) { return new InvalidDestinationException((javax.jms.InvalidDestinationException) ex); } if (ex instanceof javax.jms.InvalidSelectorException) { return new InvalidSelectorException((javax.jms.InvalidSelectorException) ex); } if (ex instanceof javax.jms.JMSSecurityException) { return new JmsSecurityException((javax.jms.JMSSecurityException) ex); } if (ex instanceof javax.jms.MessageEOFException) { return new MessageEOFException((javax.jms.MessageEOFException) ex); } if (ex instanceof javax.jms.MessageFormatException) { return new MessageFormatException((javax.jms.MessageFormatException) ex); } if (ex instanceof javax.jms.MessageNotReadableException) { return new MessageNotReadableException((javax.jms.MessageNotReadableException) ex); } if (ex instanceof javax.jms.MessageNotWriteableException) { return new MessageNotWriteableException((javax.jms.MessageNotWriteableException) ex); } if (ex instanceof javax.jms.ResourceAllocationException) { return new ResourceAllocationException((javax.jms.ResourceAllocationException) ex); } if (ex instanceof javax.jms.TransactionInProgressException) { return new TransactionInProgressException((javax.jms.TransactionInProgressException) ex); } if (ex instanceof javax.jms.TransactionRolledBackException) { return new TransactionRolledBackException((javax.jms.TransactionRolledBackException) ex); } // fallback return new UncategorizedJmsException(ex); }
Example #2
Source File: JmsTemplateTests.java From spring-analysis-note with MIT License | 4 votes |
@Test public void testMessageFormatException() throws Exception { doTestJmsException(new javax.jms.MessageFormatException(""), MessageFormatException.class); }
Example #3
Source File: JmsUtils.java From java-technology-stack with MIT License | 4 votes |
/** * Convert the specified checked {@link javax.jms.JMSException JMSException} to a * Spring runtime {@link org.springframework.jms.JmsException JmsException} equivalent. * @param ex the original checked JMSException to convert * @return the Spring runtime JmsException wrapping the given exception */ public static JmsException convertJmsAccessException(JMSException ex) { Assert.notNull(ex, "JMSException must not be null"); if (ex instanceof javax.jms.IllegalStateException) { return new org.springframework.jms.IllegalStateException((javax.jms.IllegalStateException) ex); } if (ex instanceof javax.jms.InvalidClientIDException) { return new InvalidClientIDException((javax.jms.InvalidClientIDException) ex); } if (ex instanceof javax.jms.InvalidDestinationException) { return new InvalidDestinationException((javax.jms.InvalidDestinationException) ex); } if (ex instanceof javax.jms.InvalidSelectorException) { return new InvalidSelectorException((javax.jms.InvalidSelectorException) ex); } if (ex instanceof javax.jms.JMSSecurityException) { return new JmsSecurityException((javax.jms.JMSSecurityException) ex); } if (ex instanceof javax.jms.MessageEOFException) { return new MessageEOFException((javax.jms.MessageEOFException) ex); } if (ex instanceof javax.jms.MessageFormatException) { return new MessageFormatException((javax.jms.MessageFormatException) ex); } if (ex instanceof javax.jms.MessageNotReadableException) { return new MessageNotReadableException((javax.jms.MessageNotReadableException) ex); } if (ex instanceof javax.jms.MessageNotWriteableException) { return new MessageNotWriteableException((javax.jms.MessageNotWriteableException) ex); } if (ex instanceof javax.jms.ResourceAllocationException) { return new ResourceAllocationException((javax.jms.ResourceAllocationException) ex); } if (ex instanceof javax.jms.TransactionInProgressException) { return new TransactionInProgressException((javax.jms.TransactionInProgressException) ex); } if (ex instanceof javax.jms.TransactionRolledBackException) { return new TransactionRolledBackException((javax.jms.TransactionRolledBackException) ex); } // fallback return new UncategorizedJmsException(ex); }
Example #4
Source File: JmsTemplateTests.java From java-technology-stack with MIT License | 4 votes |
@Test public void testMessageFormatException() throws Exception { doTestJmsException(new javax.jms.MessageFormatException(""), MessageFormatException.class); }
Example #5
Source File: JmsUtils.java From spring4-understanding with Apache License 2.0 | 4 votes |
/** * Convert the specified checked {@link javax.jms.JMSException JMSException} to a * Spring runtime {@link org.springframework.jms.JmsException JmsException} equivalent. * @param ex the original checked JMSException to convert * @return the Spring runtime JmsException wrapping the given exception */ public static JmsException convertJmsAccessException(JMSException ex) { Assert.notNull(ex, "JMSException must not be null"); if (ex instanceof javax.jms.IllegalStateException) { return new org.springframework.jms.IllegalStateException((javax.jms.IllegalStateException) ex); } if (ex instanceof javax.jms.InvalidClientIDException) { return new InvalidClientIDException((javax.jms.InvalidClientIDException) ex); } if (ex instanceof javax.jms.InvalidDestinationException) { return new InvalidDestinationException((javax.jms.InvalidDestinationException) ex); } if (ex instanceof javax.jms.InvalidSelectorException) { return new InvalidSelectorException((javax.jms.InvalidSelectorException) ex); } if (ex instanceof javax.jms.JMSSecurityException) { return new JmsSecurityException((javax.jms.JMSSecurityException) ex); } if (ex instanceof javax.jms.MessageEOFException) { return new MessageEOFException((javax.jms.MessageEOFException) ex); } if (ex instanceof javax.jms.MessageFormatException) { return new MessageFormatException((javax.jms.MessageFormatException) ex); } if (ex instanceof javax.jms.MessageNotReadableException) { return new MessageNotReadableException((javax.jms.MessageNotReadableException) ex); } if (ex instanceof javax.jms.MessageNotWriteableException) { return new MessageNotWriteableException((javax.jms.MessageNotWriteableException) ex); } if (ex instanceof javax.jms.ResourceAllocationException) { return new ResourceAllocationException((javax.jms.ResourceAllocationException) ex); } if (ex instanceof javax.jms.TransactionInProgressException) { return new TransactionInProgressException((javax.jms.TransactionInProgressException) ex); } if (ex instanceof javax.jms.TransactionRolledBackException) { return new TransactionRolledBackException((javax.jms.TransactionRolledBackException) ex); } // fallback return new UncategorizedJmsException(ex); }
Example #6
Source File: JmsTemplateTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Test public void testMessageFormatException() throws Exception { doTestJmsException(new javax.jms.MessageFormatException(""), MessageFormatException.class); }