[jboss-cvs] JBossAS SVN: r60443 - in projects/admin-console/trunk: docs/Jms/pdf and 10 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 8 18:16:40 EST 2007
Author: chilin
Date: 2007-02-08 18:16:40 -0500 (Thu, 08 Feb 2007)
New Revision: 60443
Added:
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms5.jsp
Modified:
projects/admin-console/trunk/docs/Jms/jms_elements.xls
projects/admin-console/trunk/docs/Jms/pdf/jms_elements.pdf
projects/admin-console/trunk/docs/Jms/pdf/queue_elements.pdf
projects/admin-console/trunk/docs/Jms/pdf/topic_elements.pdf
projects/admin-console/trunk/docs/Jms/queue_elements.xls
projects/admin-console/trunk/docs/Jms/topic_elements.xls
projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jbossmq/SaveJmsAction.java
projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/DestinationForm.java
projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/JmsForm.java
projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/SaveJmsAction.java
projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Destination.java
projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Jms.java
projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Queue.java
projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Topic.java
projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/Constants.java
projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/DeploymentServiceDestinationHelper.java
projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/DeploymentServiceJmsHelper.java
projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/MBeanServerDestinationHelper.java
projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/MBeanServerJmsHelper.java
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/classes/messages/jmsmessages.properties
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/persistenceSql.properties
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/struts-config.xml
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/tiles-defs.xml
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/validation.xml
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailDestination.jsp
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailDestination2.jsp
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms.jsp
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms2.jsp
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms3.jsp
projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms4.jsp
projects/admin-console/trunk/src/test/org/jboss/admin/model/jms/DestinationTest.java
projects/admin-console/trunk/src/test/org/jboss/admin/service/jms/DeploymentServiceDestinationHelperTest.java
projects/admin-console/trunk/src/test/org/jboss/admin/service/jms/MBeanServerDestinationHelperTest.java
projects/admin-console/trunk/src/webtest/org/jboss/admin/console/webtest/JmsDestinationTestCase.java
Log:
Made changes to support JBoss Messaging 1.2.0 Beta2.
Modified: projects/admin-console/trunk/docs/Jms/jms_elements.xls
===================================================================
(Binary files differ)
Modified: projects/admin-console/trunk/docs/Jms/pdf/jms_elements.pdf
===================================================================
(Binary files differ)
Modified: projects/admin-console/trunk/docs/Jms/pdf/queue_elements.pdf
===================================================================
(Binary files differ)
Modified: projects/admin-console/trunk/docs/Jms/pdf/topic_elements.pdf
===================================================================
(Binary files differ)
Modified: projects/admin-console/trunk/docs/Jms/queue_elements.xls
===================================================================
(Binary files differ)
Modified: projects/admin-console/trunk/docs/Jms/topic_elements.xls
===================================================================
(Binary files differ)
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jbossmq/SaveJmsAction.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jbossmq/SaveJmsAction.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jbossmq/SaveJmsAction.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -283,7 +283,7 @@
/*
* Open the persistenceSql.properties file located under
- * <JBoss-server-dir>/data/jms/ directory:
+ * <JBoss-server-dir>/data/jbossmq/ directory:
*/
Properties sysProps = System.getProperties();
String dataDir = sysProps.getProperty("jboss.server.data.dir");
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/DestinationForm.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/DestinationForm.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/DestinationForm.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -33,6 +33,7 @@
import org.apache.struts.action.ActionMessages;
import org.apache.struts.validator.ValidatorForm;
import org.jboss.admin.model.jms.DestinationIdentifier;
+import org.w3c.dom.Element;
/**
* The DestinationForm type holds the form data for a single destination.
@@ -66,16 +67,41 @@
/*
* Common attributes for both queue the topic type destinations
*/
-
+
/**
- * The name of the destination
+ * The name of this destination
*/
private String name;
/**
- * The jndi binding of the destination
+ * The JNDI name
*/
private String jndiName;
+
+ /**
+ * The name of the server peer this destination was deployed on
+ */
+ private String serverPeerName;
+
+ /**
+ * The name of the post office this destination belongs to
+ */
+ private String postOfficeName;
+
+ /**
+ * The DLQ for this destination, overrides the default DLQ on the server peer
+ */
+ private String dlqName;
+
+ /**
+ * The expiry queue for this destination, overrides the default expiry queue on the server peer
+ */
+ private String expiryQueueName;
+
+ /**
+ * The delay before redelivering
+ */
+ private String redeliveryDelay;
/**
* True if this destination was created programmatically
@@ -83,9 +109,9 @@
private boolean createdProgrammatically;
/**
- * The write-cache size
+ * The maximum number of messages this destination can hold before they are dropped
*/
- private String downCacheSize;
+ private String maxSize;
/**
* The in-memory message limit
@@ -96,17 +122,27 @@
* The paging size
*/
private String pageSize;
-
+
/**
- * Security roles
+ * The write-cache size
*/
- private String securityRoles;
+ private String downCacheSize;
/**
- * The name of the server peer this destination was deployed on
+ * Is this a clustered destination?
*/
- private String serverPeerName;
+ private boolean clustered;
+
+ /**
+ * The day limit for the message counter
+ */
+ private String messageCounterHistoryDayLimit;
+ /**
+ * Security roles, a string representation of the securityConfig
+ */
+ private String securityRoles;
+
/*
* Attributes specific to Queue type
*/
@@ -115,10 +151,35 @@
* The number of messages in the queue
*/
private String messageCount;
+
+ /**
+ * The number of scheduled messages in the queue
+ */
+ private String scheduledMessageCount;
+
+ /**
+ * The number of consumers on the queue
+ */
+ private String consumerCount;
/*
* Attributes specific to Topic type
*/
+
+ /**
+ * The count of all messages in all subscriptions of this topic
+ */
+ private String allMessageCount;
+
+ /**
+ * The count of all messages in all durable subscriptions of this topic
+ */
+ private String durableMessageCount;
+
+ /**
+ * The count of all messages in all non durable subscriptions of this topic
+ */
+ private String nonDurableMessageCount;
/**
* The number of Subscriptions waiting for a message
@@ -227,6 +288,20 @@
}
/**
+ * @return Returns the clustered.
+ */
+ public boolean isClustered() {
+ return clustered;
+ }
+
+ /**
+ * @param clustered The clustered to set.
+ */
+ public void setClustered(boolean clustered) {
+ this.clustered = clustered;
+ }
+
+ /**
* @return Returns the createdProgrammatically.
*/
public boolean isCreatedProgrammatically() {
@@ -242,6 +317,20 @@
}
/**
+ * @return Returns the dlqName.
+ */
+ public String getDlqName() {
+ return dlqName;
+ }
+
+ /**
+ * @param name The dlqName to set.
+ */
+ public void setDlqName(String name) {
+ dlqName = name;
+ }
+
+ /**
* @return Returns the downCacheSize.
*/
public String getDownCacheSize() {
@@ -257,6 +346,20 @@
}
/**
+ * @return Returns the expiryQueueName.
+ */
+ public String getExpiryQueueName() {
+ return expiryQueueName;
+ }
+
+ /**
+ * @param expiryQueueName The expiryQueueName to set.
+ */
+ public void setExpiryQueueName(String expiryQueueName) {
+ this.expiryQueueName = expiryQueueName;
+ }
+
+ /**
* @return Returns the fullSize.
*/
public String getFullSize() {
@@ -272,6 +375,35 @@
}
/**
+ * @return Returns the maxSize.
+ */
+ public String getMaxSize() {
+ return maxSize;
+ }
+
+ /**
+ * @param maxSize The maxSize to set.
+ */
+ public void setMaxSize(String maxSize) {
+ this.maxSize = maxSize;
+ }
+
+ /**
+ * @return Returns the messageCounterHistoryDayLimit.
+ */
+ public String getMessageCounterHistoryDayLimit() {
+ return messageCounterHistoryDayLimit;
+ }
+
+ /**
+ * @param messageCounterHistoryDayLimit The messageCounterHistoryDayLimit to set.
+ */
+ public void setMessageCounterHistoryDayLimit(
+ String messageCounterHistoryDayLimit) {
+ this.messageCounterHistoryDayLimit = messageCounterHistoryDayLimit;
+ }
+
+ /**
* @return Returns the pageSize.
*/
public String getPageSize() {
@@ -287,6 +419,34 @@
}
/**
+ * @return Returns the postOfficeName.
+ */
+ public String getPostOfficeName() {
+ return postOfficeName;
+ }
+
+ /**
+ * @param postOfficeName The postOfficeName to set.
+ */
+ public void setPostOfficeName(String postOfficeName) {
+ this.postOfficeName = postOfficeName;
+ }
+
+ /**
+ * @return Returns the redeliveryDelay.
+ */
+ public String getRedeliveryDelay() {
+ return redeliveryDelay;
+ }
+
+ /**
+ * @param redeliveryDelay The redeliveryDelay to set.
+ */
+ public void setRedeliveryDelay(String redeliveryDelay) {
+ this.redeliveryDelay = redeliveryDelay;
+ }
+
+ /**
* @return Returns the securityRoles
*/
public String getSecurityRoles() {
@@ -330,8 +490,78 @@
public void setMessageCount(String messageCount) {
this.messageCount = messageCount;
}
+
+ /**
+ * @return Returns the scheduledMessageCount.
+ */
+ public String getScheduledMessageCount() {
+ return scheduledMessageCount;
+ }
/**
+ * @param scheduledMessageCount The scheduledMessageCount to set.
+ */
+ public void setScheduledMessageCount(String scheduledMessageCount) {
+ this.scheduledMessageCount = scheduledMessageCount;
+ }
+
+ /**
+ * @return Returns the consumerCount.
+ */
+ public String getConsumerCount() {
+ return consumerCount;
+ }
+
+ /**
+ * @param consumerCount The consumerCount to set.
+ */
+ public void setConsumerCount(String consumerCount) {
+ this.consumerCount = consumerCount;
+ }
+
+ /**
+ * @return Returns the allMessageCount.
+ */
+ public String getAllMessageCount() {
+ return allMessageCount;
+ }
+
+ /**
+ * @param allMessageCount The allMessageCount to set.
+ */
+ public void setAllMessageCount(String allMessageCount) {
+ this.allMessageCount = allMessageCount;
+ }
+
+ /**
+ * @return Returns the durableMessageCount.
+ */
+ public String getDurableMessageCount() {
+ return durableMessageCount;
+ }
+
+ /**
+ * @param durableMessageCount The durableMessageCount to set.
+ */
+ public void setDurableMessageCount(String durableMessageCount) {
+ this.durableMessageCount = durableMessageCount;
+ }
+
+ /**
+ * @return Returns the nonDurableMessageCount.
+ */
+ public String getNonDurableMessageCount() {
+ return nonDurableMessageCount;
+ }
+
+ /**
+ * @param nonDurableMessageCount The nonDurableMessageCount to set.
+ */
+ public void setNonDurableMessageCount(String nonDurableMessageCount) {
+ this.nonDurableMessageCount = nonDurableMessageCount;
+ }
+
+ /**
* @return Returns the allSubCount.
*/
public String getAllSubCount() {
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/JmsForm.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/JmsForm.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/JmsForm.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -56,47 +56,28 @@
private static final Log logger = LogFactory.getLog(JmsForm.class);
/*
- * ********** Attributes from the ConnectionFactory MBean **********
+ * ********** Attributes from the ServerPeer MBean **********
+ */
+ /**
+ * The name of the persistence manager
*/
-
+ private String persistenceManagerName;
+
/**
- * The name of the remoting connector this destination will use
+ * The name of the jms user manager mbean
*/
- private String connectorName;
-
+ private String userManagerName;
+
/**
- * The default value of paging down cache size for any temporary queues
- * created for connections from this connection factory
+ * The name of the remoting connector
*/
- private String defaultTempQueueDownCacheSize;
-
+ private String connectorName;
+
/**
- * The default value of paging full size for any temporary queues created
- * for connections from this connection factory
+ * The name of the post office mbean
*/
- private String defaultTempQueueFullSize;
+ private String postOfficeMBeanName;
- /**
- * The default value of paging page size for any temporary queues created
- * for connections from this connection factory
- */
- private String defaultTempQueuePageSize;
-
- /**
- * The maximum number of messages that will be prefetched by the client side
- * consumer
- */
- private String prefetchSize;
-
- /**
- * The name of the server peer this destination was deployed on
- */
- private String serverPeerName;
-
- /*
- * ********** Attributes from the ServerPeer MBean **********
- */
-
/**
* The default JNDI context queues are bound under
*/
@@ -123,11 +104,6 @@
private String jmsVersion;
/**
- * The name of the persistence manager
- */
- private String persistenceManagerName;
-
- /**
* The fully qualified provider version string
*/
private String providerVersion;
@@ -146,7 +122,47 @@
* The ID of the ServerPeer. Must be unique per JBoss instance
*/
private String serverPeerID;
-
+
+ /**
+ * The name of the default DLQ - used when an individual queue does not specify a DLQ
+ */
+ private String defaultDLQName;
+
+ /**
+ * The default maximum delivery attempts for destinations, unless overridden on the destination
+ */
+ private String defaultMaxDeliveryAttempts;
+
+ /**
+ * The name of the default expiry queue - used when an individual queue does not specify an expiry queue
+ */
+ private String defaultExpiryQueueName;
+
+ /**
+ * How long to wait before redelivery, can be overridden on the destination
+ */
+ private String defaultRedeliveryDelay;
+
+ /**
+ * The period between which queue statistics are obtained
+ */
+ private String queueStatsSamplePeriod;
+
+ /**
+ * The maximum amount of time to wait for failover to begin
+ */
+ private String failoverStartTimeout;
+
+ /**
+ * The maximum amount of time to wait for failover to complete
+ */
+ private String failoverCompleteTimeout;
+
+ /**
+ * The default max number of messages per day in message counter history
+ */
+ private String defaultMessageCounterHistoryDayLimit;
+
/*
* ********** Attributes from the PersistenceManager MBean **********
*/
@@ -202,17 +218,34 @@
private String userSqlProperties;
/*
- * ********** Attributes from the QueuePostOffice MBean **********
+ * ********** Attributes from the PostOffice MBean **********
*/
-
-
- /*
- * ********** Attributes from the TopicPostOffice MBean **********
- */
+ /**
+ * Should PostOffice database tables be created on startup?
+ */
+ private boolean createPostOfficeTablesOnStartup;
+ /**
+ * The JNDI name of the DataSource used by the PostOffice
+ */
+ private String postOfficeDataSource;
+
+ /**
+ * The name of the DataSource used by the PostOffice, without the JNDI prefix
+ */
+ private String postOfficeDataSourceName;
+
+ /**
+ * The sql statements used to persist the post office information.
+ */
+ private String postOfficeSqlProperties;
+
+ /**
+ * The name of the post office
+ */
+ private String postOfficeName;
-
/*
* *************** Other Attributes ********************************
*/
@@ -226,6 +259,11 @@
* Save the user dataSource name. Needed when a new dataSource is selected.
*/
private String savedUserDataSourceName;
+
+ /**
+ * Save the post office dataSource name. Needed when a new dataSource is selected.
+ */
+ private String savedPostOfficeDataSourceName;
/**
* The name and driver class of all the available dataSources.
@@ -251,7 +289,17 @@
* Save the userSqlMap. Used to check if there're any changes.
*/
private Map savedUserSqlMap = new HashMap();
+
+ /**
+ * Map storing SQL properties used by PostOffice.
+ */
+ private Map postOfficeSqlMap = new TreeMap();
+ /**
+ * Save the postOfficeSqlMap. Used to check if there're any changes.
+ */
+ private Map savedPostOfficeSqlMap = new HashMap();
+
/*
* *************** Getters and Setters *****************************
*/
@@ -271,6 +319,21 @@
}
/**
+ * @return Returns the createPostOfficeTablesOnStartup.
+ */
+ public boolean isCreatePostOfficeTablesOnStartup() {
+ return createPostOfficeTablesOnStartup;
+ }
+
+ /**
+ * @param createPostOfficeTablesOnStartup The createPostOfficeTablesOnStartup to set.
+ */
+ public void setCreatePostOfficeTablesOnStartup(
+ boolean createPostOfficeTablesOnStartup) {
+ this.createPostOfficeTablesOnStartup = createPostOfficeTablesOnStartup;
+ }
+
+ /**
* @return Returns the createUserTablesOnStartup.
*/
public boolean isCreateUserTablesOnStartup() {
@@ -313,77 +376,105 @@
}
/**
- * @return Returns the defaultQueueJNDIContext.
+ * @return Returns the defaultDLQName.
*/
- public String getDefaultQueueJNDIContext() {
- return defaultQueueJNDIContext;
+ public String getDefaultDLQName() {
+ return defaultDLQName;
}
/**
- * @param defaultQueueJNDIContext The defaultQueueJNDIContext to set.
+ * @param defaultDLQName The defaultDLQName to set.
*/
- public void setDefaultQueueJNDIContext(String defaultQueueJNDIContext) {
- this.defaultQueueJNDIContext = defaultQueueJNDIContext;
+ public void setDefaultDLQName(String defaultDLQName) {
+ this.defaultDLQName = defaultDLQName;
}
/**
- * @return Returns the defaultSecurityRoles.
+ * @return Returns the defaultExpiryQueueName.
*/
- public String getDefaultSecurityRoles() {
- return defaultSecurityRoles;
+ public String getDefaultExpiryQueueName() {
+ return defaultExpiryQueueName;
}
/**
- * @param defaultSecurityRoles The defaultSecurityRoles to set.
+ * @param defaultExpiryQueueName The defaultExpiryQueueName to set.
*/
- public void setDefaultSecurityRoles(String defaultSecurityRoles) {
- this.defaultSecurityRoles = defaultSecurityRoles;
+ public void setDefaultExpiryQueueName(String defaultExpiryQueueName) {
+ this.defaultExpiryQueueName = defaultExpiryQueueName;
}
/**
- * @return Returns the defaultTempQueueDownCacheSize.
+ * @return Returns the defaultMaxDeliveryAttempts.
*/
- public String getDefaultTempQueueDownCacheSize() {
- return defaultTempQueueDownCacheSize;
+ public String getDefaultMaxDeliveryAttempts() {
+ return defaultMaxDeliveryAttempts;
}
/**
- * @param defaultTempQueueDownCacheSize The defaultTempQueueDownCacheSize to set.
+ * @param defaultMaxDeliveryAttempts The defaultMaxDeliveryAttempts to set.
*/
- public void setDefaultTempQueueDownCacheSize(
- String defaultTempQueueDownCacheSize) {
- this.defaultTempQueueDownCacheSize = defaultTempQueueDownCacheSize;
+ public void setDefaultMaxDeliveryAttempts(String defaultMaxDeliveryAttempts) {
+ this.defaultMaxDeliveryAttempts = defaultMaxDeliveryAttempts;
}
/**
- * @return Returns the defaultTempQueueFullSize.
+ * @return Returns the defaultMessageCounterHistoryDayLimit.
*/
- public String getDefaultTempQueueFullSize() {
- return defaultTempQueueFullSize;
+ public String getDefaultMessageCounterHistoryDayLimit() {
+ return defaultMessageCounterHistoryDayLimit;
}
/**
- * @param defaultTempQueueFullSize The defaultTempQueueFullSize to set.
+ * @param defaultMessageCounterHistoryDayLimit The defaultMessageCounterHistoryDayLimit to set.
*/
- public void setDefaultTempQueueFullSize(String defaultTempQueueFullSize) {
- this.defaultTempQueueFullSize = defaultTempQueueFullSize;
+ public void setDefaultMessageCounterHistoryDayLimit(
+ String defaultMessageCounterHistoryDayLimit) {
+ this.defaultMessageCounterHistoryDayLimit = defaultMessageCounterHistoryDayLimit;
}
/**
- * @return Returns the defaultTempQueuePageSize.
+ * @return Returns the defaultQueueJNDIContext.
*/
- public String getDefaultTempQueuePageSize() {
- return defaultTempQueuePageSize;
+ public String getDefaultQueueJNDIContext() {
+ return defaultQueueJNDIContext;
}
/**
- * @param defaultTempQueuePageSize The defaultTempQueuePageSize to set.
+ * @param defaultQueueJNDIContext The defaultQueueJNDIContext to set.
*/
- public void setDefaultTempQueuePageSize(String defaultTempQueuePageSize) {
- this.defaultTempQueuePageSize = defaultTempQueuePageSize;
+ public void setDefaultQueueJNDIContext(String defaultQueueJNDIContext) {
+ this.defaultQueueJNDIContext = defaultQueueJNDIContext;
}
/**
+ * @return Returns the defaultRedeliveryDelay.
+ */
+ public String getDefaultRedeliveryDelay() {
+ return defaultRedeliveryDelay;
+ }
+
+ /**
+ * @param defaultRedeliveryDelay The defaultRedeliveryDelay to set.
+ */
+ public void setDefaultRedeliveryDelay(String defaultRedeliveryDelay) {
+ this.defaultRedeliveryDelay = defaultRedeliveryDelay;
+ }
+
+ /**
+ * @return Returns the defaultSecurityRoles.
+ */
+ public String getDefaultSecurityRoles() {
+ return defaultSecurityRoles;
+ }
+
+ /**
+ * @param defaultSecurityRoles The defaultSecurityRoles to set.
+ */
+ public void setDefaultSecurityRoles(String defaultSecurityRoles) {
+ this.defaultSecurityRoles = defaultSecurityRoles;
+ }
+
+ /**
* @return Returns the defaultTopicJNDIContext.
*/
public String getDefaultTopicJNDIContext() {
@@ -398,6 +489,34 @@
}
/**
+ * @return Returns the failoverCompleteTimeout.
+ */
+ public String getFailoverCompleteTimeout() {
+ return failoverCompleteTimeout;
+ }
+
+ /**
+ * @param failoverCompleteTimeout The failoverCompleteTimeout to set.
+ */
+ public void setFailoverCompleteTimeout(String failoverCompleteTimeout) {
+ this.failoverCompleteTimeout = failoverCompleteTimeout;
+ }
+
+ /**
+ * @return Returns the failoverStartTimeout.
+ */
+ public String getFailoverStartTimeout() {
+ return failoverStartTimeout;
+ }
+
+ /**
+ * @param failoverStartTimeout The failoverStartTimeout to set.
+ */
+ public void setFailoverStartTimeout(String failoverStartTimeout) {
+ this.failoverStartTimeout = failoverStartTimeout;
+ }
+
+ /**
* @return Returns the jmsProviderName.
*/
public String getJmsProviderName() {
@@ -496,20 +615,90 @@
}
/**
- * @return Returns the prefetchSize.
+ * @return Returns the postOfficeDataSource.
*/
- public String getPrefetchSize() {
- return prefetchSize;
+ public String getPostOfficeDataSource() {
+ return postOfficeDataSource;
}
/**
- * @param prefetchSize The prefetchSize to set.
+ * @param postOfficeDataSource The postOfficeDataSource to set.
*/
- public void setPrefetchSize(String prefetchSize) {
- this.prefetchSize = prefetchSize;
+ public void setPostOfficeDataSource(String postOfficeDataSource) {
+ this.postOfficeDataSource = postOfficeDataSource;
}
/**
+ * @return Returns the postOfficeDataSourceName.
+ */
+ public String getPostOfficeDataSourceName() {
+ return postOfficeDataSourceName;
+ }
+
+ /**
+ * @param postOfficeDataSourceName The postOfficeDataSourceName to set.
+ */
+ public void setPostOfficeDataSourceName(String postOfficeDataSourceName) {
+ this.postOfficeDataSourceName = postOfficeDataSourceName;
+ }
+
+ /**
+ * @return Returns the postOfficeMBeanName.
+ */
+ public String getPostOfficeMBeanName() {
+ return postOfficeMBeanName;
+ }
+
+ /**
+ * @param postOfficeMBeanName The postOfficeMBeanName to set.
+ */
+ public void setPostOfficeMBeanName(String postOfficeMBeanName) {
+ this.postOfficeMBeanName = postOfficeMBeanName;
+ }
+
+ /**
+ * @return Returns the postOfficeName.
+ */
+ public String getPostOfficeName() {
+ return postOfficeName;
+ }
+
+ /**
+ * @param postOfficeName The postOfficeName to set.
+ */
+ public void setPostOfficeName(String postOfficeName) {
+ this.postOfficeName = postOfficeName;
+ }
+
+ /**
+ * @return Returns the postOfficeSqlMap.
+ */
+ public Map getPostOfficeSqlMap() {
+ return postOfficeSqlMap;
+ }
+
+ /**
+ * @param postOfficeSqlMap The postOfficeSqlMap to set.
+ */
+ public void setPostOfficeSqlMap(Map postOfficeSqlMap) {
+ this.postOfficeSqlMap = postOfficeSqlMap;
+ }
+
+ /**
+ * @return Returns the postOfficeSqlProperties.
+ */
+ public String getPostOfficeSqlProperties() {
+ return postOfficeSqlProperties;
+ }
+
+ /**
+ * @param postOfficeSqlProperties The postOfficeSqlProperties to set.
+ */
+ public void setPostOfficeSqlProperties(String postOfficeSqlProperties) {
+ this.postOfficeSqlProperties = postOfficeSqlProperties;
+ }
+
+ /**
* @return Returns the providerVersion.
*/
public String getProviderVersion() {
@@ -538,6 +727,20 @@
}
/**
+ * @return Returns the queueStatsSamplePeriod.
+ */
+ public String getQueueStatsSamplePeriod() {
+ return queueStatsSamplePeriod;
+ }
+
+ /**
+ * @param queueStatsSamplePeriod The queueStatsSamplePeriod to set.
+ */
+ public void setQueueStatsSamplePeriod(String queueStatsSamplePeriod) {
+ this.queueStatsSamplePeriod = queueStatsSamplePeriod;
+ }
+
+ /**
* @return Returns the savedMsgDataSourceName.
*/
public String getSavedMsgDataSourceName() {
@@ -552,6 +755,21 @@
}
/**
+ * @return Returns the savedPostOfficeDataSourceName.
+ */
+ public String getSavedPostOfficeDataSourceName() {
+ return savedPostOfficeDataSourceName;
+ }
+
+ /**
+ * @param savedPostOfficeDataSourceName The savedPostOfficeDataSourceName to set.
+ */
+ public void setSavedPostOfficeDataSourceName(
+ String savedPostOfficeDataSourceName) {
+ this.savedPostOfficeDataSourceName = savedPostOfficeDataSourceName;
+ }
+
+ /**
* @return Returns the savedUserDataSourceName.
*/
public String getSavedUserDataSourceName() {
@@ -594,20 +812,6 @@
}
/**
- * @return Returns the serverPeerName.
- */
- public String getServerPeerName() {
- return serverPeerName;
- }
-
- /**
- * @param serverPeerName The serverPeerName to set.
- */
- public void setServerPeerName(String serverPeerName) {
- this.serverPeerName = serverPeerName;
- }
-
- /**
* @return Returns the transactionManagerName.
*/
public String getTransactionManagerName() {
@@ -692,6 +896,20 @@
}
/**
+ * @return Returns the savedPostOfficeSqlMap.
+ */
+ public Map getSavedPostOfficeSqlMap() {
+ return savedPostOfficeSqlMap;
+ }
+
+ /**
+ * @param savedPostOfficeSqlMap The savedPostOfficeSqlMap to set.
+ */
+ public void setSavedPostOfficeSqlMap(Map savedPostOfficeSqlMap) {
+ this.savedPostOfficeSqlMap = savedPostOfficeSqlMap;
+ }
+
+ /**
* @return Returns the savedUserSqlMap.
*/
public Map getSavedUserSqlMap() {
@@ -705,7 +923,21 @@
this.savedUserSqlMap = savedUserSqlMap;
}
- /*
+ /**
+ * @return Returns the userManagerName.
+ */
+ public String getUserManagerName() {
+ return userManagerName;
+ }
+
+ /**
+ * @param userManagerName The userManagerName to set.
+ */
+ public void setUserManagerName(String userManagerName) {
+ this.userManagerName = userManagerName;
+ }
+
+ /*
* ********************* Other Methods *****************************
*/
@@ -767,8 +999,31 @@
public void setMsgSqlEntry(String key, Object value) {
msgSqlMap.put(key, value);
}
+
+ /**
+ * Gets the postOfficeSqlMap entry with the specified key.
+ *
+ * @param key
+ * The key of a map entry.
+ * @return Returns the map entry with the specified key.
+ */
+ public Object getPostOfficeSqlEntry(String key) {
+ return postOfficeSqlMap.get(key);
+ }
/**
+ * Sets the postOfficeSqlMap entry with the specified key to the specified value.
+ *
+ * @param key
+ * The key of a map entry.
+ * @param value
+ * The value to be set.
+ */
+ public void setPostOfficeSqlEntry(String key, Object value) {
+ postOfficeSqlMap.put(key, value);
+ }
+
+ /**
* Gets the userSqlMap entry with the specified key.
*
* @param key
@@ -797,6 +1052,13 @@
public void clearMsgSqlMap() {
this.msgSqlMap.clear();
}
+
+ /**
+ * Clears the postOfficeSqlMap.
+ */
+ public void clearPostOfficeSqlMap() {
+ this.postOfficeSqlMap.clear();
+ }
/**
* Clears the userSqlMap.
@@ -814,6 +1076,14 @@
}
/**
+ * Saves a copy of postOfficeSqlMap into savedPostOfficeSqlMap.
+ */
+ public void savePostOfficeSqlMap() {
+ this.savedPostOfficeSqlMap.clear();
+ this.savedPostOfficeSqlMap.putAll(this.postOfficeSqlMap);
+ }
+
+ /**
* Saves a copy of userSqlMap into savedUserSqlMap.
*/
public void saveUserSqlMap() {
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/SaveJmsAction.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/SaveJmsAction.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/console/web/struts/jms/SaveJmsAction.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -94,11 +94,15 @@
if ((jmsForm.getMsgDataSourceName() != null)
&& (jmsForm.getSavedMsgDataSourceName() != null)
&& (jmsForm.getUserDataSourceName() != null)
- && (jmsForm.getSavedUserDataSourceName() != null)) {
+ && (jmsForm.getSavedUserDataSourceName() != null)
+ && (jmsForm.getPostOfficeDataSourceName() != null)
+ && (jmsForm.getSavedPostOfficeDataSourceName() != null)) {
if ((!jmsForm.getMsgDataSourceName().equals(
jmsForm.getSavedMsgDataSourceName()))
|| (!jmsForm.getUserDataSourceName().equals(
- jmsForm.getSavedUserDataSourceName())))
+ jmsForm.getSavedUserDataSourceName()))
+ || (!jmsForm.getPostOfficeDataSourceName().equals(
+ jmsForm.getSavedPostOfficeDataSourceName())))
SaveAndReloadSqlProperties(jmsForm);
}
@@ -228,8 +232,10 @@
boolean error = false;
boolean saveMsgSql = false;
boolean saveUserSql = false;
+ boolean savePOSql = false;
boolean loadMsgSqlFromFile = false;
boolean loadUserSqlFromFile = false;
+ boolean loadPOSqlFromFile = false;
boolean updatePropFile = false;
/*
@@ -237,16 +243,18 @@
*/
if (!jmsForm.getMsgSqlMap().equals(jmsForm.getSavedMsgSqlMap()))
saveMsgSql = true;
-
if (!jmsForm.getUserSqlMap().equals(jmsForm.getSavedUserSqlMap()))
saveUserSql = true;
+ if (!jmsForm.getPostOfficeSqlMap().equals(jmsForm.getSavedPostOfficeSqlMap()))
+ savePOSql = true;
- if (saveMsgSql || saveUserSql)
+ if (saveMsgSql || saveUserSql || savePOSql)
updatePropFile = true;
if (logger.isDebugEnabled()) {
logger.debug("saveMsgSql = " + saveMsgSql);
logger.debug("saveUserSql = " + saveUserSql);
+ logger.debug("savePOSql = " + savePOSql);
logger.debug("updatePropFile = " + updatePropFile);
}
@@ -278,6 +286,19 @@
logger.debug("newUserDriverClass = " + newUserDriverClass);
logger.debug("prevUserDriverClass = " + prevUserDriverClass);
}
+
+ String newPODataSource = jmsForm.getPostOfficeDataSourceName();
+ String prevPODataSource = jmsForm.getSavedPostOfficeDataSourceName();
+ String newPODriverClass = (String) jmsForm
+ .getDataSourcesEntry(newPODataSource);
+ String prevPODriverClass = (String) jmsForm
+ .getDataSourcesEntry(prevPODataSource);
+ if (logger.isDebugEnabled()) {
+ logger.debug("newPODataSource = " + newPODataSource);
+ logger.debug("prevPODataSource = " + prevPODataSource);
+ logger.debug("newPODriverClass = " + newPODriverClass);
+ logger.debug("prevPODriverClass = " + prevPODriverClass);
+ }
if ((newMsgDataSource != null) && (newMsgDriverClass != null)) {
if (!newMsgDataSource.equals(prevMsgDataSource)
@@ -298,17 +319,31 @@
loadUserSqlFromFile = true;
}
}
+
+ if ((newPODataSource != null) && (newPODriverClass != null)) {
+ if (!newPODataSource.equals(prevPODataSource)
+ && !newPODriverClass.equals(prevPODriverClass)) {
+ /*
+ * Database type changed. Setup flag:
+ */
+ loadPOSqlFromFile = true;
+ }
+ }
+
if (logger.isDebugEnabled()) {
logger.debug("loadMsgSqlFromFile = " + loadMsgSqlFromFile);
logger.debug("loadUserSqlFromFile = " + loadUserSqlFromFile);
+ logger.debug("loadPOSqlFromFile = " + loadPOSqlFromFile);
}
- if (updatePropFile || loadMsgSqlFromFile || loadUserSqlFromFile) {
+ if (updatePropFile || loadMsgSqlFromFile || loadUserSqlFromFile || loadPOSqlFromFile) {
final String DEFAULT_DB = "default";
final String MSG_NODE = ".msg.";
final String USER_NODE = ".user.";
+ final String PO_NODE = ".po.";
final String MSG_PERSIST = "message";
final String USER_PERSIST = "user";
+ final String PO_PERSIST = "post office";
File inFile = null;
File outFile = null;
@@ -317,19 +352,22 @@
String line = "";
String newMsgDbType = DEFAULT_DB;
String newUserDbType = DEFAULT_DB;
+ String newPODbType = DEFAULT_DB;
String prevMsgDbType = "";
String prevUserDbType = "";
+ String prevPODbType = "";
String sqlKey = "";
String sqlValue = "";
String savedValue = "";
boolean newMsgSqlLoaded = false;
boolean newUserSqlLoaded = false;
+ boolean newPOSqlLoaded = false;
boolean prevMsgSqlFound = false;
boolean prevUserSqlFound = false;
+ boolean prevPOSqlFound = false;
Map tempMsgSqlMap = new HashMap();
Map tempUserSqlMap = new HashMap();
- Map defMsgSqlMap = new HashMap();
- Map defUserSqlMap = new HashMap();
+ Map tempPOSqlMap = new HashMap();
/*
* Open the persistenceSql.properties file located under
@@ -395,18 +433,20 @@
*/
if (saveMsgSql)
tempMsgSqlMap.putAll(jmsForm.getMsgSqlMap());
-
if (saveUserSql)
tempUserSqlMap.putAll(jmsForm.getUserSqlMap());
+ if (savePOSql)
+ tempPOSqlMap.putAll(jmsForm.getPostOfficeSqlMap());
/*
* Clear the maps before loading the new properties from file:
*/
if (loadMsgSqlFromFile)
jmsForm.clearMsgSqlMap();
-
if (loadUserSqlFromFile)
jmsForm.clearUserSqlMap();
+ if (loadPOSqlFromFile)
+ jmsForm.clearPostOfficeSqlMap();
try {
while ((!error && (line = br.readLine()) != null)) {
@@ -420,6 +460,11 @@
.trim();
if (logger.isDebugEnabled())
logger.debug("newUserDbType = " + newUserDbType);
+ } else if (line.startsWith(newPODriverClass)) {
+ newPODbType = line.substring(line.indexOf("=") + 1)
+ .trim();
+ if (logger.isDebugEnabled())
+ logger.debug("newPODbType = " + newPODbType);
} else if (line.startsWith(prevMsgDriverClass)) {
prevMsgDbType = line.substring(line.indexOf("=") + 1)
.trim();
@@ -430,6 +475,11 @@
.trim();
if (logger.isDebugEnabled())
logger.debug("prevUserDbType = " + prevUserDbType);
+ } else if (line.startsWith(prevPODriverClass)) {
+ prevPODbType = line.substring(line.indexOf("=") + 1)
+ .trim();
+ if (logger.isDebugEnabled())
+ logger.debug("prevPODbType = " + prevPODbType);
} else if (loadMsgSqlFromFile
&& line.startsWith(newMsgDbType + MSG_NODE)) {
/*
@@ -448,6 +498,15 @@
sqlValue = line.substring(line.indexOf("=") + 1).trim();
jmsForm.setUserSqlEntry(sqlKey, sqlValue);
newUserSqlLoaded = true;
+ } else if (loadPOSqlFromFile
+ && line.startsWith(newPODbType + PO_NODE)) {
+ /*
+ * Load the new post office sql properties:
+ */
+ sqlKey = getKey(line);
+ sqlValue = line.substring(line.indexOf("=") + 1).trim();
+ jmsForm.setPostOfficeSqlEntry(sqlKey, sqlValue);
+ newPOSqlLoaded = true;
} else if (saveMsgSql
&& line.startsWith(prevUserDbType + MSG_NODE)) {
/*
@@ -474,20 +533,19 @@
line = line + " " + savedValue;
}
prevUserSqlFound = true;
- } else if (line.startsWith(DEFAULT_DB + MSG_NODE)) {
+ } else if (savePOSql
+ && line.startsWith(prevPODbType + PO_NODE)) {
/*
- * Store the default msg sql properties in a map:
+ * Save the previous post office sql properties, if changed:
*/
sqlKey = getKey(line);
sqlValue = line.substring(line.indexOf("=") + 1).trim();
- defMsgSqlMap.put(sqlKey, sqlValue);
- } else if (line.startsWith(DEFAULT_DB + USER_NODE)) {
- /*
- * Store the default user sql properties in a map:
- */
- sqlKey = getKey(line);
- sqlValue = line.substring(line.indexOf("=") + 1).trim();
- defUserSqlMap.put(sqlKey, sqlValue);
+ savedValue = (String) tempPOSqlMap.get(sqlKey);
+ if (!sqlValue.equals(savedValue)) {
+ line = line.substring(0, line.indexOf("=") + 1);
+ line = line + " " + savedValue;
+ }
+ prevPOSqlFound = true;
}
if (updatePropFile)
@@ -499,33 +557,24 @@
*/
br.close();
- /*
+ /*
* If the sql properties for the new database type do not exist
- * in the properties file, load the default properties:
+ * in the properties file, log a message:
*/
if (loadMsgSqlFromFile && !newMsgSqlLoaded) {
if (logger.isDebugEnabled())
- logger.debug("Loading default message sql properties");
- Set keySet = defMsgSqlMap.keySet();
- Iterator iter = keySet.iterator();
- while (iter.hasNext()) {
- sqlKey = (String) iter.next();
- sqlValue = (String) defMsgSqlMap.get(sqlKey);
- jmsForm.setMsgSqlEntry(sqlKey, sqlValue);
- }
+ logger.debug("Message sql not loaded (not available)");
}
if (loadUserSqlFromFile && !newUserSqlLoaded) {
if (logger.isDebugEnabled())
- logger.debug("Loading default user sql properties");
- Set keySet = defUserSqlMap.keySet();
- Iterator iter = keySet.iterator();
- while (iter.hasNext()) {
- sqlKey = (String) iter.next();
- sqlValue = (String) defUserSqlMap.get(sqlKey);
- jmsForm.setUserSqlEntry(sqlKey, sqlValue);
- }
+ logger.debug("User sql not loaded (not available)");
}
+
+ if (loadPOSqlFromFile && !newPOSqlLoaded) {
+ if (logger.isDebugEnabled())
+ logger.debug("PostOffice sql not loaded (not available)");
+ }
/*
* If the sql properties of the previous database type do not
@@ -562,9 +611,25 @@
pw.println(line);
}
}
+
+ if (savePOSql && !prevPOSqlFound && prevPODbType != "") {
+ if (logger.isDebugEnabled())
+ logger.debug("Saving post office sql properties for: "
+ + prevPODbType);
+ printHeading(pw, prevPODbType, PO_PERSIST);
+ Set keySet = tempPOSqlMap.keySet();
+ Iterator iter = keySet.iterator();
+ while (iter.hasNext()) {
+ sqlKey = (String) iter.next();
+ sqlValue = (String) tempPOSqlMap.get(sqlKey);
+ line = prevPODbType + PO_NODE + sqlKey + " = "
+ + sqlValue;
+ pw.println(line);
+ }
+ }
/*
- * Update the properties file is needed:
+ * Update the properties file if needed:
*/
if (updatePropFile) {
pw.close();
@@ -577,8 +642,10 @@
*/
jmsForm.setSavedMsgDataSourceName(jmsForm.getMsgDataSourceName());
jmsForm.setSavedUserDataSourceName(jmsForm.getUserDataSourceName());
+ jmsForm.setSavedPostOfficeDataSourceName(jmsForm.getPostOfficeDataSourceName());
jmsForm.saveMsgSqlMap();
jmsForm.saveUserSqlMap();
+ jmsForm.savePostOfficeSqlMap();
} catch (IOException e) {
error = true;
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Destination.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Destination.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Destination.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -67,6 +67,31 @@
* The JNDI name
*/
private String jndiName;
+
+ /**
+ * The name of the server peer this destination was deployed on
+ */
+ private String serverPeerName;
+
+ /**
+ * The name of the post office this destination belongs to
+ */
+ private String postOfficeName;
+
+ /**
+ * The DLQ for this destination, overrides the default DLQ on the server peer
+ */
+ private String dlqName;
+
+ /**
+ * The expiry queue for this destination, overrides the default expiry queue on the server peer
+ */
+ private String expiryQueueName;
+
+ /**
+ * The delay before redelivering
+ */
+ private long redeliveryDelay;
/**
* True if this destination was created programmatically
@@ -74,9 +99,9 @@
private boolean createdProgrammatically;
/**
- * The write-cache size
+ * The maximum number of messages this destination can hold before they are dropped
*/
- private int downCacheSize;
+ private int maxSize;
/**
* The in-memory message limit
@@ -87,6 +112,21 @@
* The paging size
*/
private int pageSize;
+
+ /**
+ * The write-cache size
+ */
+ private int downCacheSize;
+
+ /**
+ * Is this a clustered destination?
+ */
+ private boolean clustered;
+
+ /**
+ * The day limit for the message counter
+ */
+ private int messageCounterHistoryDayLimit;
/**
* Security configuration
@@ -96,14 +136,9 @@
/**
* Security roles, a string representation of the securityConfig
*/
- private String securityRoles;
+ private String securityRoles;
/**
- * The name of the server peer this destination was deployed on
- */
- private String serverPeerName;
-
- /**
* Constructor
*/
public Destination() {
@@ -192,6 +227,20 @@
}
/**
+ * @return Returns the clustered.
+ */
+ public boolean isClustered() {
+ return clustered;
+ }
+
+ /**
+ * @param clustered The clustered to set.
+ */
+ public void setClustered(boolean clustered) {
+ this.clustered = clustered;
+ }
+
+ /**
* @return Returns the createdProgrammatically.
*/
public boolean isCreatedProgrammatically() {
@@ -207,6 +256,20 @@
}
/**
+ * @return Returns the dlqName.
+ */
+ public String getDlqName() {
+ return dlqName;
+ }
+
+ /**
+ * @param name The dlqName to set.
+ */
+ public void setDlqName(String name) {
+ dlqName = name;
+ }
+
+ /**
* @return Returns the downCacheSize.
*/
public int getDownCacheSize() {
@@ -222,6 +285,20 @@
}
/**
+ * @return Returns the expiryQueueName.
+ */
+ public String getExpiryQueueName() {
+ return expiryQueueName;
+ }
+
+ /**
+ * @param expiryQueueName The expiryQueueName to set.
+ */
+ public void setExpiryQueueName(String expiryQueueName) {
+ this.expiryQueueName = expiryQueueName;
+ }
+
+ /**
* @return Returns the fullSize.
*/
public int getFullSize() {
@@ -237,6 +314,34 @@
}
/**
+ * @return Returns the maxSize.
+ */
+ public int getMaxSize() {
+ return maxSize;
+ }
+
+ /**
+ * @param maxSize The maxSize to set.
+ */
+ public void setMaxSize(int maxSize) {
+ this.maxSize = maxSize;
+ }
+
+ /**
+ * @return Returns the messageCounterHistoryDayLimit.
+ */
+ public int getMessageCounterHistoryDayLimit() {
+ return messageCounterHistoryDayLimit;
+ }
+
+ /**
+ * @param messageCounterHistoryDayLimit The messageCounterHistoryDayLimit to set.
+ */
+ public void setMessageCounterHistoryDayLimit(int messageCounterHistoryDayLimit) {
+ this.messageCounterHistoryDayLimit = messageCounterHistoryDayLimit;
+ }
+
+ /**
* @return Returns the pageSize.
*/
public int getPageSize() {
@@ -252,6 +357,34 @@
}
/**
+ * @return Returns the postOfficeName.
+ */
+ public String getPostOfficeName() {
+ return postOfficeName;
+ }
+
+ /**
+ * @param postOfficeName The postOfficeName to set.
+ */
+ public void setPostOfficeName(String postOfficeName) {
+ this.postOfficeName = postOfficeName;
+ }
+
+ /**
+ * @return Returns the redeliveryDelay.
+ */
+ public long getRedeliveryDelay() {
+ return redeliveryDelay;
+ }
+
+ /**
+ * @param redeliveryDelay The redeliveryDelay to set.
+ */
+ public void setRedeliveryDelay(long redeliveryDelay) {
+ this.redeliveryDelay = redeliveryDelay;
+ }
+
+ /**
* @return Returns the securityConfig.
*/
public Element getSecurityConfig() {
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Jms.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Jms.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Jms.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -42,48 +42,30 @@
private static final Log logger = LogFactory.getLog(Jms.class);
/*
- * ********** Attributes from the ConnectionFactory MBean **********
+ * ********** Attributes from the ServerPeer MBean **********
*/
-
+
/**
- * The name of the remoting connector this destination will use
+ * The name of the persistence manager
*/
- private String connectorName;
-
+ private String persistenceManagerName;
+
/**
- * The default value of paging down cache size for any temporary queues
- * created for connections from this connection factory
+ * The name of the jms user manager mbean
*/
- private int defaultTempQueueDownCacheSize;
-
+ private String userManagerName;
+
/**
- * The default value of paging full size for any temporary queues created
- * for connections from this connection factory
+ * The name of the remoting connector
*/
- private int defaultTempQueueFullSize;
-
+ private String connectorName;
+
/**
- * The default value of paging page size for any temporary queues created
- * for connections from this connection factory
+ * The name of the post office mbean
*/
- private int defaultTempQueuePageSize;
+ private String postOfficeMBeanName;
/**
- * The maximum number of messages that will be prefetched by the client side
- * consumer
- */
- private int prefetchSize;
-
- /**
- * The name of the server peer this destination was deployed on
- */
- private String serverPeerName;
-
- /*
- * ********** Attributes from the ServerPeer MBean **********
- */
-
- /**
* The default JNDI context queues are bound under
*/
private String defaultQueueJNDIContext;
@@ -114,11 +96,6 @@
private String jmsVersion;
/**
- * The name of the persistence manager
- */
- private String persistenceManagerName;
-
- /**
* The fully qualified provider version string
*/
private String providerVersion;
@@ -137,7 +114,47 @@
* The ID of the ServerPeer. Must be unique per JBoss instance
*/
private String serverPeerID;
-
+
+ /**
+ * The name of the default DLQ - used when an individual queue does not specify a DLQ
+ */
+ private String defaultDLQName;
+
+ /**
+ * The default maximum delivery attempts for destinations, unless overridden on the destination
+ */
+ private int defaultMaxDeliveryAttempts;
+
+ /**
+ * The name of the default expiry queue - used when an individual queue does not specify an expiry queue
+ */
+ private String defaultExpiryQueueName;
+
+ /**
+ * How long to wait before redelivery, can be overridden on the destination
+ */
+ private long defaultRedeliveryDelay;
+
+ /**
+ * The period between which queue statistics are obtained
+ */
+ private long queueStatsSamplePeriod;
+
+ /**
+ * The maximum amount of time to wait for failover to begin
+ */
+ private long failoverStartTimeout;
+
+ /**
+ * The maximum amount of time to wait for failover to complete
+ */
+ private long failoverCompleteTimeout;
+
+ /**
+ * The default max number of messages per day in message counter history
+ */
+ private int defaultMessageCounterHistoryDayLimit;
+
/*
* ********** Attributes from the PersistenceManager MBean **********
*/
@@ -202,13 +219,34 @@
private String userSqlProperties;
/*
- * ********** Attributes from the QueuePostOffice MBean **********
+ * ********** Attributes from the PostOffice MBean **********
*/
- /*
- * ********** Attributes from the TopicPostOffice MBean **********
+ /**
+ * Should PostOffice database tables be created on startup?
*/
+ private boolean createPostOfficeTablesOnStartup;
+ /**
+ * The JNDI name of the DataSource used by the PostOffice
+ */
+ private String postOfficeDataSource;
+
+ /**
+ * The name of the DataSource used by the PostOffice, without the JNDI prefix
+ */
+ private String postOfficeDataSourceName;
+
+ /**
+ * The sql statements used to persist the post office information.
+ */
+ private String postOfficeSqlProperties;
+
+ /**
+ * The name of the post office
+ */
+ private String postOfficeName;
+
/*
* *************** Other Attributes ********************************
*/
@@ -238,6 +276,21 @@
}
/**
+ * @return Returns the createPostOfficeTablesOnStartup.
+ */
+ public boolean isCreatePostOfficeTablesOnStartup() {
+ return createPostOfficeTablesOnStartup;
+ }
+
+ /**
+ * @param createPostOfficeTablesOnStartup The createPostOfficeTablesOnStartup to set.
+ */
+ public void setCreatePostOfficeTablesOnStartup(
+ boolean createPostOfficeTablesOnStartup) {
+ this.createPostOfficeTablesOnStartup = createPostOfficeTablesOnStartup;
+ }
+
+ /**
* @return Returns the createUserTablesOnStartup.
*/
public boolean isCreateUserTablesOnStartup() {
@@ -282,6 +335,63 @@
}
/**
+ * @return Returns the defaultDLQName.
+ */
+ public String getDefaultDLQName() {
+ return defaultDLQName;
+ }
+
+ /**
+ * @param defaultDLQName The defaultDLQName to set.
+ */
+ public void setDefaultDLQName(String defaultDLQName) {
+ this.defaultDLQName = defaultDLQName;
+ }
+
+ /**
+ * @return Returns the defaultExpiryQueueName.
+ */
+ public String getDefaultExpiryQueueName() {
+ return defaultExpiryQueueName;
+ }
+
+ /**
+ * @param defaultExpiryQueueName The defaultExpiryQueueName to set.
+ */
+ public void setDefaultExpiryQueueName(String defaultExpiryQueueName) {
+ this.defaultExpiryQueueName = defaultExpiryQueueName;
+ }
+
+ /**
+ * @return Returns the defaultMaxDeliveryAttempts.
+ */
+ public int getDefaultMaxDeliveryAttempts() {
+ return defaultMaxDeliveryAttempts;
+ }
+
+ /**
+ * @param defaultMaxDeliveryAttempts The defaultMaxDeliveryAttempts to set.
+ */
+ public void setDefaultMaxDeliveryAttempts(int defaultMaxDeliveryAttempts) {
+ this.defaultMaxDeliveryAttempts = defaultMaxDeliveryAttempts;
+ }
+
+ /**
+ * @return Returns the defaultMessageCounterHistoryDayLimit.
+ */
+ public int getDefaultMessageCounterHistoryDayLimit() {
+ return defaultMessageCounterHistoryDayLimit;
+ }
+
+ /**
+ * @param defaultMessageCounterHistoryDayLimit The defaultMessageCounterHistoryDayLimit to set.
+ */
+ public void setDefaultMessageCounterHistoryDayLimit(
+ int defaultMessageCounterHistoryDayLimit) {
+ this.defaultMessageCounterHistoryDayLimit = defaultMessageCounterHistoryDayLimit;
+ }
+
+ /**
* @return Returns the defaultQueueJNDIContext.
*/
public String getDefaultQueueJNDIContext() {
@@ -297,6 +407,20 @@
}
/**
+ * @return Returns the defaultRedeliveryDelay.
+ */
+ public long getDefaultRedeliveryDelay() {
+ return defaultRedeliveryDelay;
+ }
+
+ /**
+ * @param defaultRedeliveryDelay The defaultRedeliveryDelay to set.
+ */
+ public void setDefaultRedeliveryDelay(long defaultRedeliveryDelay) {
+ this.defaultRedeliveryDelay = defaultRedeliveryDelay;
+ }
+
+ /**
* @return Returns the defaultSecurityConfig.
*/
public Element getDefaultSecurityConfig() {
@@ -327,63 +451,49 @@
}
/**
- * @return Returns the defaultTempQueueDownCacheSize.
+ * @return Returns the defaultTopicJNDIContext.
*/
- public int getDefaultTempQueueDownCacheSize() {
- return defaultTempQueueDownCacheSize;
+ public String getDefaultTopicJNDIContext() {
+ return defaultTopicJNDIContext;
}
/**
- * @param defaultTempQueueDownCacheSize The defaultTempQueueDownCacheSize to set.
+ * @param defaultTopicJNDIContext
+ * The defaultTopicJNDIContext to set.
*/
- public void setDefaultTempQueueDownCacheSize(int defaultTempQueueDownCacheSize) {
- this.defaultTempQueueDownCacheSize = defaultTempQueueDownCacheSize;
+ public void setDefaultTopicJNDIContext(String defaultTopicJNDIContext) {
+ this.defaultTopicJNDIContext = defaultTopicJNDIContext;
}
/**
- * @return Returns the defaultTempQueueFullSize.
+ * @return Returns the failoverCompleteTimeout.
*/
- public int getDefaultTempQueueFullSize() {
- return defaultTempQueueFullSize;
+ public long getFailoverCompleteTimeout() {
+ return failoverCompleteTimeout;
}
/**
- * @param defaultTempQueueFullSize The defaultTempQueueFullSize to set.
+ * @param failoverCompleteTimeout The failoverCompleteTimeout to set.
*/
- public void setDefaultTempQueueFullSize(int defaultTempQueueFullSize) {
- this.defaultTempQueueFullSize = defaultTempQueueFullSize;
+ public void setFailoverCompleteTimeout(long failoverCompleteTimeout) {
+ this.failoverCompleteTimeout = failoverCompleteTimeout;
}
/**
- * @return Returns the defaultTempQueuePageSize.
+ * @return Returns the failoverStartTimeout.
*/
- public int getDefaultTempQueuePageSize() {
- return defaultTempQueuePageSize;
+ public long getFailoverStartTimeout() {
+ return failoverStartTimeout;
}
/**
- * @param defaultTempQueuePageSize The defaultTempQueuePageSize to set.
+ * @param failoverStartTimeout The failoverStartTimeout to set.
*/
- public void setDefaultTempQueuePageSize(int defaultTempQueuePageSize) {
- this.defaultTempQueuePageSize = defaultTempQueuePageSize;
+ public void setFailoverStartTimeout(long failoverStartTimeout) {
+ this.failoverStartTimeout = failoverStartTimeout;
}
/**
- * @return Returns the defaultTopicJNDIContext.
- */
- public String getDefaultTopicJNDIContext() {
- return defaultTopicJNDIContext;
- }
-
- /**
- * @param defaultTopicJNDIContext
- * The defaultTopicJNDIContext to set.
- */
- public void setDefaultTopicJNDIContext(String defaultTopicJNDIContext) {
- this.defaultTopicJNDIContext = defaultTopicJNDIContext;
- }
-
- /**
* @return Returns the jmsProviderName.
*/
public String getJmsProviderName() {
@@ -487,20 +597,76 @@
}
/**
- * @return Returns the prefetchSize.
+ * @return Returns the postOfficeDataSource.
*/
- public int getPrefetchSize() {
- return prefetchSize;
+ public String getPostOfficeDataSource() {
+ return postOfficeDataSource;
}
/**
- * @param prefetchSize The prefetchSize to set.
+ * @param postOfficeDataSource The postOfficeDataSource to set.
*/
- public void setPrefetchSize(int prefetchSize) {
- this.prefetchSize = prefetchSize;
+ public void setPostOfficeDataSource(String postOfficeDataSource) {
+ this.postOfficeDataSource = postOfficeDataSource;
}
/**
+ * @return Returns the postOfficeDataSourceName.
+ */
+ public String getPostOfficeDataSourceName() {
+ return postOfficeDataSourceName;
+ }
+
+ /**
+ * @param postOfficeDataSourceName The postOfficeDataSourceName to set.
+ */
+ public void setPostOfficeDataSourceName(String postOfficeDataSourceName) {
+ this.postOfficeDataSourceName = postOfficeDataSourceName;
+ }
+
+ /**
+ * @return Returns the postOfficeMBeanName.
+ */
+ public String getPostOfficeMBeanName() {
+ return postOfficeMBeanName;
+ }
+
+ /**
+ * @param postOfficeMBeanName The postOfficeMBeanName to set.
+ */
+ public void setPostOfficeMBeanName(String postOfficeMBeanName) {
+ this.postOfficeMBeanName = postOfficeMBeanName;
+ }
+
+ /**
+ * @return Returns the postOfficeName.
+ */
+ public String getPostOfficeName() {
+ return postOfficeName;
+ }
+
+ /**
+ * @param postOfficeName The postOfficeName to set.
+ */
+ public void setPostOfficeName(String postOfficeName) {
+ this.postOfficeName = postOfficeName;
+ }
+
+ /**
+ * @return Returns the postOfficeSqlProperties.
+ */
+ public String getPostOfficeSqlProperties() {
+ return postOfficeSqlProperties;
+ }
+
+ /**
+ * @param postOfficeSqlProperties The postOfficeSqlProperties to set.
+ */
+ public void setPostOfficeSqlProperties(String postOfficeSqlProperties) {
+ this.postOfficeSqlProperties = postOfficeSqlProperties;
+ }
+
+ /**
* @return Returns the providerVersion.
*/
public String getProviderVersion() {
@@ -531,6 +697,20 @@
}
/**
+ * @return Returns the queueStatsSamplePeriod.
+ */
+ public long getQueueStatsSamplePeriod() {
+ return queueStatsSamplePeriod;
+ }
+
+ /**
+ * @param queueStatsSamplePeriod The queueStatsSamplePeriod to set.
+ */
+ public void setQueueStatsSamplePeriod(long queueStatsSamplePeriod) {
+ this.queueStatsSamplePeriod = queueStatsSamplePeriod;
+ }
+
+ /**
* @return Returns the securityDomain.
*/
public String getSecurityDomain() {
@@ -561,20 +741,6 @@
}
/**
- * @return Returns the serverPeerName.
- */
- public String getServerPeerName() {
- return serverPeerName;
- }
-
- /**
- * @param serverPeerName The serverPeerName to set.
- */
- public void setServerPeerName(String serverPeerName) {
- this.serverPeerName = serverPeerName;
- }
-
- /**
* @return Returns the transactionManagerName.
*/
public String getTransactionManagerName() {
@@ -618,6 +784,20 @@
}
/**
+ * @return Returns the userManagerName.
+ */
+ public String getUserManagerName() {
+ return userManagerName;
+ }
+
+ /**
+ * @param userManagerName The userManagerName to set.
+ */
+ public void setUserManagerName(String userManagerName) {
+ this.userManagerName = userManagerName;
+ }
+
+ /**
* @return Returns the userSqlProperties.
*/
public String getUserSqlProperties() {
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Queue.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Queue.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Queue.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -41,6 +41,16 @@
* The number of messages in the queue
*/
private int messageCount;
+
+ /**
+ * The number of scheduled messages in the queue
+ */
+ private int scheduledMessageCount;
+
+ /**
+ * The number of consumers on the queue
+ */
+ private int consumerCount;
/**
* Constructor
@@ -59,6 +69,20 @@
}
/**
+ * @return Returns the consumerCount.
+ */
+ public int getConsumerCount() {
+ return consumerCount;
+ }
+
+ /**
+ * @param consumerCount The consumerCount to set.
+ */
+ public void setConsumerCount(int consumerCount) {
+ this.consumerCount = consumerCount;
+ }
+
+ /**
* @return Returns the messageCount.
*/
public int getMessageCount() {
@@ -74,6 +98,20 @@
}
/**
+ * @return Returns the scheduledMessageCount.
+ */
+ public int getScheduledMessageCount() {
+ return scheduledMessageCount;
+ }
+
+ /**
+ * @param scheduledMessageCount The scheduledMessageCount to set.
+ */
+ public void setScheduledMessageCount(int scheduledMessageCount) {
+ this.scheduledMessageCount = scheduledMessageCount;
+ }
+
+ /**
* Appends extra information to toString.
*
* @param builder
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Topic.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Topic.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/model/jms/Topic.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -36,6 +36,26 @@
* Comment for <code>serialVersionUID</code>
*/
private static final long serialVersionUID = 1L;
+
+ /**
+ * The count of all messages in all subscriptions of this topic
+ */
+ private int allMessageCount;
+
+ /**
+ * The count of all messages in all durable subscriptions of this topic
+ */
+ private int durableMessageCount;
+
+ /**
+ * The count of all messages in all non durable subscriptions of this topic
+ */
+ private int nonDurableMessageCount;
+
+ /**
+ * All subscriptions count
+ */
+ private int allSubCount;
/**
* Durable subscriptions count
@@ -48,11 +68,6 @@
private int nonDurableSubCount;
/**
- * All subscriptions count
- */
- private int allSubCount;
-
- /**
* Constructor
*/
public Topic() {
@@ -69,6 +84,48 @@
}
/**
+ * @return Returns the allMessageCount.
+ */
+ public int getAllMessageCount() {
+ return allMessageCount;
+ }
+
+ /**
+ * @param allMessageCount The allMessageCount to set.
+ */
+ public void setAllMessageCount(int allMessageCount) {
+ this.allMessageCount = allMessageCount;
+ }
+
+ /**
+ * @return Returns the durableMessageCount.
+ */
+ public int getDurableMessageCount() {
+ return durableMessageCount;
+ }
+
+ /**
+ * @param durableMessageCount The durableMessageCount to set.
+ */
+ public void setDurableMessageCount(int durableMessageCount) {
+ this.durableMessageCount = durableMessageCount;
+ }
+
+ /**
+ * @return Returns the nonDurableMessageCount.
+ */
+ public int getNonDurableMessageCount() {
+ return nonDurableMessageCount;
+ }
+
+ /**
+ * @param nonDurableMessageCount The nonDurableMessageCount to set.
+ */
+ public void setNonDurableMessageCount(int nonDurableMessageCount) {
+ this.nonDurableMessageCount = nonDurableMessageCount;
+ }
+
+ /**
* @return Returns the allSubCount.
*/
public int getAllSubCount() {
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/Constants.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/Constants.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/Constants.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -36,39 +36,47 @@
*/
public class JmsAttributes {
protected static final String
- // Attributes of ConnectionFactory:
+ // Attributes of ServerPeer:
+ PERSISTENCE_MANAGER = "PersistenceManager",
+ JMS_USER_MANAGER = "JMSUserManager",
+ POST_OFFICE = "PostOffice",
CONNECTOR = "Connector",
- DEFAULT_TEMP_QUEUE_DOWN_CACHE_SIZE = "DefaultTempQueueDownCacheSize",
- DEFAULT_TEMP_QUEUE_FULL_SIZE = "DefaultTempQueueFullSize",
- DEFAULT_TEMP_QUEUE_PAGE_SIZE = "DefaultTempQueuePageSize",
- PREFETCH_SIZE = "PrefetchSize",
- SERVER_PEER = "ServerPeer",
-
- // Attributes of ServerPeer:
DEFAULT_QUEUE_JNDI_CONTEXT = "DefaultQueueJNDIContext",
- DEFAULT_SECURITY_CONFIG = "DefaultSecurityConfig",
DEFAULT_TOPIC_JNDI_CONTEXT = "DefaultTopicJNDIContext",
JMS_PROVIDER_NAME = "JMSProviderName",
JMS_VERSION = "JMSVersion",
- PERSISTENCE_MANAGER = "PersistenceManager",
PROVIDER_VERSION = "ProviderVersion",
QUEUED_EXECUTOR_POOL_SIZE = "QueuedExecutorPoolSize",
SECURITY_DOMAIN = "SecurityDomain",
+ DEFAULT_SECURITY_CONFIG = "DefaultSecurityConfig",
SERVER_PEER_ID = "serverPeerID",
+ DEFAULT_DLQ = "DefaultDLQ",
+ DEFAULT_MAX_DELIVERY_ATTEMPTS = "DefaultMaxDeliveryAttempts",
+ DEFAULT_EXPIRY_QUEUE = "DefaultExpiryQueue",
+ DEFAULT_REDELIVERY_DELAY = "DefaultRedeliveryDelay",
+ QUEUE_STATS_SAMPLE_PERIOD = "QueueStatsSamplePeriod",
+ FAILOVER_START_TIMEOUT = "FailoverStartTimeout",
+ FAILOVER_COMPLETE_TIMEOUT = "FailoverCompleteTimeout",
+ DEFAULT_MESSAGE_COUNTER_HISTORY_DAY_LIMIT = "DefaultMessageCounterHistoryDayLimit",
- // Attributes of PersistenceManager:
+ // Attributes of PersistenceManager/JMSUserManager/PostOffice:
CREATE_TABLES_ON_STARTUP = "CreateTablesOnStartup",
MAX_PARAMS = "MaxParams",
DATA_SOURCE = "DataSource",
SQL_PROPERTIES = "SqlProperties",
TRANSACTION_MANAGER = "TransactionManager",
- USING_BATCH_UPDATES = "UsingBatchUpdates";
+ DATA_SOURCE_BINDING = "DataSourceBinding",
+ USING_BATCH_UPDATES = "UsingBatchUpdates",
+ POST_OFFICE_NAME = "PostOfficeName",
+ SERVER_PEER = "ServerPeer";
protected static final String
- CONNECTION_FACTORY_NAME = "jboss.messaging.destination:service=ConnectionFactory",
- SERVER_PEER_NAME = "jboss.messaging:service=ServerPeer",
- PERSISTENCE_MANAGER_NAME = "jboss.messaging:service=PersistenceManager",
- JMS_USER_MANAGER_NAME = "jboss.messaging:service=JMSUserManager";
+ SERVER_PEER_MBEAN = "jboss.messaging:service=ServerPeer",
+ PERSISTENCE_MANAGER_MBEAN = "jboss.messaging:service=PersistenceManager",
+ JMS_USER_MANAGER_MBEAN = "jboss.messaging:service=JMSUserManager",
+ POST_OFFICE_MBEAN = "jboss.messaging:service=PostOffice",
+ CONNECTOR_MBEAN = "jboss.messaging:service=Connector,transport=socket",
+ DATA_SOURCE_BINDING_PREFIX = "jboss.jca:service=DataSourceBinding,name=";
}
/**
@@ -78,13 +86,20 @@
public class CommonAttributes {
protected static final String NAME = "Name",
JNDI_NAME = "JNDIName",
+ SERVER_PEER = "ServerPeer",
+ POST_OFFICE = "PostOffice",
+ DLQ = "DLQ",
+ EXPIRY_QUEUE = "ExpiryQueue",
+ REDELIVERY_DELAY = "RedeliveryDelay",
+ SECURITY_CONFIG = "SecurityConfig",
+ SECURITY_ROLES = "SecurityRoles",
CREATED_PROGRAMMATICALLY = "CreatedProgrammatically",
- DOWN_CACHE_SIZE = "DownCacheSize",
+ MAX_SIZE = "MaxSize",
FULL_SIZE = "FullSize",
PAGE_SIZE = "PageSize",
- SECURITY_CONFIG = "SecurityConfig",
- SECURITY_ROLES = "SecurityRoles",
- SERVER_PEER = "ServerPeer";
+ DOWN_CACHE_SIZE = "DownCacheSize",
+ CLUSTERED = "Clustered",
+ MESSAGE_COUNTER_HISTORY_DAY_LIMIT = "MessageCounterHistoryDayLimit";
}
/**
@@ -92,7 +107,9 @@
* Queue type
*/
public class QueueAttributes {
- protected static final String MESSAGE_COUNT = "MessageCount";
+ protected static final String MESSAGE_COUNT = "MessageCount",
+ SCHEDULED_MESSAGE_COUNT = "ScheduledMessageCount",
+ CONSUMER_COUNT = "ConsumerCount";
}
/**
@@ -101,8 +118,11 @@
*/
public class TopicAttributes {
protected static final String
- DURABLE_SUBSCRIPTIONS_COUNT = "DurableSubscriptionsCount",
- NON_DURABLE_SUBSCRIPTIONS_COUNT = "NonDurableSubscriptionsCount",
- ALL_SUBSCRIPTIONS_COUNT = "AllSubscriptionsCount";
+ ALL_MESSAGE_COUNT = "AllMessageCount",
+ DURABLE_MESSAGE_COUNT = "DurableMessageCount",
+ NON_DURABLE_MESSAGE_COUNT = "NonDurableMessageCount",
+ ALL_SUBSCRIPTIONS_COUNT = "AllSubscriptionsCount",
+ DURABLE_SUBSCRIPTIONS_COUNT = "DurableSubscriptionsCount",
+ NON_DURABLE_SUBSCRIPTIONS_COUNT = "NonDurableSubscriptionsCount";
}
}
\ No newline at end of file
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/DeploymentServiceDestinationHelper.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/DeploymentServiceDestinationHelper.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/DeploymentServiceDestinationHelper.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -34,6 +34,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.admin.model.jms.Destination;
import org.jboss.admin.model.jms.DestinationIdentifier;
+import org.jboss.admin.model.jms.Jms;
import org.jboss.admin.model.jms.Queue;
import org.jboss.admin.model.jms.Topic;
import org.jboss.admin.service.DeploymentServiceHelper;
@@ -52,13 +53,13 @@
private static Log logger = LogFactory
.getLog(DeploymentServiceDestinationHelper.class);
+ private static Jms jms = null;
+
/**
* Defines constant strings used in the class
*/
protected static final String JMS_QUEUE_TEMPLATE_NAME = "jms-queue",
- JMS_TOPIC_TEMPLATE_NAME = "jms-topic",
- JMS_QUEUE_DEF_JNDI_PREFIX = "queue/",
- JMS_TOPIC_DEF_JNDI_PREFIX = "topic/";
+ JMS_TOPIC_TEMPLATE_NAME = "jms-topic";
/**
* Constructor
@@ -79,14 +80,13 @@
*/
public void createDestination(Destination destination)
throws JmsServiceException {
+ if (jms == null)
+ jms = new JmsServiceImpl().getJmsAttributes();
if (destination instanceof Queue) {
Queue queue = (Queue) destination;
if ("".equals(queue.getJndiName()) || queue.getJndiName() == null) {
- queue.setJndiName(JMS_QUEUE_DEF_JNDI_PREFIX + queue.getName()); // TODO:
- // TODO: get
- // prefix
- // from
- // jms
+ queue.setJndiName(jms.getDefaultQueueJNDIContext() + "/"
+ + queue.getName());
}
Map attributes = getDestinationAttributes(queue);
createDestination(queue.getName(), JMS_QUEUE_TEMPLATE_NAME,
@@ -94,11 +94,8 @@
} else if (destination instanceof Topic) {
Topic topic = (Topic) destination;
if ("".equals(topic.getJndiName()) || topic.getJndiName() == null) {
- topic.setJndiName(JMS_TOPIC_DEF_JNDI_PREFIX + topic.getName()); // TODO:
- // TODO: get
- // prefix
- // from
- // jms
+ topic.setJndiName(jms.getDefaultTopicJNDIContext() + "/"
+ + topic.getName());
}
Map attributes = getDestinationAttributes(topic);
createDestination(topic.getName(), JMS_TOPIC_TEMPLATE_NAME,
@@ -157,16 +154,26 @@
*/
protected Map getCommonDestinationAttributes(Destination destination) {
Map map = new HashMap();
- putAttribute(Constants.CommonAttributes.NAME, destination.getName(),
- map);
putAttribute(Constants.CommonAttributes.JNDI_NAME, destination
.getJndiName(), map);
- putAttribute(Constants.CommonAttributes.DOWN_CACHE_SIZE, destination
- .getDownCacheSize(), map);
+ putAttribute(Constants.CommonAttributes.DLQ, destination.getDlqName(),
+ map);
+ putAttribute(Constants.CommonAttributes.EXPIRY_QUEUE, destination
+ .getExpiryQueueName(), map);
+ putAttribute(Constants.CommonAttributes.REDELIVERY_DELAY, destination
+ .getRedeliveryDelay(), map);
+ putAttribute(Constants.CommonAttributes.MAX_SIZE, destination
+ .getMaxSize(), map);
putAttribute(Constants.CommonAttributes.FULL_SIZE, destination
.getFullSize(), map);
putAttribute(Constants.CommonAttributes.PAGE_SIZE, destination
.getPageSize(), map);
+ putAttribute(Constants.CommonAttributes.DOWN_CACHE_SIZE, destination
+ .getDownCacheSize(), map);
+ putAttribute(Constants.CommonAttributes.CLUSTERED, destination
+ .isClustered(), map);
+ putAttribute(Constants.CommonAttributes.MESSAGE_COUNTER_HISTORY_DAY_LIMIT, destination
+ .getMessageCounterHistoryDayLimit(), map);
putSecurityRolesAttribute(destination.getSecurityRoles(), map);
return map;
}
@@ -371,11 +378,13 @@
Properties props = new Properties();
Properties depends = new Properties();
+ if (jms == null)
+ jms = new JmsServiceImpl().getJmsAttributes();
if (destination instanceof Queue) {
Queue queue = (Queue) destination;
- // TODO: get jndi prefix from jms
if ("".equals(queue.getJndiName()) || queue.getJndiName() == null) {
- queue.setJndiName(JMS_QUEUE_DEF_JNDI_PREFIX + queue.getName());
+ queue.setJndiName(jms.getDefaultQueueJNDIContext() + "/"
+ + queue.getName());
}
/*
@@ -384,9 +393,8 @@
props = getWritableDestinationProperties(queue);
} else if (destination instanceof Topic) {
Topic topic = (Topic) destination;
- // TODO: get jndi prefix from jms
if ("".equals(topic.getJndiName()) || topic.getJndiName() == null) {
- topic.setJndiName(JMS_TOPIC_DEF_JNDI_PREFIX
+ topic.setJndiName(jms.getDefaultTopicJNDIContext() + "/"
+ topic.getName());
}
@@ -405,6 +413,8 @@
*/
putProperty(Constants.CommonAttributes.SERVER_PEER, destination
.getServerPeerName(), depends);
+ putProperty(Constants.CommonAttributes.POST_OFFICE, destination
+ .getPostOfficeName(), depends);
/*
* Invoke DeploymentService to perform update:
@@ -424,12 +434,24 @@
Properties props = new Properties();
putProperty(Constants.CommonAttributes.JNDI_NAME, destination
.getJndiName(), props);
- putProperty(Constants.CommonAttributes.DOWN_CACHE_SIZE, destination
- .getDownCacheSize(), props);
+ putProperty(Constants.CommonAttributes.DLQ, destination
+ .getDlqName(), props);
+ putProperty(Constants.CommonAttributes.EXPIRY_QUEUE, destination
+ .getExpiryQueueName(), props);
+ putProperty(Constants.CommonAttributes.REDELIVERY_DELAY, destination
+ .getRedeliveryDelay(), props);
+ putProperty(Constants.CommonAttributes.MAX_SIZE, destination
+ .getMaxSize(), props);
putProperty(Constants.CommonAttributes.FULL_SIZE, destination
.getFullSize(), props);
putProperty(Constants.CommonAttributes.PAGE_SIZE, destination
.getPageSize(), props);
+ putProperty(Constants.CommonAttributes.DOWN_CACHE_SIZE, destination
+ .getDownCacheSize(), props);
+ putProperty(Constants.CommonAttributes.CLUSTERED, destination
+ .isClustered(), props);
+ putProperty(Constants.CommonAttributes.MESSAGE_COUNTER_HISTORY_DAY_LIMIT, destination
+ .getMessageCounterHistoryDayLimit(), props);
putSecurityRolesProperty(destination.getSecurityRoles(), props);
return props;
}
@@ -444,9 +466,9 @@
Properties props = getWritableCommonDestinationProperties(destination);
/*
- * Get other queue specific writable attributes. None for now.
+ * Get other queue specific writable attributes. None for now.
*/
-
+
return props;
}
@@ -462,7 +484,7 @@
/*
* Get other topic specific writable attributes. None for now.
*/
-
+
return props;
}
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/DeploymentServiceJmsHelper.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/DeploymentServiceJmsHelper.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/DeploymentServiceJmsHelper.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -63,45 +63,46 @@
*/
public void updateJmsAttributes(Jms jms) throws JmsServiceException {
/*
- * Update attributes of the ConnectionFactory MBean:
+ * Update attributes of the ServerPeer MBean:
*/
Properties attrs = new Properties();
- putProperty(Constants.JmsAttributes.DEFAULT_TEMP_QUEUE_DOWN_CACHE_SIZE,
- jms.getDefaultTempQueueDownCacheSize(), attrs);
- putProperty(Constants.JmsAttributes.DEFAULT_TEMP_QUEUE_FULL_SIZE, jms
- .getDefaultTempQueueFullSize(), attrs);
- putProperty(Constants.JmsAttributes.DEFAULT_TEMP_QUEUE_PAGE_SIZE, jms
- .getDefaultTempQueuePageSize(), attrs);
- putProperty(Constants.JmsAttributes.PREFETCH_SIZE, jms
- .getPrefetchSize(), attrs);
-
- Properties depends = new Properties();
- putProperty(Constants.JmsAttributes.CONNECTOR, jms.getConnectorName(),
- depends);
- putProperty(Constants.JmsAttributes.SERVER_PEER, jms
- .getServerPeerName(), depends);
-
- updateMBeanAttributes(Constants.JmsAttributes.CONNECTION_FACTORY_NAME,
- attrs, depends);
-
- /*
- * Update attributes of the ServerPeer MBean:
- */
- attrs.clear();
+ putProperty(Constants.JmsAttributes.POST_OFFICE, jms
+ .getPostOfficeMBeanName(), attrs);
+ putProperty(Constants.JmsAttributes.QUEUED_EXECUTOR_POOL_SIZE, jms
+ .getQueuedExecutorPoolSize(), attrs);
+ putProperty(Constants.JmsAttributes.SECURITY_DOMAIN, jms
+ .getSecurityDomain(), attrs);
String secConfig = convertSecurityRolesToXml(jms
.getDefaultSecurityRoles());
putProperty(Constants.JmsAttributes.DEFAULT_SECURITY_CONFIG, secConfig,
attrs);
- putProperty(Constants.JmsAttributes.QUEUED_EXECUTOR_POOL_SIZE, jms
- .getQueuedExecutorPoolSize(), attrs);
- putProperty(Constants.JmsAttributes.SECURITY_DOMAIN, jms
- .getSecurityDomain(), attrs);
+ putProperty(Constants.JmsAttributes.DEFAULT_DLQ, jms
+ .getDefaultDLQName(), attrs);
+ putProperty(Constants.JmsAttributes.DEFAULT_MAX_DELIVERY_ATTEMPTS, jms
+ .getDefaultMaxDeliveryAttempts(), attrs);
+ putProperty(Constants.JmsAttributes.DEFAULT_EXPIRY_QUEUE, jms
+ .getDefaultExpiryQueueName(), attrs);
+ putProperty(Constants.JmsAttributes.DEFAULT_REDELIVERY_DELAY, jms
+ .getDefaultRedeliveryDelay(), attrs);
+ putProperty(Constants.JmsAttributes.QUEUE_STATS_SAMPLE_PERIOD, jms
+ .getQueueStatsSamplePeriod(), attrs);
+ putProperty(Constants.JmsAttributes.FAILOVER_START_TIMEOUT, jms
+ .getFailoverStartTimeout(), attrs);
+ putProperty(Constants.JmsAttributes.FAILOVER_COMPLETE_TIMEOUT, jms
+ .getFailoverCompleteTimeout(), attrs);
+ putProperty(
+ Constants.JmsAttributes.DEFAULT_MESSAGE_COUNTER_HISTORY_DAY_LIMIT,
+ jms.getDefaultMessageCounterHistoryDayLimit(), attrs);
- depends.clear();
+ Properties depends = new Properties();
putProperty(Constants.JmsAttributes.PERSISTENCE_MANAGER, jms
.getPersistenceManagerName(), depends);
+ putProperty(Constants.JmsAttributes.JMS_USER_MANAGER, jms
+ .getUserManagerName(), depends);
+ putProperty(Constants.JmsAttributes.CONNECTOR, jms.getConnectorName(),
+ depends);
- updateMBeanAttributes(Constants.JmsAttributes.SERVER_PEER, attrs,
+ updateMBeanAttributes(Constants.JmsAttributes.SERVER_PEER_MBEAN, attrs,
depends);
/*
@@ -125,18 +126,53 @@
.isUsingBatchUpdates(), attrs);
depends.clear();
+ String dataSourceBinding = Constants.JmsAttributes.DATA_SOURCE_BINDING_PREFIX
+ + jms.getMsgDataSourceName();
+ putProperty(Constants.JmsAttributes.DATA_SOURCE_BINDING,
+ dataSourceBinding, depends);
putProperty(Constants.JmsAttributes.TRANSACTION_MANAGER, jms
.getTransactionManagerName(), depends);
- updateMBeanAttributes(Constants.JmsAttributes.PERSISTENCE_MANAGER_NAME,
- attrs, depends);
+ updateMBeanAttributes(
+ Constants.JmsAttributes.PERSISTENCE_MANAGER_MBEAN, attrs,
+ depends);
/*
- * Update attributes of the JMSUserManager MBean. Note that it uses the
- * same depends object as PersistenceManager:
+ * Update attributes of the PostOffice MBean:
*/
attrs.clear();
putProperty(Constants.JmsAttributes.CREATE_TABLES_ON_STARTUP, jms
+ .isCreatePostOfficeTablesOnStartup(), attrs);
+
+ dataSourceName = jms.getPostOfficeDataSource();
+ inx = dataSourceName.indexOf("/");
+ dataSourceName = dataSourceName.substring(0, inx)
+ + jms.getPostOfficeDataSourceName();
+ putProperty(Constants.JmsAttributes.DATA_SOURCE, dataSourceName, attrs);
+
+ putProperty(Constants.JmsAttributes.SQL_PROPERTIES, jms
+ .getPostOfficeSqlProperties(), attrs);
+ putProperty(Constants.JmsAttributes.POST_OFFICE_NAME, jms
+ .getPostOfficeName(), attrs);
+
+ depends.clear();
+ dataSourceBinding = Constants.JmsAttributes.DATA_SOURCE_BINDING_PREFIX
+ + jms.getPostOfficeDataSourceName();
+ putProperty(Constants.JmsAttributes.DATA_SOURCE_BINDING,
+ dataSourceBinding, depends);
+ putProperty(Constants.JmsAttributes.TRANSACTION_MANAGER, jms
+ .getTransactionManagerName(), depends);
+ putProperty(Constants.JmsAttributes.SERVER_PEER,
+ Constants.JmsAttributes.SERVER_PEER_MBEAN, depends);
+
+ updateMBeanAttributes(Constants.JmsAttributes.POST_OFFICE_MBEAN, attrs,
+ depends);
+
+ /*
+ * Update attributes of the JMSUserManager MBean:
+ */
+ attrs.clear();
+ putProperty(Constants.JmsAttributes.CREATE_TABLES_ON_STARTUP, jms
.isCreateUserTablesOnStartup(), attrs);
dataSourceName = jms.getUserDataSource();
@@ -148,9 +184,15 @@
putProperty(Constants.JmsAttributes.SQL_PROPERTIES, jms
.getUserSqlProperties(), attrs);
- updateMBeanAttributes(Constants.JmsAttributes.JMS_USER_MANAGER_NAME,
+ depends.clear();
+ dataSourceBinding = Constants.JmsAttributes.DATA_SOURCE_BINDING_PREFIX
+ + jms.getUserDataSourceName();
+ putProperty(Constants.JmsAttributes.DATA_SOURCE_BINDING,
+ dataSourceBinding, depends);
+ putProperty(Constants.JmsAttributes.TRANSACTION_MANAGER, jms
+ .getTransactionManagerName(), depends);
+
+ updateMBeanAttributes(Constants.JmsAttributes.JMS_USER_MANAGER_MBEAN,
attrs, depends);
-
}
-
}
\ No newline at end of file
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/MBeanServerDestinationHelper.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/MBeanServerDestinationHelper.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/MBeanServerDestinationHelper.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -176,30 +176,46 @@
* Set common destinatin attributes:
*/
destination.setName(getMBeanStringAttribute(destinationObjectName,
- Constants.CommonAttributes.NAME));
+ Constants.CommonAttributes.NAME));
destination.setJndiName(getMBeanStringAttribute(destinationObjectName,
Constants.CommonAttributes.JNDI_NAME));
- destination.setCreatedProgrammatically(getMBeanBooleanAttribute(destinationObjectName,
+ destination.setDlqName(getMBeanStringAttribute(destinationObjectName,
+ Constants.CommonAttributes.DLQ));
+ destination
+ .setExpiryQueueName(getMBeanStringAttribute(
+ destinationObjectName,
+ Constants.CommonAttributes.EXPIRY_QUEUE));
+ destination.setRedeliveryDelay(getMBeanLongAttribute(
+ destinationObjectName,
+ Constants.CommonAttributes.REDELIVERY_DELAY));
+ destination.setCreatedProgrammatically(getMBeanBooleanAttribute(
+ destinationObjectName,
Constants.CommonAttributes.CREATED_PROGRAMMATICALLY));
+ destination.setMaxSize(getMBeanIntAttribute(destinationObjectName,
+ Constants.CommonAttributes.MAX_SIZE));
+ destination.setFullSize(getMBeanIntAttribute(destinationObjectName,
+ Constants.CommonAttributes.FULL_SIZE));
+ destination.setPageSize(getMBeanIntAttribute(destinationObjectName,
+ Constants.CommonAttributes.PAGE_SIZE));
destination.setDownCacheSize(getMBeanIntAttribute(
destinationObjectName,
Constants.CommonAttributes.DOWN_CACHE_SIZE));
- destination.setFullSize(getMBeanIntAttribute(destinationObjectName,
- Constants.CommonAttributes.FULL_SIZE));
- destination.setPageSize(getMBeanIntAttribute(
+ destination.setClustered(getMBeanBooleanAttribute(
+ destinationObjectName, Constants.CommonAttributes.CLUSTERED));
+ destination.setMessageCounterHistoryDayLimit(getMBeanIntAttribute(
destinationObjectName,
- Constants.CommonAttributes.PAGE_SIZE));
- Element elem = (Element) getMBeanAttribute(
- destinationObjectName,
- Constants.CommonAttributes.SECURITY_CONFIG);
+ Constants.CommonAttributes.MESSAGE_COUNTER_HISTORY_DAY_LIMIT));
+ Element elem = (Element) getMBeanAttribute(destinationObjectName,
+ Constants.CommonAttributes.SECURITY_CONFIG);
destination.setSecurityConfig(elem);
destination.setSecurityRoles(convertSecurityConfigToText(elem));
-
+
try {
ObjectName serverPeerObjectName = getMBeanObjectNameAttribute(
destinationObjectName,
Constants.CommonAttributes.SERVER_PEER);
- if (serverPeerObjectName != null && !"".equals(serverPeerObjectName)) {
+ if (serverPeerObjectName != null
+ && !"".equals(serverPeerObjectName)) {
destination.setServerPeerName(serverPeerObjectName
.getCanonicalName());
}
@@ -210,6 +226,12 @@
logger.error(e);
}
}
+
+ /*
+ * The PostOffice that this destination depends on was not exposed
+ * by the jmx-console, so we'll use the hard-coded name:
+ */
+ destination.setPostOfficeName(Constants.JmsAttributes.POST_OFFICE_MBEAN);
/*
* Set Queue specific attributes:
@@ -218,36 +240,38 @@
((Queue) destination).setMessageCount(getMBeanIntAttribute(
destinationObjectName,
Constants.QueueAttributes.MESSAGE_COUNT));
+ ((Queue) destination)
+ .setScheduledMessageCount(getMBeanIntAttribute(
+ destinationObjectName,
+ Constants.QueueAttributes.SCHEDULED_MESSAGE_COUNT));
+ ((Queue) destination).setConsumerCount(getMBeanIntAttribute(
+ destinationObjectName,
+ Constants.QueueAttributes.CONSUMER_COUNT));
}
/*
* Set Topic specific attributes:
*/
if (destination instanceof Topic) {
- Object[] paramTrue = { Boolean.TRUE };
- Object[] paramFalse = { Boolean.FALSE};
- String[] signature = { "boolean" };
- try {
- Integer durableSubCount = (Integer) getMBeanServer().invoke(
- destinationObjectName, SUBSCRIPTION_COUNT,
- paramTrue, signature);
- ((Topic) destination).setDurableSubCount(durableSubCount.intValue());
- Integer nonDurableSubCount = (Integer) getMBeanServer().invoke(
- destinationObjectName, SUBSCRIPTION_COUNT,
- paramFalse, signature);
- ((Topic) destination).setNonDurableSubCount(nonDurableSubCount.intValue());
- Integer allSubCount = (Integer) getMBeanServer().invoke(
- destinationObjectName, SUBSCRIPTION_COUNT,
- null, null);
- ((Topic) destination).setAllSubCount(allSubCount.intValue());
- } catch (Exception e) {
- /*
- * a bunch of stuff can get thrown here, none on which we can deal
- * with:
- */
- throw new JmsServiceRuntimeException(new Error(
- Error.FAILED_INVOKE_MBEAN_OPERATION, null), e);
- }
+ ((Topic) destination).setAllMessageCount(getMBeanIntAttribute(
+ destinationObjectName,
+ Constants.TopicAttributes.ALL_MESSAGE_COUNT));
+ ((Topic) destination).setDurableMessageCount(getMBeanIntAttribute(
+ destinationObjectName,
+ Constants.TopicAttributes.DURABLE_MESSAGE_COUNT));
+ ((Topic) destination)
+ .setNonDurableMessageCount(getMBeanIntAttribute(
+ destinationObjectName,
+ Constants.TopicAttributes.NON_DURABLE_MESSAGE_COUNT));
+ ((Topic) destination).setAllSubCount(getMBeanIntAttribute(
+ destinationObjectName,
+ Constants.TopicAttributes.ALL_SUBSCRIPTIONS_COUNT));
+ ((Topic) destination).setDurableSubCount(getMBeanIntAttribute(
+ destinationObjectName,
+ Constants.TopicAttributes.DURABLE_SUBSCRIPTIONS_COUNT));
+ ((Topic) destination).setNonDurableSubCount(getMBeanIntAttribute(
+ destinationObjectName,
+ Constants.TopicAttributes.NON_DURABLE_SUBSCRIPTIONS_COUNT));
}
}
Modified: projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/MBeanServerJmsHelper.java
===================================================================
--- projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/MBeanServerJmsHelper.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/main/org/jboss/admin/service/jms/MBeanServerJmsHelper.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -80,64 +80,26 @@
* The Jms object
*/
protected void populateJmsData(Jms jms) {
- ObjectName connectionFactory = null;
ObjectName serverPeer = null;
ObjectName persistenceManager = null;
ObjectName userManager = null;
+ ObjectName postOffice = null;
+ ObjectName defaultDLQ = null;
+ ObjectName defaultExpiryQueue = null;
/*
- * Get the ObjectName of the ConectionFactory:
+ * Get the ObjectName of the ServerPeer:
*/
-
try {
- connectionFactory = new ObjectName(Constants.JmsAttributes.CONNECTION_FACTORY_NAME);
+ serverPeer = new ObjectName(Constants.JmsAttributes.SERVER_PEER_MBEAN);
} catch (Exception e) {
if (logger.isDebugEnabled()) {
- logger.debug("Failed to get ConnectionFactory ObjectName, cause:");
+ logger.debug("Failed to get ServerPeer ObjectName, cause:");
logger.error(e);
}
}
-
/*
- * Get attributes from the ConnectionFactory MBean:
- */
- if (connectionFactory != null) {
- try {
- ObjectName connector = getMBeanObjectNameAttribute(
- connectionFactory, Constants.JmsAttributes.CONNECTOR);
- if (connector != null && !connector.equals("")) {
- jms.setConnectorName(connector.getCanonicalName());
- }
- } catch (Exception e) {
- if (logger.isDebugEnabled()) {
- logger.debug("Failed to get Connector ObjectName, cause:");
- logger.error(e);
- }
- }
- jms.setDefaultTempQueueDownCacheSize(getMBeanIntAttribute(connectionFactory,
- Constants.JmsAttributes.DEFAULT_TEMP_QUEUE_DOWN_CACHE_SIZE));
- jms.setDefaultTempQueueFullSize(getMBeanIntAttribute(connectionFactory,
- Constants.JmsAttributes.DEFAULT_TEMP_QUEUE_FULL_SIZE));
- jms.setDefaultTempQueuePageSize(getMBeanIntAttribute(connectionFactory,
- Constants.JmsAttributes.DEFAULT_TEMP_QUEUE_PAGE_SIZE));
- jms.setPrefetchSize(getMBeanIntAttribute(connectionFactory,
- Constants.JmsAttributes.PREFETCH_SIZE));
- try {
- serverPeer = getMBeanObjectNameAttribute(
- connectionFactory, Constants.JmsAttributes.SERVER_PEER);
- if (serverPeer != null && !serverPeer.equals("")) {
- jms.setServerPeerName(serverPeer.getCanonicalName());
- }
- } catch (Exception e) {
- if (logger.isDebugEnabled()) {
- logger.debug("Failed to get ServerPeer ObjectName, cause:");
- logger.error(e);
- }
- }
- }
-
- /*
* Get attributes from the ServerPeer MBean:
*/
if (serverPeer != null) {
@@ -156,6 +118,27 @@
Constants.JmsAttributes.JMS_PROVIDER_NAME));
jms.setJmsVersion(getMBeanStringAttribute(serverPeer,
Constants.JmsAttributes.JMS_VERSION));
+ jms.setProviderVersion(getMBeanStringAttribute(serverPeer,
+ Constants.JmsAttributes.PROVIDER_VERSION));
+ jms.setQueuedExecutorPoolSize(getMBeanIntAttribute(serverPeer,
+ Constants.JmsAttributes.QUEUED_EXECUTOR_POOL_SIZE));
+ jms.setSecurityDomain(getMBeanStringAttribute(serverPeer,
+ Constants.JmsAttributes.SECURITY_DOMAIN));
+ jms.setServerPeerID(getMBeanStringAttribute(serverPeer,
+ Constants.JmsAttributes.SERVER_PEER_ID));
+//TODO: jms.setDefaultMaxDeliveryAttempts(getMBeanIntAttribute(serverPeer,
+// Constants.JmsAttributes.DEFAULT_MAX_DELIVERY_ATTEMPTS));
+// jms.setDefaultRedeliveryDelay(getMBeanIntAttribute(serverPeer,
+// Constants.JmsAttributes.DEFAULT_REDELIVERY_DELAY));
+// jms.setQueueStatsSamplePeriod(getMBeanIntAttribute(serverPeer,
+// Constants.JmsAttributes.QUEUE_STATS_SAMPLE_PERIOD));
+// jms.setFailoverStartTimeout(getMBeanLongAttribute(serverPeer,
+// Constants.JmsAttributes.FAILOVER_START_TIMEOUT));
+// jms.setFailoverCompleteTimeout(getMBeanLongAttribute(serverPeer,
+// Constants.JmsAttributes.FAILOVER_COMPLETE_TIMEOUT));
+// jms.setDefaultMessageCounterHistoryDayLimit(getMBeanIntAttribute(serverPeer,
+// Constants.JmsAttributes.DEFAULT_MESSAGE_COUNTER_HISTORY_DAY_LIMIT));
+
try {
persistenceManager = getMBeanObjectNameAttribute(
serverPeer, Constants.JmsAttributes.PERSISTENCE_MANAGER);
@@ -168,14 +151,64 @@
logger.error(e);
}
}
- jms.setProviderVersion(getMBeanStringAttribute(serverPeer,
- Constants.JmsAttributes.PROVIDER_VERSION));
- jms.setQueuedExecutorPoolSize(getMBeanIntAttribute(serverPeer,
- Constants.JmsAttributes.QUEUED_EXECUTOR_POOL_SIZE));
- jms.setSecurityDomain(getMBeanStringAttribute(serverPeer,
- Constants.JmsAttributes.SECURITY_DOMAIN));
- jms.setServerPeerID(getMBeanStringAttribute(serverPeer,
- Constants.JmsAttributes.SERVER_PEER_ID));
+
+ try {
+ userManager = getMBeanObjectNameAttribute(
+ serverPeer, Constants.JmsAttributes.JMS_USER_MANAGER);
+ if (userManager != null && !userManager.equals("")) {
+ jms.setUserManagerName(userManager.getCanonicalName());
+ }
+ } catch (Exception e) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Failed to get UserManager ObjectName, cause:");
+ logger.error(e);
+ }
+ }
+
+ try {
+ postOffice = getMBeanObjectNameAttribute(
+ serverPeer, Constants.JmsAttributes.POST_OFFICE);
+ if (postOffice != null && !postOffice.equals("")) {
+ jms.setPostOfficeMBeanName(postOffice.getCanonicalName());
+ }
+ } catch (Exception e) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Failed to get PostOffice ObjectName, cause:");
+ logger.error(e);
+ }
+ }
+
+//TODO: try {
+// defaultDLQ = getMBeanObjectNameAttribute(
+// serverPeer, Constants.JmsAttributes.DEFAULT_DLQ);
+// if (postOffice != null && !postOffice.equals("")) {
+// jms.setDefaultDLQName(defaultDLQ.getCanonicalName());
+// }
+// } catch (Exception e) {
+// if (logger.isDebugEnabled()) {
+// logger.debug("Failed to get DefaultDLQ ObjectName, cause:");
+// logger.error(e);
+// }
+// }
+//
+// try {
+// defaultExpiryQueue = getMBeanObjectNameAttribute(
+// serverPeer, Constants.JmsAttributes.DEFAULT_EXPIRY_QUEUE);
+// if (postOffice != null && !postOffice.equals("")) {
+// jms.setDefaultExpiryQueueName(defaultExpiryQueue.getCanonicalName());
+// }
+// } catch (Exception e) {
+// if (logger.isDebugEnabled()) {
+// logger.debug("Failed to get DefaultExpiryQueue ObjectName, cause:");
+// logger.error(e);
+// }
+// }
+
+ /*
+ * The Connector name that ServrPeer depends on was not exposed
+ * by the jmx-console, so we'll use the hard-coded name:
+ */
+ jms.setConnectorName(Constants.JmsAttributes.CONNECTOR_MBEAN);
}
/*
@@ -231,6 +264,26 @@
jms.setUserSqlProperties(getMBeanStringAttribute(userManager,
Constants.JmsAttributes.SQL_PROPERTIES));
}
+
+ /*
+ * Get attributes from the PostOffice MBean:
+ */
+ if (postOffice != null) {
+ jms.setCreatePostOfficeTablesOnStartup(getMBeanBooleanAttribute(postOffice,
+ Constants.JmsAttributes.CREATE_TABLES_ON_STARTUP));
+ jms.setPostOfficeDataSource(getMBeanStringAttribute(postOffice,
+ Constants.JmsAttributes.DATA_SOURCE));
+ // Get rid of the jndi prefix:
+ String dataSourceName = jms.getPostOfficeDataSource();
+ int inx = dataSourceName.indexOf("/");
+ dataSourceName = dataSourceName.substring(inx+1);
+ jms.setPostOfficeDataSourceName(dataSourceName);
+
+ jms.setPostOfficeSqlProperties(getMBeanStringAttribute(postOffice,
+ Constants.JmsAttributes.SQL_PROPERTIES));
+ jms.setPostOfficeName(getMBeanStringAttribute(postOffice,
+ Constants.JmsAttributes.POST_OFFICE_NAME));
+ }
/*
* Setup the dataSources map:
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/classes/messages/jmsmessages.properties
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/classes/messages/jmsmessages.properties 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/classes/messages/jmsmessages.properties 2007-02-08 23:16:40 UTC (rev 60443)
@@ -23,25 +23,34 @@
jms.section.heading.more.page=More...
jms.section.heading.msgSql.page=Message SQL
jms.section.heading.userSql.page=User SQL
+jms.section.heading.postOfficeSql.page=PostOffice SQL
jms.section.heading.configurable=Configurable Attributes
jms.section.heading.readonly=Read-Only Attributes
jms.section.heading.msgSql=SQL Properties for Message Persistence
-jms.section.heading.userSql=SQL Properties for user info Persistence
+jms.section.heading.userSql=SQL Properties for User Persistence
+jms.section.heading.postOfficeSql=SQL Properties for PostOffice Persistence
#page1
-jms.view.defaultTempQueueDownCacheSize=Default Temp Queue Down Cache Size:
-jms.view.defaultTempQueueFullSize=Default Temp Queue Full Size:
-jms.view.defaultTempQueuePageSize=Default Temp Queue Page Size:
-jms.view.prefetchSize=Prefetch Size:
-jms.view.defaultSecurityRoles=Default Security Roles:
jms.view.queuedExecutorPoolSize=Queued Executor Pool Size:
+jms.view.defaultDLQName=Default DLQ:
+jms.view.defaultMaxDeliveryAttempts=Default Max Delivery Attempts:
+jms.view.defaultExpiryQueueName=Default Expiry Queue:
+jms.view.defaultRedeliveryDelay=Default Redelivery Delay:
+jms.view.queueStatsSamplePeriod=Queue Stats Sample Period:
+jms.view.failoverStartTimeout=Failover Start Timeout:
+jms.view.failoverCompleteTimeout=Failover Complete Timeout:
+jms.view.defaultMessageCounterHistoryDayLimit=Default Message Counter History Day Limit:
jms.view.securityDomain=Security Domain:
-jms.view.createMsgTablesOnStartup=Create Msg Tables On Startup:
+jms.view.defaultSecurityRoles=Default Security Roles:
+jms.view.createMsgTablesOnStartup=Create Message Tables On Startup:
jms.view.maxParams=Max Params:
-jms.view.msgDataSource=Msg Data Source:
+jms.view.msgDataSource=Message Data ource:
jms.view.usingBatchUpdates=Using Batch Updates:
jms.view.createUserTablesOnStartup=Create User Tables On Startup:
jms.view.userDataSource=User Data Source:
+jms.view.createPostOfficeTablesOnStartup=Create Post Office Tables On Startup:
+jms.view.postOfficeDataSource=Post Office Data Source:
+jms.view.postOfficeName=Post Office Name
#page2
jms.view.defaultQueueJNDIContext=Default Queue JNDI Context:
@@ -86,17 +95,28 @@
#page1
destination.view.name=Name:
destination.view.jndiName=JNDI Name:
-destination.view.downCacheSize=Down Cache Size:
+destination.view.dlqName=DLQ:
+destination.view.expiryQueueName=Expiry Queue:
+destination.view.redeliveryDelay=Redelivery Delay
+destination.view.maxSize=Max Size:
destination.view.fullSize=Full Size:
destination.view.pageSize=Page Size:
+destination.view.downCacheSize=Down Cache Size:
destination.view.securityRoles=Security Roles:
+destination.view.clustered=Clustered?
+destination.view.messageCounterHistoryDayLimit= Message Counter History Day Limit:
#page2
destination.view.createdProgrammatically=Created Programmatically?
destination.view.messageCount=Message Count:
+destination.view.scheduledMessageCount=Scheduled Message Count:
+destination.view.consumerCount=Consumer Count:
+destination.view.allMessageCount=All Message Count:
+destination.view.durableMessageCount=Durable Message Count:
+destination.view.nonDurableMessageCount=NonDurable Message Count:
+destination.view.allSubCount=All Subscription Count:
destination.view.durableSubCount=Durable Subscription Count:
-destination.view.nonDurableSubCount=Non-Durable Subscription Count:
-destination.view.allSubCount=All Subscription Count:
+destination.view.nonDurableSubCount=NonDurable Subscription Count:
#Other page
#destination.view.msgCounter=Message counter
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/persistenceSql.properties
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/persistenceSql.properties 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/persistenceSql.properties 2007-02-08 23:16:40 UTC (rev 60443)
@@ -2,31 +2,31 @@
#
# File: persistenceSql.properties
#
-# This file holds the message and user persistence SQL properties
-# for various types of databases. This file will be used by the
-# admin console to load the sql properties for the appropriate
-# database when the user selects a different dataSource.
+# This file holds the message, user, and post office persistence
+# SQL properties for various types of databases. This file will be
+# used by the admin console to load the sql properties for the
+# appropriate database when the user selects a different dataSource.
# If the user selects a database that is not defined in this
-# file, or the properties for the selected database is not
-# available in this file, then the default properties (defined
-# under default.msg.* and default.user.*) will be loaded.
+# file, no sql properties will be loaded. JBoss Messaging will
+# use the default sql properties to persist the data.
#
# To add sql properties for another type of database, perform the
# following steps:
# 1. Define the jdbc driver class and the associated database type
# at the top of the file. e.g.:
-# org.hsqldb.jdbcDriver = hsqldb
-# where "org.hsqldb.jdbcDriver" is the driver class specified
-# in the dataSource, and "hsqldb" is the database type
+# org.gjt.mm.mysql.Driver = mysql
+# where "org.gjt.mm.mysql.Driver" is the driver class specified
+# in the dataSource, and "mysql" is the database type
# (dbType) used in this file to locate the properties.
-# 2. Define the sql properties for message persistence if they
-# are different from the defaults. Use "<dbType>.msg." as
-# the prefix for each property. e.g.:
-# hsqldb.msg.BLOB_TYPE = OBJECT_BLOB
-# 3. Define the sql properties for user persistence if they
-# are different from the defaults. Use "<dbType>.user." as
-# the prefix for each property. e.g.:
-# hsqldb.user.CREATE_TABLES_ON_STARTUP = TRUE
+# 2. Define the sql properties for message persistence.
+# Use "<dbType>.msg." as the prefix for each property. e.g.:
+# mysql.msg.CREATE_MESSAGE_REFERENCE=CREATE TABLE.....
+# 3. Define the sql properties for user persistence.
+# Use "<dbType>.user." as the prefix for each property. e.g.:
+# mysql.user.CREATE_USER_TABLE=CREATE TABLE.....
+# 4. Define the sql properties for the post office.
+# Use "<dbType>.po." as the prefix for each property. e.g.:
+# mysql.po.CREATE_POSTOFFICE_TABLE=CREATE TABLE.....
#
#####################################################################
@@ -38,50 +38,66 @@
##########################################################
org.hsqldb.jdbcDriver = hsqldb
org.postgresql.Driver = postgresql
+org.gjt.mm.mysql.Driver = mysql
##########################################################
-# Hypersonic SQL properties for message persistence
+# MySQL SQL properties for message persistence
##########################################################
-hsqldb.msg.BLOB_TYPE = OBJECT_BLOB
-hsqldb.msg.INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
-hsqldb.msg.INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
-hsqldb.msg.SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
-hsqldb.msg.SELECT_MAX_TX = SELECT MAX(TXID) TXID FROM (SELECT MAX(TXID) AS TXID FROM JMS_TRANSACTIONS UNION SELECT MAX(TXID) AS TXID FROM JMS_MESSAGES)
-hsqldb.msg.DELETE_ALL_TX = DELETE FROM JMS_TRANSACTIONS
-hsqldb.msg.SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
-hsqldb.msg.SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
-hsqldb.msg.MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
-hsqldb.msg.UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=?
-hsqldb.msg.UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=?
-hsqldb.msg.UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
-hsqldb.msg.DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXOP=? AND JMS_MESSAGES.TXID IN (SELECT TXID FROM JMS_TRANSACTIONS)
-hsqldb.msg.DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
-hsqldb.msg.DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
-hsqldb.msg.DELETE_TEMPORARY_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXOP='T'
-hsqldb.msg.DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
-hsqldb.msg.CREATE_MESSAGE_TABLE =CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
-hsqldb.msg.CREATE_IDX_MESSAGE_TXOP_TXID = CREATE INDEX JMS_MESSAGES_TXOP_TXID ON JMS_MESSAGES (TXOP, TXID)
-hsqldb.msg.CREATE_IDX_MESSAGE_DESTINATION = CREATE INDEX JMS_MESSAGES_DESTINATION ON JMS_MESSAGES (DESTINATION)
-hsqldb.msg.CREATE_TX_TABLE = CREATE CACHED TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) )
-hsqldb.msg.CREATE_TABLES_ON_STARTUP = TRUE
+mysql.msg.CREATE_MESSAGE_REFERENCE=CREATE TABLE JMS_MESSAGE_REFERENCE (CHANNELID BIGINT, MESSAGEID BIGINT, TRANSACTIONID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERYCOUNT INTEGER, RELIABLE CHAR(1), LOADED CHAR(1), PRIMARY KEY(CHANNELID, MESSAGEID))
+mysql.msg.CREATE_IDX_MESSAGE_REF_TX=CREATE INDEX JMS_MESSAGE_REF_TX ON JMS_MESSAGE_REFERENCE (TRANSACTIONID)
+mysql.msg.CREATE_IDX_MESSAGE_REF_ORD=CREATE INDEX JMS_MESSAGE_REF_ORD ON JMS_MESSAGE_REFERENCE (ORD)
+mysql.msg.CREATE_IDX_MESSAGE_REF_PAGE_ORD=CREATE INDEX JMS_MESSAGE_REF_LOADED ON JMS_MESSAGE_REFERENCE (PAGE_ORD)
+mysql.msg.CREATE_IDX_MESSAGE_REF_MESSAGEID=CREATE INDEX JMS_MESSAGE_REF_MESSAGEID ON JMS_MESSAGE_REFERENCE (MESSAGEID)
+mysql.msg.CREATE_IDX_MESSAGE_REF_RELIABLE=CREATE INDEX JMS_MESSAGE_REF_RELIABLE ON JMS_MESSAGE_REFERENCE (RELIABLE)
+mysql.msg.CREATE_MESSAGE=CREATE TABLE JMS_MESSAGE (MESSAGEID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, COREHEADERS MEDIUMBLOB, PAYLOAD LONGBLOB, CHANNELCOUNT INTEGER, TYPE TINYINT, JMSTYPE VARCHAR(255), CORRELATIONID VARCHAR(255), CORRELATIONID_BYTES VARBINARY(254), DESTINATION VARCHAR(255), REPLYTO VARCHAR(255), JMSPROPERTIES MEDIUMBLOB, PRIMARY KEY (MESSAGEID))
+mysql.msg.CREATE_TRANSACTION=CREATE TABLE JMS_TRANSACTION (TRANSACTIONID BIGINT, BRANCH_QUAL VARBINARY(254), FORMAT_ID INTEGER, GLOBAL_TXID VARBINARY(254), PRIMARY KEY (TRANSACTIONID))
+mysql.msg.CREATE_COUNTER=CREATE TABLE JMS_COUNTER (NAME VARCHAR(255), NEXT_ID BIGINT, PRIMARY KEY(NAME))
+mysql.msg.INSERT_MESSAGE_REF=INSERT INTO JMS_MESSAGE_REFERENCE (CHANNELID, MESSAGEID, TRANSACTIONID, STATE, ORD, PAGE_ORD, DELIVERYCOUNT, RELIABLE) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
+mysql.msg.DELETE_MESSAGE_REF=DELETE FROM JMS_MESSAGE_REFERENCE WHERE MESSAGEID=? AND CHANNELID=? AND STATE='C'
+mysql.msg.UPDATE_MESSAGE_REF=UPDATE JMS_MESSAGE_REFERENCE SET TRANSACTIONID=?, STATE='-' WHERE MESSAGEID=? AND CHANNELID=? AND STATE='C'
+mysql.msg.UPDATE_PAGE_ORDER=UPDATE JMS_MESSAGE_REFERENCE SET PAGE_ORD = ? WHERE MESSAGEID=? AND CHANNELID=?
+mysql.msg.COMMIT_MESSAGE_REF1=UPDATE JMS_MESSAGE_REFERENCE SET STATE='C', TRANSACTIONID = NULL WHERE TRANSACTIONID=? AND STATE='+'
+mysql.msg.COMMIT_MESSAGE_REF2=DELETE FROM JMS_MESSAGE_REFERENCE WHERE TRANSACTIONID=? AND STATE='-'
+mysql.msg.ROLLBACK_MESSAGE_REF1=DELETE FROM JMS_MESSAGE_REFERENCE WHERE TRANSACTIONID=? AND STATE='+'
+mysql.msg.ROLLBACK_MESSAGE_REF2=UPDATE JMS_MESSAGE_REFERENCE SET STATE='C', TRANSACTIONID = NULL WHERE TRANSACTIONID=? AND STATE='-'
+mysql.msg.LOAD_PAGED_REFS=SELECT MESSAGEID, DELIVERYCOUNT, PAGE_ORD, RELIABLE FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID = ? AND PAGE_ORD BETWEEN ? AND ? ORDER BY PAGE_ORD
+mysql.msg.LOAD_UNPAGED_REFS=SELECT MESSAGEID, DELIVERYCOUNT, RELIABLE FROM JMS_MESSAGE_REFERENCE WHERE PAGE_ORD IS NULL and CHANNELID = ? ORDER BY ORD
+mysql.msg.UPDATE_RELIABLE_REFS_NOT_PAGED=UPDATE JMS_MESSAGE_REFERENCE SET PAGE_ORD = NULL WHERE PAGE_ORD BETWEEN ? AND ? AND CHANNELID=?
+mysql.msg.SELECT_MIN_MAX_PAGE_ORD=SELECT MIN(PAGE_ORD), MAX(PAGE_ORD) FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID = ?
+mysql.msg.SELECT_EXISTS_REF=SELECT MESSAGEID FROM JMS_MESSAGE_REFERENCE WHERE CHANNELID = ? AND MESSAGEID = ?
+mysql.msg.UPDATE_DELIVERYCOUNT=UPDATE JMS_MESSAGE_REFERENCE SET DELIVERYCOUNT = ? WHERE CHANNELID = ? AND MESSAGEID = ?
+mysql.msg.LOAD_MESSAGES=SELECT MESSAGEID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, COREHEADERS, PAYLOAD, CHANNELCOUNT, TYPE, JMSTYPE, CORRELATIONID, CORRELATIONID_BYTES, DESTINATION, REPLYTO, JMSPROPERTIES FROM JMS_MESSAGE
+mysql.msg.INSERT_MESSAGE=INSERT INTO JMS_MESSAGE (MESSAGEID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, COREHEADERS, PAYLOAD, CHANNELCOUNT, TYPE, JMSTYPE, CORRELATIONID, CORRELATIONID_BYTES, DESTINATION, REPLYTO, JMSPROPERTIES) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+mysql.msg.INC_CHANNELCOUNT=UPDATE JMS_MESSAGE SET CHANNELCOUNT = CHANNELCOUNT + 1 WHERE MESSAGEID=?
+mysql.msg.DEC_CHANNELCOUNT=UPDATE JMS_MESSAGE SET CHANNELCOUNT = CHANNELCOUNT - 1 WHERE MESSAGEID=?
+mysql.msg.DELETE_MESSAGE=DELETE FROM JMS_MESSAGE WHERE MESSAGEID=? AND CHANNELCOUNT=0
+mysql.msg.MESSAGEID_COLUMN=MESSAGEID
+mysql.msg.MESSAGE_EXISTS=SELECT MESSAGEID FROM JMS_MESSAGE WHERE MESSAGEID = ? FOR UPDATE
+mysql.msg.INSERT_TRANSACTION=INSERT INTO JMS_TRANSACTION (TRANSACTIONID, BRANCH_QUAL, FORMAT_ID, GLOBAL_TXID) VALUES(?, ?, ?, ?)
+mysql.msg.DELETE_TRANSACTION=DELETE FROM JMS_TRANSACTION WHERE TRANSACTIONID = ?
+mysql.msg.SELECT_PREPARED_TRANSACTIONS=SELECT TRANSACTIONID, BRANCH_QUAL, FORMAT_ID, GLOBAL_TXID FROM JMS_TRANSACTION
+mysql.msg.UPDATE_COUNTER=UPDATE JMS_COUNTER SET NEXT_ID = ? WHERE NAME=?
+mysql.msg.SELECT_COUNTER=SELECT NEXT_ID FROM JMS_COUNTER WHERE NAME=? FOR UPDATE
+mysql.msg.INSERT_COUNTER=INSERT INTO JMS_COUNTER (NAME, NEXT_ID) VALUES (?, ?)
+mysql.msg.SELECT_ALL_CHANNELS=SELECT DISTINCT(CHANNELID) FROM JMS_MESSAGE_REFERENCE
##########################################################
-# Hypersonic SQL properties for user persistence
+# MySQL SQL properties for user persistence
##########################################################
-hsqldb.user.CREATE_TABLES_ON_STARTUP = TRUE
-hsqldb.user.CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USERID))
-hsqldb.user.CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, PRIMARY KEY(USERID, ROLEID))
-hsqldb.user.CREATE_SUBSCRIPTION_TABLE =CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, SELECTOR VARCHAR(255), PRIMARY KEY(CLIENTID, SUBNAME))
-hsqldb.user.GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-hsqldb.user.LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-hsqldb.user.GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
-hsqldb.user.INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
-hsqldb.user.UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
-hsqldb.user.REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-hsqldb.user.GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
-hsqldb.user.GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
+mysql.user.CREATE_USER_TABLE=CREATE TABLE JMS_USER (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USERID))
+mysql.user.CREATE_ROLE_TABLE=CREATE TABLE JMS_ROLE (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, PRIMARY KEY(USERID, ROLEID))
+mysql.user.SELECT_PRECONF_CLIENTID=SELECT CLIENTID FROM JMS_USER WHERE USERID=?
##########################################################
+# MySQL SQL properties for post office persistence
+##########################################################
+
+mysql.po.CREATE_POSTOFFICE_TABLE=CREATE TABLE JMS_POSTOFFICE (POSTOFFICE_NAME VARCHAR(255), NODE_ID INTEGER, QUEUE_NAME VARCHAR(1023), COND VARCHAR(1023), SELECTOR VARCHAR(1023), CHANNEL_ID BIGINT, IS_FAILED_OVER CHAR(1))
+mysql.po.INSERT_BINDING=INSERT INTO JMS_POSTOFFICE (POSTOFFICE_NAME, NODE_ID, QUEUE_NAME, COND, SELECTOR, CHANNEL_ID, IS_FAILED_OVER) VALUES (?, ?, ?, ?, ?, ?, ?)
+mysql.po.DELETE_BINDING=DELETE FROM JMS_POSTOFFICE WHERE POSTOFFICE_NAME=? AND NODE_ID=? AND QUEUE_NAME=?
+mysql.po.LOAD_BINDINGS=SELECT NODE_ID, QUEUE_NAME, COND, SELECTOR, CHANNEL_ID FROM JMS_POSTOFFICE WHERE POSTOFFICE_NAME = ?
+
+##########################################################
# Postgre SQL properties for message persistence
##########################################################
postgresql.msg.CREATE_MESSAGE_REF=CREATE TABLE JMS_MESSAGE_REFERENCE (CHANNELID BIGINT, MESSAGEID BIGINT, TRANSACTIONID BIGINT, STATE CHAR(1), ORD BIGINT, DELIVERYCOUNT INTEGER, RELIABLE CHAR(1), LOADED CHAR(1), PRIMARY KEY(CHANNELID, MESSAGEID))
@@ -124,42 +140,3 @@
postgresql.msg.DELETE_ALL_COUNTERS=DELETE FROM JMS_COUNTER
postgresql.msg.SELECT_ALL_CHANNELS=SELECT DISTINCT(CHANNELID) FROM JMS_MESSAGE_REFERENCE
-##########################################################
-# Default SQL properties for message persistence
-##########################################################
-default.msg.BLOB_TYPE = OBJECT_BLOB
-default.msg.INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
-default.msg.INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
-default.msg.SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
-default.msg.SELECT_MAX_TX = SELECT MAX(TXID) TXID FROM (SELECT MAX(TXID) AS TXID FROM JMS_TRANSACTIONS UNION SELECT MAX(TXID) AS TXID FROM JMS_MESSAGES)
-default.msg.DELETE_ALL_TX = DELETE FROM JMS_TRANSACTIONS
-default.msg.SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
-default.msg.SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGESSTINATION=?
-default.msg.UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=?
-default.msg.UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
-default.msg.DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXOP=? AND JMS_MESSAGES.TXID IN (SELECT TXID FROM JMS_TRANSACTIONS)
-default.msg.DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
-default.msg.DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
-default.msg.DELETE_TEMPORARY_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXOP='T'
-default.msg.DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
-default.msg.CREATE_MESSAGE_TABLE = CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
-default.msg.CREATE_IDX_MESSAGE_TXOP_TXID = CREATE INDEX JMS_MESSAGES_TXOP_TXID ON JMS_MESSAGES (TXOP, TXID)
-default.msg.CREATE_IDX_MESSAGE_DESTINATION = CREATE INDEX JMS_MESSAGES_DESTINATION ON JMS_MESSAGES (DESTINATION)
-default.msg.CREATE_TX_TABLE = CREATE CACHED TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) )
-default.msg.CREATE_TABLES_ON_STARTUP = TRUE
-
-##########################################################
-# Default SQL properties for user persistence
-##########################################################
-default.user.CREATE_TABLES_ON_STARTUP = TRUE
-default.user.CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USERID))
-default.user.CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, PRIMARY KEY(USERID, ROLEID))
-default.user.CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, SELECTOR VARCHAR(255), PRIMARY KEY(CLIENTID, SUBNAME))
-default.user.GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-default.user.LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-default.user.GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
-default.user.INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
-default.user.UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
-default.user.REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
-default.user.GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
-default.user.GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/struts-config.xml
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/struts-config.xml 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/struts-config.xml 2007-02-08 23:16:40 UTC (rev 60443)
@@ -56,6 +56,9 @@
<forward name="page4"
path="jms.detail4.tile"
redirect="false"/>
+ <forward name="page5"
+ path="jms.detail5.tile"
+ redirect="false"/>
</action>
<!--
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/tiles-defs.xml
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/tiles-defs.xml 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/tiles-defs.xml 2007-02-08 23:16:40 UTC (rev 60443)
@@ -44,6 +44,12 @@
<put name="body"
value="/WEB-INF/jsp/jms/detailJms4.jsp"/>
</definition>
+
+ <definition name="jms.detail5.tile"
+ extends="jms.portal.layout">
+ <put name="body"
+ value="/WEB-INF/jsp/jms/detailJms5.jsp"/>
+ </definition>
<!--
JBoss Messaging destination related pages.
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/validation.xml
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/validation.xml 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/conf/jms/validation.xml 2007-02-08 23:16:40 UTC (rev 60443)
@@ -7,26 +7,34 @@
<form-validation>
<global/>
<formset>
- <form name="jms">
- <field property="defaultTempQueueDownCacheSize" depends="integer">
- <arg0 key="jms.view.defaultTempQueueDownCacheSize"/>
+ <form name="jms">
+ <field property="queuedExecutorPoolSize" depends="integer">
+ <arg0 key="jms.view.queuedExecutorPoolSize"/>
</field>
- <field property="defaultTempQueueFullSize" depends="integer">
- <arg0 key="jms.view.defaultTempQueueFullSize"/>
+ <field property="defaultMaxDeliveryAttempts" depends="integer">
+ <arg0 key="jms.view.defaultMaxDeliveryAttempts"/>
</field>
- <field property="defaultTempQueuePageSize" depends="integer">
- <arg0 key="jms.view.defaultTempQueuePageSize"/>
+ <field property="defaultRedeliveryDelay" depends="long">
+ <arg0 key="jms.view.defaultRedeliveryDelay"/>
</field>
- <field property="prefetchSize" depends="integer">
- <arg0 key="jms.view.prefetchSize"/>
+ <field property="queueStatsSamplePeriod" depends="long">
+ <arg0 key="jms.view.queueStatsSamplePeriod"/>
</field>
- <field property="queuedExecutorPoolSize" depends="integer">
- <arg0 key="jms.view.queuedExecutorPoolSize"/>
+ <field property="failoverStartTimeout" depends="long">
+ <arg0 key="jms.view.failoverStartTimeout"/>
</field>
+
+ <field property="failoverCompleteTimeout" depends="long">
+ <arg0 key="jms.view.failoverCompleteTimeout"/>
+ </field>
+
+ <field property="defaultMessageCounterHistoryDayLimit" depends="integer">
+ <arg0 key="jms.view.defaultMessageCounterHistoryDayLimit"/>
+ </field>
<field property="maxParams" depends="integer">
<arg0 key="jms.view.maxParams"/>
@@ -36,9 +44,13 @@
<field property="name" depends="required">
<arg0 key="destination.view.name"/>
</field>
+
+ <field property="redeliveryDelay" depends="long">
+ <arg0 key="destination.view.redeliveryDelay"/>
+ </field>
- <field property="downCacheSize" depends="integer">
- <arg0 key="destination.view.downCacheSize"/>
+ <field property="maxSize" depends="integer">
+ <arg0 key="destination.view.maxSize"/>
</field>
<field property="fullSize" depends="integer">
@@ -48,6 +60,14 @@
<field property="pageSize" depends="integer">
<arg0 key="destination.view.pageSize"/>
</field>
+
+ <field property="downCacheSize" depends="integer">
+ <arg0 key="destination.view.downCacheSize"/>
+ </field>
+
+ <field property="messageCounterHistoryDayLimit" depends="integer">
+ <arg0 key="destination.view.messageCounterHistoryDayLimit"/>
+ </field>
</form>
</formset>
</form-validation>
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailDestination.jsp
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailDestination.jsp 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailDestination.jsp 2007-02-08 23:16:40 UTC (rev 60443)
@@ -103,10 +103,22 @@
<html:text property="jndiName" />
</li>
<li>
- <span class="caseDetailFieldHeader"><fmt:message key="destination.view.downCacheSize" bundle="${jms}" /></span>
- <html:text property="downCacheSize" />
+ <span class="caseDetailFieldHeader"><fmt:message key="destination.view.dlqName" bundle="${jms}" /></span>
+ <html:text property="dlqName" />
</li>
<li>
+ <span class="caseDetailFieldHeader"><fmt:message key="destination.view.expiryQueueName" bundle="${jms}" /></span>
+ <html:text property="expiryQueueName" />
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="destination.view.redeliveryDelay" bundle="${jms}" /></span>
+ <html:text property="redeliveryDelay" />
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="destination.view.maxSize" bundle="${jms}" /></span>
+ <html:text property="maxSize" />
+ </li>
+ <li>
<span class="caseDetailFieldHeader"><fmt:message key="destination.view.fullSize" bundle="${jms}" /></span>
<html:text property="fullSize" />
</li>
@@ -115,9 +127,21 @@
<html:text property="pageSize" />
</li>
<li>
+ <span class="caseDetailFieldHeader"><fmt:message key="destination.view.downCacheSize" bundle="${jms}" /></span>
+ <html:text property="downCacheSize" />
+ </li>
+ <li>
<span class="caseDetailFieldHeader"><fmt:message key="destination.view.securityRoles" bundle="${jms}" /></span>
<br/>
<html:textarea cols="40" rows="3" property="securityRoles" />
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="destination.view.clustered" bundle="${jms}" /></span>
+ <html:checkbox property="clustered" />
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="destination.view.messageCounterHistoryDayLimit" bundle="${jms}" /></span>
+ <html:text property="messageCounterHistoryDayLimit" />
</li>
</ul>
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailDestination2.jsp
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailDestination2.jsp 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailDestination2.jsp 2007-02-08 23:16:40 UTC (rev 60443)
@@ -93,9 +93,33 @@
<td class="caseDetailFieldHeader"><fmt:message key="destination.view.messageCount" bundle="${jms}" /> </td>
<td><bean:write name="destination" property="messageCount"/></td>
</tr>
+ <tr>
+ <td class="caseDetailFieldHeader"><fmt:message key="destination.view.scheduledMessageCount" bundle="${jms}" /> </td>
+ <td><bean:write name="destination" property="scheduledMessageCount"/></td>
+ </tr>
+ <tr>
+ <td class="caseDetailFieldHeader"><fmt:message key="destination.view.consumerCount" bundle="${jms}" /> </td>
+ <td><bean:write name="destination" property="consumerCount"/></td>
+ </tr>
</c:when>
<c:otherwise>
+ <tr>
+ <td class="caseDetailFieldHeader"><fmt:message key="destination.view.allMessageCount" bundle="${jms}" /> </td>
+ <td><bean:write name="destination" property="allMessageCount"/></td>
+ </tr>
+ <tr>
+ <td class="caseDetailFieldHeader"><fmt:message key="destination.view.durableMessageCount" bundle="${jms}" /> </td>
+ <td><bean:write name="destination" property="durableMessageCount"/></td>
+ </tr>
<tr>
+ <td class="caseDetailFieldHeader"><fmt:message key="destination.view.nonDurableMessageCount" bundle="${jms}" /> </td>
+ <td><bean:write name="destination" property="nonDurableMessageCount"/></td>
+ </tr>
+ <tr>
+ <td class="caseDetailFieldHeader"><fmt:message key="destination.view.allSubCount" bundle="${jms}" /> </td>
+ <td><bean:write name="destination" property="allSubCount"/></td>
+ </tr>
+ <tr>
<td class="caseDetailFieldHeader"><fmt:message key="destination.view.durableSubCount" bundle="${jms}" /> </td>
<td><bean:write name="destination" property="durableSubCount"/></td>
</tr>
@@ -103,13 +127,15 @@
<td class="caseDetailFieldHeader"><fmt:message key="destination.view.nonDurableSubCount" bundle="${jms}" /> </td>
<td><bean:write name="destination" property="nonDurableSubCount"/></td>
</tr>
- <tr>
- <td class="caseDetailFieldHeader"><fmt:message key="destination.view.allSubCount" bundle="${jms}" /> </td>
- <td><bean:write name="destination" property="allSubCount"/></td>
- </tr>
+
</c:otherwise>
</c:choose>
</table>
+
+ <% // include hidden values for checked checkboxes specified on other pages %>
+ <logic:equal name="destination" property="clustered" value="true">
+ <html:hidden property="clustered" value="on"/>
+ </logic:equal>
</div>
</html:form>
</div>
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms.jsp
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms.jsp 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms.jsp 2007-02-08 23:16:40 UTC (rev 60443)
@@ -56,6 +56,11 @@
<fmt:message key="jms.section.heading.userSql.page" bundle="${jmsmsg}" />
</a>
</li>
+ <li>
+ <a href="javascript:void(setPageAndSubmit('page5'))">
+ <fmt:message key="jms.section.heading.postOfficeSql.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
</ul>
<p class="sectionHeading">
@@ -84,35 +89,51 @@
<html:hidden property="dispatch" value="navigation"/>
<html:hidden property="destination" value="error"/>
<ul>
- <li>
- <span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultTempQueueDownCacheSize" bundle="${jmsmsg}" /></span>
- <html:text property="defaultTempQueueDownCacheSize" />
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultDLQName" bundle="${jmsmsg}" /></span>
+ <html:text property="defaultDLQName" />
</li>
<li>
- <span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultTempQueueFullSize" bundle="${jmsmsg}" /></span>
- <html:text property="defaultTempQueueFullSize" />
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultMaxDeliveryAttempts" bundle="${jmsmsg}" /></span>
+ <html:text property="defaultMaxDeliveryAttempts" />
</li>
<li>
- <span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultTempQueuePageSize" bundle="${jmsmsg}" /></span>
- <html:text property="defaultTempQueuePageSize" />
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultExpiryQueueName" bundle="${jmsmsg}" /></span>
+ <html:text property="defaultExpiryQueueName" />
</li>
<li>
- <span class="caseDetailFieldHeader"><fmt:message key="jms.view.prefetchSize" bundle="${jmsmsg}" /></span>
- <html:text property="prefetchSize" />
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultRedeliveryDelay" bundle="${jmsmsg}" /></span>
+ <html:text property="defaultRedeliveryDelay" />
</li>
<li>
<span class="caseDetailFieldHeader"><fmt:message key="jms.view.queuedExecutorPoolSize" bundle="${jmsmsg}" /></span>
<html:text property="queuedExecutorPoolSize" />
</li>
<li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.queueStatsSamplePeriod" bundle="${jmsmsg}" /></span>
+ <html:text property="queueStatsSamplePeriod" />
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.failoverStartTimeout" bundle="${jmsmsg}" /></span>
+ <html:text property="failoverStartTimeout" />
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.failoverCompleteTimeout" bundle="${jmsmsg}" /></span>
+ <html:text property="failoverCompleteTimeout" />
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultMessageCounterHistoryDayLimit" bundle="${jmsmsg}" /></span>
+ <html:text property="defaultMessageCounterHistoryDayLimit" />
+ </li>
+ <li>
<span class="caseDetailFieldHeader"><fmt:message key="jms.view.securityDomain" bundle="${jmsmsg}" /></span>
<html:text property="securityDomain" />
</li>
<li>
<span class="caseDetailFieldHeader"><fmt:message key="jms.view.defaultSecurityRoles" bundle="${jmsmsg}" /></span>
- <br/>
<html:textarea cols="30" rows="2" property="defaultSecurityRoles" />
</li>
+ <br/> <br/>
<li>
<span class="caseDetailFieldHeader"><fmt:message key="jms.view.createMsgTablesOnStartup" bundle="${jmsmsg}" /></span>
<html:checkbox property="createMsgTablesOnStartup" />
@@ -128,6 +149,11 @@
<html:checkbox property="usingBatchUpdates" />
</li>
<li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.maxParams" bundle="${jmsmsg}" /></span>
+ <html:text property="maxParams" />
+ </li>
+ <br/> <br/>
+ <li>
<span class="caseDetailFieldHeader"><fmt:message key="jms.view.createUserTablesOnStartup" bundle="${jmsmsg}" /></span>
<html:checkbox property="createUserTablesOnStartup" />
</li>
@@ -137,6 +163,21 @@
<html:options property="dataSourceOptions" />
</html:select>
</li>
+ <br/> <br/>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.createPostOfficeTablesOnStartup" bundle="${jmsmsg}" /></span>
+ <html:checkbox property="createPostOfficeTablesOnStartup" />
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.postOfficeDataSource" bundle="${jmsmsg}" /></span>
+ <html:select property="postOfficeDataSourceName" >
+ <html:options property="dataSourceOptions" />
+ </html:select>
+ </li>
+ <li>
+ <span class="caseDetailFieldHeader"><fmt:message key="jms.view.postOfficeName" bundle="${jmsmsg}" /></span>
+ <html:text property="postOfficeName" />
+ </li>
</ul>
<html:submit onclick="setDispatch('save');"><fmt:message key="destination.button.save" bundle="${jmsmsg}" /></html:submit>
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms2.jsp
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms2.jsp 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms2.jsp 2007-02-08 23:16:40 UTC (rev 60443)
@@ -56,6 +56,11 @@
<fmt:message key="jms.section.heading.userSql.page" bundle="${jmsmsg}" />
</a>
</li>
+ <li>
+ <a href="javascript:void(setPageAndSubmit('page5'))">
+ <fmt:message key="jms.section.heading.postOfficeSql.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
</ul>
<p class="sectionHeading">
@@ -114,11 +119,14 @@
<logic:equal name="jms" property="createMsgTablesOnStartup" value="true">
<html:hidden property="createMsgTablesOnStartup" value="on"/>
</logic:equal>
+ <logic:equal name="jms" property="usingBatchUpdates" value="true">
+ <html:hidden property="usingBatchUpdates" value="on"/>
+ </logic:equal>
<logic:equal name="jms" property="createUserTablesOnStartup" value="true">
<html:hidden property="createUserTablesOnStartup" value="on"/>
</logic:equal>
- <logic:equal name="jms" property="usingBatchUpdates" value="true">
- <html:hidden property="usingBatchUpdates" value="on"/>
+ <logic:equal name="jms" property="createPostOfficeTablesOnStartup" value="true">
+ <html:hidden property="createPostOfficeTablesOnStartup" value="on"/>
</logic:equal>
</div>
</html:form>
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms3.jsp
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms3.jsp 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms3.jsp 2007-02-08 23:16:40 UTC (rev 60443)
@@ -57,6 +57,11 @@
<fmt:message key="jms.section.heading.userSql.page" bundle="${jmsmsg}" />
</a>
</li>
+ <li>
+ <a href="javascript:void(setPageAndSubmit('page5'))">
+ <fmt:message key="jms.section.heading.postOfficeSql.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
</ul>
<p class="sectionHeading">
@@ -107,11 +112,14 @@
<logic:equal name="jms" property="createMsgTablesOnStartup" value="true">
<html:hidden property="createMsgTablesOnStartup" value="on"/>
</logic:equal>
+ <logic:equal name="jms" property="usingBatchUpdates" value="true">
+ <html:hidden property="usingBatchUpdates" value="on"/>
+ </logic:equal>
<logic:equal name="jms" property="createUserTablesOnStartup" value="true">
<html:hidden property="createUserTablesOnStartup" value="on"/>
</logic:equal>
- <logic:equal name="jms" property="usingBatchUpdates" value="true">
- <html:hidden property="usingBatchUpdates" value="on"/>
+ <logic:equal name="jms" property="createPostOfficeTablesOnStartup" value="true">
+ <html:hidden property="createPostOfficeTablesOnStartup" value="on"/>
</logic:equal>
</div>
</html:form>
Modified: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms4.jsp
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms4.jsp 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms4.jsp 2007-02-08 23:16:40 UTC (rev 60443)
@@ -56,6 +56,11 @@
<fmt:message key="jms.section.heading.userSql.page" bundle="${jmsmsg}" />
</a>
</li>
+ <li>
+ <a href="javascript:void(setPageAndSubmit('page5'))">
+ <fmt:message key="jms.section.heading.postOfficeSql.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
</ul>
<p class="sectionHeading">
@@ -100,11 +105,14 @@
<logic:equal name="jms" property="createMsgTablesOnStartup" value="true">
<html:hidden property="createMsgTablesOnStartup" value="on"/>
</logic:equal>
+ <logic:equal name="jms" property="usingBatchUpdates" value="true">
+ <html:hidden property="usingBatchUpdates" value="on"/>
+ </logic:equal>
<logic:equal name="jms" property="createUserTablesOnStartup" value="true">
<html:hidden property="createUserTablesOnStartup" value="on"/>
</logic:equal>
- <logic:equal name="jms" property="usingBatchUpdates" value="true">
- <html:hidden property="usingBatchUpdates" value="on"/>
+ <logic:equal name="jms" property="createPostOfficeTablesOnStartup" value="true">
+ <html:hidden property="createPostOfficeTablesOnStartup" value="on"/>
</logic:equal>
</div>
</html:form>
Added: projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms5.jsp
===================================================================
--- projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms5.jsp (rev 0)
+++ projects/admin-console/trunk/src/resources/admin-console.war/WEB-INF/jsp/jms/detailJms5.jsp 2007-02-08 23:16:40 UTC (rev 60443)
@@ -0,0 +1,119 @@
+<!--
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ include file="/WEB-INF/jsp/common/taglibs.inc.jsp" %>
+<html:xhtml/>
+<fmt:setBundle basename="messages.jmsmessages" var="jmsmsg" scope="page"/>
+<div id="main">
+ <script>
+ function setPageAndSubmit(target){
+ document.forms["jms"].destination.value=target;
+ document.forms["jms"].submit();
+ }
+ function setDispatch(target) {
+ document.forms["jms"].dispatch.value=target;
+ }
+ </script>
+
+ <ul class="navigation">
+ <li>
+ <a href="javascript:void(setPageAndSubmit('page1'))">
+ <fmt:message key="jms.section.heading.settings.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
+ <li>
+ <a href="javascript:void(setPageAndSubmit('page2'))">
+ <fmt:message key="jms.section.heading.more.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
+ <li>
+ <a href="javascript:void(setPageAndSubmit('page3'))">
+ <fmt:message key="jms.section.heading.msgSql.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
+ <li>
+ <a href="javascript:void(setPageAndSubmit('page4'))">
+ <fmt:message key="jms.section.heading.userSql.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
+ <li>
+ <a class="active">
+ <fmt:message key="jms.section.heading.postOfficeSql.page" bundle="${jmsmsg}" />
+ </a>
+ </li>
+ </ul>
+
+ <p class="sectionHeading">
+ <span class="sectionHeadingText">
+ <fmt:message key="jms.section.heading.manage" bundle="${jmsmsg}" />
+ <fmt:message key="jms.section.heading.postOfficeSql" bundle="${jmsmsg}" />
+ </span>
+ </p>
+
+ <logic:messagesPresent message="false">
+ <p class="error">
+ <html:errors /><br/>
+ </p>
+ </logic:messagesPresent >
+ <logic:messagesPresent message="true">
+ <p class="infoMessage">
+ <html:messages id="theMessage" message="true">
+ <%= theMessage %>
+ </html:messages>
+ </p>
+ </logic:messagesPresent >
+
+ <bean:define id="jmsForm" name="jms" type="org.jboss.admin.console.web.struts.jms.JmsForm"/>
+ <html:form action="jms/save">
+ <div class="caseDetail">
+ <html:hidden property="dispatch" value="navigation"/>
+ <html:hidden property="destination" value="error"/>
+ <ul>
+ <logic:iterate id="element" name="jms" property="postOfficeSqlMap">
+ <bean:define id="sqlKey" name="element" property="key" />
+ <% String name = "iserSqlMap(" + sqlKey + ")"; %>
+ <li>
+ <span class="caseDetailFieldHeader">
+ <bean:write name="sqlKey"/>=
+ </span>
+ <html:text property="<%= name %>" size="60" />
+ </li>
+ </logic:iterate>
+ </ul>
+
+ <% // include hidden values for checked checkboxes specified on other pages %>
+ <logic:equal name="jms" property="createMsgTablesOnStartup" value="true">
+ <html:hidden property="createMsgTablesOnStartup" value="on"/>
+ </logic:equal>
+ <logic:equal name="jms" property="usingBatchUpdates" value="true">
+ <html:hidden property="usingBatchUpdates" value="on"/>
+ </logic:equal>
+ <logic:equal name="jms" property="createUserTablesOnStartup" value="true">
+ <html:hidden property="createUserTablesOnStartup" value="on"/>
+ </logic:equal>
+ <logic:equal name="jms" property="createPostOfficeTablesOnStartup" value="true">
+ <html:hidden property="createPostOfficeTablesOnStartup" value="on"/>
+ </logic:equal>
+ </div>
+ </html:form>
+</div>
\ No newline at end of file
Modified: projects/admin-console/trunk/src/test/org/jboss/admin/model/jms/DestinationTest.java
===================================================================
--- projects/admin-console/trunk/src/test/org/jboss/admin/model/jms/DestinationTest.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/test/org/jboss/admin/model/jms/DestinationTest.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -77,6 +77,9 @@
dest.setJndiName("queue/testQ");
assertEquals("queue/testQ", dest.getJndiName());
+ dest.setClustered(false);
+ assertFalse(dest.isClustered());
+
dest.setCreatedProgrammatically(true);
assertTrue(dest.isCreatedProgrammatically());
Modified: projects/admin-console/trunk/src/test/org/jboss/admin/service/jms/DeploymentServiceDestinationHelperTest.java
===================================================================
--- projects/admin-console/trunk/src/test/org/jboss/admin/service/jms/DeploymentServiceDestinationHelperTest.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/test/org/jboss/admin/service/jms/DeploymentServiceDestinationHelperTest.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -53,260 +53,256 @@
* @version $Revision: 56034 $
*/
public class DeploymentServiceDestinationHelperTest extends TestCase {
- private MockControl control;
+ private MockControl control;
- private MBeanServer mockMBeanServer;
+ private MBeanServer mockMBeanServer;
- private MBeanServerHelper mbeanServerHelper;
+ private MBeanServerHelper mbeanServerHelper;
- private DeploymentServiceDestinationHelper service;
-
- private ServiceTestHelper hService;
+ private DeploymentServiceDestinationHelper service;
- private MockControl deploymentServiceControl;
+ private ServiceTestHelper hService;
- private DeploymentServiceMBean mockDeploymentService;
+ private MockControl deploymentServiceControl;
- private MockControl invocationHandlerControl;
+ private DeploymentServiceMBean mockDeploymentService;
- private MBeanServerInvocationHandler mockInvocationHandler;
+ private MockControl invocationHandlerControl;
- /**
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- control = MockClassControl.createControl(MBeanServer.class);
- mockMBeanServer = (MBeanServer) control.getMock();
+ private MBeanServerInvocationHandler mockInvocationHandler;
- mbeanServerHelper = new MBeanServerHelper(mockMBeanServer);
- service = new DeploymentServiceDestinationHelper(mbeanServerHelper);
- hService = new ServiceTestHelper(service);
+ /**
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ control = MockClassControl.createControl(MBeanServer.class);
+ mockMBeanServer = (MBeanServer) control.getMock();
- deploymentServiceControl = MockClassControl
- .createControl(DeploymentServiceMBean.class);
- mockDeploymentService = (DeploymentServiceMBean) deploymentServiceControl
- .getMock();
+ mbeanServerHelper = new MBeanServerHelper(mockMBeanServer);
+ service = new DeploymentServiceDestinationHelper(mbeanServerHelper);
+ hService = new ServiceTestHelper(service);
- mbeanServerHelper.setDeploymentServiceProxy(mockDeploymentService);
- }
+ deploymentServiceControl = MockClassControl
+ .createControl(DeploymentServiceMBean.class);
+ mockDeploymentService = (DeploymentServiceMBean) deploymentServiceControl
+ .getMock();
- /**
- * @see TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
+ mbeanServerHelper.setDeploymentServiceProxy(mockDeploymentService);
+ }
- /**
- * Tests action to create a destination.
- *
- * @throws Exception
- */
- public void testCreateDestination() throws Exception {
+ /**
+ * @see TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
- /*
- * Setup test data:
- */
- Queue queue = new Queue();
- queue.setName("testQueue");
- String moduleName = "testQueue";
- String templateName = "jms-queue";
- Map attributes = new HashMap();
- attributes.put("testKey", "testData");
+ /**
+ * Tests action to create a destination.
+ *
+ * @throws Exception
+ */
+ public void testCreateDestination() throws Exception {
- /*
- * Tell the mock what method to expect to be called and what value to
- * return:
- */
- mockDeploymentService.createModule(moduleName, templateName,
- (HashMap) attributes);
- deploymentServiceControl.setMatcher(MockControl.ALWAYS_MATCHER);
- deploymentServiceControl.setReturnValue("testQueue-service.xml");
- String moduleToBeDeployed = "testQueue-service.xml";
- mockDeploymentService.deployModuleAsynch(moduleToBeDeployed);
- deploymentServiceControl.setVoidCallable();
+ /*
+ * Setup test data:
+ */
+ Queue queue = new Queue();
+ queue.setName("testQueue");
+ String moduleName = "testQueue";
+ String templateName = "jms-queue";
+ Map attributes = new HashMap();
+ attributes.put("testKey", "testData");
- /*
- * Finish off test setup:
- */
- deploymentServiceControl.replay();
+ /*
+ * Tell the mock what method to expect to be called and what value to
+ * return:
+ */
+ mockDeploymentService.createModule(moduleName, templateName,
+ (HashMap) attributes);
+ deploymentServiceControl.setMatcher(MockControl.ALWAYS_MATCHER);
+ deploymentServiceControl.setReturnValue("testQueue-service.xml");
+ String moduleToBeDeployed = "testQueue-service.xml";
+ mockDeploymentService.deployModuleAsynch(moduleToBeDeployed);
+ deploymentServiceControl.setVoidCallable();
- /*
- * Run the method under test:
- */
- service.createDestination(queue);
+ /*
+ * Finish off test setup:
+ */
+ deploymentServiceControl.replay();
- /*
- * Check all the mock methods were called correctly:
- */
- deploymentServiceControl.verify();
- }
+ /*
+ * Run the method under test:
+ */
+ service.createDestination(queue);
- /**
- * Tests action to put security role attributes into a map.
- */
- public void testPutSecurityRolesAttribute() {
- Map map = new HashMap();
- StringBuffer roles = new StringBuffer();
- roles.append("admin:read:write:create\r\n");
- roles.append("quest:read\r\n");
- String key = Constants.CommonAttributes.SECURITY_ROLES;
+ /*
+ * Check all the mock methods were called correctly:
+ */
+ deploymentServiceControl.verify();
+ }
- service.putSecurityRolesAttribute(roles.toString(), map);
- String[] roleArray = (String[]) map.get(key);
+ /**
+ * Tests action to put security role attributes into a map.
+ */
+ public void testPutSecurityRolesAttribute() {
+ Map map = new HashMap();
+ StringBuffer roles = new StringBuffer();
+ roles.append("admin:read:write:create\r\n");
+ roles.append("quest:read\r\n");
+ String key = Constants.CommonAttributes.SECURITY_ROLES;
- assertEquals(roleArray.length, 2);
- assertEquals(roleArray[0], "admin:read:write:create");
- assertEquals(roleArray[1], "quest:read");
- }
+ service.putSecurityRolesAttribute(roles.toString(), map);
+ String[] roleArray = (String[]) map.get(key);
- /**
- * Tests action to put a string attribute into a map.
- */
- public void testPutNotNullStringAttribute() {
- Map map = new HashMap();
- hService.putAttribute("keyNotNull", "textString", map);
- assertEquals(map.get("keyNotNull"), "textString");
- }
+ assertEquals(roleArray.length, 2);
+ assertEquals(roleArray[0], "admin:read:write:create");
+ assertEquals(roleArray[1], "quest:read");
+ }
- /**
- * Tests action to put a null string attribute into a map.
- */
- public void testPutNullStringAttribute() {
- Map map = new HashMap();
- hService.putAttribute("keyNull", (String) null, map);
- assertTrue(map.isEmpty());
- }
+ /**
+ * Tests action to put a string attribute into a map.
+ */
+ public void testPutNotNullStringAttribute() {
+ Map map = new HashMap();
+ hService.putAttribute("keyNotNull", "textString", map);
+ assertEquals(map.get("keyNotNull"), "textString");
+ }
- /**
- * Tests action to put an empty string attribute into a map.
- */
- public void testPutEmptyStringAttribute() {
- Map map = new HashMap();
- hService.putAttribute("keyEmpty", "", map);
- assertTrue(map.isEmpty());
- }
+ /**
+ * Tests action to put a null string attribute into a map.
+ */
+ public void testPutNullStringAttribute() {
+ Map map = new HashMap();
+ hService.putAttribute("keyNull", (String) null, map);
+ assertTrue(map.isEmpty());
+ }
- /**
- * Tests action to put a class attribute into a map.
- */
- public void testPutClassTypeAttribute() {
- Map map = new HashMap();
- hService.putAttribute("keyClass", "java.lang.String", map);
- assertEquals(map.get("keyClass"), "java.lang.String");
- }
+ /**
+ * Tests action to put an empty string attribute into a map.
+ */
+ public void testPutEmptyStringAttribute() {
+ Map map = new HashMap();
+ hService.putAttribute("keyEmpty", "", map);
+ assertTrue(map.isEmpty());
+ }
- /**
- * Tests action to get common destination attributes from a given
- * destination.
- *
- * @throws Exception
- */
- public void testGetCommonDestinationAttributes() throws Exception {
- Destination dest = new Destination();
- dest.setName("testQueue");
- dest.setJndiName("/queue/testQueue");
- dest.setDownCacheSize(1000);
- dest.setFullSize(80000);
- dest.setPageSize(3000);
- dest.setSecurityRoles("user:read:write");
-
- Map map = service.getCommonDestinationAttributes(dest);
- assertEquals( "testQueue", map.get(Constants.CommonAttributes.NAME));
- assertEquals(map.get(Constants.CommonAttributes.JNDI_NAME),
- "/queue/testQueue");
- assertEquals(
- ((Integer) map
- .get(Constants.CommonAttributes.DOWN_CACHE_SIZE))
- .intValue(), 1000);
- assertEquals(
- ((Integer) map
- .get(Constants.CommonAttributes.FULL_SIZE))
- .intValue(), 80000);
- assertEquals(
- ((Integer) map
- .get(Constants.CommonAttributes.PAGE_SIZE))
- .intValue(), 3000);
- String[] securityRole = (String[]) map
- .get(Constants.CommonAttributes.SECURITY_ROLES);
- assertEquals(securityRole.length, 1);
- }
+ /**
+ * Tests action to put a class attribute into a map.
+ */
+ public void testPutClassTypeAttribute() {
+ Map map = new HashMap();
+ hService.putAttribute("keyClass", "java.lang.String", map);
+ assertEquals(map.get("keyClass"), "java.lang.String");
+ }
- /**
- * Tests action to check whether a destination was created by the
- * DeploymentService.
- *
- * @throws Exception
- */
- public void testWasDestinationCreatedViaDeploymentService()
- throws Exception {
- final String DEPLOYMENT_SERVICE_OBJECT_NAME = "jboss:service=DeploymentService";
+ /**
+ * Tests action to get common destination attributes from a given
+ * destination.
+ *
+ * @throws Exception
+ */
+ public void testGetCommonDestinationAttributes() throws Exception {
+ Destination dest = new Destination();
+ dest.setName("testQueue");
+ dest.setJndiName("/queue/testQueue");
+ dest.setClustered(true);
+ dest.setDownCacheSize(1000);
+ dest.setFullSize(80000);
+ dest.setPageSize(3000);
+ dest.setSecurityRoles("user:read:write");
- /*
- * Setup the test data:
- */
- DestinationIdentifier id = new DestinationIdentifier("abc|def");
+ Map map = service.getCommonDestinationAttributes(dest);
+ assertEquals("testQueue", map.get(Constants.CommonAttributes.NAME));
+ assertEquals("/queue/testQueue", map
+ .get(Constants.CommonAttributes.JNDI_NAME));
+ assertTrue((Boolean) map.get(Constants.CommonAttributes.CLUSTERED));
+ assertEquals(1000, ((Integer) map
+ .get(Constants.CommonAttributes.DOWN_CACHE_SIZE)).intValue());
+ assertEquals(80000, ((Integer) map
+ .get(Constants.CommonAttributes.FULL_SIZE)).intValue());
+ assertEquals(3000, ((Integer) map
+ .get(Constants.CommonAttributes.PAGE_SIZE)).intValue());
+ String[] securityRole = (String[]) map
+ .get(Constants.CommonAttributes.SECURITY_ROLES);
+ assertEquals(1, securityRole.length);
+ }
- /*
- * Tell the mock what method to expect to be called and what value to
- * return:
- */
- mockMBeanServer.invoke(new ObjectName(DEPLOYMENT_SERVICE_OBJECT_NAME),
- "getDeployedURL", new Object[] { id.getModuleName() },
- new String[] { "java.lang.String" });
- control.setMatcher(MockControl.ALWAYS_MATCHER);
- control.setReturnValue(new String("an object"));
+ /**
+ * Tests action to check whether a destination was created by the
+ * DeploymentService.
+ *
+ * @throws Exception
+ */
+ public void testWasDestinationCreatedViaDeploymentService()
+ throws Exception {
+ final String DEPLOYMENT_SERVICE_OBJECT_NAME = "jboss:service=DeploymentService";
- /*
- * Finish off test setup:
- */
- control.replay();
+ /*
+ * Setup the test data:
+ */
+ DestinationIdentifier id = new DestinationIdentifier("abc|def");
- /*
- * Run the method method under test:
- */
- boolean returnValue = service
- .wasDestinationCreatedViaDeploymentService(id);
+ /*
+ * Tell the mock what method to expect to be called and what value to
+ * return:
+ */
+ mockMBeanServer.invoke(new ObjectName(DEPLOYMENT_SERVICE_OBJECT_NAME),
+ "getDeployedURL", new Object[] { id.getModuleName() },
+ new String[] { "java.lang.String" });
+ control.setMatcher(MockControl.ALWAYS_MATCHER);
+ control.setReturnValue(new String("an object"));
- /*
- * Check returned data:
- */
- assertTrue(returnValue);
+ /*
+ * Finish off test setup:
+ */
+ control.replay();
- /*
- * Check all the mock methods were called correctly:
- */
- control.verify();
- }
+ /*
+ * Run the method method under test:
+ */
+ boolean returnValue = service
+ .wasDestinationCreatedViaDeploymentService(id);
- /**
- * Tests action to check whether a destination was created by the
- * DeploymentService.
- *
- * @throws Exception
- */
- public void testWasDestinationCreatedViaDeploymentService2()
- throws Exception {
- /*
- * Set test data:
- */
- File f = new File(
- "src/etc/test/server/default/deploy/deployment-service/");
- String fs = "file://" + f.getAbsolutePath() + "/";
- fs = fs.replace('\\', '/');
- URL url = new URL(fs);
- DeploymentInfo deploymentInfo = new DeploymentInfo(url, null, null);
+ /*
+ * Check returned data:
+ */
+ assertTrue(returnValue);
- /*
- * Run the method under test:
- */
- boolean returnValue = service
- .wasDestinationCreatedViaDeploymentService(deploymentInfo);
+ /*
+ * Check all the mock methods were called correctly:
+ */
+ control.verify();
+ }
- /*
- * Check the return data:
- */
- assertTrue(returnValue);
- }
+ /**
+ * Tests action to check whether a destination was created by the
+ * DeploymentService.
+ *
+ * @throws Exception
+ */
+ public void testWasDestinationCreatedViaDeploymentService2()
+ throws Exception {
+ /*
+ * Set test data:
+ */
+ File f = new File(
+ "src/etc/test/server/default/deploy/deployment-service/");
+ String fs = "file://" + f.getAbsolutePath() + "/";
+ fs = fs.replace('\\', '/');
+ URL url = new URL(fs);
+ DeploymentInfo deploymentInfo = new DeploymentInfo(url, null, null);
+
+ /*
+ * Run the method under test:
+ */
+ boolean returnValue = service
+ .wasDestinationCreatedViaDeploymentService(deploymentInfo);
+
+ /*
+ * Check the return data:
+ */
+ assertTrue(returnValue);
+ }
}
\ No newline at end of file
Modified: projects/admin-console/trunk/src/test/org/jboss/admin/service/jms/MBeanServerDestinationHelperTest.java
===================================================================
--- projects/admin-console/trunk/src/test/org/jboss/admin/service/jms/MBeanServerDestinationHelperTest.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/test/org/jboss/admin/service/jms/MBeanServerDestinationHelperTest.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -276,6 +276,8 @@
control.setReturnValue("q1");
mockMBeanServer.getAttribute(objName, "JNDIName");
control.setReturnValue("/queue/q1");
+ mockMBeanServer.getAttribute(objName, "Clustered");
+ control.setReturnValue(Boolean.valueOf(true));
mockMBeanServer.getAttribute(objName, "CreatedProgrammatically");
control.setReturnValue(Boolean.valueOf(false));
mockMBeanServer.getAttribute(objName, "DownCacheSize");
@@ -326,6 +328,7 @@
*/
assertEquals("q1", q1.getName());
assertEquals("/queue/q1", q1.getJndiName());
+ assertTrue(q1.isClustered());
assertFalse(q1.isCreatedProgrammatically());
assertEquals(2000, q1.getDownCacheSize());
assertEquals(75000, q1.getFullSize());
Modified: projects/admin-console/trunk/src/webtest/org/jboss/admin/console/webtest/JmsDestinationTestCase.java
===================================================================
--- projects/admin-console/trunk/src/webtest/org/jboss/admin/console/webtest/JmsDestinationTestCase.java 2007-02-08 22:46:48 UTC (rev 60442)
+++ projects/admin-console/trunk/src/webtest/org/jboss/admin/console/webtest/JmsDestinationTestCase.java 2007-02-08 23:16:40 UTC (rev 60443)
@@ -75,7 +75,7 @@
protected final static String VIEW_DATA_BUTTON = "View Data";
protected final static String REMOVE_ALL_MESSAGES_BUTTON = "Remove All Messages";
-
+
protected final static String VIEW_MESSAGES_BUTTON = "View Messages";
protected final Properties msgProps;
@@ -417,8 +417,8 @@
/**
* Verify the provided page contains the expected input fields of the
- * "Settings" page of a JBossMQ destination. Note that the values of the input
- * fields are not checked.
+ * "Settings" page of a JBossMQ destination. Note that the values of the
+ * input fields are not checked.
*
* @param page
* The page to be verified
@@ -433,6 +433,8 @@
HtmlTextInput name = (HtmlTextInput) form.getInputByName("name");
HtmlTextInput jndiName = (HtmlTextInput) form
.getInputByName("jndiName");
+ HtmlCheckBoxInput clustered = (HtmlCheckBoxInput) form
+ .getInputByName("clustered");
HtmlTextInput downCacheSize = (HtmlTextInput) form
.getInputByName("downCacheSize");
HtmlTextInput fullSize = (HtmlTextInput) form
@@ -482,6 +484,7 @@
/*
* Verify the message count on the specified entry:
*/
- assertEquals(Integer.toString(msgCount), table.getCellAt(entryNo, 4).asText());
+ assertEquals(Integer.toString(msgCount), table.getCellAt(entryNo, 4)
+ .asText());
}
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list