All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jencks.pool.PooledQueueSender Maven / Gradle / Ivy

Go to download

Spring and POJO enhancements to the Geronimo JCA container to implement Message Driven POJOs.

There is a newer version: 2.2
Show newest version
/** 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License. 
 * 
 **/
package org.jencks.pool;

import javax.jms.QueueSender;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Queue;
import javax.jms.Message;

/**
 * @version $Revision$
 */
public class PooledQueueSender extends PooledProducer implements QueueSender
{
  public PooledQueueSender(final QueueSender messageProducer,
                           final Destination destination) throws JMSException
  {
    super(messageProducer, destination);
  }

  public void send(final Queue queue, final Message message, final int i, final int i1, final long l)
      throws JMSException
  {
    getQueueSender().send(queue, message, i, i1, l);
  }

  public void send(Queue queue, Message message) throws JMSException
  {
    getQueueSender().send(queue, message);
  }

  public Queue getQueue() throws JMSException
  {
    return getQueueSender().getQueue();
  }


  protected QueueSender getQueueSender()
  {
    return (QueueSender)getMessageProducer();
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy