|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.webmsg.publisher.jndijms.JmsPublisher
public class JmsPublisher
Publisher implementation that uses a JMS ConnectionFactory to propagate messages. The ConnectionFactory is configured as a JNDI administered object, the key to which is passed in as a context parameter. JNDI lookup occurs during initialization. For every publish operation, a connection, session and producer is created and closed. (JCA Connection pooling should alleviate some of the weight of those operations). This should push some of the connection management issues back to the JCA container and remove some any threading concerns when using this class. Long property PROPERTY_MAX_CONNECT_TIME, if > 0, will indicate the publish request should be retried accord to duration set by Long property CONNECT_DELAY_INTERVAL (duration multiplied by Integer value specified by property PROPERTY_CONN_DELAY_MULTIPLIER). This could help in a clustered environment when an ME fails over.
Field Summary | |
---|---|
static java.lang.String |
EVENT_HEADER_ATTRIBUTE_NAME_JMS_DELIVERY_MODE
|
static java.lang.String |
EVENT_HEADER_ATTRIBUTE_NAME_JMS_PRIORITY
|
static java.lang.String |
EVENT_HEADER_ATTRIBUTE_NAME_JMS_TIME_TO_LIVE
|
static java.lang.String |
PROPERTY_CONN_DELAY_MULTIPLIER
|
static java.lang.String |
PROPERTY_CONN_DELAYINTERVAL
|
static java.lang.String |
PROPERTY_KEY_CONNECTION_FACTORY_JNDI_NAME
|
static java.lang.String |
PROPERTY_KEY_DEFAULT_DESTINATION
|
static java.lang.String |
PROPERTY_KEY_INITIAL_CONTEXT_FACTORY
|
static java.lang.String |
PROPERTY_KEY_JMS_CLIENT_ID
|
static java.lang.String |
PROPERTY_KEY_PROVIDER_URL
|
static java.lang.String |
PROPERTY_MAX_CONNECT_TIME
|
Constructor Summary | |
---|---|
JmsPublisher()
Constructor |
Method Summary | |
---|---|
void |
close()
Close publisher, includes shutting down any connections, etc. |
void |
initialize(PublisherContext context)
Context attribute CONNECTION_FACTORY_JNDI_NAME is mandatory and it contains the String key with which to look up the ConnectionFactory from JMS. |
void |
publish(WebMessage message)
Publish given WebMessage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_KEY_CONNECTION_FACTORY_JNDI_NAME
public static final java.lang.String PROPERTY_KEY_INITIAL_CONTEXT_FACTORY
public static final java.lang.String PROPERTY_KEY_PROVIDER_URL
public static final java.lang.String PROPERTY_KEY_JMS_CLIENT_ID
public static final java.lang.String PROPERTY_KEY_DEFAULT_DESTINATION
public static final java.lang.String EVENT_HEADER_ATTRIBUTE_NAME_JMS_DELIVERY_MODE
public static final java.lang.String EVENT_HEADER_ATTRIBUTE_NAME_JMS_PRIORITY
public static final java.lang.String EVENT_HEADER_ATTRIBUTE_NAME_JMS_TIME_TO_LIVE
public static final java.lang.String PROPERTY_MAX_CONNECT_TIME
public static final java.lang.String PROPERTY_CONN_DELAYINTERVAL
public static final java.lang.String PROPERTY_CONN_DELAY_MULTIPLIER
Constructor Detail |
---|
public JmsPublisher()
Method Detail |
---|
public void initialize(PublisherContext context) throws PublisherException
initialize
in interface Publisher
context
- - Context in which the publisher is running.
PublisherException
- - if there is initialization error.Publisher.initialize(com.ibm.websphere.webmsg.publisher.PublisherContext)
public void close() throws PublisherException
Publisher
close
in interface Publisher
PublisherException
- If error closing publisher.Publisher.close()
public void publish(WebMessage message) throws PublisherException
publish
in interface Publisher
message
- Message to be published.
PublisherException
- If there is any error with publishing the exception.Publisher.publish(WebMessage)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |