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

Part Number E27170-02

weblogic.j2ee.descriptor.wl
Interface ClientParamsBean

All Superinterfaces:
SettableBean

public interface ClientParamsBean
extends SettableBean

This package provides parameters that govern JMS server behavior with regard to a client. For example, setting the client Id when using a particular connection factory.

Access limited to the following security roles:
Deployer

Method Summary
 String getAcknowledgePolicy()
          Acknowledge policy for non-transacted sessions that use the CLIENT_ACKNOWLEDGE mode.
 String getClientId()
          An optional Client ID for applications that use this JMS connection factory.
 String getClientIdPolicy()
          The Client ID Policy indicates whether more than one JMS connection can use the same Client ID.
 int getMessagesMaximum()
          The maximum number of messages that can exist for an asynchronous session and that have not yet been passed to the message listener.
 String getMulticastOverrunPolicy()
          The policy to use when the number of outstanding multicast messages reaches the value specified in MessagesMaximum and some messages must be discarded.
 long getReconnectBlockingMillis()
          The maximum length of time, in milliseconds, 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.
 String getReconnectPolicy()
          Specifies which types of JMS clients will be explicitly and implicitly refreshed after a lost network connection with a server or upon a server reboot.
 String getSubscriptionSharingPolicy()
          Specifies the subscription sharing policy on this connection.
 String getSynchronousPrefetchMode()
          Specifies whether a synchronous consumer will prefetch messages (that is, messages sent from the server to the client) in one server access.
 long getTotalReconnectPeriodMillis()
          The maximum length of time, in milliseconds, that JMS clients (particularly asynchronous consumers) will 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.
 boolean isAllowCloseInOnMessage()
          Specifies whether the connection factory creates message consumers that allow a close() method to be issued within its onMessage() method call.
 void setAcknowledgePolicy(String acknowledgePolicy)
          Sets the value of the AcknowledgePolicy attribute.
 void setAllowCloseInOnMessage(boolean allowCloseInOnMessage)
          Sets the value of the AllowCloseInOnMessage attribute.
 void setClientId(String clientId)
          Sets the value of the ClientID attribute.
 void setClientIdPolicy(String clientIdPolicy)
          Sets the value of the ClientIdPolicy attribute.
 void setMessagesMaximum(int messagesMaximum)
          Sets the value of the MessagesMaximum attribute.
 void setMulticastOverrunPolicy(String multicastOverrunPolicy)
          Sets the value of the MulticastOverrunPolicy attribute.
 void setReconnectBlockingMillis(long reconnectBlockingMillis)
          Sets the value of the ReconnectBlockingMillis attribute.
 void setReconnectPolicy(String reconnectPolicy)
          Sets the value of the ReconnectPolicy attribute.
 void setSubscriptionSharingPolicy(String subscriptionSharingPolicy)
          Sets the value of the Subscription Sharing Policy attribute.
 void setSynchronousPrefetchMode(String prefetchMode)
          Sets the value of the SynchronousPrefetchMode attribute.
 void setTotalReconnectPeriodMillis(long totalReconnectPeriodMillis)
          Sets the value of the TotalReconnectPeriod attribute.
 
Methods inherited from interface weblogic.descriptor.SettableBean
isSet, unSet
 

Method Detail

getClientId

String getClientId()

An optional Client ID for applications that use this JMS connection factory. If the Client ID Policy is set to Restricted (the default), then configuring a Client ID on the connection factory prevents more than one JMS client from using a connection from this factory.

This attribute is rarely configured and should normally be left at the default (blank), as JMS application programs can set their Client IDs dynamically using the standard JMS API javax.jms.Connection.setClientID(), and JMS application message processing containers (such as MDBs) normally make the Client ID configurable as part of container configuration.

This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

Returns:
The clientId value
Changes take effect after you redeploy the module or restart the server.

setClientId

void setClientId(String clientId)
                 throws IllegalArgumentException

Sets the value of the ClientID attribute.

Parameters:
clientId - The client id that new connections should have
Throws:
IllegalArgumentException
See Also:
ClientParamsBean.getClientId()
Changes take effect after you redeploy the module or restart the server.

getClientIdPolicy

String getClientIdPolicy()

The Client ID Policy indicates whether more than one JMS connection can use the same Client ID.

The valid values are:

  • CLIENT_ID_POLICY_RESTRICTED - The default. Only one connection that uses this policy can exist in a cluster at any given time for a particular Client ID (if a connection already exists with a given Client ID, attempts to create new connections using this policy with the same Client ID fail with an exception).
  • CLIENT_ID_POLICY_UNRESTRICTED - Connections created using this policy can specify any Client ID, even when other restricted or unrestricted connections already use the same Client ID. The Unrestricted Client ID capability was added in WebLogic 10.3.4 (11gR1PS3).
  • Notes:

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    The clientIdPolicy value
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.CLIENT_ID_POLICY_RESTRICTED

    setClientIdPolicy

    void setClientIdPolicy(String clientIdPolicy)
                           throws IllegalArgumentException

    Sets the value of the ClientIdPolicy attribute.

    Parameters:
    clientIdPolicy - The client id policy
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.getClientIdPolicy()
    Changes take effect after you redeploy the module or restart the server.
    Valid Values:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.CLIENT_ID_POLICY_RESTRICTED,weblogic.j2ee.descriptor.wl.constants.JMSConstants.CLIENT_ID_POLICY_UNRESTRICTED

    getSubscriptionSharingPolicy

    String getSubscriptionSharingPolicy()

    Specifies the subscription sharing policy on this connection. Although this attribute is dynamic, the new values only take effect on future connections and have no impact to existing connections created before the value was changed.

    The valid values are:

    Notes:

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    The Subscription Sharing Policy value
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.SUBSCRIPTION_EXCLUSIVE

    setSubscriptionSharingPolicy

    void setSubscriptionSharingPolicy(String subscriptionSharingPolicy)
                                      throws IllegalArgumentException

    Sets the value of the Subscription Sharing Policy attribute.

    Parameters:
    subscriptionSharingPolicy - policy of how subscription is shared between distributed topic members
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.getSubscriptionSharingPolicy()
    Changes take effect after you redeploy the module or restart the server.
    Valid Values:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.SUBSCRIPTION_EXCLUSIVE,weblogic.j2ee.descriptor.wl.constants.JMSConstants.SUBSCRIPTION_SHARABLE

    getAcknowledgePolicy

    String getAcknowledgePolicy()

    Acknowledge policy for non-transacted sessions that use the CLIENT_ACKNOWLEDGE mode. All indicates that calling acknowledge on a message acknowledges all unacknowledged messages received on the session. Previous specifies that calling acknowledge on a message acknowledges only unacknowledged messages up to, and including, the given message.

    This parameter works around a change in the JMS specification and only applies to implementations that use the CLIENT_ACKNOWLEDGE acknowledge mode for a non-transacted session. Specifically, the specification allowed users to acknowledge all messages before and including the message being acknowledged. The specification was changed so that acknowledging any message acknowledges all messages ever received (even those received after the message being acknowledge).

    ACKNOWLEDGE_PREVIOUS retains the old behavior (acknowledge all message up to and including the message being acknowledged). Whereas, ACKNOWLEDGE_ALL yields the new behavior, where all messages received by the given session are acknowledged regardless of which message is being used to effect the acknowledge.

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    The acknowledgePolicy value
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.ACKNOWLEDGE_ALL

    setAcknowledgePolicy

    void setAcknowledgePolicy(String acknowledgePolicy)
                              throws IllegalArgumentException
    Sets the value of the AcknowledgePolicy attribute.

    Parameters:
    acknowledgePolicy - The policy that should be used for all new connections
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.getAcknowledgePolicy()
    Changes take effect after you redeploy the module or restart the server.
    Valid Values:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.ACKNOWLEDGE_ALL,weblogic.j2ee.descriptor.wl.constants.JMSConstants.ACKNOWLEDGE_PREVIOUS

    isAllowCloseInOnMessage

    boolean isAllowCloseInOnMessage()

    Specifies whether the connection factory creates message consumers that allow a close() method to be issued within its onMessage() method call.

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    The allowCloseInOnMessage value
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    true

    setAllowCloseInOnMessage

    void setAllowCloseInOnMessage(boolean allowCloseInOnMessage)
                                  throws IllegalArgumentException

    Sets the value of the AllowCloseInOnMessage attribute.

    Parameters:
    allowCloseInOnMessage - true if close is allowable in the onMessage routine, false otherwise
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.isAllowCloseInOnMessage()
    Changes take effect after you redeploy the module or restart the server.

    getMessagesMaximum

    int getMessagesMaximum()

    The maximum number of messages that can exist for an asynchronous session and that have not yet been passed to the message listener. When the Synchronous Prefetch Mode is enabled, this value also affects synchronous sessions with a message consumer that will prefetch messages in one server access.

    A value of -1 indicates that there is no limit on the number of messages. In this case, however, the limit is set to the amount of remaining virtual memory.

    When the number of messages reaches the MessagesMaximum value:

    For multicast sessions, when a connection is stopped, messages will continue to be delivered, but only until the MessagesMaximum value is reached. Once this value is reached, messages will be discarded based on the Overrun policy.

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    The MessagesMaximum value
    See Also:
    ClientParamsBean.getSynchronousPrefetchMode()
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    10

    setMessagesMaximum

    void setMessagesMaximum(int messagesMaximum)
                            throws IllegalArgumentException

    Sets the value of the MessagesMaximum attribute.

    Parameters:
    messagesMaximum - The maximum messages for an asynchronous session on new connections
    Throws:
    IllegalArgumentException
    See Also:
    messagesMaximum The new messagesMaximum value
    Changes take effect after you redeploy the module or restart the server.

    getMulticastOverrunPolicy

    String getMulticastOverrunPolicy()

    The policy to use when the number of outstanding multicast messages reaches the value specified in MessagesMaximum and some messages must be discarded.

    Message age is defined by the order of receipt, not by the JMSTimestamp value.

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    The overrunPolicy value
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.KEEP_OLD

    setMulticastOverrunPolicy

    void setMulticastOverrunPolicy(String multicastOverrunPolicy)
                                   throws IllegalArgumentException

    Sets the value of the MulticastOverrunPolicy attribute.

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Parameters:
    multicastOverrunPolicy - The new overrunPolicy value
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.getMulticastOverrunPolicy()
    Changes take effect after you redeploy the module or restart the server.
    Valid Values:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.KEEP_OLD, weblogic.j2ee.descriptor.wl.constants.JMSConstants.KEEP_NEW

    setSynchronousPrefetchMode

    void setSynchronousPrefetchMode(String prefetchMode)
                                    throws IllegalArgumentException

    Sets the value of the SynchronousPrefetchMode attribute.

    Parameters:
    prefetchMode -
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.getSynchronousPrefetchMode()
    Changes take effect after you redeploy the module or restart the server.

    getSynchronousPrefetchMode

    String getSynchronousPrefetchMode()

    Specifies whether a synchronous consumer will prefetch messages (that is, messages sent from the server to the client) in one server access.

    Synchronous message prefetching does not support the following conditions, and will throw a JMS Exception when encountered:

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.DISABLED, weblogic.j2ee.descriptor.wl.constants.JMSConstants.ENABLED, or weblogic.j2ee.descriptor.wl.constants.JMSConstants.TOPIC_SUBSCRIBER_ONLY
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.DISABLED

    setReconnectPolicy

    void setReconnectPolicy(String reconnectPolicy)
                            throws IllegalArgumentException

    Sets the value of the ReconnectPolicy attribute.

    Parameters:
    reconnectPolicy -
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.getReconnectPolicy()
    Changes take effect after you redeploy the module or restart the server.

    getReconnectPolicy

    String getReconnectPolicy()

    Specifies which types of JMS clients will be explicitly and implicitly refreshed after a lost network connection with a server or upon a server reboot. For example, selecting the Producers option will explicitly refresh JMS Producers and implicitly refresh any related Session and Connection clients.

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.RECONNECT_POLICY_PRODUCER, weblogic.j2ee.descriptor.wl.constants.JMSConstants.RECONNECT_POLICY_NONE, weblogic.j2ee.descriptor.wl.constants.JMSConstants.RECONNECT_POLICY_ALL
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.RECONNECT_POLICY_PRODUCER

    setReconnectBlockingMillis

    void setReconnectBlockingMillis(long reconnectBlockingMillis)
                                    throws IllegalArgumentException

    Sets the value of the ReconnectBlockingMillis attribute.

    Parameters:
    reconnectBlockingMillis - must be non-negative
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.getReconnectBlockingMillis()
    Changes take effect after you redeploy the module or restart the server.

    getReconnectBlockingMillis

    long getReconnectBlockingMillis()

    The maximum length of time, in milliseconds, 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.

    This attribute is effective only if the Reconnect Policy option is set to either Producers or All. A value of 0 will cause synchronous JMS calls to not wait for any reconnect in progress; a value of -1 will cause an infinite wait for a reconnect.

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    the effective value of the ReconnectBlockingMillis attribute
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.DEFAULT_RECONNECT_BLOCKING_MILLIS

    setTotalReconnectPeriodMillis

    void setTotalReconnectPeriodMillis(long totalReconnectPeriodMillis)
                                       throws IllegalArgumentException

    Sets the value of the TotalReconnectPeriod attribute.

    Parameters:
    totalReconnectPeriodMillis - must be non-negative
    Throws:
    IllegalArgumentException
    See Also:
    ClientParamsBean.getTotalReconnectPeriodMillis()
    Changes take effect after you redeploy the module or restart the server.

    getTotalReconnectPeriodMillis

    long getTotalReconnectPeriodMillis()

    The maximum length of time, in milliseconds, that JMS clients (particularly asynchronous consumers) will 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.

    This attribute is effective only if the ReconnectPolicy attribute is set to either Producers or All. The default value of -1 means that that it will keep trying to reconnect indefinitely; a value of 0 means that there would be exactly one retry attempt.

    This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

    Returns:
    the effective value of the TotalReconnectPeriod attribute
    Changes take effect after you redeploy the module or restart the server.
    Default Value:
    weblogic.j2ee.descriptor.wl.constants.JMSConstants.DEFAULT_TOTAL_RECONNECT_PERIOD

    Copyright 1996, 2013, 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.1.2)

    Part Number E27170-02