Index: jms-plugin/src/main/resources/jmsAvailabilityService.jsf =================================================================== --- jms-plugin/src/main/resources/jmsAvailabilityService.jsf (revision 44781) +++ jms-plugin/src/main/resources/jmsAvailabilityService.jsf (working copy) @@ -2,7 +2,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -83,21 +83,18 @@ #include "/common/shared/configNameSection.inc" - + - - - - + - + - + @@ -117,4 +114,4 @@ #include "/common/shared/changeButtonsJS.inc" - \ No newline at end of file + Index: jms-plugin/src/main/resources/org/glassfish/jms/admingui/Strings.properties =================================================================== --- jms-plugin/src/main/resources/org/glassfish/jms/admingui/Strings.properties (revision 44781) +++ jms-plugin/src/main/resources/org/glassfish/jms/admingui/Strings.properties (working copy) @@ -334,21 +334,16 @@ availability.jmsAvailability=JMS Availability availability.jmsAvailabilityInfo=Availability for JMS availability.jmsAvailabilityInfoHelp=Enable JMS Availability Service. If true, the MQ cluster pointed to by the jms-service element is a HA (enhanced). If false, then the MQ cluster pointed to by the jms-service element is considered non-HA (Conventional MQ cluster) cluster. -availability.storePoolName=MQ Store Pool Name: -availability.storePoolNameHelp=JNDI name of the JDBC Resource used by the MQ broker cluster when saving persistent JMS messages and other broker cluster configuration information; name must contain only alphanumeric, underscore, dash, or dot characters. availability.configStoreType=Configuration Store Type: availability.configStoreTypeHelp=Type of data store for configuration data in a conventional cluster.The value masterbroker specifies the use of a master broker to store and manage the configuration data. The value shareddb specifies the use of a shared database to store the configuration data. This option is ignored if availability enabled is set to true. -availability.configStoreType.masterbroker=masterbroker -availability.configStoreType.shareddb=shareddb availability.messageStoreType=Message Store Type: availability.messageStoreTypeHelp=Type of data store for message data in brokers in a conventional cluster. The value file specifies a file store. The value jdbc specifies a JDBC store. This option is ignored if availability enabled is set to true. -availability.messageStoreType.file=file -availability.messageStoreType.jdbc=jdbc availability.dbVendor=Database Vendor: -availability.dbVendorHelp=The database vendor of the JDBC database to use when availabilyenabled is set to true or configstoretype is set to shareddb or messagestoretype is set to jdbc. +availability.dbVendorHelp=The database vendor of the JDBC database to use when Availability Service is enabled or Configuration Store Type is set to 'shareddb' or Message Store Type is set to 'jdbc'. availability.dbUserName=Database User Name: -availability.dbUserNameHelp=The database user name of the JDBC database to use when availabilyenabled is set to true or configstoretype is set to shareddb or messagestoretype is set to jdbc. +availability.dbUserNameHelp=The database user name of the JDBC database to use when Availability Service is enabled or Configuration Store Type is set to 'shareddb' or Message Store Type is set to 'jdbc'. availability.dbPassword=Database Password: -availability.dbPasswordHelp=The database password of the JDBC database to use when availabilyenabled is set to true or configstoretype is set to shareddb or messagestoretype is set to jdbc. +availability.dbPasswordHelp=The database password of the JDBC database to use when Availability Service is enabled or Configuration Store Type is set to 'shareddb' or Message Store Type is set to 'jdbc'. availability.dbUrl=Database Acess URL: -availability.dbUrlHelp=The database access URL of the JDBC database to use when availabilyenabled is set to true or configstoretype is set to shareddb or messagestoretype is set to jdbc. \ No newline at end of file +availability.dbUrlHelp=The database access URL of the JDBC database to use when Availability Service is enabled or Configuration Store Type is set to 'shareddb' or Message Store Type is set to 'jdbc'. + Index: devtests/src/test/java/org/glassfish/admingui/devtests/AvailabilityServiceTest.java =================================================================== --- devtests/src/test/java/org/glassfish/admingui/devtests/AvailabilityServiceTest.java (revision 44828) +++ devtests/src/test/java/org/glassfish/admingui/devtests/AvailabilityServiceTest.java (working copy) @@ -104,16 +104,35 @@ @Test public void testJMSAvailability() { - final String storePoolName = "test" + Integer.toString(generateRandomNumber(100)); - if (!isTextPresent(TRIGGER_AVAILABILTY_SERVICE_NODE)) { - clickAndWait(ID_DEFAULT_CONFIG_TURNER, TRIGGER_AVAILABILTY_SERVICE_NODE); - } - clickAndWait(ID_AVAILABILITY_SERVICE_TREE_NODE, TRIGGER_AVAILABILTY_SERVICE_PAGE); + final String configName = "Config-" + generateRandomString(); + MsgSecurityTest msgS = new MsgSecurityTest(); + msgS.copyConfig("default-config", configName); + +// if (!isTextPresent(TRIGGER_AVAILABILTY_SERVICE_NODE)) { +// clickAndWait(ID_DEFAULT_CONFIG_TURNER, TRIGGER_AVAILABILTY_SERVICE_NODE); +// } + + clickAndWait(getAvailabilityLink(configName), TRIGGER_AVAILABILTY_SERVICE_PAGE); clickAndWait("propertyForm:availabilityTabs:jmsAvailabilityTab", TRIGGER_JMS_AVAILABILTY); - setFieldValue("propertyForm:propertySheet:propertSectionTextField:StorePoolNameProp:StorePoolName", storePoolName); + markCheckbox("propertyForm:propertySheet:propertSectionTextField:AvailabilityEnabledProp:avail"); + selectDropdownOption("propertyForm:propertySheet:propertSectionTextField:ConfigStoreTypeProp:ConfigStoreType", "shareddb"); + selectDropdownOption("propertyForm:propertySheet:propertSectionTextField:MessageStoreTypeProp:MessageStoreType", "file"); + setFieldValue("propertyForm:propertySheet:propertSectionTextField:DbVendorProp:DbVendor", "Vendor"); + setFieldValue("propertyForm:propertySheet:propertSectionTextField:DbUserNameProp:DbUserName", "USERNAME"); + setFieldValue("propertyForm:propertySheet:propertSectionTextField:DbPasswordProp:DbPassword", "PSWD"); + setFieldValue("propertyForm:propertySheet:propertSectionTextField:DbUrlProp:DbUrl", "URL"); clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton", TRIGGER_NEW_VALUES_SAVED); - assertEquals(storePoolName, getFieldValue("propertyForm:propertySheet:propertSectionTextField:StorePoolNameProp:StorePoolName")); + clickAndWait("propertyForm:availabilityTabs:availabilityTab", TRIGGER_AVAILABILTY_SERVICE_PAGE); + clickAndWait("propertyForm:availabilityTabs:jmsAvailabilityTab", TRIGGER_JMS_AVAILABILTY); + + assertEquals(getSelectedValue("propertyForm:propertySheet:propertSectionTextField:ConfigStoreTypeProp:ConfigStoreType"), "shareddb"); + assertEquals(getSelectedValue("propertyForm:propertySheet:propertSectionTextField:MessageStoreTypeProp:MessageStoreType"), "file"); + assertEquals("Vendor", getFieldValue("propertyForm:propertySheet:propertSectionTextField:DbVendorProp:DbVendor")); + assertEquals("USERNAME", getFieldValue("propertyForm:propertySheet:propertSectionTextField:DbUserNameProp:DbUserName")); + assertEquals( "PSWD", getFieldValue("propertyForm:propertySheet:propertSectionTextField:DbPasswordProp:DbPassword")); + assertEquals( "URL", getFieldValue("propertyForm:propertySheet:propertSectionTextField:DbUrlProp:DbUrl")); + int count = addTableRow("propertyForm:basicTable", "propertyForm:basicTable:topActionsGroup1:addSharedTableButton"); setFieldValue("propertyForm:basicTable:rowGroup1:0:col2:col1St", generateRandomString()); setFieldValue("propertyForm:basicTable:rowGroup1:0:col3:col1St", "b"); @@ -121,4 +140,8 @@ clickAndWait("propertyForm:propertyContentPage:topButtons:saveButton", TRIGGER_NEW_VALUES_SAVED); assertTableRowCount("propertyForm:basicTable", count); } -} \ No newline at end of file + + private static String getAvailabilityLink(String configName){ + return "treeForm:tree:configurations:" + configName + ":availabilityService:availabilityService_link"; + } +}