5.3. ServerPeer methods
The following methods are available for the ServerPeer managed bean:
- deployQueue
- Used to programmatically deploy a queue. If the queue exists but is undeployed, it will be deployed. Otherwise, it is created and deployed.The
name
parameter matches a destination to deploy.The optionaljndiName
parameter represents the full JNDI name of the location to which a destination will be bound. If this is not specified, the destination will be bound in<DefaultQueueJNDIContext>/<name>
.There are two overloaded versions of this operation. The first deploys the destination with default paging parameters. The second deploys the destination with the paging parameters specified. For more information about paging parameters, refer to Section 5.9, “Configuring Destinations”. - undeployQueue
- Used to programmatically undeploy a queue. Queues are not removed from persistent storage. This operation returns
true
if the queue is successfully undeployed. Otherwise, it returnsfalse
. - destroyQueue
- Used to programmatically destroy a queue. Queues are undeployed and all of their data is removed from the database and destroyed.
Warning
Exercise caution when using this method, since it will delete all data for the queue.This operation returnstrue
if the queue was destroyed successfully. Otherwise, it returnsfalse
. - deployTopic
- Used to programmatically deploy a topic. There are two overloaded versions of this operation. The first deploys already existing topics with the default paging parameters. The second creates and deploys topics with specified paging parameters. For more information about destinations, refer to Section 5.9, “Configuring Destinations”.The
name
parameter represents the name of the destination to deploy.ThejndiName
represents the full JNDI name of the location to which the destination will be bound. If this is not specified, the destination will be bound in<DefaultTopicJNDIContext>/<name>
. - undeployTopic
- Used to programmatically undeploy a topic. Topics are undeployed, but not removed from persistent storage. This operation returns
true
if the topic is undeployed successfully. Otherwise,false
is returned. - destroyTopic
- Used to programmatically destroy a topic. Topics are undeployed and all data is removed from the database and destroyed. This operation returns
true
if the topic is successfully destroyed. Otherwise, it returnsfalse
.Warning
Exercise caution when using this method: it will delete all data for the topic. - listMessageCountersHTML
- Returns message counters in a simply-displayed HTML format.
- resetAllMesageCounters
- Resets all message counters to zero.
- enableMessageCounters
- Enables all message counters for all destinations. Message counters are disabled by default.
- disableMessageCounters
- Disables all message counters for all destinations. Message counters are disabled by default.
- retrievePreparedTransactions
- Retrieves a list of the XIDs for all transactions currently in a prepared state on the node.
- showPreparedTransactions
- Retrieves a list of the XIDs for all transactions currently in a prepared state on the node in an easily-displayed HTML format.
- listAllPreparedTransactions
- Displays the details of all prepared transactions.
- listPreparedTransactions
- Displays the details of all prepared transactions where the transaction ages are equal to or older than a specified time.
- showMessageDetails
- Displays the details of a message. The message ID is used to specify the message to display.
- commitPreparedTransaction
- Manually commit a prepared transaction. The transaction ID is used to specify the transaction to commit.
- rollbackPreparedTransaction
- Manually roll-back a prepared transaction. The transaction ID is used to specify the transaction to roll-back.