Class ActivationSpecImpl
- java.lang.Object
-
- org.objectweb.joram.client.connector.ActivationSpecImpl
-
- All Implemented Interfaces:
Serializable,ActivationSpec,ResourceAdapterAssociation
public class ActivationSpecImpl extends Object implements ActivationSpec, ResourceAdapterAssociation, Serializable
AnActivationSpecImplinstance holds configuration information related to an endpoint deployment.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private StringacknowledgeModeAcknowledgement mode.static StringAUTO_ACKNOWLEDGEValue for the propertyacknowledgeModedefined in the MDB deployment descriptor.private intcnxPendingTimerPeriod 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.private Booleancollocatedtrueif the underlying JORAM server is collocated.private intconnectingTimerDuration 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.private static booleanDEBUGprivate BooleandeleteDurableSubscriptionDetermine whether durable subscription must be deleted or not at close time of the InboundConsumer.private StringdestinationThe name of the destination to get messages from.private StringdestinationTypeThe type of the destination to get messages from.static StringDUPS_OK_ACKNOWLEDGEValue for the propertyacknowledgeModedefined in the MDB deployment descriptor.private StringhostNameHost name or IP of the underlying JORAM server.private StringidentityClassidentity class name.private static Loggerloggerprivate StringmaxMessagesThe maximum number of messages that can be assigned to a server session at one time Default is 10.private StringmaxNumberOfWorksMaximum number of work instances to be submitted (0 for infinite).private StringmessageSelectorMessage selector.private Stringnameprivate StringpasswordUser password.private intqueueMessageReadMaxThe maximum number of messages that can be read at once from a queue.private JoramAdapterraResource adapter central authority.private static longserialVersionUIDDefine serialVersionUID for interoperability.private intserverPortPort number of the underlying JORAM server.private StringsubscriptionDurabilitySubscription durability.private StringsubscriptionNameDurable subscription name, if any.private inttopicAckBufferMaxThe maximum number of acknowledgements that can be buffered in Session.DUPS_OK_ACKNOWLEDGE mode when listening to a topic.private inttopicActivationThresholdThis threshold is the minimum messages number below which the subscription is activated.private inttopicPassivationThresholdThis threshold is the maximum messages number over which the subscription is passivated.private inttxPendingTimerDuration 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".private StringuserNameUser identification.
-
Constructor Summary
Constructors Constructor Description ActivationSpecImpl()Constructs anActivationSpecImplinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAcknowledgeMode()Returns the acknowledgment mode.IntegergetCnxPendingTimer()BooleangetCollocated()IntegergetConnectingTimer()BooleangetDeleteDurableSubscription()Returns the deleteDurableSubscription attribute.StringgetDestination()Returns the destination name.StringgetDestinationType()Returns the destination type.StringgetHostName()StringgetIdentityClass()Returns the identity class name.StringgetMaxMessages()StringgetMaxNumberOfWorks()Returns the maximum number of work instances to be submitted.StringgetMessageSelector()Returns the message selector.StringgetName()StringgetPassword()Returns the user password.IntegergetQueueMessageReadMax()ResourceAdaptergetResourceAdapter()Returns the resource adapter central authority instance.IntegergetServerPort()StringgetSubscriptionDurability()Returns the subscription durability.StringgetSubscriptionName()Returns the name of the durable subscription.IntegergetTopicAckBufferMax()IntegergetTopicActivationThreshold()IntegergetTopicPassivationThreshold()IntegergetTxPendingTimer()StringgetUserName()Returns the user identification.voidsetAcknowledgeMode(String acknowledgeMode)Sets the acknowledgment mode.voidsetActivationSpecConfig(Properties props)voidsetCnxPendingTimer(String cnxPendingTimer)voidsetCollocated(String collocatedServer)voidsetConnectingTimer(String connectingTimer)voidsetDeleteDurableSubscription(String deleteDurableSubscription)Set the deleteDurableSubscription attribute.voidsetDestination(String destination)Sets the destination name.voidsetDestinationType(String destinationType)Sets the destination type (either "javax.jms.Queue" or "javax.jms.Topic").voidsetHostName(String hostName)voidsetIdentityClass(String identityClass)set the identity class name.voidsetMaxMessages(String maxMessages)voidsetMaxNumberOfWorks(String maxNumberOfWorks)Sets the maximum number of work instances to be submitted.voidsetMessageSelector(String messageSelector)Sets the message selector.voidsetName(String name)voidsetPassword(String password)Sets the user password.voidsetQueueMessageReadMax(String queueMessageReadMax)voidsetResourceAdapter(ResourceAdapter ra)Sets the resource adapter central authority.voidsetServerPort(String serverPort)voidsetSubscriptionDurability(String subscriptionDurability)Sets the durability of the subscription.voidsetSubscriptionName(String subscriptionName)Sets the name of the durable subscription.voidsetTopicAckBufferMax(String topicAckBufferMax)voidsetTopicActivationThreshold(String topicActivationThreshold)voidsetTopicPassivationThreshold(String topicPassivationThreshold)voidsetTxPendingTimer(String txPendingTimer)voidsetUserName(String userName)Sets the user identification.StringtoString()voidvalidate()Checks if the configuration information is valid.
-
-
-
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 propertyacknowledgeModedefined in the MDB deployment descriptor.- See Also:
- Constant Field Values
-
DUPS_OK_ACKNOWLEDGE
public static final String DUPS_OK_ACKNOWLEDGE
Value for the propertyacknowledgeModedefined 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
trueif 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.
-
name
private String name
-
-
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 InvalidPropertyExceptionChecks if the configuration information is valid.- Specified by:
validatein interfaceActivationSpec- Throws:
InvalidPropertyException- If a parameter is missing, incorrect, or not consistent with other parameters.
-
setResourceAdapter
public void setResourceAdapter(ResourceAdapter ra) throws ResourceException
Sets the resource adapter central authority.- Specified by:
setResourceAdapterin interfaceResourceAdapterAssociation- Throws:
ResourceException
-
getResourceAdapter
public ResourceAdapter getResourceAdapter()
Returns the resource adapter central authority instance.- Specified by:
getResourceAdapterin interfaceResourceAdapterAssociation
-
setDestinationType
public void setDestinationType(String destinationType)
Sets the destination type (either "javax.jms.Queue" or "javax.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)
-
-