[jboss-svn-commits] JBL Code SVN: r23760 - in labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta: tests/src/org/jboss/soa/esb/listeners and 5 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Nov 6 10:00:10 EST 2008
Author: kevin.conner at jboss.com
Date: 2008-11-06 10:00:09 -0500 (Thu, 06 Nov 2008)
New Revision: 23760
Added:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml
Removed:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml
Modified:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/ESBConfigUtil.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java
Log:
Normalise names: JBESB-2150
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -51,11 +51,13 @@
* @throws ConfigurationException Invalid listener configuration.
*/
public static Element map(Element root, FsListener listener, XMLBeansModel model) throws ConfigurationException {
- Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
FsBus bus;
FsProvider provider;
-
- try {
+
+ listenerNode.setAttribute("name", listener.getName());
+
+ try {
bus = (FsBus) model.getBus(listener.getBusidref());
} catch (ClassCastException e) {
throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "]. A <fs-listener> must reference a <fs-bus>.");
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -51,9 +51,11 @@
* @throws ConfigurationException Invalid listener configuration.
*/
public static Element map(Element root, FtpListener listener, XMLBeansModel model) throws ConfigurationException {
- Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
FtpBus bus;
FtpProvider provider;
+
+ listenerNode.setAttribute("name", listener.getName());
try {
bus = (FtpBus) model.getBus(listener.getBusidref());
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -36,8 +36,10 @@
public class GroovyListenerMapper {
public static Element map(Element root, GroovyListenerDocument.GroovyListener listener, Generator.XMLBeansModel model) throws ConfigurationException {
- Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
+ listenerNode.setAttribute("name", listener.getName());
+
// Map the standard listener attributes - common across all listener types...
MapperUtil.mapDefaultAttributes(listener, listenerNode, model);
// Map the <property> elements targeted at the listener - from the listener itself.
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -52,10 +52,12 @@
* @throws ConfigurationException Invalid listener configuration.
*/
public static Element map(Element root, HibernateListener listener, XMLBeansModel model) throws ConfigurationException {
- Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
HibernateBus bus;
HibernateProvider provider;
-
+
+ listenerNode.setAttribute("name", listener.getName());
+
try {
bus = (HibernateBus) model.getBus(listener.getBusidref());
} catch (ClassCastException e) {
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -44,10 +44,12 @@
* @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
*/
public static Element map(Element root, JbrListener listener, XMLBeansModel model) throws ConfigurationException {
- Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
JbrBus bus;
JbrProvider provider;
+ listenerNode.setAttribute("name", listener.getName());
+
try {
bus = (JbrBus) model.getBus(listener.getBusidref());
} catch (ClassCastException e) {
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -40,9 +40,11 @@
{
public static Element map(Element root, JcaGateway gateway, Generator.XMLBeansModel model) throws ConfigurationException
{
- Element listenerNode = YADOMUtil.addElement(root, gateway.getName());
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
gateway.setIsGateway(true);
+ listenerNode.setAttribute("name", gateway.getName());
+
ServiceDocument.Service service = model.getService(gateway);
listenerNode.setAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG, service.getDescription());
listenerNode.setAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, service.getCategory());
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -65,10 +65,12 @@
* @throws ConfigurationException Invalid listener configuration.
*/
public static Element map(Element root, JmsListener listener, XMLBeansModel model) throws ConfigurationException {
- Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
JmsBus bus;
JmsProviderType provider;
-
+
+ listenerNode.setAttribute("name", listener.getName());
+
try {
bus = (JmsBus) model.getBus(listener.getBusidref());
} catch (ClassCastException e) {
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -30,17 +30,19 @@
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
public class ScheduledListenerMapper {
- public static Element map(Element root, ScheduledListenerDocument.ScheduledListener scheduledListener) {
- Element listenerNode = YADOMUtil.addElement(root, scheduledListener.getName());
+ public static Element map(Element root, ScheduledListenerDocument.ScheduledListener listener) {
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
- listenerNode.setAttribute("event-processor", scheduledListener.getEventProcessor());
+ listenerNode.setAttribute("name", listener.getName());
+
+ listenerNode.setAttribute("event-processor", listener.getEventProcessor());
listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, ScheduleListener.class.getName());
- if (scheduledListener.isSetTransacted()) {
- listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(scheduledListener.getTransacted()));
+ if (listener.isSetTransacted()) {
+ listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(listener.getTransacted()));
}
// Map the <property> elements targeted at the listener - from the listener itself.
- MapperUtil.mapProperties(scheduledListener.getPropertyList(), listenerNode);
+ MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
return listenerNode;
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -49,10 +49,12 @@
* @throws ConfigurationException Invalid listener configuration.
*/
public static Element map(Element root, SqlListener listener, XMLBeansModel model) throws ConfigurationException {
- Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
SqlBus bus;
SqlProvider provider;
-
+
+ listenerNode.setAttribute("name", listener.getName());
+
try {
bus = (SqlBus) model.getBus(listener.getBusidref());
} catch (ClassCastException e) {
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -56,8 +56,10 @@
* @throws ConfigurationException Invalid listener configuration.
*/
public static Element map(Element root, Listener listener, XMLBeansModel model) throws ConfigurationException {
- Element listenerNode = YADOMUtil.addElement(root, listener.getName());
-
+ Element listenerNode = YADOMUtil.addElement(root, "listener");
+
+ listenerNode.setAttribute("name", listener.getName());
+
assertListenerConfigOK(listener, model);
// Map the standard listener attributes - common across all listener types...
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -1,32 +1,27 @@
/*
* JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
* v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
- *
+ *
* (C) 2005-2006,
* @author JBoss Inc.
*/
package org.jboss.soa.esb.listeners.config;
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
import junit.framework.TestCase;
-
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.util.StreamUtils;
import org.jboss.soa.esb.ConfigurationException;
@@ -34,19 +29,23 @@
import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsBusDocument.JmsBus;
import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsListenerDocument.JmsListener;
import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsMessageFilterDocument.JmsMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsProviderType;
import org.jboss.soa.esb.listeners.config.xbeanmodel.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
import org.jboss.soa.esb.testutils.FileUtil;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
/**
* Generator unit tests.
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
public class GeneratorUnitTest extends TestCase {
-
+
private Logger log = Logger.getLogger( GeneratorUnitTest.class );
-
+
private File outdir = new File("test-outdir");
private File gatewayConfig;
private File awareConfig;
@@ -59,36 +58,36 @@
// OK
}
}
-
+
public void test_generate_badagrs() throws ConfigurationException, IOException {
test_generate_badargs(null, "null 'outdir' arg in method call");
test_generate_badargs(new File("build.xml"), "'outdir' exists, but is not a directory");
}
-
+
public void test_generate_files() throws ConfigurationException, IOException {
test_generate_files("jbossesb_config_01.xml");
test_generate_files("jbossesb_config_02.xml");
}
-
+
public void test_generate_files(String filename) throws ConfigurationException, IOException {
Generator generator = new Generator(getClass().getResourceAsStream(filename));
String expectedGatewayConfig = new String(StreamUtils.readStream(getClass().getResourceAsStream("jbossesb_config_01_gateways.xml"))).trim();
String expectedESBAwareConfig = new String(StreamUtils.readStream(getClass().getResourceAsStream("jbossesb_config_01_esbaware.xml"))).trim();
String actualGatewayConfig;
String actualESBAwareConfig;
-
+
expectedGatewayConfig = removeEOL(expectedGatewayConfig);
expectedESBAwareConfig = removeEOL(expectedESBAwareConfig);
-
+
generator.generate(outdir);
-
+
gatewayConfig = new File(outdir, Generator.ESB_CONFIG_GATEWAY_XML_FILE);
assertTrue(gatewayConfig.exists());
actualGatewayConfig = FileUtil.readTextFile(gatewayConfig);
log.debug("actual [" + removeEOL(actualGatewayConfig) + "]");
log.debug("expected[" + expectedGatewayConfig + "]");
assertEquals(expectedGatewayConfig, removeEOL(actualGatewayConfig));
-
+
awareConfig = new File(outdir, Generator.ESB_CONFIG_XML_FILE);
assertTrue(awareConfig.exists());
actualESBAwareConfig = FileUtil.readTextFile(awareConfig);
@@ -96,12 +95,12 @@
actualESBAwareConfig = removeEOL(actualESBAwareConfig);
boolean isIndentical = expectedESBAwareConfig.equals(actualESBAwareConfig);
log.debug("Strings identical=" + isIndentical);
- assertEquals(expectedESBAwareConfig, actualESBAwareConfig);
+ assertEquals(expectedESBAwareConfig, actualESBAwareConfig);
}
public void test_bad_base_listener_busref() throws ConfigurationException, IOException {
Generator generator = new Generator(getClass().getResourceAsStream("jbossesb_config_03.xml"));
-
+
try {
generator.generate(outdir);
fail("Expected ConfigurationException");
@@ -111,18 +110,18 @@
}
}
}
-
+
public static String removeEOL(String string) {
StringBuffer stringBuf = new StringBuffer(string.length());
for(int i = 0; i < string.length(); i++) {
char character = string.charAt(i);
-
+
if(character != '\r' && character != '\n') {
stringBuf.append(character);
}
}
-
+
return stringBuf.toString();
}
@@ -161,12 +160,12 @@
assertEquals("queue/B", listenerDestination.getDestName());
assertEquals(JmsMessageFilter.DestType.TOPIC, listenerDestination.getDestType());
assertEquals("service='Reconciliation'", listenerDestination.getSelector());
-
+
Listener untypedAwareListener = awareListeners.get(1);
assertEquals("Bank-Listener-Generic", untypedAwareListener.getName());
assertEquals("my-generic-bus", untypedAwareListener.getBusidref());
assertTrue(!untypedAwareListener.getIsGateway());
-
+
Service gatewayService = model.getService(gatewayListener);
Service awareService = model.getService(awareListener);
assertSame(gatewayService, awareService);
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539 (from rev 21125, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539)
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java 2008-07-18 21:48:38 UTC (rev 21125)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.listeners.config.JBESB_539;
-
-import junit.framework.TestCase;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.testutils.ESBConfigUtil;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class JBESB_539_UnitTest extends TestCase {
-
- public void test() throws IOException, SAXException, ConfigurationException {
- ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("config_01.xml"));
- ConfigTree myListenerConfig = configUtil.getGatewayConfig("My Listener");
- ConfigTree yourListenerConfig = configUtil.getGatewayConfig("Your Listener");
-
- assertNotNull(myListenerConfig);
- assertEquals("My Listener", myListenerConfig.getAttribute("name"));
- assertNotNull(yourListenerConfig);
- assertEquals("Your Listener", yourListenerConfig.getAttribute("name"));
- }
-}
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java (from rev 21125, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.listeners.config.JBESB_539;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.testutils.ESBConfigUtil;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JBESB_539_UnitTest extends TestCase {
+
+ public void test() throws IOException, SAXException, ConfigurationException {
+ ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("config_01.xml"));
+ ConfigTree myListenerConfig = configUtil.getGatewayConfig("My Listener");
+ ConfigTree yourListenerConfig = configUtil.getListenerConfig("Your Listener");
+
+ assertNotNull(myListenerConfig);
+ assertEquals("My Listener", myListenerConfig.getAttribute("name"));
+ assertNotNull(yourListenerConfig);
+ assertEquals("Your Listener", yourListenerConfig.getAttribute("name"));
+ }
+}
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml 2008-07-18 21:48:38 UTC (rev 21125)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml 2008-11-06 15:00:09 UTC (rev 23760)
@@ -1,22 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
-
- <providers>
- <jbr-provider name="jbr" protocol="http" host="localhost">
- <jbr-bus busid="http1" port="10909" />
- </jbr-provider>
- </providers>
-
- <services>
- <service category="cat" name="name" description="blah" invmScope="GLOBAL">
- <listeners>
- <jbr-listener name="My Listener" busidref="http1" is-gateway="true" />
- <jbr-listener name="Your Listener" busidref="http1" is-gateway="true" />
- </listeners>
- <actions>
- <action name="xxx" class="org.jboss.soa.esb.mock.MockAction" />
- </actions>
- </service>
- </services>
-
-</jbossesb>
\ No newline at end of file
Copied: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml (from rev 21125, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml (rev 0)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml 2008-11-06 15:00:09 UTC (rev 23760)
@@ -0,0 +1,27 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+
+ <providers>
+ <jbr-provider name="jbr" protocol="http" host="localhost">
+ <jbr-bus busid="http1" port="10909" />
+ </jbr-provider>
+ <jms-provider name="JMS" connection-factory="ConnectionFactory">
+ <jms-bus busid="listenerBus">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/does_not_exist"/>
+ </jms-bus>
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service category="cat" name="name" description="blah" invmScope="GLOBAL">
+ <listeners>
+ <jbr-listener name="My Listener" busidref="http1" is-gateway="true" />
+ <jms-listener name="Your Listener" busidref="listenerBus"/>
+ </listeners>
+ <actions>
+ <action name="xxx" class="org.jboss.soa.esb.mock.MockAction" />
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml 2008-11-06 15:00:09 UTC (rev 23760)
@@ -1,41 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- NOTE: DO NOT MODIFY
- This file was auto-generated.
--->
-<jbossesb-listeners parameterReloadSecs="180">
-<Bank-Listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation">
-<EPR acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" persistent="true" protocol="jms" transacted="false"/>
-<action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue">
- This is some complex..
- <!-- property -->
- value.
- <xxxx>
- boooo
- <yyyy/>
- </xxxx>
- Some CDATA data...
- </action>
-</Bank-Listener>
-<Bank-Listener-Generic listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" my-generic-listener="my-generic-listener#someattribvalue" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation">
-<EPR my-generic-bus="my-generic-bus#someattribvalue" my-generic-provider="my-generic-provider#someattribvalue"/>
-<action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue">
- This is some complex..
- <!-- property -->
- value.
- <xxxx>
- boooo
- <yyyy/>
- </xxxx>
- Some CDATA data...
- </action>
-</Bank-Listener-Generic>
-<test-ftp-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="OneWay" schedule-frequency="10" service-category="Test2" service-description="FTP server Test" service-name="FTPTest">
-<EPR URL="ftp://joe:secret@localhost:21/Temp" errorDelete="true" inputSuffix=".txt" passive="false" postDelete="true" workSuffix=".esbInProcess"/>
-<action action="TestFtpRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
-</test-ftp-listener>
-<test-sql-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="RequestResponse" pollLatencySeconds="10" service-category="Test3" service-description="SQL server Test" service-name="SQLTest">
-<EPR URL="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" errorDelete="true" insert_timestamp_column="insert_timestamp" message_column="message" message_id_column="message_id" password="secret" postDelete="true" status_column="status" tablename="testtable" username="joe"/>
-<action action="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
-</test-sql-listener>
-</jbossesb-listeners>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><!-- NOTE: DO NOT MODIFY This file was auto-generated.--><jbossesb-listeners parameterReloadSecs="180"><listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" name="Bank-Listener" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" persistent="true" protocol="jms" transacted="false"/><action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue"> This is some complex.. <!-- property --> value. <xxxx> boooo <yyyy/> </xxxx> Some CDATA data... </action></listener><listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" ma!
xThreads="2" my-generic-listener="my-generic-listener#someattribvalue" name="Bank-Listener-Generic" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR my-generic-bus="my-generic-bus#someattribvalue" my-generic-provider="my-generic-provider#someattribvalue"/><action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue"> This is some complex.. <!-- property --> value. <xxxx> boooo <yyyy/> </xxxx> Some CDATA data... </action></listener><listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="OneWay" name="test-ftp-listener" schedule-frequency="10" service-category="Test2" service-description="FTP server Test" service-name="FTPTest"><EPR URL="ftp://joe:secret@localhost:21/Temp" errorDelete="true" inputSuffix=".txt" passive="false" postDelete="true" workSuffix=".esbInProcess"/><a!
ction action="TestFtpRouteAction" class="org.jboss.soa.esb.actions.Con
tentBasedRouter"/></listener><listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="RequestResponse" name="test-sql-listener" pollLatencySeconds="10" service-category="Test3" service-description="SQL server Test" service-name="SQLTest"><EPR URL="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" errorDelete="true" insert_timestamp_column="insert_timestamp" message_column="message" message_id_column="message_id" password="secret" postDelete="true" status_column="status" tablename="testtable" username="joe"/><action action="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/></listener></jbossesb-listeners>
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml 2008-11-06 15:00:09 UTC (rev 23760)
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- NOTE: DO NOT MODIFY This file was auto-generated.--><jbossesb-gateways parameterReloadSecs="180"><Bank-JMS-Gateway acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" is-gateway="true" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" persistent="true" protocol="jms" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation" transacted="false"/><Bank-HTTP-Gateway gatewayClass="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" is-gateway="true" jbr-serverBindAddress="192.168.1.111" jbr-serverBindPort="8765" jbr-serverProtocol="http" maxThreads="1" service-description="Bank !
Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/></jbossesb-gateways>
+<?xml version="1.0" encoding="UTF-8"?><!-- NOTE: DO NOT MODIFY This file was auto-generated.--><jbossesb-gateways parameterReloadSecs="180"><listener acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" is-gateway="true" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" name="Bank-JMS-Gateway" persistent="true" protocol="jms" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation" transacted="false"/><listener gatewayClass="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" is-gateway="true" jbr-serverBindAddress="192.168.1.111" jbr-serverBindPort="8765" jbr-serverProtocol="http" maxThreads="1" name="Bank-HTTP-Gat!
eway" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/></jbossesb-gateways>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml 2008-11-06 15:00:09 UTC (rev 23760)
@@ -1,3 +1,3 @@
-<simple-schedule-listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" my-prop="1" scheduleidref="1-sec-trigger">
+<listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" my-prop="1" name="simple-schedule-listener" scheduleidref="1-sec-trigger">
<action action="action" class="org.jboss.soa.esb.mock.MockAction"/>
-</simple-schedule-listener>
\ No newline at end of file
+</listener>
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml 2008-11-06 15:00:09 UTC (rev 23760)
@@ -1,3 +1,3 @@
-<simple-schedule-listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" scheduleidref="1-sec-trigger">
+<listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" name="simple-schedule-listener" scheduleidref="1-sec-trigger">
<action action="action" class="org.jboss.soa.esb.mock.MockAction"/>
-</simple-schedule-listener>
\ No newline at end of file
+</listener>
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/ESBConfigUtil.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/ESBConfigUtil.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/ESBConfigUtil.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -87,6 +87,18 @@
NodeList listenerConfigElements = config.getDocumentElement().getElementsByTagName(name);
if(listenerConfigElements == null || listenerConfigElements.getLength() == 0) {
+ listenerConfigElements = config.getDocumentElement().getElementsByTagName("listener");
+ if(listenerConfigElements == null || listenerConfigElements.getLength() == 0) {
+ return null;
+ }
+
+ for(int i = 0; i < listenerConfigElements.getLength(); i++) {
+ Element element = (Element) listenerConfigElements.item(i);
+ if(name.equals(element.getAttribute("name"))) {
+ return element;
+ }
+ }
+
return null;
}
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java 2008-11-06 14:50:41 UTC (rev 23759)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java 2008-11-06 15:00:09 UTC (rev 23760)
@@ -13,8 +13,8 @@
public void test() throws ConfigurationException {
ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("jboss-esb.xml"));
- assertTrue(configUtil.getListenerConfig("JMS-ESBListener").toString().startsWith("<JMS-ESBListener listenerClass=\"org.jboss.soa.esb.listeners.message.MessageAwareListener\" maxThreads=\"1\" service-category=\"ABI_OrderManager\" service-description=\"ABI OrderManager Service\" service-name=\"ABI_OrderManager\">"));
- assertTrue(configUtil.getGatewayConfig("FileGateway").toString().startsWith("<FileGateway"));
+ assertTrue(configUtil.getListenerConfig("JMS-ESBListener").toString().startsWith("<listener listenerClass=\"org.jboss.soa.esb.listeners.message.MessageAwareListener\" maxThreads=\"1\" name=\"JMS-ESBListener\" service-category=\"ABI_OrderManager\" service-description=\"ABI OrderManager Service\" service-name=\"ABI_OrderManager\">"));
+ assertTrue(configUtil.getGatewayConfig("FileGateway").toString().startsWith("<listener"));
assertTrue(configUtil.getActionConfig("OrderNotificationService", "print-after-transform").toString().startsWith("<action action=\"print-after-transform\""));
}
More information about the jboss-svn-commits
mailing list