}
private Connection createOrReturnQueueOrTopicConnection()
{
JMSModel jmsModel = this.jmsComponent.getJmsModel();
try
{
if (jmsModel.getJmsType().equals(JMSType.QUEUE))
{
if (connections.containsKey(JMSType.QUEUE))
{
return connections.get(JMSType.QUEUE);
}
else
{
QueueConnectionFactory ccf = (QueueConnectionFactory) createOrReturnConnectionFactory();
QueueConnection qc = ccf.createQueueConnection();
connections.put(JMSType.QUEUE, qc);
return qc;
}
}
else if (jmsModel.getJmsType().equals(JMSType.TOPIC))
{
if (connections.containsKey(JMSType.TOPIC))
{
return connections.get(JMSType.TOPIC);
}