Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09


weblogic.jms.extensions
Interface WLJMSProducer

All Superinterfaces:
JMSProducer

public interface WLJMSProducer
extends JMSProducer

A WLJMSProducer provides methods not supported by javax.jms.JMSProducer.

WLJMSProducer provide methods for the following:

See Also:
JMSProducer

Method Summary
abstract  WLJMSProducer forward(Destination destination, Message message)
          Forwards a message to the specified destination, using any send options, message properties and message headers that have been defined on this JMSProducer.
abstract  int getCompressionThreshold()
           The number of bytes for the serialized message body so any message that exceeds this limit will trigger message compression when the message is sent using this JMSProducer.
abstract  int getRedeliveryLimit()
          Get the redelivery limit for the producer.
abstract  long getSendTimeout()
          Get the send timeout for the producer.
abstract  String getUnitOfOrder()
          Get the Unit-of-Order name associated with the producer.
abstract  WLJMSProducer setCompressionThreshold(int limit)
           The number of bytes for the serialized message body so any message that exceeds this limit will trigger message compression when the message is sent using this JMSProducer.
abstract  WLJMSProducer setRedeliveryLimit(int redeliveryLimit)
          Set the redelivery limit for the producer.
abstract  WLJMSProducer setSendTimeout(long sendTimeout)
          Set the send timeout for the producer.
abstract  WLJMSProducer setUnitOfOrder()
          Set the Unit-of-Order for this producer with a system-generated name.
abstract  WLJMSProducer setUnitOfOrder(String name)
          Set the Unit-of-Order name for this producer.

 

Methods inherited from interface javax.jms.JMSProducer
clearProperties, getAsync, getBooleanProperty, getByteProperty, getDeliveryDelay, getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSReplyTo, getJMSType, getLongProperty, getObjectProperty, getPriority, getPropertyNames, getShortProperty, getStringProperty, getTimeToLive, propertyExists, send, send, send, send, send, setAsync, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSReplyTo, setJMSType, setPriority, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTimeToLive

 

Method Detail

getRedeliveryLimit

int getRedeliveryLimit()
Get the redelivery limit for the producer. This is the number of times a message will be redelivered after a recover or rollback. When this limit is reached, the message is moved to the error destination if one is configured; otherwise, the message is deleted. This limit may be overridden by a configured redelivery limit for the entire destination.
Returns:
The number of times to redeliver the message
Throws:
JMSRuntimeException - if a JMS error occurs.
See Also:
WLMessage.getJMSRedeliveryLimit(), WLMessage.setJMSRedeliveryLimit(int)

setRedeliveryLimit

WLJMSProducer setRedeliveryLimit(int redeliveryLimit)
Set the redelivery limit for the producer. This is the number of times a message will be redelivered after a recover or rollback. When this limit is reached, the message is moved to the error destination if one is configured, otherwise, the message is deleted. This limit may be overridden by a configured redelivery limit for the entire destination. A redelivery limit of -1 (the default) implies that there is no redelivery limit unless a limit is specified on the destination.
Parameters:
redeliveryLimit - the number of times to redeliver the message
Returns:
this WLJMSProducer
Throws:
JMSRuntimeException - if a JMS error occurs.
See Also:
WLMessage.getJMSRedeliveryLimit(), WLMessage.setJMSRedeliveryLimit(int)

getSendTimeout

long getSendTimeout()
Get the send timeout for the producer. This is the maximum time the producer will wait (in milliseconds) for space when sending a message. The default value is configurable on the connection factory used to create this producer.
Returns:
the send timeout in milliseconds
Throws:
JMSRuntimeException - if a JMS error occurs.

setSendTimeout

WLJMSProducer setSendTimeout(long sendTimeout)
Set the send timeout for the producer. This is the maximum time the producer will wait (in milliseconds) for space when sending a message. The default value is configurable on the connection factory used to create this producer.
Parameters:
sendTimeout - the send timeout in milliseconds
Returns:
this WLJMSProducer
Throws:
JMSRuntimeException - if a JMS error occurs.

getUnitOfOrder

String getUnitOfOrder()
Get the Unit-of-Order name associated with the producer.
Returns:
the unit of order name or null if none is associated with the producer.
Throws:
JMSRuntimeException - if a JMS error occurs.

setUnitOfOrder

WLJMSProducer setUnitOfOrder(String name)
Set the Unit-of-Order name for this producer. When name is null, there is no Unit-of-Order. Messages will be produced with this name attached. This makes sure that messages belonging to the same unit will be processed sequentially by consumers. A producer can have a default value which is configurable on the connection factory used to create this producer.
Parameters:
name - the name or null if none is to be used.
Returns:
this WLJMSProducer
Throws:
JMSRuntimeException - if a JMS error occurs.
UnsupportedOperationException - if the frontend is older than 9.0 (diablo)

setUnitOfOrder

WLJMSProducer setUnitOfOrder()
Set the Unit-of-Order for this producer with a system-generated name. This method is used when the application does not require a specific name for the unit of order crated by this producer. The system creates a statistically unique name for the unit of order.
Returns:
this WLJMSProducer
Throws:
JMSException - if a JMS error occurs.
UnsupportedOperationException - if the frontend is older than 9.0 (diablo)

forward

WLJMSProducer forward(Destination destination,
                      Message message)
Forwards a message to the specified destination, using any send options, message properties and message headers that have been defined on this JMSProducer. The forwarded message will have the same JMSMessageID, JMSTimestamp and JMSXUserID as the message before forwarding.

Forwarding a newly created message causes a JMSRuntimeException to be thrown. The forward() method can only be used on unmodified received messages.

Forwarding a message asynchronously is not supported

Parameters:
destination - - the destination to forward this message to
message - - the message to forward
Returns:
this WLJMSProducer
Throws:
JMSRuntimeException - - if the JMS provider fails to forward the message due to some internal error or the message is not forwardable.
MessageFormatRuntimeException - - if an invalid message is specified.
InvalidDestinationRuntimeException - - if an invalid destination is specified.
UnsupportedOperationException - - if this method is called on a JMSProducer object whose setAsync method has previously been used to specify that messages should be sent synchronously.

setCompressionThreshold

WLJMSProducer setCompressionThreshold(int limit)

The number of bytes for the serialized message body so any message that exceeds this limit will trigger message compression when the message is sent using this JMSProducer.

The compression occurs on the JMS message producer's JVM if the JMS message producer's JVM is not colocated with the JMS provider's JVM and if the message body size exceeds the threshold limit.

The compression threshold value can be set to zero or higher. Setting it to zero will cause every message body to be compressed, except when messages are sent to a prior WebLogic Server release that doesn't support this feature.

Parameters:
limit - - minimum of the serialized message body size to trigger the compression.
Returns:
this WLJMSProducer
Throws:
JMSRuntimeException - - if an error occurs

getCompressionThreshold

int getCompressionThreshold()

The number of bytes for the serialized message body so any message that exceeds this limit will trigger message compression when the message is sent using this JMSProducer.

The compression occurs on the JMS message producer's JVM if the JMS message producer's JVM is not colocated with the JMS provider's JVM and if the message body size exceeds the threshold limit.

The compression threshold value can be set to zero or higher. Setting it to zero will cause every message body to be compressed, except when messages are sent to a prior WebLogic Server release that doesn't support this feature.

Returns:
The compression threshold for this message producer.

Skip navigation links

Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09