Hi

Letīs say that I'm creating a jms queue like this:
Code:
import com.sun.messaging.Queue;

@Bean
public Queue batchOrderQueue() {
	return new Queue("queueName");
}
Queue declares that it throws javax.jms.JMSException which is a checked exception.

What is the correct way to handle that exception?

  • Should I catch it and re-throw a RuntimeException?
  • Should I declare that the batchOrderQueue method also throws the exception?


I'm new to SpringConfig, thatīs why I'm asking how to handle the exception in this particular circumstance.

Best regards,
Mattias