com.caucho.jms.resource
Class MessageSenderResource

java.lang.Object
  extended by com.caucho.jms.resource.MessageSenderResource
All Implemented Interfaces:
MessageSender

public class MessageSenderResource
extends java.lang.Object
implements MessageSender

Configures message senders, avoiding JCA.


Constructor Summary
MessageSenderResource()
           
 
Method Summary
 void init()
          Initialize the sender resource.
 void send(java.util.HashMap header, java.lang.Object value)
          Sends a message to the destination
 void setConnectionFactory(ConnectionFactory factory)
          Sets the JMS connection factory.
 void setDestination(Destination destination)
          Sets the JMS Destination (Queue or Topic)
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageSenderResource

public MessageSenderResource()
Method Detail

setConnectionFactory

public void setConnectionFactory(ConnectionFactory factory)
Sets the JMS connection factory.

Parameters:
factory -

setDestination

public void setDestination(Destination destination)
Sets the JMS Destination (Queue or Topic)

Parameters:
destination -

init

@PostConstruct
public void init()
          throws JMSException,
                 ConfigException
Initialize the sender resource.

Throws:
JMSException
ConfigException

send

public void send(java.util.HashMap header,
                 java.lang.Object value)
          throws MessageServiceException
Sends a message to the destination

Specified by:
send in interface MessageSender
Parameters:
header -
value -
Throws:
MessageServiceException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object