Class ActivationSpecImpl

  • All Implemented Interfaces:
    jakarta.resource.spi.ActivationSpec, jakarta.resource.spi.ResourceAdapterAssociation, Serializable

    public class ActivationSpecImpl
    extends Object
    implements jakarta.resource.spi.ActivationSpec, jakarta.resource.spi.ResourceAdapterAssociation, Serializable
    An ActivationSpecImpl instance holds configuration information related to an endpoint deployment.
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Define serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • logger

        private static final Logger logger
      • DEBUG

        private static final boolean DEBUG
      • AUTO_ACKNOWLEDGE

        public static final String AUTO_ACKNOWLEDGE
        Value for the property acknowledgeMode defined in the MDB deployment descriptor.
        See Also:
        Constant Field Values
      • DUPS_OK_ACKNOWLEDGE

        public static final String DUPS_OK_ACKNOWLEDGE
        Value for the property acknowledgeMode defined in the MDB deployment descriptor.
        See Also:
        Constant Field Values
      • destinationType

        private String destinationType
        The type of the destination to get messages from.
      • destination

        private String destination
        The name of the destination to get messages from.
      • userName

        private String userName
        User identification.
      • password

        private String password
        User password.
      • identityClass

        private String identityClass
        identity class name.
      • messageSelector

        private String messageSelector
        Message selector.
      • subscriptionDurability

        private String subscriptionDurability
        Subscription durability.
      • subscriptionName

        private String subscriptionName
        Durable subscription name, if any.
      • acknowledgeMode

        private String acknowledgeMode
        Acknowledgement mode.
      • maxNumberOfWorks

        private String maxNumberOfWorks
        Maximum number of work instances to be submitted (0 for infinite).
      • maxMessages

        private String maxMessages
        The maximum number of messages that can be assigned to a server session at one time Default is 10.
      • deleteDurableSubscription

        private Boolean deleteDurableSubscription
        Determine whether durable subscription must be deleted or not at close time of the InboundConsumer.

        Default is false.

      • ra

        private transient JoramAdapter ra
        Resource adapter central authority.
      • collocated

        private Boolean collocated
        true if the underlying JORAM server is collocated.
      • hostName

        private String hostName
        Host name or IP of the underlying JORAM server.
      • serverPort

        private int serverPort
        Port number of the underlying JORAM server.
      • connectingTimer

        private int connectingTimer
        Duration in seconds during which connecting is attempted (connecting might take time if the server is temporarily not reachable); the 0 value is set for connecting only once and aborting if connecting failed.
      • txPendingTimer

        private int txPendingTimer
        Duration in seconds during which a JMS transacted (non XA) session might be pending; above that duration the session is rolled back and closed; the 0 value means "no timer".
      • cnxPendingTimer

        private int cnxPendingTimer
        Period in milliseconds between two ping requests sent by the client connection to the server; if the server does not receive any ping request during more than 2 * cnxPendingTimer, the connection is considered as dead and processed as required.
      • queueMessageReadMax

        private int queueMessageReadMax
        The maximum number of messages that can be read at once from a queue. Default value is 2 in order to compensate the former subscription mechanism.
      • topicAckBufferMax

        private int topicAckBufferMax
        The maximum number of acknowledgements that can be buffered in Session.DUPS_OK_ACKNOWLEDGE mode when listening to a topic. Default is 0.
      • topicPassivationThreshold

        private int topicPassivationThreshold
        This threshold is the maximum messages number over which the subscription is passivated. Default is Integer.MAX_VALUE.
      • topicActivationThreshold

        private int topicActivationThreshold
        This threshold is the minimum messages number below which the subscription is activated. Default is 0.
    • Constructor Detail

      • ActivationSpecImpl

        public ActivationSpecImpl()
        Constructs an ActivationSpecImpl instance.
    • Method Detail

      • setCollocated

        public void setCollocated​(String collocatedServer)
      • getCollocated

        public Boolean getCollocated()
      • getHostName

        public String getHostName()
      • setHostName

        public void setHostName​(String hostName)
      • getServerPort

        public Integer getServerPort()
      • setServerPort

        public void setServerPort​(String serverPort)
      • getConnectingTimer

        public Integer getConnectingTimer()
      • setConnectingTimer

        public void setConnectingTimer​(String connectingTimer)
      • getTxPendingTimer

        public Integer getTxPendingTimer()
      • setTxPendingTimer

        public void setTxPendingTimer​(String txPendingTimer)
      • getCnxPendingTimer

        public Integer getCnxPendingTimer()
      • setCnxPendingTimer

        public void setCnxPendingTimer​(String cnxPendingTimer)
      • getQueueMessageReadMax

        public Integer getQueueMessageReadMax()
      • setQueueMessageReadMax

        public void setQueueMessageReadMax​(String queueMessageReadMax)
      • getTopicAckBufferMax

        public Integer getTopicAckBufferMax()
      • setTopicAckBufferMax

        public void setTopicAckBufferMax​(String topicAckBufferMax)
      • getTopicPassivationThreshold

        public Integer getTopicPassivationThreshold()
      • setTopicPassivationThreshold

        public void setTopicPassivationThreshold​(String topicPassivationThreshold)
      • getTopicActivationThreshold

        public Integer getTopicActivationThreshold()
      • setTopicActivationThreshold

        public void setTopicActivationThreshold​(String topicActivationThreshold)
      • getName

        public String getName()
        Returns:
        the name
      • setName

        public void setName​(String name)
        Parameters:
        name - the name to set
      • validate

        public void validate()
                      throws jakarta.resource.spi.InvalidPropertyException
        Checks if the configuration information is valid.
        Specified by:
        validate in interface jakarta.resource.spi.ActivationSpec
        Throws:
        jakarta.resource.spi.InvalidPropertyException - If a parameter is missing, incorrect, or not consistent with other parameters.
      • setResourceAdapter

        public void setResourceAdapter​(jakarta.resource.spi.ResourceAdapter ra)
                                throws jakarta.resource.ResourceException
        Sets the resource adapter central authority.
        Specified by:
        setResourceAdapter in interface jakarta.resource.spi.ResourceAdapterAssociation
        Throws:
        jakarta.resource.ResourceException
      • getResourceAdapter

        public jakarta.resource.spi.ResourceAdapter getResourceAdapter()
        Returns the resource adapter central authority instance.
        Specified by:
        getResourceAdapter in interface jakarta.resource.spi.ResourceAdapterAssociation
      • setDestinationType

        public void setDestinationType​(String destinationType)
        Sets the destination type (either "jakarta.jms.Queue" or "jakarta.jms.Topic").
      • setDestination

        public void setDestination​(String destination)
        Sets the destination name.
      • setUserName

        public void setUserName​(String userName)
        Sets the user identification.
      • setPassword

        public void setPassword​(String password)
        Sets the user password.
      • setIdentityClass

        public void setIdentityClass​(String identityClass)
        set the identity class name.
      • setMessageSelector

        public void setMessageSelector​(String messageSelector)
        Sets the message selector.
      • setSubscriptionDurability

        public void setSubscriptionDurability​(String subscriptionDurability)
        Sets the durability of the subscription.
      • setSubscriptionName

        public void setSubscriptionName​(String subscriptionName)
        Sets the name of the durable subscription.
      • setAcknowledgeMode

        public void setAcknowledgeMode​(String acknowledgeMode)
        Sets the acknowledgment mode.
      • setMaxNumberOfWorks

        public void setMaxNumberOfWorks​(String maxNumberOfWorks)
        Sets the maximum number of work instances to be submitted.
      • setMaxMessages

        public void setMaxMessages​(String maxMessages)
      • setDeleteDurableSubscription

        public void setDeleteDurableSubscription​(String deleteDurableSubscription)
        Set the deleteDurableSubscription attribute.
        Parameters:
        deleteDurableSubscription - to set deleteDurableSubscription
        See Also:
        deleteDurableSubscription
      • getDestinationType

        public String getDestinationType()
        Returns the destination type.
      • getDestination

        public String getDestination()
        Returns the destination name.
      • getUserName

        public String getUserName()
        Returns the user identification.
      • getPassword

        public String getPassword()
        Returns the user password.
      • getIdentityClass

        public String getIdentityClass()
        Returns the identity class name.
      • getMessageSelector

        public String getMessageSelector()
        Returns the message selector.
      • getSubscriptionDurability

        public String getSubscriptionDurability()
        Returns the subscription durability.
      • getSubscriptionName

        public String getSubscriptionName()
        Returns the name of the durable subscription.
      • getAcknowledgeMode

        public String getAcknowledgeMode()
        Returns the acknowledgment mode.
      • getMaxNumberOfWorks

        public String getMaxNumberOfWorks()
        Returns the maximum number of work instances to be submitted.
      • getMaxMessages

        public String getMaxMessages()
      • getDeleteDurableSubscription

        public Boolean getDeleteDurableSubscription()
        Returns the deleteDurableSubscription attribute.
        Returns:
        the DeleteDurableSubscription
        See Also:
        deleteDurableSubscription
      • setActivationSpecConfig

        public void setActivationSpecConfig​(Properties props)