|
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 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WLConnection
A WLConnection provides fields and methods that are not supported by javax.jms.Connection
.
Connection
, QueueConnection
, TopicConnection
Field Summary | |
---|---|
static String |
CLIENT_ID_POLICY_RESTRICTED Only one connection that uses this policy exists in a cluster at any given time for a particular ClientID . |
static String |
CLIENT_ID_POLICY_UNRESTRICTED Connections created using this policy can specify any ClientID , even when other restricted or unrestricted connections already use the same ClientID . |
static String |
RECONNECT_POLICY_ALL |
static String |
RECONNECT_POLICY_NONE |
static String |
RECONNECT_POLICY_PRODUCER |
static String |
SUBSCRIPTION_EXCLUSIVE All subscribers created using this connection do not share subscriptions with any other subscribers. |
static String |
SUBSCRIPTION_SHARABLE Subscribers created using this connection factory can share their subscriptions with other subscribers, regardless of whether those subscribers are created using the same connection factory or a different connection factory. |
Method Summary | |
---|---|
abstract String |
getClientIDPolicy() The ClientIdPolicy on this connection. |
abstract long |
getReconnectBlockingMillis() The maximum length of time that any synchronous JMS calls block the calling thread before giving up on a JMS client reconnect in progress. |
abstract String |
getReconnectPolicy() The JMS client reconnection policy after a lost network connection with a server or upon a server reboot. |
abstract String |
getSubscriptionSharingPolicy() The SubscriptionSharingPolicy on this connection. |
abstract long |
getTotalReconnectPeriodMillis() The maximum length of time that JMS client operations continue to try to reconnect to the server. |
abstract void |
setClientID(String clientID, String clientIDPolicy) Sets the ClientID and ClientIdPolicy on the connection. |
abstract void |
setReconnectBlockingMillis(long timeout) Sets the maximum length of time that any synchronous JMS calls, such as a producer.send() , consumer.receive() , or session.createBrowser() , will block the calling thread before giving up on a JMS client reconnect in progress. |
abstract void |
setReconnectPolicy(String reconnectPolicy) Sets the JMS client reconnection policy after a lost network connection with a server or upon a server reboot. |
abstract void |
setSubscriptionSharingPolicy(String subscriptionSharingPolicy) Sets the SubscriptionSharingPolicy on this connection. |
abstract void |
setTotalReconnectPeriodMillis(long timeout) Sets the maximum length of time that JMS client operations continue to try to reconnect to the server after either the initial network disconnect or the last synchronous call attempt, whichever occurred most recently, before giving up retrying. |
Methods inherited from interface javax.jms.QueueConnection |
---|
createConnectionConsumer, createQueueSession |
Methods inherited from interface javax.jms.Connection |
---|
close, createConnectionConsumer, createSession, createSession, createSession, createSharedConnectionConsumer, createSharedDurableConnectionConsumer, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop |
Methods inherited from interface javax.jms.TopicConnection |
---|
createConnectionConsumer, createDurableConnectionConsumer, createTopicSession |
Methods inherited from interface javax.jms.Connection |
---|
close, createConnectionConsumer, createSession, createSession, createSession, createSharedConnectionConsumer, createSharedDurableConnectionConsumer, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop |
Field Detail |
---|
static final String RECONNECT_POLICY_NONE
WLConnection.setReconnectPolicy(java.lang.String)
, WLConnection.getReconnectPolicy()
static final String RECONNECT_POLICY_PRODUCER
WLConnection.setReconnectPolicy(java.lang.String)
, WLConnection.getReconnectPolicy()
static final String RECONNECT_POLICY_ALL
WLConnection.setReconnectPolicy(java.lang.String)
, WLConnection.getReconnectPolicy()
static final String CLIENT_ID_POLICY_RESTRICTED
ClientID
.
WLConnection.getClientIDPolicy()
, WLConnection.setClientID(String,String)
static final String CLIENT_ID_POLICY_UNRESTRICTED
ClientID
, even when other restricted or unrestricted connections already use the same ClientID
.
WLConnection.getClientIDPolicy()
, WLConnection.setClientID(String,String)
static final String SUBSCRIPTION_EXCLUSIVE
WLConnection.getSubscriptionSharingPolicy()
, WLConnection.setSubscriptionSharingPolicy(java.lang.String)
static final String SUBSCRIPTION_SHARABLE
WLConnection.getSubscriptionSharingPolicy()
, WLConnection.setSubscriptionSharingPolicy(java.lang.String)
Method Detail |
---|
void setReconnectPolicy(String reconnectPolicy) throws IllegalArgumentException
Sets the JMS client reconnection policy after a lost network connection with a server or upon a server reboot.
weblogic.jms.extensions.WLConnection.RECONNECT_POLICY_NONE
-- Prevents reconnection attempts.weblogic.jms.extensions.WLConnection.RECONNECT_POLICY_PRODUCER
-- Explicitly refreshes Producer objects and implicitly refreshes any related Session and Connection objects. However, this value does not refresh Consumers, QueueBrowsers, and Connections with a configured ClientID for a durable subscriber.weblogic.jms.extensions.WLConnection.RECONNECT_POLICY_ALL
-- Explicitly refreshes all Consumer and Producer objects and implicitly refreshes any related Session and Connection objects. However, this value does not refresh QueueBrowsers and Connections with a configured ClientID for a durable subscriber.reconnectPolicy
- reconnectPolicy is the new reconnect policy.IllegalArgumentException
- when the argument is not: weblogic.jms.extensions.WLConnection.RECONNECT_POLICY_NONE weblogic.jms.extensions.WLConnection.RECONNECT_POLICY_PRODUCER weblogic.jms.extensions.WLConnection.RECONNECT_POLICY_ALLWLConnection.getReconnectPolicy()
, WLConnection.RECONNECT_POLICY_NONE
, WLConnection.RECONNECT_POLICY_PRODUCER
, WLConnection.RECONNECT_POLICY_ALL
, WLMessage.getJMSRedeliveryLimit()
String getReconnectPolicy()
WLConnection.setReconnectPolicy(java.lang.String)
void setReconnectBlockingMillis(long timeout) throws IllegalArgumentException
Sets the maximum length of time that any synchronous JMS calls, such as a producer.send()
, consumer.receive()
, or session.createBrowser()
, will block the calling thread before giving up on a JMS client reconnect in progress.
timeout
- The number of milliseconds JMS operations will wait trying to reconnect to a disconnected server before throwing a JMSException.
When the timeout is zero, the reconnect starts but this call does not block waiting for the reconnected objects.
When the timeout is -1, the call blocks as long as reconnects are possible. For example, send() can block until close() is called, and send() will throw a JMSException.
IllegalArgumentExcaption
- is thrown when timeout is less than -1.IllegalArgumentException
WLConnection.getReconnectBlockingMillis()
long getReconnectBlockingMillis()
The maximum length of time that any synchronous JMS calls block the calling thread before giving up on a JMS client reconnect in progress.
WLConnection.setReconnectBlockingMillis(long)
void setTotalReconnectPeriodMillis(long timeout) throws IllegalArgumentException
Sets the maximum length of time that JMS client operations continue to try to reconnect to the server after either the initial network disconnect or the last synchronous call attempt, whichever occurred most recently, before giving up retrying.
timeout
- The number of milliseconds that JMS reconnect timers are permitted to reconnect a disconnected server.
When the timeout is -1, there is no limit. Reconnection timers are always scheduled until close() is called.
IllegalArgumentExcaption
- is thrown when timeout is less than -1.IllegalArgumentException
WLConnection.getTotalReconnectPeriodMillis()
long getTotalReconnectPeriodMillis()
The maximum length of time that JMS client operations continue to try to reconnect to the server.
WLConnection.setTotalReconnectPeriodMillis(long)
void setClientID(String clientID, String clientIDPolicy) throws JMSException, IllegalArgumentException
The ClientID and ClientIdPolicy can be set administratively through the connection factory. If a client sets the ClientID explicitly, it must do so immediately after it creates the connection and before any other action on the connection is taken. After this point, setting the ClientID throws an IllegalStateException
. If the ClientID is specified on the connection factory, an attempt to use this setter to change it throws IllegalStateException
. If the ClientIdPolicy is specified on the connection factory without a ClientID, calling this setter with a ClientID and a different ClientIdPolicy overrides the policy as well as sets the ClientID.
Note: A durable subscription that is created using a Unrestricted client ID can only be unsubscribed using WLSession.unsubscribe(String name, Topic topic) method. An attempt of unsubscribing such a subscription using standard javax.jms.Session.unsubscribe(String name) will get an InvalidDestinationException
.
clientID
- the ClientID to be setclientIDPolicy
- the ClientIdPolicy to be setJMSException
- if the JMS provider fails to set the client ID for this connection due to some internal error.IllegalStateException
- if the JMS client attempts to set a connection's client ID at the wrong time or when it has been administratively configured.InvalidClientIDException
- if the JMS client specifies an invalid or duplicate client ID using the RESTRICTED policy.IllegalArgumentException
- if the policy is not valid.WLConnection.getClientIDPolicy()
, WLConnection.CLIENT_ID_POLICY_RESTRICTED
, WLConnection.CLIENT_ID_POLICY_UNRESTRICTED
String getClientIDPolicy()
WLConnection.setClientID(String,String)
, WLConnection.CLIENT_ID_POLICY_RESTRICTED
, WLConnection.CLIENT_ID_POLICY_UNRESTRICTED
String getSubscriptionSharingPolicy()
WLConnection.setSubscriptionSharingPolicy(java.lang.String)
, WLConnection.SUBSCRIPTION_EXCLUSIVE
, WLConnection.SUBSCRIPTION_SHARABLE
void setSubscriptionSharingPolicy(String subscriptionSharingPolicy) throws JMSException, IllegalArgumentException
subscriptionSharingPolicy
- new subscription sharing policy to be set.JMSException
- if the JMS provider fails to set the Subsrciption Sharing Policy for this connection due to some internal error.IllegalArgumentException
- if the policy is not validWLConnection.SUBSCRIPTION_EXCLUSIVE
, WLConnection.SUBSCRIPTION_SHARABLE
, WLConnection.getSubscriptionSharingPolicy()
|
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 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |