[jboss-svn-commits] JBL Code SVN: r25327 - in labs/jbossesb/branches/JBESB_4_4_GA_FP: IDE/JBossIDE/services/soap and 22 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Feb 18 17:43:28 EST 2009


Author: tfennelly
Date: 2009-02-18 17:43:27 -0500 (Wed, 18 Feb 2009)
New Revision: 25327

Added:
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsdconfig
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Action.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/WebserviceInfo.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ESBAwareGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GatewayGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleProviderFactory.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/XMLBeansModel.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator101ModelUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator110ModelUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.110.xml
Removed:
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ScheduleProviderFactory.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_01.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml
Modified:
   labs/jbossesb/branches/JBESB_4_4_GA_FP/IDE/JBossIDE/product/.classpath
   labs/jbossesb/branches/JBESB_4_4_GA_FP/IDE/JBossIDE/services/soap/.classpath
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/.classpath
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/build-distr.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.0.1.xsdconfig
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/build.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ActionContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Configuration.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/MapperUtil.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/NotificationMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SecurityMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/build.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerConfigUtil.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/MockContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/SecurityMapperUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_mtom/src/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
Log:
https://jira.jboss.org/jira/browse/JBESB-2426

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/IDE/JBossIDE/product/.classpath
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/IDE/JBossIDE/product/.classpath	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/IDE/JBossIDE/product/.classpath	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.0.1.jar"/>
+	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.1.0.jar"/>
 	<classpathentry excluding="**/.svn/" kind="src" path="rosetta/src"/>
 	<classpathentry kind="src" path="build/schema-model/src"/>
 	<classpathentry excluding="**/.svn/" kind="src" path="rosetta/tests/src"/>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/IDE/JBossIDE/services/soap/.classpath
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/IDE/JBossIDE/services/soap/.classpath	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/IDE/JBossIDE/services/soap/.classpath	2009-02-18 22:43:27 UTC (rev 25327)
@@ -6,6 +6,7 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="var" path="ESB_HOME/jbossesb-rosetta.jar"/>
 	<classpathentry kind="var" path="ESB_HOME/jbossesb-config-model-1.0.1.jar"/>
+	<classpathentry kind="var" path="ESB_HOME/jbossesb-config-model-1.1.0.jar"/>
 	<classpathentry kind="var" path="ESB_HOME/test-util.jar"/>
 	<classpathentry kind="lib" path="lib/ext/jaxb-api.jar"/>
 	<classpathentry kind="lib" path="lib/ext/jaxb-impl.jar"/>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/.classpath
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/.classpath	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/.classpath	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,147 +1,92 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.0.1.jar"/>
+	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.1.0.jar"/>
 	<classpathentry excluding="**/.svn/" kind="src" path="rosetta/src"/>
-	<classpathentry kind="src" path="rosetta/tests/resources"/>
+	<classpathentry kind="src" path="services/jbossesb/src/main/java"/>
+	<classpathentry kind="src" path="services/jbrules/src/main/java"/>
+	<classpathentry kind="src" path="services/jbossesb/src/test/java"/>
+	<classpathentry kind="src" path="services/jbpm/src/test/java"/>
+	<classpathentry kind="src" path="services/jbrules/src/test/java"/>
+	<classpathentry kind="src" path="services/jbpm/src/main/java"/>
+	<classpathentry kind="src" path="services/smooks/src/test/java"/>
+	<classpathentry kind="src" path="services/smooks/src/main/java"/>
+	<classpathentry kind="src" path="services/slsb/src/main/java"/>
+	<classpathentry kind="src" path="build/schema-model/src"/>
 	<classpathentry excluding="**/.svn/" kind="src" path="rosetta/tests/src"/>
+	<classpathentry kind="src" path="services/soap/src/main/java"/>
+	<classpathentry kind="src" path="services/soap/src/test/java"/>
+	<classpathentry kind="src" path="services/soapui-client/src/main/java"/>
+	<classpathentry kind="lib" path="etc/test/resources/log4j/dev"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="lib" path="build/lib/activation-1.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/antlr-2.7.7.jar"/>
-	<classpathentry kind="lib" path="build/lib/asm-1.5.3.jar"/>
-	<classpathentry kind="lib" path="build/lib/avalon-framework-4.1.3.jar"/>
-	<classpathentry kind="lib" path="build/lib/bsf-2.3.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/bsh-1.3.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/cglib-nodep-2.1_3.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-beanutils-1.6.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-beanutils-bean-collections-1.7.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-codec-1.3.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-collections-3.2.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-dbcp-1.2.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-digester-1.7.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-discovery-0.2.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-httpclient-3.0.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-io-1.3.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-lang-2.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-logging-1.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/commons-pool-1.2.jar"/>
-	<classpathentry kind="lib" path="build/lib/dom4j-1.6.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/groovy-all-1.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/h2-1.0.68.jar"/>
-	<classpathentry kind="lib" path="build/lib/hibernate3-3.2.4.SP1.jar"/>
-	<classpathentry kind="lib" path="build/lib/javassist-3.6.0.GA.jar"/>
-	<classpathentry kind="lib" path="build/lib/jaxb-xjc-2.1.4.jar"/>
-	<classpathentry kind="lib" path="build/lib/jaxen-1.1-beta-8.jar"/>
-	<classpathentry kind="lib" path="build/lib/jaxr-api-1.0rc2.jar"/>
-	<classpathentry kind="lib" path="build/lib/jbossall-client-4.2.2.GA.jar"/>
-	<classpathentry kind="lib" path="build/lib/jaxws-rt-2.1.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/jaxws-tools-2.1.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/jboss-aop-jdk50-1.5.6.GA.jar"/>
-	<classpathentry kind="lib" path="build/lib/jboss-cache-1.2.4.SP2.jar"/>
-	<classpathentry kind="lib" path="build/lib/jboss-system-4.2.2.GA.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb/lib/ext/jbosssx.jar"/>
-	<classpathentry kind="lib" path="build/lib/jcr-1.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/jdom-1.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/jettison-1.0-RC1.jar"/>
-	<classpathentry kind="lib" path="build/lib/jgroups-2.4.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/jmock-1.0.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/joda-time-1.2.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/jsch-0.1.38.jar"/>
-	<classpathentry kind="lib" path="build/lib/juddi-2.0rc5.jar"/>
-	<classpathentry kind="lib" path="build/lib/juddi-client-2.0rc5.jar"/>
-	<classpathentry kind="lib" path="build/lib/junit-3.8.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/jzlib-1.0.7.jar"/>
-	<classpathentry kind="lib" path="build/lib/log4j-1.2.14.jar"/>
-	<classpathentry kind="lib" path="build/lib/logkit-1.0.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/mail-1.4.jar"/>
-	<classpathentry kind="lib" path="build/lib/milyn-commons-1.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/milyn-smooks-core-1.0.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/milyn-smooks-javabean-1.0.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/mvel-1.3.3-java1.5.jar"/>
-	<classpathentry kind="lib" path="build/lib/ognl-2.6.9.jar"/>
-	<classpathentry kind="lib" path="build/lib/quartz-1.5.2.jar"/>
-	<classpathentry kind="lib" path="build/lib/scout-1.0rc2.jar"/>
-	<classpathentry kind="lib" path="build/lib/servlet-api-2.4.jar"/>
-	<classpathentry kind="lib" path="build/lib/stax-1.2.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/stax-api-1.0.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/stringtemplate-3.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/wstx-asl-3.2.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/xalan-2.7.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/xbean-2.2.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/xercesImpl-2.8.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/xml-writer-0.2.jar"/>
-	<classpathentry kind="lib" path="build/lib/xmlParserAPIs-2.6.2.jar"/>
-	<classpathentry kind="lib" path="build/lib/xmlpublic-2.2.0.jar"/>
-	<classpathentry kind="lib" path="build/lib/xom-1.1.jar"/>
-	<classpathentry kind="lib" path="build/lib/xpp3_min-1.1.3.4.O.jar"/>
-	<classpathentry kind="lib" path="build/lib/xstream-1.2.2.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb.sar/lib/jbossesb-config-model-1.0.1.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb.sar/lib/jbossesb-rosetta.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb/lib/ext/jbossts-common.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb.esb/c3p0-0.9.1-pre9.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/javassist.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jaxb-api.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jaxb-impl.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jaxb-xjc.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jaxws-rt.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jaxws-tools.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-aop-jdk50-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-aspect-jdk50-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-common-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-deployment.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-iiop-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-j2ee.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-jaxrpc.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-jaxws.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-jsr77-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-messaging-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-remoting.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-saaj.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-serialization.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-srp-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-system-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-transaction-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jboss-xml-binding.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossall-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbosscx-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossha-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossjmx-ant.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossmq-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbosssx-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossws-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossws-common.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossws-framework.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossws-jboss42.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jbossws-spi.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jmx-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jmx-invoker-adaptor-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/jnp-client.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/log4j.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/policy.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/stax-ex.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/streambuffer.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/trove.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb-server-4.4.GA/client/wsdl4j.jar"/>
-	<classpathentry kind="lib" path="lib/ext/commons-net-2.0.0-652071.jar"/>
-	<classpathentry kind="lib" path="lib/ext/commons-ssl-0.3.4.jar"/>
-	<classpathentry kind="lib" path="lib/ext/jboss-jaxws.jar"/>
-	<classpathentry kind="lib" path="lib/ext/jbossws-core.jar"/>
-	<classpathentry kind="lib" path="lib/ext/jbossws-spi.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/emma.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/emma_ant.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/hsqldb.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/jakarta-oro-2.0.8.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/jboss-jaxb-intros.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/jboss-remoting.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/jbossweb.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/junit-4.1.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/mockejb.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/opencsv-1.6.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/properties-plugin.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/wsdl4j-1.6.2.jar"/>
-	<classpathentry kind="lib" path="/opt/jboss/esb/JBESB_4_4_GA_CP/testlib/xalan-2.7.0.jar"/>
+	<classpathentry kind="lib" path="lib/ext/activation.jar"/>
+	<classpathentry kind="lib" path="lib/ext/antlr-2.7.6.jar"/>
+	<classpathentry kind="lib" path="lib/ext/commons-collections-3.2.jar"/>
+	<classpathentry kind="lib" path="lib/ext/commons-lang-2.1.jar"/>
+	<classpathentry kind="lib" path="lib/ext/commons-codec-1.3.jar"/>
+	<classpathentry kind="lib" path="lib/ext/emma_ant.jar"/>
+	<classpathentry kind="lib" path="lib/ext/emma.jar"/>
+	<classpathentry kind="lib" path="lib/ext/groovy-all-1.0.jar"/>
+	<classpathentry kind="lib" path="lib/ext/hsqldb.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jbossall-client.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jboss-system.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jbossts-common.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jsch-0.1.jar"/>
+	<classpathentry kind="lib" path="lib/ext/juddi-2.0rc5.jar"/>
+	<classpathentry kind="lib" path="lib/ext/juddi-client-2.0rc5.jar"/>
+	<classpathentry kind="lib" path="lib/ext/junit-4.1.jar"/>
+	<classpathentry kind="lib" path="lib/ext/log4j.jar"/>
+	<classpathentry kind="lib" path="lib/ext/mail.jar"/>
+	<classpathentry kind="lib" path="lib/ext/mockejb.jar"/>
+	<classpathentry kind="lib" path="lib/ext/ognl-2.6.9.jar"/>
+	<classpathentry kind="lib" path="lib/ext/opencsv-1.6.jar"/>
+	<classpathentry kind="lib" path="lib/ext/properties-plugin.jar"/>
+	<classpathentry kind="lib" path="lib/ext/stax-api-1.0.1.jar"/>
+	<classpathentry kind="lib" path="lib/ext/xalan-2.7.0.jar"/>
+	<classpathentry kind="lib" path="lib/ext/xbean.jar"/>
+	<classpathentry kind="lib" path="lib/ext/xercesImpl-2.7.1.jar"/>
+	<classpathentry kind="lib" path="lib/ext/xml-apis-1.3.02.jar"/>
+	<classpathentry kind="lib" path="lib/ext/xmlpublic.jar"/>
+	<classpathentry kind="lib" path="lib/ext/xstream-1.2.2.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jboss.jar"/>
+	<classpathentry kind="lib" path="lib/ext/commons-io-1.3.jar"/>
+	<classpathentry kind="lib" path="lib/ext/edtftpj-1.5.4.jar"/>
+	<classpathentry kind="lib" path="ftp/lib/backport-util-concurrent-2.2.jar"/>
 	<classpathentry kind="lib" path="ftp/lib/ftplet-api-1.0-incubator-SNAPSHOT.jar"/>
 	<classpathentry kind="lib" path="ftp/lib/ftpserver-admin-gui-1.0-incubator-SNAPSHOT.jar"/>
 	<classpathentry kind="lib" path="ftp/lib/ftpserver-core-1.0-incubator-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="build/lib/jboss-4.2.2.GA.jar"/>
+	<classpathentry kind="lib" path="ftp/lib/mina-core-1.0.2.jar"/>
+	<classpathentry kind="lib" path="ftp/lib/mina-filter-ssl-1.0.2.jar"/>
+	<classpathentry kind="lib" path="ftp/lib/slf4j-api-1.3.0.jar"/>
+	<classpathentry kind="lib" path="ftp/lib/slf4j-log4j12-1.3.0.jar"/>
+	<classpathentry kind="lib" path="services/jbpm/lib/ext/asm.jar"/>
+	<classpathentry kind="lib" path="services/jbpm/lib/ext/dom4j.jar"/>
+	<classpathentry kind="lib" path="services/jbpm/lib/ext/jbpm-identity.jar"/>
+	<classpathentry kind="lib" path="services/jbpm/lib/ext/jbpm-jpdl.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jgroups-all.jar"/>
+	<classpathentry kind="lib" path="lib/ext/cache.jar"/>
+	<classpathentry kind="lib" path="lib/ext/standalone/c3p0-0.9.1-pre9.jar"/>
+	<classpathentry kind="lib" path="lib/ext/antlr-3.0b7.jar"/>
+	<classpathentry kind="lib" path="lib/ext/asm.jar"/>
+	<classpathentry kind="lib" path="lib/ext/cglib-2.1_3.jar"/>
+	<classpathentry kind="lib" path="lib/ext/commons-httpclient.jar"/>
+	<classpathentry kind="lib" path="lib/ext/commons-logging-1.0.4.jar"/>
+	<classpathentry kind="lib" path="lib/ext/hibernate3.jar"/>
+	<classpathentry kind="lib" path="lib/ext/javassist.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jboss-aop-jdk50.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jboss-messaging-client.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jboss-remoting.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jbossweb.jar"/>
+	<classpathentry kind="lib" path="lib/ext/stringtemplate-3.0.jar"/>
+	<classpathentry kind="lib" path="lib/ext/trove.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jakarta-oro-2.0.8.jar"/>
+	<classpathentry kind="lib" path="lib/ext/commons-ssl-0.3.4.jar"/>
+	<classpathentry kind="lib" path="services/jbrules/lib/ext/antlr-runtime-3.0.jar"/>
+	<classpathentry kind="lib" path="lib/ext/mvel14-1.2rc4rv908.jar"/>
+	<classpathentry kind="lib" path="lib/ext/quartz-1.5.2.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jaxr-api-1.0rc1.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jboss-jaxb-intros.jar"/>
+	<classpathentry kind="lib" path="lib/ext/scout-1.0rc1.jar"/>
+	<classpathentry kind="lib" path="services/soap/lib/ext/wise-core.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/build-distr.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/build-distr.xml	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/build-distr.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -40,8 +40,10 @@
                 <include name="tools/**/*"/>
             </fileset>
         </copy>
-        <copy file="${build.dir}/jbossesb/xml/jbossesb-1.0.1.xsd"
-            todir="${esbserver.dist.dir}/docs/schema"/>
+        <copy todir="${esbserver.dist.dir}/docs/schema">
+            <fileset dir="${build.dir}/jbossesb/xml/"
+                includes="jbossesb-1.0.1.xsd jbossesb-1.1.0.xsd"/>
+        </copy>
         <copy todir="${esbserver.dist.dir}">
             <fileset dir="${build.dir}/jbossesb">
                 <include name="*.txt"/>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.0.1.xsdconfig
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.0.1.xsdconfig	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.0.1.xsdconfig	2009-02-18 22:43:27 UTC (rev 25327)
@@ -9,6 +9,6 @@
     <!-- Use the "namespace" element to map a namespace to the Java package
         name that should be generated. -->
     <xb:namespace uri="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
-        <xb:package>org.jboss.soa.esb.listeners.config.xbeanmodel</xb:package>
+        <xb:package>org.jboss.soa.esb.listeners.config.xbeanmodel101</xb:package>
     </xb:namespace>
 </xb:config>
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsd (from rev 24633, labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsd	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,1704 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Generated by Turbo XML 2.4.1.100. Conforms to w3c http://www.w3.org/2001/XMLSchema-->
+<xsd:schema
+	xmlns:jesb="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified"
+	targetNamespace="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		Document root + some basic types.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+
+	<xsd:element name="jbossesb">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				The jbossesb configuration for a single instance.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="1" minOccurs="0"
+					ref="jesb:providers" />
+				<xsd:element maxOccurs="1" minOccurs="0"
+					ref="jesb:services" />
+			</xsd:sequence>
+			<xsd:attribute default="180" name="parameterReloadSecs"
+				use="optional" />
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="property">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A simple name-value pair.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="xsd:anyType">
+					<xsd:attribute name="name" type="xsd:string"
+						use="required" />
+					<xsd:attribute name="value" type="xsd:string" />
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		Provider and Bus base types.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+
+	<xsd:element name="providers">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A container for the providers referenced in the jbossesb
+				config file
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="unbounded" minOccurs="0"
+					ref="jesb:provider" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:complexType abstract="true" name="provider">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				Abstract provider.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element maxOccurs="unbounded" minOccurs="0"
+				ref="jesb:property" />
+		</xsd:sequence>
+		<xsd:attribute name="name" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:element abstract="true" name="provider" type="jesb:provider" />
+
+	<xsd:complexType name="bus-provider">
+		<xsd:complexContent>
+			<xsd:extension base="jesb:provider">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						A provider of a bus. So for instance you can
+						have a jms-provider (JBossMQ) or an
+						ftp-provider.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:sequence>
+					<xsd:element maxOccurs="unbounded" minOccurs="1"
+						ref="jesb:bus" />
+				</xsd:sequence>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+	<xsd:element name="bus-provider"
+		substitutionGroup="jesb:provider">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				Generic Bus Provider.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus-provider" />
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:complexType name="bus">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A bus (also called "channel" by others) is a means by
+				which Services communicate with each other (JMS, FTP,
+				HTTP, etc).
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element maxOccurs="unbounded" minOccurs="0"
+				ref="jesb:property" />
+		</xsd:sequence>
+		<xsd:attribute name="busid" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">
+					An id such that this bus can be referenced by
+					Service listn.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+	<xsd:element name="bus" type="jesb:bus" />
+
+	<xsd:element name="schedule-provider"
+		substitutionGroup="jesb:provider">
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:provider">
+					<xsd:sequence>
+						<xsd:element maxOccurs="unbounded" minOccurs="1"
+							ref="jesb:schedule" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:complexType abstract="true" name="schedule">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				Schedule Configuration.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element maxOccurs="unbounded" minOccurs="0"
+				ref="jesb:property" />
+		</xsd:sequence>
+		<xsd:attribute name="scheduleid" type="xsd:string"
+			use="required">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">
+					An id such that this schedule can be referenced by
+					Service listner.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="startDate" type="xsd:dateTime"
+			use="optional">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">
+					Schedule start time and date.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="endDate" type="xsd:dateTime"
+			use="optional">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">
+					Schedule end time and date.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+	<xsd:element abstract="true" name="schedule" type="jesb:schedule" />
+
+	<xsd:element name="simple-schedule"
+		substitutionGroup="jesb:schedule">
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:schedule">
+                    <xsd:attribute name="frequency" use="optional" type="xsd:long" default="10">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">Schedule frequency.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                    <xsd:attribute name="frequencyUnits" use="optional" type="jesb:frequency-unit" default="seconds">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">Schedule frequency time units.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+					<xsd:attribute default="-1" name="execCount" type="xsd:int" use="optional">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								Schedule execution count. -1 to execute indefinitely.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+    <xsd:simpleType name="frequency-unit">
+        <xsd:restriction base="xsd:NMTOKEN">
+            <xsd:enumeration value="seconds"/>
+            <xsd:enumeration value="milliseconds"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+    
+    <xsd:element name="cron-schedule"
+		substitutionGroup="jesb:schedule">
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:schedule">
+					<xsd:attribute name="cronExpression"
+						type="xsd:string" use="optional">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								Schedule CRON expression.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		Service and Action types.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+
+	<xsd:element name="services">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A container for services.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="unbounded" minOccurs="1"
+					ref="jesb:service" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="service">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A service has listener or gateways and a list of
+				actions.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="1" minOccurs="0" ref="jesb:security" />
+                <xsd:element maxOccurs="unbounded" minOccurs="0"
+                    ref="jesb:property" />
+				<xsd:element maxOccurs="1" minOccurs="0"
+					ref="jesb:listeners" />
+				<xsd:element maxOccurs="1" minOccurs="0"
+					ref="jesb:actions" />
+			</xsd:sequence>
+			<xsd:attribute name="category"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The service category which will be used to store
+						a reference to this service in the registry.
+					</xsd:documentation>
+				</xsd:annotation>
+                                <xsd:simpleType>
+                                        <xsd:restriction base="xsd:string">
+                                                <xsd:maxLength value="255"/>
+                                        </xsd:restriction>
+				</xsd:simpleType>
+			</xsd:attribute>
+			<xsd:attribute name="name"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The service name which will be used to store a
+						reference to this service in the registry.
+					</xsd:documentation>
+				</xsd:annotation>
+                                <xsd:simpleType>
+                                        <xsd:restriction base="xsd:string">
+                                                <xsd:maxLength value="255"/>
+                                        </xsd:restriction>
+                                </xsd:simpleType>
+			</xsd:attribute>
+			<xsd:attribute name="description"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The service description which stored with this
+						service in the registry, so that the purpose of
+						this service can be understood by a human.
+					</xsd:documentation>
+				</xsd:annotation>
+                                <xsd:simpleType>
+                                        <xsd:restriction base="xsd:string">
+                                                <xsd:maxLength value="255"/>
+                                        </xsd:restriction>
+                                </xsd:simpleType>
+			</xsd:attribute>
+            <xsd:attribute name="invmScope" type="jesb:invmScope" use="optional">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">
+                        All services are locally invokable over an "in VM" transport.  Invokability
+                        can be scoped using this attribute.  An "invmScope" value of "NONE" means that
+                        the Service should not be locally invokable over the "in VM" transport.
+                        More fine grained scoping will be added in the future.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="invmTransacted" type="xsd:boolean">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">
+                        Should the InVM listener execute in a transacted environment?
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+    <xsd:simpleType name="invmScope">
+        <xsd:restriction base="xsd:NMTOKEN">
+            <!-- Not invokable over InVM -->
+            <xsd:enumeration value="NONE" />
+
+            <!-- Invokable over InVM only from within the same/local deployment. -->
+            <!-- xsd:enumeration value="LOCAL" / -->
+
+            <!-- (DEFAULT) Invokable over InVM from within the same classloader scope. -->
+            <xsd:enumeration value="GLOBAL" />
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:simpleType name="mepType">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="RequestResponse" />
+			<xsd:enumeration value="OneWay" />
+		</xsd:restriction>
+	</xsd:simpleType>
+
+	<xsd:element name="actions">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A container for actions belonging to this service.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="unbounded" minOccurs="1"
+					ref="jesb:action" />
+			</xsd:sequence>
+			<xsd:attribute name="mep" type="jesb:mepType" />
+                        <xsd:attribute name="inXsd" type="xsd:string" />
+                        <xsd:attribute name="outXsd" type="xsd:string" />
+                        <xsd:attribute name="faultXsd" type="xsd:string" />
+                        <xsd:attribute name="webservice" type="xsd:boolean" default="true"/>
+                        <xsd:attribute name="validate" type="xsd:boolean" default="false"/>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="action">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				An action which will act on the message when it is
+				received by the service. Actions can be chained. Hence
+				you can specify a list of actions. Action are
+				'pluggable' and can be custom code, however JBossESB
+				comes with a list of predefined actions.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="unbounded" minOccurs="0"
+					ref="jesb:property" />
+			</xsd:sequence>
+			<xsd:attribute name="name" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The logical name of the action.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="class" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The full classname of the java class in which
+						this action is defined.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="process" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The name of the method on the action that needs
+						to be called when the message is received.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="security">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="unbounded" minOccurs="0" ref="jesb:property" />
+			</xsd:sequence>
+			<xsd:attribute name="runAs" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					 Is used to specify that a specific security role given by the role-name value should be used 
+					 as the security identity for this service.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="rolesAllowed" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					Specifies one or more logical roles that are allowed to acccess the service.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="moduleName" type="xsd:string" use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="useCallerIdentity" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					Is used to indicate that the current caller's identity should be propagated as the security identity
+					this service.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="callbackHandler" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+					CallbackHandler implementation class. This will override the global callbackhandler 
+					which can be specified in jbossesb-properties.xml
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		Listener base types.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+
+	<xsd:element name="listeners">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A container for all listener for a service.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="unbounded" minOccurs="1"
+					ref="jesb:listener" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:complexType name="listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A listener is a listener or a gateway. The listener
+				defines to which bus the service is listening. The
+				service can simultaneniously listen to multiple buses.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element maxOccurs="unbounded" minOccurs="0"
+				ref="jesb:property" />
+		</xsd:sequence>
+		<xsd:attribute name="name" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">
+					The logical name of the listener.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute default="$not-defined$" name="busidref"
+			type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">
+					A reference to an existing bus, as defined in the
+					'buses' section of this jbossesb config.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute default="1" name="maxThreads" type="xsd:int"
+			use="optional">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">
+					The number of threads which will be started for this
+					listener.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute default="false" name="is-gateway"
+			type="xsd:boolean" use="optional">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">
+					true if the listener is a gateway. A gateway is an
+					ESB-Unware listener, while a listener is ESB-aware
+					and as such expects jbossesb formatted messages.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+	<xsd:element name="listener" type="jesb:listener" />
+
+	<xsd:complexType abstract="true"
+		name="abstract-scheduled-listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				Abstract scheduled listener.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexContent>
+			<xsd:extension base="jesb:listener">
+				<xsd:attribute default="-1"
+					name="poll-frequency-seconds" type="xsd:int" use="optional">
+<!-- Purposely defaults to -1 -->
+					<xsd:annotation>
+						<xsd:documentation xml:lang="en">
+							DEPRECATED (use "schedule-frequency" or
+							"scheduleidref"): The frequency with which
+							this listener is scheduled (in seconds).
+							Defaults to 10 seconds.
+						</xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+				<xsd:attribute default="-1" name="schedule-frequency"
+					type="xsd:int" use="optional">
+<!-- Purposely defaults to -1 -->
+					<xsd:annotation>
+						<xsd:documentation xml:lang="en">
+							The frequency with which this listener is
+							scheduled (in seconds). Defaults to 10
+							seconds.
+						</xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+				<xsd:attribute name="scheduleidref" type="xsd:string"
+					use="optional">
+					<xsd:annotation>
+						<xsd:documentation xml:lang="en">
+							The id reference for the schedule that's
+							driving this scheduled listener.
+						</xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<xsd:element name="scheduled-listener"
+		substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				Scheduled listener.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension
+					base="jesb:abstract-scheduled-listener">
+					<xsd:attribute name="event-processor"
+						type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								Message Composer class name.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="transacted"
+						type="xsd:boolean">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								Should the schedule execute in a
+								transacted environment?
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- JCA Types -->
+	<xsd:element name="activation-config">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				Activation configuration for jca bus or listener.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element maxOccurs="unbounded" minOccurs="1"
+					ref="jesb:property" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="jca-gateway" substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific gateway using JCA inflow.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:listener">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:activation-config" />
+					</xsd:sequence>
+					<xsd:attribute name="adapter" type="xsd:string"
+						use="required" />
+					<xsd:attribute name="endpointClass"
+						type="xsd:string" use="required" />
+					<xsd:attribute name="messagingType"
+						type="xsd:string" use="optional" />
+					<xsd:attribute name="jcaBridge" type="xsd:string"
+						use="optional" />
+					<xsd:attribute name="transacted" type="xsd:string"
+						use="optional" />
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		JMS Type Implementations.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+
+	<xsd:element name="jms-message-filter">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A JMS filter can add information to a Queue, or Topic.
+				For example you can defined a message-selector. However,
+				you can also push the queue name and type into this
+				filter given you did not already specify them in the
+				jms-bus.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:attribute name="dest-name" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						Name of the Queue of Topic.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="dest-type" use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						A Queue delivers a message once, a topic
+						broadcasts a message to all registered
+						listeners.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:simpleType>
+					<xsd:restriction base="xsd:NMTOKEN">
+						<xsd:enumeration value="QUEUE" />
+						<xsd:enumeration value="TOPIC" />
+					</xsd:restriction>
+				</xsd:simpleType>
+			</xsd:attribute>
+			<xsd:attribute name="selector" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						A message-selector allows multiple listeners to
+						register with the same queue/topic, but they
+						will filter on this message-selector.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="true" name="persistent"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If false, JMS messages will be sent
+						non-persistent. Default is to send messages with
+						DeliveryMode.PERSISTENT.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="AUTO_ACKNOWLEDGE"
+				name="acknowledge-mode" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						JMS Session acknowledge mode. Can be on of
+						AUTO_ACKNOWLEDGE (default), CLIENT_ACKNOWLEDGE,
+						or DUPS_OK_ACKNOWLEDGE.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute 
+				name="jms-security-principal" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						JMS destination username. Will be used when creating a connection
+						to the destination.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute 
+				name="jms-security-credential" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						JMS destination password. Will be used when creating a connection
+						to the destination. Will be ignored if username is not specified.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="false" name="transacted"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, JMS sessions will be transaction aware.
+						Default is false.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="jms-bus" substitutionGroup="jesb:bus">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A JMS-Bus is a specific instance of a bus using the JMS
+				protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:jms-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:complexType name="jms-provider-type">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific instance of a provider, providing JMS.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexContent>
+			<xsd:extension base="jesb:bus-provider">
+				<xsd:attribute name="connection-factory"
+					type="xsd:string" use="required">
+					<xsd:annotation>
+						<xsd:documentation xml:lang="en">
+							The connection-factory used to lookup
+							queues/topics in a naming directory (JNDI)
+						</xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+				<xsd:attribute name="jndi-context-factory"
+					type="xsd:string">
+					<xsd:annotation>
+						<xsd:documentation xml:lang="en">
+							The context factory class the JBossESB will
+							use to do naming lookups.
+						</xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+				<xsd:attribute name="jndi-pkg-prefix"
+					type="xsd:string">
+					<xsd:annotation>
+						<xsd:documentation xml:lang="en">
+							The pkg-prefix which will be used to do
+							naming lookups. It is left empty by default.
+						</xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+				<xsd:attribute name="jndi-URL" type="xsd:anyURI">
+					<xsd:annotation>
+						<xsd:documentation xml:lang="en">
+							The URL used to do naming lookups.
+						</xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+	<xsd:element name="jms-provider" substitutionGroup="jesb:provider"
+		type="jesb:jms-provider-type" />
+
+	<xsd:element name="jms-jca-provider"
+		substitutionGroup="jesb:provider">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific instance of a provider, providing JMS through
+				JCA inflow.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:jms-provider-type">
+                    <xsd:sequence>
+                        <xsd:element maxOccurs="1" minOccurs="0"
+                        ref="jesb:activation-config" />
+                    </xsd:sequence>
+					<xsd:attribute name="adapter" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The artifact containing the resource
+								adapter.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="endpointClass"
+						type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The class name of the JCA endpoint.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="messagingType"
+						type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The class name of the messaging specific
+								interface.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="jcaBridge" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The class name of the JCA Bridge.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="transacted"
+						type="xsd:boolean">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The transacted flag.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="providerAdapterJNDI" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The JNDI location of an alternate provider adapter
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="jms-listener"
+		substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific listener using the jms protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:listener">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:jms-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		FS Type Implementations.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+	<xsd:element name="fs-message-filter">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A FS filter.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:attribute name="directory" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file share that is monitored for incoming
+						new files.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="input-suffix" type="xsd:string"
+				use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file suffix used to filter files targeted
+						for comsumption by the ESB (note: add the dot,
+						so something like '.esbIn').
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default=".esbInProcess" name="work-suffix"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file suffix used while the file is being
+						process, so that another thread or process won't
+						pick it up too.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="true" name="post-delete"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, the file will be deleted after it is
+						processed. Note that in that case post-directory
+						and post-suffix have no effect.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="true" name="post-rename"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, the file will be renamed after it is
+						processed. Note that in that case post-directory
+						and post-suffix have no effect.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="processed" name="post-directory"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file share to which the file will be moved
+						after it is processed by the ESB
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default=".esbDone" name="post-suffix"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file suffix which will be added to the file
+						name after it is processed.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="true" name="error-delete"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, the file will be deleted if an error
+						occurs during processing. Note that in that case
+						error-directory and error-suffix have no effect.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="processed" name="error-directory"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file share to which the file will be moved
+						after when an error occurs during processing.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default=".esbERROR" name="error-suffix"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file suffix which will be added to the file
+						name after an error occurs during processing.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="fs-bus" substitutionGroup="jesb:bus">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A Fs-Bus is a specific instance of a bus using the File
+				protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:fs-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="fs-provider" substitutionGroup="jesb:provider">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific instance of a provider, providing a file
+				system (local fileshare or NAS).
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus-provider" />
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="fs-listener" substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific listener using the file protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension
+					base="jesb:abstract-scheduled-listener">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:fs-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		FTP Type Implementations.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+	<xsd:element name="ftp-message-filter">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A FTP filter.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:attribute name="directory" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The ftp directory that is monitored for incoming
+						new files.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="username" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The username used to access the ftp server
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="password" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The password used to access the ftp server.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="input-suffix" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file suffix used to filter files targeted
+						for comsumption by the ESB (note: add the dot,
+						so something like '.esbIn').
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default=".esbInProcess" name="work-suffix"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file suffix used while the file is being
+						process, so that another thread or process won't
+						pick it up too.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="true" name="post-delete"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, the file will be deleted after it is
+						processed. Note that in that case post-directory
+						and post-suffix have no effect.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="post-directory" type="xsd:string"
+				use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The ftp directory to which the file will be
+						moved after it is processed by the ESB
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default=".esbDone" name="post-suffix"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file suffix which will be added to the file
+						name after it is processed.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="true" name="error-delete"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, the file will be deleted if an error
+						occurs during processing. Note that in that case
+						error-directory and error-suffix have no effect.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="processed" name="error-directory"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The ftp directory to which the file will be
+						moved after when an error occurs during
+						processing.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default=".esbERROR" name="error-suffix"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The file suffix which will be added to the file
+						name after an error occurs during processing.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="passive" type="xsd:boolean"
+				use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						This is an ftp server setting which may vary per
+						session.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="ftp" name="protocol"
+				use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The protocol, can be sftp (SSH File Transfer
+						Protocol), ftps (FTP over SLL) and ftp (to which
+						it defaults).
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:simpleType>
+					<xsd:restriction base="xsd:NMTOKEN">
+						<xsd:enumeration value="ftp" />
+						<xsd:enumeration value="ftps" />
+						<xsd:enumeration value="sftp" />
+					</xsd:restriction>
+				</xsd:simpleType>
+			</xsd:attribute>
+			<xsd:attribute name="certificate-url" type="xsd:string"
+				use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The url to a public server certificate for ftps, or to a
+						private certificate for sftp client verification. sftp certificate
+						can be located via a resource.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="certificate-name" type="xsd:string"
+				use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The common name of a certificate, which may be needed
+						for ftps.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="certificate-passphrase" type="xsd:string"
+				use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The passphrase of the private key, if necessary, for sftp client verification.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="false" name="read-only"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, the ftp server does not permit write
+						opertations on files. Note that in this case the
+						following properties have no effect:
+						work-suffix, post-delete, post-directory,
+						post-suffix, error-delete, error-directory, and
+						error-suffix.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="ftp-bus" substitutionGroup="jesb:bus">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A FTP-Bus is a specific instance of a bus using the FTP
+				protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:ftp-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="ftp-provider"
+		substitutionGroup="jesb:provider">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific instance of a provider, providing a ftp
+				service.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus-provider">
+					<xsd:attribute name="hostname" type="xsd:string"
+						use="required">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The ftp hostname, as it can be resolved
+								by DNS.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="ftp-listener"
+		substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific listener using the ftp protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension
+					base="jesb:abstract-scheduled-listener">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:ftp-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		SQL Type Implementations.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+	<xsd:element name="sql-message-filter">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A SQL filter.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:attribute name="tablename" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The table in which esb message are stored.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="message-id-column"
+				type="xsd:string" use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						A unique key (PK) in the table.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="message-column"
+				type="xsd:string" use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The field that holds the serialized message.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="status-column"
+				type="xsd:string" use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						This column contents ('P', 'W', 'E' or 'D')
+						indicates if the row is pending (P), in process
+						(W), in error(E) or done (D) if postDelete
+						and/or errorDelete are 'true' rows might be
+						deleted
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="where-condition" use="optional"
+				type="xsd:string" default="">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						A where clause, not including the word where,
+						which is applied to the query.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="order-by" use="optional"
+				type="xsd:string" default="">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						A where clause, not including the word where,
+						which is applied to the query.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="insert-timestamp-column" use="optional"
+				type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						Holds the timestamp when the record was
+						inserted.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="true" name="post-delete"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, records will be deleted after
+						processing.((e.g. no rows with a 'D' for done,
+						in column defined in 'status_column')
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="true" name="error-delete"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, records in error will be deleted after
+						attempted picked up for processing.(e.g. no rows
+						with a 'E' for error, in column defined in
+						'status_column')
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="sql-bus" substitutionGroup="jesb:bus">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A SQL-Bus is a specific instance of a bus using the SQL
+				protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:sql-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="sql-provider"
+		substitutionGroup="jesb:provider">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific instance of a provider, providing a db
+				service.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus-provider">
+					<xsd:attribute name="datasource" type="xsd:string"
+						use="optional">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The name of the datasource.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="url" type="xsd:string"
+						use="optional">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The url needed to connect to the db.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="driver" type="xsd:string"
+						use="optional">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The driver needed to connect to the db.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="username" type="xsd:string"
+						use="optional">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The username used to access the
+								database.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="password" type="xsd:string"
+						use="optional">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The password used to access the
+								database.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="transacted"
+						type="xsd:boolean">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The transacted flag.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="sql-listener"
+		substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific listener using the SQL protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:listener">
+					<xsd:sequence>
+						<xsd:element maxOccurs="1" minOccurs="0"
+							ref="jesb:sql-message-filter" />
+					</xsd:sequence>
+					<xsd:attribute default="10"
+						name="poll-frequency-seconds" use="optional">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The frequency with which this listener
+								polls the db in seconds. Defaults to 10
+								seconds.
+							</xsd:documentation>
+						</xsd:annotation>
+						<xsd:simpleType>
+							<xsd:restriction base="xsd:integer">
+								<xsd:minExclusive value="0" />
+							</xsd:restriction>
+						</xsd:simpleType>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		Hibernate Type Implementations.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+	<xsd:element name="hibernate-message-filter">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A Hibernate filter.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:attribute name="classname" type="xsd:string"
+				use="required">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						The class name to monitor.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute default="message_id" name="event"
+				type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						A comma-separated list of events to intercept.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="hibernate-bus" substitutionGroup="jesb:bus">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A hibernate-bus is a specific instance of a bus using
+				the Hibernate protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus">
+					<xsd:sequence>
+						<xsd:element maxOccurs="unbounded" minOccurs="1"
+							ref="jesb:hibernate-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="hibernate-provider"
+		substitutionGroup="jesb:provider">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific instance of a provider, providing a hibernate
+				service.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus-provider">
+					<xsd:attribute name="hibernate-cfg-file"
+						type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The Hibernate configuration file to use.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="hibernate-listener"
+		substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				A specific listener using the hibernate protocol.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:listener">
+					<xsd:sequence>
+						<xsd:element maxOccurs="unbounded" minOccurs="0"
+							ref="jesb:hibernate-message-filter" />
+					</xsd:sequence>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		JBoss Remoting Type Implementations.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+	<xsd:element name="jbr-bus" substitutionGroup="jesb:bus">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				JBoss Remoting Bus
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus">
+					<xsd:attribute name="port" type="xsd:int"
+						use="required">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								JBoss Remoting Server listen port.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="jbr-provider"
+		substitutionGroup="jesb:provider">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				JBoss Remoting Provider.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:bus-provider">
+					<xsd:attribute name="protocol" use="required">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								Jboss Remoting Listener/Server protocol.
+							</xsd:documentation>
+						</xsd:annotation>
+						<xsd:simpleType>
+							<xsd:restriction base="xsd:NMTOKEN">
+								<xsd:enumeration value="http" />
+                                <xsd:enumeration value="https" />
+								<xsd:enumeration value="socket" />
+                                <xsd:enumeration value="sslsocket" />
+							</xsd:restriction>
+						</xsd:simpleType>
+					</xsd:attribute>
+					<xsd:attribute name="host" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								JBoss Remoting Server bind address. When
+								not specified, defaults to
+								InetAddress.getLocalHost().getHostName().
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="jbr-listener"
+		substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				JBoss Remoting Listener.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:listener" />
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+		Groovy Gateway Type Implementations.
+		88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+	<xsd:element name="groovy-listener"
+		substitutionGroup="jesb:listener">
+		<xsd:annotation>
+			<xsd:documentation xml:lang="en">
+				Groovy Listener.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:listener">
+					<xsd:attribute name="script" type="xsd:string"
+						use="required">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The path (classpath) to the Groovy
+								Gateway script. Or, the alias for the
+								pre-packaged Groovy Gateway script.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+</xsd:schema>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsdconfig (from rev 24633, labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsdconfig)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsdconfig	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsdconfig	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,14 @@
+<!-- An xsdconfig file must begin with a "config" element in the 
+        http://www.bea.com/2002/09/xbean/config namespace. Also, be sure
+        to declare any namespaces used to qualify types in your schema (here,
+        the namespace corresponding to the pol prefix. -->
+        
+<xb:config xmlns:pol="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" 
+    xmlns:xb="http://www.bea.com/2002/09/xbean/config">
+
+    <!-- Use the "namespace" element to map a namespace to the Java package
+        name that should be generated. -->
+    <xb:namespace uri="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+        <xb:package>org.jboss.soa.esb.listeners.config.xbeanmodel110</xb:package>
+    </xb:namespace>
+</xb:config>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/build.xml	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/build.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -10,6 +10,10 @@
     <property name="org.jboss.esb.rosetta.src.dir" location="src"/>
 	<property name="org.jboss.esb.root.dir" location="../"/>
 	<property name="gendir" location="${org.jboss.esb.internal.dest}/schema-model" />
+	<property name="schema101.src.dir" location="${gendir}/src" />
+	<property name="schema101.classes.dir" location="${gendir}/classes" />
+	<property name="schema110.src.dir" location="${gendir}/src110" />
+	<property name="schema110.classes.dir" location="${gendir}/classes110" />
     <property environment="env"/>
 
     <property name="org.jboss.esb.lib.dir" location="${org.jboss.esb.internal.dest}/lib"/>
@@ -21,7 +25,8 @@
         <fileset dir="${org.jboss.esb.lib.dir}" includes="*.jar"/>
         <fileset dir="../../testlib" includes="emma*.jar"/>
         <fileset dir="${org.jboss.esb.ext.lib.dir}/standalone" includes="*.jar"/>
-		<pathelement location="${gendir}/classes"/>
+		<pathelement location="${schema101.classes.dir}"/>
+		<pathelement location="${schema110.classes.dir}"/>
 	</path>
 
     <target name="org.jboss.esb.rosetta.init">
@@ -144,21 +149,37 @@
         <delete dir="${gendir}" /><mkdir dir="${gendir}" />
 
         <xmlbean
-            classgendir="${gendir}/classes"
+            classgendir="${schema101.classes.dir}"
             javasource="1.5"
             debug="${org.jboss.esb.debug}"
-            srcgendir="${gendir}/src"
+            srcgendir="${schema101.src.dir}"
             destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/jbossesb-config-model-1.0.1.jar"
             classpathref="xbeans-classpath">
             <fileset dir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.0.1.xsd,jbossesb-1.0.1.xsdconfig"/>
         </xmlbean>
         <!-- now add the xsd to it -->
         <jar destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/jbossesb-config-model-1.0.1.jar" update="true" manifest="${org.jboss.esb.rosetta.classes.dir}/MANIFEST.MF"
-            basedir="${org.jboss.esb.root.dir}/etc/schemas/xml/"
-            includes="jbossesb-1.0.1.xsd">
-        	<fileset dir="${org.jboss.esb.rosetta.classes.dir}"
-                 includes="VERSION org/jboss/soa/**/Version.class"/>
-		</jar>
+            basedir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.0.1.xsd">
+            <fileset dir="${org.jboss.esb.rosetta.classes.dir}"
+                includes="VERSION org/jboss/soa/**/Version.class"/>
+        </jar>
+
+        <!-- now handle 1.1.0 -->
+        <xmlbean
+            classgendir="${schema110.classes.dir}"
+            javasource="1.5"
+            debug="${org.jboss.esb.debug}"
+            srcgendir="${schema110.src.dir}"
+            destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/jbossesb-config-model-1.1.0.jar"
+            classpathref="xbeans-classpath">
+            <fileset dir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.1.0.xsd,jbossesb-1.1.0.xsdconfig"/>
+        </xmlbean>
+        <!-- now add the xsd to it -->
+        <jar destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/jbossesb-config-model-1.1.0.jar" update="true" manifest="${org.jboss.esb.rosetta.classes.dir}/MANIFEST.MF"
+            basedir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.1.0.xsd">
+            <fileset dir="${org.jboss.esb.rosetta.classes.dir}"
+                includes="VERSION org/jboss/soa/**/Version.class"/>
+        </jar>
     </target>
 
     <path id="xbeans-classpath">

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ActionContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ActionContractPublisher.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ActionContractPublisher.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,7 +1,7 @@
 package org.jboss.internal.soa.esb.publish;
 
 import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument.Action;
+import org.jboss.soa.esb.listeners.config.Action;
 
 /**
  * Action contract Publisher.

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -33,6 +33,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
 import javax.xml.validation.SchemaFactory;
@@ -176,6 +177,25 @@
     }
     
     /**
+     * Get the schema for the specified resources.
+     * @param resources The schema resources to parse.
+     * @return The resource schema for validation. 
+     * @throws SAXException For errors during parsing.
+     */
+    public static Schema getSchema(final String[] resources)
+        throws SAXException
+    {
+        final int numResources = (resources == null ? 0 : resources.length) ;
+        final Source[] sources = new Source[numResources] ;
+        for(int count = 0 ; count < numResources ; count++)
+        {
+            final InputStream resourceIS = ClassUtil.getResourceAsStream(resources[count], XMLHelper.class) ;
+            sources[count] = new StreamSource(resourceIS) ;
+        }
+        return SCHEMA_FACTORY.newSchema(sources) ;
+    }
+    
+    /**
      * Validate the specified xml against the schema.
      * @param schema The resource schema for validation.
      * @param xml The XML to validate.

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -48,8 +48,9 @@
 import javax.xml.namespace.QName;
 
 import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.Service;
 import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
 import org.jboss.soa.esb.util.ClassUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -67,7 +68,7 @@
 	private static final QName XSD_QN = new QName("http://www.w3.org/2001/XMLSchema", "schema");
 	private static WSDLFactory wsdlFactory ;
  
-	public static String generateWSDL(final Service serviceConfig, final ESBServiceEndpointInfo serviceInfo)
+	public static String generateWSDL(final WebserviceInfo serviceConfig, final ESBServiceEndpointInfo serviceInfo)
 			throws ConfigurationException {
 		final Definition def = getWSDLFactory().newDefinition() ;
 		final String namespace = serviceInfo.getNamespace() ;
@@ -82,9 +83,9 @@
 		Message resMessage = null;
 		List<Message> faultMessages = null;
 
-		String inXsd = serviceConfig.getActions().getInXsd();
-		String outXsd = serviceConfig.getActions().getOutXsd();
-		String faultXsd = serviceConfig.getActions().getFaultXsd();
+		String inXsd = serviceConfig.getInXsd();
+		String outXsd = serviceConfig.getOutXsd();
+		String faultXsd = serviceConfig.getFaultXsd();
 
 		int nsSuffixCounter = 0 ;
 		if (inXsd != null) {
@@ -97,7 +98,7 @@
 							serviceInfo.getRequestName(), "in", ++nsSuffixCounter);
 				}
 			} catch (Exception e) {
-				throw new ConfigurationException("File defined in inXsd attribute '" + serviceConfig.getActions().getInXsd() + "' not found in classpath.", e);
+				throw new ConfigurationException("File defined in inXsd attribute '" + inXsd + "' not found in classpath.", e);
 			} 
 		}
 
@@ -111,7 +112,7 @@
 							serviceInfo.getResponseName(), "out", ++nsSuffixCounter);
 				}
 			} catch (Exception e) {
-				throw new ConfigurationException("File defined in outXsd attribute '" + serviceConfig.getActions().getOutXsd() + "' not found in classpath.", e);
+				throw new ConfigurationException("File defined in outXsd attribute '" + outXsd + "' not found in classpath.", e);
 			} 
 
 		}
@@ -130,7 +131,7 @@
 					}
 				}
 			} catch (Exception e) {
-				throw new ConfigurationException("File defined in faultXsd attribute '" + serviceConfig.getActions().getFaultXsd() + "' not found in classpath.", e);
+				throw new ConfigurationException("File defined in faultXsd attribute '" + faultXsd + "' not found in classpath.", e);
 			} 
 
 		}
@@ -143,7 +144,8 @@
 		try {
 			getWSDLFactory().newWSDLWriter().writeWSDL(def, sw);
 		} catch (WSDLException e) {
-			throw new ConfigurationException("Failed to generate wsdl for service:" + serviceConfig.getCategory() + "/" + serviceConfig.getName() , e);
+			final Service service = serviceConfig.getService() ;
+			throw new ConfigurationException("Failed to generate wsdl for service:" + service.getCategory() + "/" + service.getName() , e);
 		}
 		return sw.toString();
 	}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -25,9 +25,8 @@
 import java.security.PrivilegedAction;
 
 import org.apache.log4j.Logger;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.MepType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionsDocument.Actions;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
 
 
 public class ESBServiceEndpointInfo {
@@ -50,8 +49,9 @@
 	private final boolean isOneWay ;
 	private final String action ;
 	
-	public ESBServiceEndpointInfo(final Service service)
+	public ESBServiceEndpointInfo(final WebserviceInfo webserviceInfo)
 			throws UnsupportedEncodingException {
+		final Service service = webserviceInfo.getService() ;
 		final String name = service.getName() ;
 		requestName = name + "Req" ;
 		responseName = name + "Res" ;
@@ -70,26 +70,18 @@
 		namespace = "http://soa.jboss.org/" + URLEncoder.encode(service.getCategory(), DEFAULT_ENCODING) ;
 		action = namespace + "/" + operationName ;
 		
-		final Actions actions = service.getActions() ;
-		if (actions != null)
+		isOneWay = (webserviceInfo.getOutXsd() == null) ;
+		if (isOneWay)
 		{
-			isOneWay = (actions.getOutXsd() == null) ;
-			if (isOneWay)
+			if (webserviceInfo.getFaultXsd() != null)
 			{
-				if (actions.getFaultXsd() != null)
-				{
-					LOGGER.warn("Fault schemas ignored for OneWay service " + serviceCategory + ":" + serviceName) ;
-				}
-				if (MepType.REQUEST_RESPONSE.equals(actions.getMep()))
-				{
-					LOGGER.warn("No response specified for RequestResponse service " + serviceCategory + ":" + serviceName) ;
-				}
+				LOGGER.warn("Fault schemas ignored for OneWay service " + serviceCategory + ":" + serviceName) ;
 			}
+			if (webserviceInfo.isRequestResponse())
+			{
+				LOGGER.warn("No response specified for RequestResponse service " + serviceCategory + ":" + serviceName) ;
+			}
 		}
-		else
-		{
-			isOneWay = false ;
-		}
 	}
 
 	public String getRequestName() {

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -26,7 +26,6 @@
 package org.jboss.soa.esb.listeners;
 
 import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.listeners.config.ScheduleProviderFactory;
 import org.jboss.soa.esb.schedule.ScheduleProvider;
 
 public class ListenerTagNames

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Action.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/Action.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Action.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Action.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,102 @@
+/*
+* 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.
+*/
+package org.jboss.soa.esb.listeners.config;
+
+import java.util.Properties;
+
+/**
+ * Common information used to configure an action
+ *
+ * @author <a href="kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public class Action
+{
+    /**
+     * The action name attribute.
+     */
+    private final String nameAttribute ;
+    /**
+     * The action class attribute.
+     */
+    private final String classAttribute ;
+    /**
+     * The action process attribute.
+     */
+    private final String processAttribute ;
+    /**
+     * The action properties.
+     */
+    private final Properties properties ;
+    
+    /**
+     * Create the common action information.
+     * 
+     * @param nameAttribute The name attribute.
+     * @param classAttribute The class attribute.
+     * @param processAttribute The process attribute.
+     * @param properties The properties.
+     */
+    public Action(final String nameAttribute, final String classAttribute,
+        final String processAttribute, final Properties properties)
+    {
+        this.nameAttribute = nameAttribute ;
+        this.classAttribute = classAttribute ;
+        this.processAttribute = processAttribute ;
+        this.properties = properties ;
+    }
+    
+    /**
+     * Get the action name attribute.
+     * @return The name attribute.
+     */
+    public String getNameAttribute()
+    {
+        return nameAttribute ;
+    }
+    
+    /**
+     * Get the action class attribute.
+     * @return The class attribute.
+     */
+    public String getClassAttribute()
+    {
+        return classAttribute ;
+    }
+    
+    /**
+     * Get the action process attribute.
+     * @return The process attribute.
+     */
+    public String getProcessAttribute()
+    {
+        return processAttribute ;
+    }
+    
+    /**
+     * Get the action properties.
+     * @return The properties.
+     */
+    public Properties getProperties()
+    {
+        return properties ;
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Configuration.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Configuration.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Configuration.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -24,6 +24,7 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
+import java.io.Reader;
 import java.io.StringReader;
 import java.net.URL;
 import java.util.List;
@@ -36,6 +37,7 @@
 import org.jboss.soa.esb.helpers.ConfigTree;
 import org.jboss.soa.esb.listeners.LifecycleUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.model.ModelParser;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
 import org.jboss.soa.esb.util.ClassUtil;
@@ -50,8 +52,6 @@
  */
 public class Configuration
 {
-   private static final String JBOSSESB_XSD = "/jbossesb-1.0.1.xsd";
-
    public static String getStringFromStream(InputStream is) throws Exception
    {
       byte[] bytes = StreamUtils.readStream(is);
@@ -83,19 +83,10 @@
    
    public static ManagedLifecycleController create(final String configXml, final ObjectName serviceName, final List<ContractReferencePublisher> publishers)
    {
-      InputStream validationInputStream = ClassUtil.getResourceAsStream(JBOSSESB_XSD, Configuration.class);
-      //if this fails try using the
-      if (validationInputStream == null)
-      {
-         throw new IllegalStateException("ESB validation file [" + JBOSSESB_XSD + "] not found.");
-      }
-      StreamSource validationInputSource = new StreamSource(validationInputStream);
-
       try
       {
-         InputSource xmlInputSource = new InputSource(new StringReader(configXml));
-         XmlValidator validator = new XmlValidatorImpl();
-         if (validator.validate(xmlInputSource, validationInputSource))
+         final Reader config = new StringReader(configXml);
+         if (ModelParser.getParser().validate(config))
          {
             ByteArrayOutputStream listenerXml = new ByteArrayOutputStream();
             ByteArrayOutputStream gatewayXml = new ByteArrayOutputStream();
@@ -123,7 +114,7 @@
              boolean success = false ;
              try
              {
-                 ServicePublisher.addServicePublishers(controller, generator.getModel());
+                 ServicePublisher.addServicePublishers(controller, generator.getModel().getServicePublishers());
                  ServicePublisher.addContractReferencePublishers(controller, publishers) ;
                  success = true ;
              }

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -40,6 +40,8 @@
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
 import org.jboss.soa.esb.listeners.LifecycleUtil;
+import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
+import org.jboss.soa.esb.listeners.config.model.ModelParser;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
@@ -316,9 +318,7 @@
 				mLogger.info("loading configuration..");
 				String configXml = ParamRepositoryFactory.getInstance().get(mConfigFileName);
 				mLogger.debug("Start validation on configXml=" + configXml);
-				InputSource xmlInputSource = new InputSource(new StringReader(configXml));
-				XmlValidator validator = new XmlValidatorImpl();
-				if (validator.validate(xmlInputSource, validationInputSource)) {
+				if (ModelParser.getParser().validate(new StringReader(configXml))) {
 					mLogger.debug("Configuration file " + mConfigFileName + " passed validation. Starting " +
 							" the generation process of the jbossesb-listener.xml and the jbossesb-gateway.xml.");
 					Generator generator = new Generator(new ByteArrayInputStream(configXml.getBytes()));
@@ -329,18 +329,6 @@
 
                     // TODO: Get rid of generating config files to disk.  It's nuts.  Use in memory stream buffers!!
                     controller = startController(generator.getModel());
-				} else {
-					StringBuffer buffer = new StringBuffer("The configuration file "
-							+ mConfigFileName + "\n did not pass validation for the following reasons: \n");
-					int i=0;
-				    for (String error: validator.getValidationResults())
-					{
-						buffer.append("** " + ++i + ". "+ error + "\n");
-					}
-				    mLogger.debug(buffer);
-				    mLogger.error(buffer);
-					mLogger.info("The current configuration is kept in place until "
-							+ " validation passes.");
 				}
 			} catch (Exception e) {
 				mLogger.error("The current versions of the jbossesb-listener.xml and/or"
@@ -350,14 +338,14 @@
 		}
 	}
 	
-	public ManagedLifecycleController startController(final Generator.XMLBeansModel configModel)
+	public ManagedLifecycleController startController(final ModelAdapter configModel)
 	    throws ParamRepositoryException, SAXException, ManagedLifecycleException, ConfigurationException
 	{
 	    LifecycleResourceManager.getSingleton().associateDeployment(mConfigName) ;
             return startController(configModel, LifecycleUtil.getConfigTree(mListenerConfigFile), LifecycleUtil.getConfigTree(mGatewayConfigFile)) ;
 	}
 
-    public static ManagedLifecycleController startController(Generator.XMLBeansModel configModel, ConfigTree listenerConfig, ConfigTree gatewayConfig) throws ParamRepositoryException, SAXException, ManagedLifecycleException, ConfigurationException {
+    public static ManagedLifecycleController startController(ModelAdapter configModel, ConfigTree listenerConfig, ConfigTree gatewayConfig) throws ParamRepositoryException, SAXException, ManagedLifecycleException, ConfigurationException {
         final List<ManagedLifecycle> instances = LifecycleUtil.getListeners(listenerConfig);
         instances.addAll(LifecycleUtil.getGateways(gatewayConfig));
 
@@ -367,7 +355,7 @@
             lifecycleController.start();
 
             // In parallel, create a map of the contract publication info...
-            ServicePublisher.addServicePublishers(lifecycleController, configModel);
+            ServicePublisher.addServicePublishers(lifecycleController, configModel.getServicePublishers());
         } catch (final ManagedLifecycleException mle) {
             lifecycleController = null;
             mLogger.error("Unexpected exception starting controller", mle);

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,222 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config;
-
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.InVMEpr;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FsListenerDocument.FsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpListenerDocument.FtpListener;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsBusDocument.JmsBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsJcaProviderDocument.JmsJcaProvider;
-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.SqlBusDocument.SqlBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SqlListenerDocument.SqlListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SqlProviderDocument.SqlProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ScheduledListenerDocument.ScheduledListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.*;
-import org.jboss.soa.esb.listeners.config.mappers.*;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.message.MessageAwareListener;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * ESB Aware Listeners Configuration Generator.
- * <p/>
- * Generates a "ConfigTree" style configuration for the ESB Aware Listeners. 
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ESBAwareGenerator {
-
-    private static final Logger logger = Logger.getLogger(ESBAwareGenerator.class);
-
-    /**
-	 * XMLBeans based configuration model instance.
-	 */
-	private XMLBeansModel model;
-	
-	/**
-	 * Public constructor.
-	 * @param model XMLBeans based configuration model instance.
-	 */
-	public ESBAwareGenerator(XMLBeansModel model) {
-		this.model = model;
-	}
-
-	/**
-	 * Generate the configuration DOM for the target Server.
-	 * @return The configuration DOM.
-	 * @throws ConfigurationException Error creating configuration. 
-	 */
-	public Document generate() throws ConfigurationException {
-		Document doc = YADOMUtil.createDocument();
-		Element root;
-		
-		doc.appendChild(doc.createComment("\n\tNOTE: DO NOT MODIFY\n\tThis file was auto-generated.\n"));
-		root = YADOMUtil.addElement(doc, "jbossesb-listeners");
-		root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
-
-        // Add an InVM listener for each service...
-        List<Service> services = model.getServices();
-        for (int i = 0; i < services.size(); i++) {
-            Service service = services.get(i);
-            if(Generator.exposesInVMListener(service)) {
-                addInVMListener(root, service, i);
-            }
-        }
-		
-		// Iterate over all the ESB Aware listner configs and map them to the listener configuration...
-		List<Listener> listeners = model.getESBAwareListeners();
-		for(Listener listener : listeners) {
-			addESBAwareConfig(root, listener);
-		}
-		
-		return doc;
-	}
-
-    private void addInVMListener(Element root, Service service, int serviceIndex) throws ConfigurationException {
-        Element listenerNode = YADOMUtil.addElement(root, "InVM-" + serviceIndex);
-        Element properties = listenerNode.getOwnerDocument().createElement("properties");
-
-        MapperUtil.mapListenerServiceAttributes(listenerNode, service, false);
-        listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, MessageAwareListener.class.getName());
-
-        Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
-        eprNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, InVMEpr.INVM_PROTOCOL);
-
-        MapperUtil.mapProperties(service.getPropertyList(), properties);
-        eprNode.setAttribute(ListenerTagNames.URL_TAG, InVMEpr.INVM_PROTOCOL + "://"
-                + InVMEpr.createEncodedServiceId(service.getCategory(), service.getName())
-                + "/" + YADOMUtil.getAttribute(properties, "inVMPassByValue", "false")
-                + "?" + YADOMUtil.getAttribute(properties, "inVMLockStep", "false")
-                + "#" + YADOMUtil.getAttribute(properties, "inVMLockStepTimeout", "10000"));
-
-        listenerNode.setAttribute(ListenerTagNames.MAX_THREADS_TAG, YADOMUtil.getAttribute(properties, ListenerTagNames.MAX_THREADS_TAG, "1"));
-
-        listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(getInVMTransacted(service))) ;
-        YADOMUtil.removeEmptyAttributes(eprNode);
-
-        ActionMapper.map(listenerNode, service, model);
-    }
-    
-    /**
-     * Try to find the InVM transacted value.  Check to see if the transacted attribute
-     * has been explicitly set on the service.  If it has not been explicitly set then we
-     * check to see if any of the listener/bus configurations are transacted and assume the
-     * InVM is implicitly transacted.
-     * 
-     * @param service The current service.
-     * @return true if transacted, false otherwise.
-     */
-    private boolean getInVMTransacted(final Service service)
-        throws ConfigurationException
-    {
-        if (service.isSetInvmScope()) {
-            return service.getInvmTransacted() ;
-        } else if (service.isSetListeners()) {
-            for (Listener listener: service.getListeners().getListenerList()) {
-                if (listener instanceof ScheduledListener) {
-                    if (((ScheduledListener)listener).getTransacted())
-                        return true ;
-                }
-                else if (listener instanceof JmsListener) {
-                    final Bus bus = model.getBus(listener.getBusidref()) ;
-                    if (!(bus instanceof JmsBus))
-                        continue ;
-                    
-                    final Provider provider = model.getProvider(bus) ;
-                    if (provider instanceof JmsJcaProvider) {
-                        // Jms JCA provider defaults to true
-                        final JmsJcaProvider jmsJcaProvider = (JmsJcaProvider)provider ;
-                        if (!jmsJcaProvider.isSetTransacted() || jmsJcaProvider.getTransacted())
-                            return true ;
-                    } else if (provider instanceof JmsProviderType) {
-                        JmsMessageFilter filter = ((JmsListener)listener).getJmsMessageFilter() ;
-                        if (filter == null)
-                            filter = ((JmsBus)bus).getJmsMessageFilter() ;
-                        if ((filter != null) && filter.getTransacted())
-                            return true ;
-                    }
-                } else if (listener instanceof SqlListener) {
-                    final Bus bus = model.getBus(listener.getBusidref()) ;
-                    if (!(bus instanceof SqlBus))
-                        continue ;
-                    
-                    final Provider provider = model.getProvider(bus) ;
-                    if ((provider instanceof SqlProvider) && ((SqlProvider)provider).getTransacted())
-                        return true ;
-                }
-            }
-        }
-        return false ;
-    }
-
-    /**
-	 * Add a single ESB Aware Listener configuration node to configuration root. 
-	 * @param root Configuration root node.
-	 * @param listener The ESB Aware Listener configuration to be added.
-	 * @throws ConfigurationException Invalid listener configuration.
-	 */
-	private void addESBAwareConfig(Element root, Listener listener) throws ConfigurationException {
-		Element listenerConfigTree;
-		Service listenerService;
-		
-		// Of course we could do the following reflectively if we really want to - TODO perhaps!!
-		if(listener instanceof JmsListener) {
-			listenerConfigTree = JmsListenerMapper.map(root, (JmsListener)listener, model);
-        } else if (listener instanceof ScheduledListener) {
-            listenerConfigTree = ScheduledListenerMapper.map(root, (ScheduledListener) listener, model);
-        } else if(listener instanceof FsListener) {
-         listenerConfigTree = FsListenerMapper.map(root, (FsListener)listener, model);
-		} else if (listener instanceof FtpListener) {
-			listenerConfigTree = FtpListenerMapper.map(root, (FtpListener)listener, model);
-		} else if (listener instanceof SqlListener) {
-			listenerConfigTree = SqlListenerMapper.map(root, (SqlListener)listener, model);
-        } else if (listener instanceof JbrListenerDocument.JbrListener) {
-            logger.error("JbossRemoting listener only supported in Gateway mode.");
-            return;
-        } else if (listener instanceof GroovyListenerDocument.GroovyListener) {
-            listenerConfigTree = GroovyListenerMapper.map(root, (GroovyListenerDocument.GroovyListener)listener, model);
-		} else {
-			listenerConfigTree = UntypedListenerMapper.map(root, listener, model);
-		}
-
-        if (listener instanceof AbstractScheduledListener) {
-            ScheduleMapper.map(listenerConfigTree, (AbstractScheduledListener) listener, model);
-        }
-
-        // Locate the Service to which the listener is bound...
-		listenerService = model.getService(listener);
-		
-		// Map the actions and notiications...
-		ActionMapper.map(listenerConfigTree, listenerService, model);
-		NotificationMapper.map(listenerConfigTree, listenerService, model);
-	}
-}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,149 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config;
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FsListenerDocument.FsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpListenerDocument.FtpListener;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.GroovyListenerDocument.GroovyListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.HibernateListenerDocument.HibernateListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JbrListenerDocument.JbrListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SqlListenerDocument.SqlListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JcaGatewayDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.AbstractScheduledListener;
-import org.jboss.soa.esb.listeners.config.mappers.*;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Gateway Listeners Configuration Generator.
- * <p/>
- * Generates a "ConfigTree" style configuration for the Gateways Listeners.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class GatewayGenerator {
-	
-	private static final Logger logger = Logger.getLogger(GatewayGenerator.class);
-
-    /**
-     * XMLBeans based configuration model instance.
-     */
-    private XMLBeansModel model;
-
-    /**
-     * Public constructor.
-     *
-     * @param model XMLBeans based configuration model instance.
-     */
-    public GatewayGenerator(XMLBeansModel model) {
-        this.model = model;
-    }
-
-    /**
-     * Generate the configuration DOM for the target Server.
-     *
-     * @return The configuration DOM.
-     * @throws ConfigurationException Error creating configuration.
-     */
-    public Document generate() throws ConfigurationException {
-        Document doc = YADOMUtil.createDocument();
-        Element root;
-
-        doc.appendChild(doc.createComment("\n\tNOTE: DO NOT MODIFY\n\tThis file was auto-generated.\n"));
-        root = YADOMUtil.addElement(doc, "jbossesb-gateways");
-        root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
-
-        List<Service> services = model.getServices();
-        HashMap<String, HashMap<String, String>> hm = new HashMap<String, HashMap<String, String>>();
-        for (Service service : services) {
-        	if (hm.containsKey(service.getCategory())) {
-        		HashMap<String, String> hc = hm.get(service.getCategory());
-        		
-        		if (hc.containsKey(service.getName())) {
-        			throw new ConfigurationException("Service names must be unique within a category.  "
-        					+ "The service name " + service.getName()
-        					+ " is already defined within the " + service.getCategory() + " category.");
-        		} else {
-        			hc.put(service.getName(), service.getName());
-        		}
-        	} else {
-        		HashMap <String,String> hc = new HashMap<String,String>();
-        		hc.put(service.getName(), service.getName());
-        		hm.put(service.getCategory(), hc);
-        	}
-        }
-        
-        // Iterate over all the gateway configs and map them to the gateway configuration...
-        List<Listener> gateways = model.getGatewayListeners();
-        for (Listener gateway : gateways) {
-            addGatewayConfig(root, gateway);
-        }
-
-        return doc;
-    }
-
-    /**
-     * Add a single gateway configuration node to configuration root.
-     *
-     * @param root    Configuration root node.
-     * @param gateway The Gateway Listener configuration to be added.
-     * @throws ConfigurationException Invalid listener configuration.
-     */
-    private void addGatewayConfig(Element root, Listener gateway) throws ConfigurationException {
-        Element listenerConfig;
-
-        // Of course we could do the following reflectively if we really want to - TODO perhaps!!
-        if (gateway instanceof JmsListener) {
-            listenerConfig = JmsListenerMapper.map(root, (JmsListener) gateway, model);
-        } else if (gateway instanceof FsListener) {
-            listenerConfig = FsListenerMapper.map(root, (FsListener) gateway, model);
-        } else if (gateway instanceof JcaGatewayDocument.JcaGateway) {
-            listenerConfig = JcaGatewayMapper.map(root, (JcaGatewayDocument.JcaGateway) gateway, model);
-        } else if (gateway instanceof FtpListener) {
-            listenerConfig = FtpListenerMapper.map(root, (FtpListener) gateway, model);
-        } else if (gateway instanceof SqlListener) {
-            listenerConfig = SqlListenerMapper.map(root, (SqlListener) gateway, model);
-        } else if (gateway instanceof JbrListener) {
-            listenerConfig = JbrListenerMapper.map(root, (JbrListener) gateway, model);
-        } else if (gateway instanceof GroovyListener) {
-            listenerConfig = GroovyListenerMapper.map(root, (GroovyListener) gateway, model);
-        } else if (gateway instanceof HibernateListener) {
-            listenerConfig = HibernateListenerMapper.map(root, (HibernateListener) gateway, model);
-        } else {
-            listenerConfig = UntypedListenerMapper.map(root, gateway, model);
-        }
-
-        if (gateway instanceof AbstractScheduledListener) {
-            ScheduleMapper.map(listenerConfig, (AbstractScheduledListener) gateway, model);
-        }
-    }
-}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -22,26 +22,18 @@
 package org.jboss.soa.esb.listeners.config;
 
 import org.apache.log4j.Logger;
-import org.apache.xmlbeans.XmlException;
 import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
 import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.*;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JbossesbDocument.Jbossesb;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ScheduleProviderDocument.ScheduleProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServicesDocument.Services;
+import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
+import org.jboss.soa.esb.listeners.config.model.ModelException;
+import org.jboss.soa.esb.listeners.config.model.ModelParser;
 import org.w3c.dom.Document;
 
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
 
 /**
  * ESB Configuration Generator.
@@ -68,7 +60,7 @@
 	/**
 	 * Configuration model.
 	 */
-	private XMLBeansModel model;
+	private ModelAdapter model;
 
    private OutputStream gatewayOutputStream;
 
@@ -94,30 +86,9 @@
 		
 		// Parse the config into our internal model instance...
        model = parseConfig(config);
-       assertOneScheduleProviderConfig(model);
+       model.verifyScheduleProviderConfig();
    }
 
-    private void assertOneScheduleProviderConfig(XMLBeansModel model) throws ConfigurationException {
-        ProvidersDocument.Providers providersConfig = model.jbossesb.getProviders();
-
-        if(providersConfig == null) {
-            return;
-        }
-
-        List<Provider> providers = providersConfig.getProviderList();
-        int numScheduleProviders = 0;
-
-        for(Provider provider : providers) {
-            if(provider instanceof ScheduleProvider) {
-                numScheduleProviders++;
-            }
-        }
-
-        if(numScheduleProviders > 1) {
-            throw new ConfigurationException("Configuration contains " + numScheduleProviders + " <schedule-provider> configurations.  Only one of this provider type can exist per configuration.");
-        }
-    }
-
     /**
     * Parse the supplied config into a config model.
     * @param config The input configuration stream.
@@ -125,16 +96,11 @@
     * @throws ConfigurationException Bad listener ESB configuration.
     * @throws IOException Unable to read the ESB listener configuration.
     */
-   public static XMLBeansModel parseConfig(InputStream config) throws IOException, ConfigurationException {
+   public static ModelAdapter parseConfig(InputStream config) throws IOException, ConfigurationException {
        try {
-           JbossesbDocument doc = JbossesbDocument.Factory.parse(config);
-
-           // TODO: Get validation working from here - would save
-           // doc.validate();
-
-           return new XMLBeansModel(doc);
-       } catch (XmlException e) {
-           throw new ConfigurationException("Error while processing ESB Listener configuration stream.", e);
+           return ModelParser.getParser().parse(new InputStreamReader(config)) ;
+       } catch (final ModelException me) {
+           throw new ConfigurationException("Error while processing ESB Listener configuration stream.", me);
        }
    }
 
@@ -143,15 +109,11 @@
     * @throws ConfigurationException Failed to generate configuration set.
     */
    public void generate() throws ConfigurationException {
-      // Generate and serialise the configuration for the ESB Aware listeners...
-      ESBAwareGenerator awareGenerator = new ESBAwareGenerator(model);
-      Document awareConfig = awareGenerator.generate();
+      Document awareConfig = model.generateESBAwareConfig();
 
       YADOMUtil.serialize(awareConfig, listenerOutputStream);
 
-      // Generate and serialise the configuration for the Gateway listeners...
-      GatewayGenerator gatewayGenerator = new GatewayGenerator(model);
-      Document gatewayConfig = gatewayGenerator.generate();
+      Document gatewayConfig = model.generateGatewayConfig();
 
       YADOMUtil.serialize(gatewayConfig, gatewayOutputStream);
    }
@@ -180,288 +142,22 @@
 			throw new IllegalArgumentException("'outdir' exists, but is not a directory.");
 		}
 
-		// Generate and serialise the configuration for the ESB Aware listeners...
-		ESBAwareGenerator awareGenerator = new ESBAwareGenerator(model);
-		Document awareConfig = awareGenerator.generate();
+		Document awareConfig = model.generateESBAwareConfig();
 
 		logger.info("Serializing ESB Aware Listener 'ConfigTree' configuration to [" + (new File(outdir, ESB_CONFIG_XML_FILE)).getAbsolutePath() + "].");
 		YADOMUtil.serialize(awareConfig, outdir, ESB_CONFIG_XML_FILE);
 
-		// Generate and serialise the configuration for the Gateway listeners...
-		GatewayGenerator gatewayGenerator = new GatewayGenerator(model);
-		Document gatewayConfig = gatewayGenerator.generate();
+		Document gatewayConfig = model.generateGatewayConfig();
 		
 		logger.info("Serializing ESB Gateway 'ConfigTree' configuration to [" + (new File(outdir, ESB_CONFIG_GATEWAY_XML_FILE)).getAbsolutePath() + "].");
 		YADOMUtil.serialize(gatewayConfig, outdir, ESB_CONFIG_GATEWAY_XML_FILE);
 	}
 
-    public static Properties toProperties(List<PropertyDocument.Property> configProperties) {
-        Properties properties = new Properties();
-
-        for(PropertyDocument.Property property : configProperties) {
-            properties.setProperty(property.getName(), property.getValue());
-        }
-
-        return properties;
-    }
-
 	/**
 	 * Get the model instance associate with the configuration used to create this Generator instance. 
 	 * @return Returns the model.
 	 */
-	public XMLBeansModel getModel() {
+	public ModelAdapter getModel() {
 		return model;
 	}
-
-    public static boolean exposesInVMListener(Service service) {
-        if(service.xgetInvmScope() != null && service.xgetInvmScope().getStringValue() != null) {
-            return (service.xgetInvmScope().getStringValue().equals("GLOBAL"));
-        }
-
-        String systemDefaultScope = System.getProperty(Environment.DEFAULT_INVM_SCOPE, "GLOBAL");
-        String defaultScope = ModulePropertyManager.getPropertyManager("core").getProperty(Environment.DEFAULT_INVM_SCOPE, systemDefaultScope);
-
-        return defaultScope.equals("GLOBAL");
-    }
-	
-	/**
-	 * XMLBeans based model implementation.
-	 * 
-	 * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
-	 */
-	public static class XMLBeansModel {
-
-		/**
-		 * XMLBeans config model instance.
-		 */
-		private Jbossesb jbossesb;
-		
-		/**
-		 * Constructor.
-		 * @param xmlBeansDoc XMLBeans config model.
-		 */
-		private XMLBeansModel(JbossesbDocument xmlBeansDoc) {
-			this.jbossesb = xmlBeansDoc.getJbossesb();
-		}
-
-        /**
-		 * Get the list of ESB Gateway Listeners from the configuration.
-		 * @return The list of ESB Gateway Listeners from the configuration.
-         * @throws ConfigurationException Bad configuration.
-		 */
-		public List<Listener> getGatewayListeners() throws ConfigurationException {
-			return getListeners(true);
-		}
-
-		/**
-		 * Get the list of ESB Aware Listeners from the configuration.
-		 * @return The list of ESB Aware Listeners from the configuration.
-         * @throws ConfigurationException Bad configuration.
-		 */
-		public List<Listener> getESBAwareListeners() throws ConfigurationException {
-			return getListeners(false);
-		}
-
-        /**
-		 * Get the Service to which the supplied {@link Listener} configuration instance is bound.
-		 * @param listener The listener instance (Gateway or ESB Aware).
-		 * @return The Service to which the 
-		 */
-		public Service getService(Listener listener) {
-            List<Service> services = getServices();
-
-            for(Service service : services) {
-                ListenersDocument.Listeners listeners = service.getListeners();
-
-                if(listeners != null) {
-                    List<Listener> listenerList = listeners.getListenerList();
-
-                    if(listenerList != null) {
-                        for(Listener serviceListener : listenerList) {
-                            if(serviceListener == listener) {
-                                return service;
-                            }
-                        }
-                    }
-                }
-            }
-			
-			throw new IllegalStateException("No Service instance found for the supplied Listener instance.  This should not be possible if the Listener instance was provided by this configuration.  Where has this Listener instance come from?");
-		}
-
-        /**
-         * Get the Service list.
-         * @return Service list.
-         */
-        public List<Service> getServices() {
-            final Services services = jbossesb.getServices();
-            if (services != null) {
-                return jbossesb.getServices().getServiceList();
-            } else {
-                return Collections.emptyList();
-            }
-        }
-
-        /**
-		 * Get the &lt;bus&gt; configuration matching the supplied busid reference value.
-		 * @param busid The required &lt;bus&gt; configuration reference value.
-		 * @return The Bus configuration instance.
-		 * @throws ConfigurationException Unknown busid reference value.
-		 */
-		public Bus getBus(String busid) throws ConfigurationException {
-			List<Provider> providers = jbossesb.getProviders().getProviderList();
-			
-			for(Provider provider : providers) {
-                if(provider instanceof BusProvider) {
-                    List<Bus> buses = ((BusProvider)provider).getBusList();
-
-                    for(Bus bus : buses) {
-                        if(bus.getBusid().equals(busid)) {
-                            return bus;
-                        }
-                    }
-                }
-            }
-			
-			throw new ConfigurationException("Invalid ESB Configuration: No <bus> configuration matching busid reference value [" + busid + "].");
-		}
-
-		/**
-		 * Get the &lt;provider&gt; configuration containing the supplied Bus configuration instance.
-		 * @param bus The Bus config instance whose Provider is being sought.
-		 * @return The Provider configuration instance.
-		 */
-		public Provider getProvider(Bus bus) {
-			List<Provider> providers = jbossesb.getProviders().getProviderList();
-			
-			for(Provider provider : providers) {
-                if(provider instanceof BusProvider) {
-                    List<Bus> buses = ((BusProvider)provider).getBusList();
-
-                    for(Bus installedBus : buses) {
-                        if(installedBus == bus) {
-                            return provider;
-                        }
-                    }
-                }
-            }
-			
-			throw new IllegalStateException("No Provider instance found for the supplied Bus config instance.  This should not be possible if the Bus instance was provided by this configuration.  Where has this Bus instance come from?");
-		}
-
-        public Schedule getSchedule(final String id) {
-            if((id == null) || (jbossesb.getProviders() == null)) {
-                return null;
-            }
-
-            List<Provider> providers = jbossesb.getProviders().getProviderList();
-
-            for(Provider provider : providers) {
-                if(provider instanceof ScheduleProvider) {
-                    final ScheduleProvider scheduleProvider = (ScheduleProvider)provider ;
-                    final List<Schedule> schedules = scheduleProvider.getScheduleList() ;
-                    for(Schedule schedule: schedules) {
-                        if (id.equals(schedule.getScheduleid())) {
-                            return schedule ;
-                        }
-                    }
-                }
-            }
-
-            return null;
-        }
-
-        public ScheduleProvider getScheduleProvider() {
-            if(jbossesb.getProviders() == null) {
-                return null;
-            }
-
-            List<Provider> providers = jbossesb.getProviders().getProviderList();
-
-            for(Provider provider : providers) {
-                if(provider instanceof ScheduleProvider) {
-                    return (ScheduleProvider) provider;
-                }
-            }
-
-            return null;
-        }
-        
-        public int getScheduledListenerCount() {
-            int count = 0 ;
-            if (jbossesb.getServices() != null) {
-                final List<Service> services = getServices() ;
-                for(Service service: services) {
-                    final ListenersDocument.Listeners listeners = service.getListeners() ;
-                    if (listeners != null) {
-                        for (Listener listener: listeners.getListenerList()) {
-                            if (listener instanceof AbstractScheduledListener) {
-                                count++ ;
-                            }
-                        }
-                    }
-                }
-            }
-            return count ;
-        }
-
-        private boolean isGateway(Listener listener)
-      {
-         return listener.getIsGateway() || (listener instanceof JcaGatewayDocument.JcaGateway);
-      }
-
-      /**
-		 * Get the list of ESB Listeners based on their Gateway flag.
-		 * @return The list of ESB Aware or Gateway Listeners from the configuration.
-         * @param isGateway Is the listener a gateway or ESB aware listener.
-         * @throws ConfigurationException Bad configuration.
-		 */
-		private List<Listener> getListeners(boolean isGateway) throws ConfigurationException {
-			List<Listener> gateways = new ArrayList<Listener>();
-			if (jbossesb.getServices() != null) {
-                List<Service> services = getServices();
-
-                for(Service service : services) {
-                    boolean listenerAdded = false;
-                    ListenersDocument.Listeners listeners = service.getListeners();
-
-                    if(listeners != null) {
-                        for(Listener listener : listeners.getListenerList()) {
-                            if(isGateway(listener) == isGateway) {
-                                gateways.add(listener);
-                                listenerAdded = true;
-                            }
-                        }
-                    }
-
-                    // Make sure each Service config has a message aware listener...
-                    // http://jira.jboss.com/jira/browse/JBESB-648
-                    if(!exposesInVMListener(service) && !isGateway && !listenerAdded) {
-                        throw new ConfigurationException("Service configuration for Service '" + service.getCategory() + ":" + service.getName() + "' doesn't define a Message-Aware Listener (i.e. is-gateway='false').");
-                    }
-                }
-			}
-			
-			return gateways;
-		}
-
-        /**
-		 * Gets the setting for the number of seconds between reloads.
-		 * 
-		 * @return The param reload seconds config value.
-		 */
-		public String getParameterReloadSecs() {
-			return jbossesb.getParameterReloadSecs().getStringValue();
-		}
-        
-        public static String getProperty(List<PropertyDocument.Property> properties, String name, String defaultVal) {
-            for (PropertyDocument.Property property : properties) {
-                if(property.getName().equals(name)) {
-                    return property.getValue();
-                }
-            }
-
-            return defaultVal;
-        }
-	}
 }

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -56,14 +56,10 @@
 import org.jboss.mx.loading.LoaderRepositoryFactory;
 import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.mx.util.ObjectNameConverter;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
+import org.jboss.soa.esb.listeners.config.model.ModelParser;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JbossesbDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.MepType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument.Action;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionsDocument.Actions;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JbossesbDocument.Jbossesb;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServicesDocument.Services;
 import org.jboss.soa.esb.util.ClassUtil;
 import org.jboss.system.ServiceControllerMBean;
 import org.jboss.system.server.ServerConfig;
@@ -261,8 +257,8 @@
          }
          
          final Set<ObjectName> deps = new HashSet<ObjectName>();
-         final Jbossesb jbossEsb = getJbossEsb(jbossEsbXml) ;
-         addActionDependencies(di.shortName, jbossEsb, deps) ;
+         final ModelAdapter model = getJbossEsbModel(jbossEsbXml) ;
+         addActionDependencies(di.shortName, model, deps) ;
          
          JBoss4ESBDeployment deployment = new JBoss4ESBDeployment(jbossEsbXml, di.shortName);
          initialiseDeploymentName(deployment) ;
@@ -277,7 +273,7 @@
          try
          {
              Thread.currentThread().setContextClassLoader(di.localCl) ;
-             warFile = createWebserviceWars(di.shortName, jbossEsb, deploymentName, publishers) ;
+             warFile = createWebserviceWars(di.shortName, model, deploymentName, publishers) ;
          }
          finally
          {
@@ -398,13 +394,13 @@
       super.create(di);
    }
 
-   private Jbossesb getJbossEsb(final String configuration)
+   private ModelAdapter getJbossEsbModel(final String configuration)
        throws DeploymentException
    {
        try
        {
            final StringReader sr = new StringReader(configuration) ;
-           return JbossesbDocument.Factory.parse(sr).getJbossesb() ;
+           return ModelParser.getParser().parse(sr) ;
        }
        catch (final Exception ex)
        {
@@ -413,41 +409,25 @@
    }
    
    private void addActionDependencies(final String deploymentName,
-      final Jbossesb jbossEsb, final Set<ObjectName> deps)
+      final ModelAdapter model, final Set<ObjectName> deps)
       throws MalformedObjectNameException
    {
       final Set<String> artifacts = new HashSet<String>() ;
       artifacts.add(ESB_ARTIFACT_NAME) ;
 
-      final Services services = jbossEsb.getServices() ;
-      if (services != null)
+      final Set<String> actionClasses = model.getActions() ;
+      
+      final int numActionClasses = (actionClasses == null ? 0 : actionClasses.size()) ;
+      if (numActionClasses > 0)
       {
-          final Set<String> actionClasses = new HashSet<String>() ;
-          
-          for(final Service service : services.getServiceList())
+          for(final String actionClass: actionClasses)
           {
-              final Actions actions = service.getActions() ;
-              if (actions != null)
+              final String artifact = (String)actionArtifactProperties.get(actionClass) ;
+              if (artifact != null)
               {
-                  for (final Action action: actions.getActionList())
-                  {
-                      actionClasses.add(action.getClass1()) ;
-                  }
+                  artifacts.add(artifact) ;
               }
           }
-          
-          final int numActionClasses = actionClasses.size() ;
-          if (numActionClasses > 0)
-          {
-              for(final String actionClass: actionClasses)
-              {
-                  final String artifact = (String)actionArtifactProperties.get(actionClass) ;
-                  if (artifact != null)
-                  {
-                      artifacts.add(artifact) ;
-                  }
-              }
-          }
       }
       
       for(final String artifact: artifacts)
@@ -461,30 +441,13 @@
       }
    }
    
-   private File createWebserviceWars(final String esbName, final Jbossesb jbossEsb, final String deploymentName,
+   private File createWebserviceWars(final String esbName, final ModelAdapter model, final String deploymentName,
        final List<ContractReferencePublisher> publishers)
        throws DeploymentException
    {
-       final Services services = jbossEsb.getServices() ;
-       if (services != null)
+       final List<WebserviceInfo> endpointServices =  model.getWebserviceServices() ;
+       if (endpointServices != null)
        {
-           final List<Service> endpointServices = new ArrayList<Service>() ;
-           for(final Service service : jbossEsb.getServices().getServiceList())
-           {
-               final Actions actions = service.getActions() ;
-               if (actions != null)
-               {
-                   if (!actions.isSetWebservice() || actions.getWebservice())
-                   {
-                       final String inXsd = actions.getInXsd() ;
-                       if (inXsd != null)
-                       {
-                           endpointServices.add(service) ;
-                       }
-                   }
-               }
-           }
-           
            if (endpointServices.size() > 0)
            {
                final StringWriter filterDefinitions = new StringWriter() ;
@@ -499,13 +462,13 @@
                {
                    final JAXWSProviderClassGenerator generator = new JAXWSProviderClassGenerator() ;
                    
-                   for(Service service: endpointServices)
+                   for(WebserviceInfo webserviceInfo: endpointServices)
                    {
-                       final MepType.Enum mep  = service.getActions().getMep() ;
-                       final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(service) ;
-                       final String wsdl = ESBContractGenerator.generateWSDL(service, serviceInfo) ;
+                       final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(webserviceInfo) ;
+                       final String wsdl = ESBContractGenerator.generateWSDL(webserviceInfo, serviceInfo) ;
                        addFile(zos, serviceInfo.getWSDLFileName(), wsdl) ;
-                       
+
+                       final Service service = webserviceInfo.getService() ;
                        final byte[] wsClass = generator.generate(service.getCategory(),
                            service.getName(), serviceInfo) ;
                        final String wsClassName = serviceInfo.getClassName().replace('.', '/') + ".class" ;
@@ -514,7 +477,7 @@
                        // Filter...
                        // At the moment we only need the filter to overcome a bug in JBossWS re In-Only endpoints, so
                        // we only include for one way services...
-                       if(mep == MepType.ONE_WAY) {                           
+                       if(serviceInfo.isOneWay()) {
                            String filterName = serviceInfo.getServletName() + "_Filter";
 
                            filterDefinitions.append("<filter><filter-name>") ;
@@ -545,8 +508,7 @@
                        servletMappings.append(serviceInfo.getServletPath()) ;
                        servletMappings.append("</url-pattern></servlet-mapping>") ;
                        
-                       final org.jboss.soa.esb.Service esbService = new org.jboss.soa.esb.Service(service.getCategory(), service.getName()) ;
-                       final ContractReferencePublisher publisher = new ESBServiceContractPublisher(esbService, service.getDescription(), serviceInfo.getServletName()) ;
+                       final ContractReferencePublisher publisher = new ESBServiceContractPublisher(service, webserviceInfo.getDescription(), serviceInfo.getServletName()) ;
                        publishers.add(publisher) ;
                    }
                    

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ScheduleProviderFactory.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ScheduleProviderFactory.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ScheduleProviderFactory.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,119 +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;
-
-import org.jboss.soa.esb.schedule.*;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ScheduleProviderDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SimpleScheduleDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.CronScheduleDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FrequencyUnit;
-
-import java.util.List;
-import java.util.Properties;
-import java.util.ArrayList;
-
-/**
- * Factory class for creating and configuring a {@link ScheduleProvider}
- * instance.
- *
- * @author <a href="daniel.bevenius at redpill.se">Daniel Bevenius</a>
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public abstract class ScheduleProviderFactory {
-
-    public static final String ATTR_SCHEDULE_ID_REF = "scheduleidref";
-    public static final String ATTR_FREQUENCY = "schedule-frequency";
-
-    public static ScheduleProvider createInstance(List<ManagedLifecycle> listeners, ScheduleProviderDocument.ScheduleProvider scheduleProviderConfig) throws ConfigurationException {
-        Properties schedulerConfig = null;
-        List<org.jboss.soa.esb.schedule.Schedule> schedules = null;
-        ScheduleProvider instance;
-
-        if(scheduleProviderConfig != null) {
-            schedulerConfig = Generator.toProperties(scheduleProviderConfig.getPropertyList());
-            schedules = getSchedules(scheduleProviderConfig);
-        }
-        instance = new ScheduleProvider(schedulerConfig, schedules);
-
-        try {
-            for(ManagedLifecycle listener : listeners) {
-                if(listener instanceof ScheduledEventListener) {
-                    ConfigTree config = listener.getConfig();
-                    String scheduleIdRef = config.getAttribute(ATTR_SCHEDULE_ID_REF);
-
-                    if(scheduleIdRef != null) {
-                        instance.addListener((ScheduledEventListener) listener, scheduleIdRef);
-                    } else {
-                        long frequency = config.getLongAttribute(ATTR_FREQUENCY, 10);
-                        instance.addListener((ScheduledEventListener) listener, frequency);
-                    }
-                }
-            }
-        } catch (SchedulingException e) {
-            throw new ConfigurationException(e);
-        }
-
-        return instance;
-    }
-
-    private static List<org.jboss.soa.esb.schedule.Schedule> getSchedules(ScheduleProviderDocument.ScheduleProvider scheduleProviderConfig) throws ConfigurationException {
-        List<Schedule> schedules = new ArrayList<Schedule>();
-        List<org.jboss.soa.esb.listeners.config.xbeanmodel.Schedule> scheduleConfigs = scheduleProviderConfig.getScheduleList();
-        List<String> schedulIds = new ArrayList<String>();
-
-        // We wouldn't have to do this if we were using JAXB!!!
-        // TODO: Get XMLBeans to fudge the class names for the generated binds - existing names are potentialy dangerous because they're the same as the non XMLBeans types
-        for(org.jboss.soa.esb.listeners.config.xbeanmodel.Schedule scheduleConfig : scheduleConfigs) {
-            String scheduleId = scheduleConfig.getScheduleid();
-            Schedule schedule;
-
-            if(schedulIds.contains(scheduleId)) {
-                throw new ConfigurationException("Duplicate 'scheduleid' value of '" + scheduleId + "'.  Must be unique on a per <schedule-provider> basis.");
-            }
-            schedulIds.add(scheduleId);
-
-            if(scheduleConfig instanceof SimpleScheduleDocument.SimpleSchedule) {
-                SimpleSchedule simpleSchedule;
-                FrequencyUnit.Enum frequencyUnit = ((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequencyUnits();
-
-                schedule = simpleSchedule = new SimpleSchedule(scheduleId);
-                if(frequencyUnit == FrequencyUnit.SECONDS) {
-                    simpleSchedule.setFrequency(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequency() * 1000);
-                } else {
-                simpleSchedule.setFrequency(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequency());
-                }
-                simpleSchedule.setExecCount(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getExecCount());
-            } else {
-                CronSchedule cronSchedule;
-                
-                schedule = cronSchedule = new CronSchedule(scheduleId);
-                cronSchedule.setCronExpression(((CronScheduleDocument.CronSchedule)scheduleConfig).getCronExpression());
-            }
-            schedule.setStartDate(scheduleConfig.getStartDate());
-            schedule.setEndDate(scheduleConfig.getEndDate());
-            schedules.add(schedule);
-        }
-
-        return schedules;
-    }
-}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -8,16 +8,11 @@
 import java.util.Map;
 
 import org.jboss.internal.soa.esb.assertion.AssertArgument;
-import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
 import org.jboss.internal.soa.esb.publish.ContractPublisher;
 import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
-import org.jboss.internal.soa.esb.publish.Publish;
 import org.jboss.internal.soa.esb.publish.Publisher;
 import org.jboss.soa.esb.Service;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument.Action;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
-import org.jboss.soa.esb.util.ClassUtil;
 
 /**
  * Service contract publisher.
@@ -39,7 +34,7 @@
      * @param category Service category.
      * @param publisher publisher implementation.
      */
-    protected ServicePublisher(String name, String category, Publisher publisher) {
+    public ServicePublisher(String name, String category, Publisher publisher) {
         AssertArgument.isNotNullAndNotEmpty(name, "name");
         AssertArgument.isNotNullAndNotEmpty(category, "category");
 
@@ -99,32 +94,6 @@
     public Publisher getPublisher() {
         return publisher ;
     }
-
-    /**
-     * Add service publication from the suppplied configuration, keying them under the
-     * controller that is managing these services.
-     * <p/>
-     * This is used later to publish as service list, their EPRs (from the reg),
-     * links to their contract definitions, and the contract definitions
-     * (e.g. wsdls) themselves.
-     *
-     * @param model The configuration model.
-     */
-    public static void addServicePublishers(ManagedLifecycleController controller, XMLBeansModel model) {
-        List<org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service> serviceConfigs = model.getServices();
-        final Map<Service, List<ServicePublisher>> servicePublishers = new LinkedHashMap<Service, List<ServicePublisher>>() ;
-
-        for (org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service docService : serviceConfigs) {
-            ContractPublisher publisher = getConractPublisher(docService);
-            final Service service = new Service(docService.getCategory(), docService.getName()) ;
-            ServicePublisher servicePublisher = new ServicePublisher(service.getName(), service.getCategory(), publisher);
-
-            servicePublisher.setDescription(docService.getDescription());
-            addPublisher(servicePublishers, service, servicePublisher) ;
-        }
-        
-        addServicePublishers(controller, servicePublishers) ;
-    }
     
     /**
      * Add the publisher into map for the specified service.
@@ -150,7 +119,7 @@
      * @param controller The controller for the services
      * @param servicePublishers The service publishers
      */
-    private static synchronized void addServicePublishers(ManagedLifecycleController controller, Map<Service, List<ServicePublisher>> publishers) {
+    public static synchronized void addServicePublishers(ManagedLifecycleController controller, Map<Service, List<ServicePublisher>> publishers) {
         final Map<Service, List<ServicePublisher>> currentMap = SERVICE_PUBLISHERS.get(controller) ;
         if (currentMap != null) {
             for(Map.Entry<Service, List<ServicePublisher>> entry: publishers.entrySet()) {
@@ -193,43 +162,6 @@
         SERVICE_PUBLISHERS.remove(controller);
     }
 
-    @SuppressWarnings("unchecked")
-    private static ContractPublisher getConractPublisher(org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service service) {
-        if(service.getActions() == null || service.getActions().getActionList() == null) {
-            return null;
-        }
-
-        for (Action action : service.getActions().getActionList()) {
-            Class<Class> actionClass;
-
-            try {
-                actionClass = (Class<Class>) ClassUtil.forName(action.getClass1(), ServicePublisher.class);
-            } catch (ClassNotFoundException e) {
-                throw new RuntimeException("Failed to find action class '" + action.getClass1() + "'.", e);
-            }
-
-            Publish publishAnnotation = (Publish) actionClass.getAnnotation(Publish.class);
-            if (publishAnnotation != null) {
-                Class publisherClass;
-                ActionContractPublisher publisher = null;
-
-                publisherClass = publishAnnotation.value();
-                try {
-                    publisher = (ActionContractPublisher) publisherClass.newInstance();
-                    publisher.setActionConfig(action);
-                    return publisher;
-                } catch (ClassCastException e) {
-                    throw new RuntimeException("Action Contract Publisher class '" + publisherClass.getName() + "' must implement " + ActionContractPublisher.class.getName());
-                } catch (Exception e) {
-                    throw new RuntimeException("Failed to instantiate Contract Publisher '" + publisherClass.getName() + "'. Class must implement a public default constructor.", e);
-                }
-            }
-        }
-
-        // No publisher configured on any of the actions in the processing chain...
-        return null;
-    }
-
     /**
      * Add external contract reference publishers to the list of publishers
      * @param controller The controller

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/WebserviceInfo.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/WebserviceInfo.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/WebserviceInfo.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/WebserviceInfo.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,212 @@
+/*
+ * 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;
+
+import org.jboss.soa.esb.Service;
+
+/**
+ * Webservice information required to expose the service.
+ *
+ * @author <a href="mailto:Kevin.Conner at jboss.com">Kevin Conner</a>
+ */
+public class WebserviceInfo
+{
+    /**
+     * The associated service details.
+     */
+    private final Service service ;
+    /**
+     * The input schema.
+     */
+    private final String inXsd ;
+    /**
+     * The output schema.
+     */
+    private final String outXsd ;
+    /**
+     * The fault schemas.
+     */
+    private final String faultXsd ;
+    /**
+     * The service description.
+     */
+    private final String description ;
+    /**
+     * The service request/response flag.
+     */
+    private final boolean requestResponse ;
+
+    /**
+     * Construct the webservice information.
+     * @param service The associated service details.
+     * @param inXsd The input schema.
+     * @param outXsd The output schema.
+     * @param faultXsd The fault schemas.
+     * @param description The service description.
+     * @param requestResponse The service request/response flag.
+     */
+    public WebserviceInfo(final Service service, final String inXsd, final String outXsd,
+        final String faultXsd, final String description, final boolean requestResponse)
+    {
+        this.service = service ;
+        this.inXsd = inXsd ;
+        this.outXsd = outXsd ;
+        this.faultXsd = faultXsd ;
+        this.description = description ;
+        this.requestResponse = requestResponse ;
+    }
+
+    /**
+     * Get the service details.
+     * @return The service details.
+     */
+    public Service getService()
+    {
+        return service ;
+    }
+
+    /**
+     * Get the input schema.
+     * @return The input schema.
+     */
+    public String getInXsd()
+    {
+        return inXsd ;
+    }
+
+    /**
+     * Get the output schema.
+     * @return The output schema.
+     */
+    public String getOutXsd()
+    {
+        return outXsd ;
+    }
+
+    /**
+     * Get the fault schema.
+     * @return The fault schema.
+     */
+    public String getFaultXsd()
+    {
+        return faultXsd ;
+    }
+
+    /**
+     * Get the service description.
+     * @return The service description.
+     */
+    public String getDescription()
+    {
+        return description ;
+    }
+
+    /**
+     * Is this a defined request/response service?
+     * @return true if it is a request/response service, false otherwise.
+     */
+    public boolean isRequestResponse()
+    {
+        return requestResponse ;
+    }
+
+    /**
+     * Test for equality.
+     * @param obj The object to compare with
+     * @return true if equal, false otherwise.
+     */
+    public boolean equals(final Object obj)
+    {
+        if(obj instanceof WebserviceInfo)
+        {
+            final WebserviceInfo webserviceInfo = (WebserviceInfo)obj;
+            return (service.equals(webserviceInfo.getService()) && objEquals(inXsd, webserviceInfo.inXsd) &&
+                objEquals(outXsd, webserviceInfo.outXsd) && objEquals(faultXsd, webserviceInfo.faultXsd) &&
+                objEquals(description, webserviceInfo.description) &&
+                (requestResponse == webserviceInfo.isRequestResponse())) ;
+        }
+
+        return false ;
+    }
+
+    /**
+     * Get the instance hash code.
+     * @return the instance hash code.
+     */
+    public int hashCode()
+    {
+        return service.hashCode() ^ objHash(inXsd) ^ objHash(outXsd) ^ objHash(faultXsd) & objHash(description) ^ (requestResponse ? 0xdeafdeaf : 0) ;
+    }
+
+    /**
+     * Get a string representation of this instance.
+     * @return the string representation.
+     */
+    public String toString()
+    {
+        return service + objName("inXsd", inXsd) + objName("outXsd", outXsd) + objName("faultXsd" , faultXsd) + objName("description" , description) + (requestResponse ? ",requestResponse" : "") ;
+    }
+
+    /**
+     * Generate a hashcode for an object.
+     * @param value The object value or null.
+     * @return The hashcode.
+     */
+    private int objHash(final String value)
+    {
+        return (value == null ? 0 : value.hashCode()) ;
+    }
+
+    /**
+     * Generate a string representation for an object.
+     * @param name The object name.
+     * @param value The object value or null.
+     * @return The string representation.
+     */
+    private String objName(final String name, final String value)
+    {
+        if (value != null)
+        {
+            return "," + name + "=" + value ;
+        }
+        else
+        {
+            return "" ;
+        }
+    }
+
+    /**
+     * Test for object equality.
+     * @param lhs The object value or null.
+     * @param rhs The object value or null.
+     * @return true if equal, false otherwise.
+     */
+    private boolean objEquals(final Object lhs, final Object rhs)
+    {
+        if (lhs == null)
+        {
+            return (rhs == null) ;
+        }
+        else
+        {
+            return lhs.equals(rhs) ;
+        }
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -28,12 +28,11 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.MepType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument.Action;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionsDocument.Actions;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument.Property;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.MepType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ActionDocument.Action;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ActionsDocument.Actions;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
 import org.w3c.dom.Element;
 
 /**

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ESBAwareGenerator.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ESBAwareGenerator.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ESBAwareGenerator.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ESBAwareGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,226 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers;
+
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.InVMEpr;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.AbstractScheduledListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsProviderType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FsListenerDocument.FsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpListenerDocument.FtpListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.GroovyListenerDocument.GroovyListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbrListenerDocument.JbrListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsBusDocument.JmsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsJcaProviderDocument.JmsJcaProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsMessageFilterDocument.JmsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SqlBusDocument.SqlBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SqlListenerDocument.SqlListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SqlProviderDocument.SqlProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ScheduledListenerDocument.ScheduledListener;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.message.MessageAwareListener;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * ESB Aware Listeners Configuration Generator.
+ * <p/>
+ * Generates a "ConfigTree" style configuration for the ESB Aware Listeners. 
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ESBAwareGenerator {
+
+    private static final Logger logger = Logger.getLogger(ESBAwareGenerator.class);
+
+    /**
+	 * XMLBeans based configuration model instance.
+	 */
+	private XMLBeansModel model;
+	
+	/**
+	 * Public constructor.
+	 * @param model XMLBeans based configuration model instance.
+	 */
+	public ESBAwareGenerator(XMLBeansModel model) {
+		this.model = model;
+	}
+
+	/**
+	 * Generate the configuration DOM for the target Server.
+	 * @return The configuration DOM.
+	 * @throws ConfigurationException Error creating configuration. 
+	 */
+	public Document generate() throws ConfigurationException {
+		Document doc = YADOMUtil.createDocument();
+		Element root;
+		
+		doc.appendChild(doc.createComment("\n\tNOTE: DO NOT MODIFY\n\tThis file was auto-generated.\n"));
+		root = YADOMUtil.addElement(doc, "jbossesb-listeners");
+		root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
+
+        // Add an InVM listener for each service...
+        List<Service> services = model.getServices();
+        for (int i = 0; i < services.size(); i++) {
+            Service service = services.get(i);
+            if(model.exposesInVMListener(service)) {
+                addInVMListener(root, service, i);
+            }
+        }
+		
+		// Iterate over all the ESB Aware listner configs and map them to the listener configuration...
+		List<Listener> listeners = model.getESBAwareListeners();
+		for(Listener listener : listeners) {
+			addESBAwareConfig(root, listener);
+		}
+		
+		return doc;
+	}
+
+    private void addInVMListener(Element root, Service service, int serviceIndex) throws ConfigurationException {
+        Element listenerNode = YADOMUtil.addElement(root, "InVM-" + serviceIndex);
+        Element properties = listenerNode.getOwnerDocument().createElement("properties");
+
+        MapperUtil.mapListenerServiceAttributes(listenerNode, service, false);
+        listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, MessageAwareListener.class.getName());
+
+        Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+        eprNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, InVMEpr.INVM_PROTOCOL);
+
+        MapperUtil.mapProperties(service.getPropertyList(), properties);
+        eprNode.setAttribute(ListenerTagNames.URL_TAG, InVMEpr.INVM_PROTOCOL + "://"
+                + InVMEpr.createEncodedServiceId(service.getCategory(), service.getName())
+                + "/" + YADOMUtil.getAttribute(properties, "inVMPassByValue", "false")
+                + "?" + YADOMUtil.getAttribute(properties, "inVMLockStep", "false")
+                + "#" + YADOMUtil.getAttribute(properties, "inVMLockStepTimeout", "10000"));
+
+        listenerNode.setAttribute(ListenerTagNames.MAX_THREADS_TAG, YADOMUtil.getAttribute(properties, ListenerTagNames.MAX_THREADS_TAG, "1"));
+
+        listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(getInVMTransacted(service))) ;
+        YADOMUtil.removeEmptyAttributes(eprNode);
+
+        ActionMapper.map(listenerNode, service, model);
+    }
+    
+    /**
+     * Try to find the InVM transacted value.  Check to see if the transacted attribute
+     * has been explicitly set on the service.  If it has not been explicitly set then we
+     * check to see if any of the listener/bus configurations are transacted and assume the
+     * InVM is implicitly transacted.
+     * 
+     * @param service The current service.
+     * @return true if transacted, false otherwise.
+     */
+    private boolean getInVMTransacted(final Service service)
+        throws ConfigurationException
+    {
+        if (service.isSetInvmScope()) {
+            return service.getInvmTransacted() ;
+        } else if (service.isSetListeners()) {
+            for (Listener listener: service.getListeners().getListenerList()) {
+                if (listener instanceof ScheduledListener) {
+                    if (((ScheduledListener)listener).getTransacted())
+                        return true ;
+                }
+                else if (listener instanceof JmsListener) {
+                    final Bus bus = model.getBus(listener.getBusidref()) ;
+                    if (!(bus instanceof JmsBus))
+                        continue ;
+                    
+                    final Provider provider = model.getProvider(bus) ;
+                    if (provider instanceof JmsJcaProvider) {
+                        // Jms JCA provider defaults to true
+                        final JmsJcaProvider jmsJcaProvider = (JmsJcaProvider)provider ;
+                        if (!jmsJcaProvider.isSetTransacted() || jmsJcaProvider.getTransacted())
+                            return true ;
+                    } else if (provider instanceof JmsProviderType) {
+                        JmsMessageFilter filter = ((JmsListener)listener).getJmsMessageFilter() ;
+                        if (filter == null)
+                            filter = ((JmsBus)bus).getJmsMessageFilter() ;
+                        if ((filter != null) && filter.getTransacted())
+                            return true ;
+                    }
+                } else if (listener instanceof SqlListener) {
+                    final Bus bus = model.getBus(listener.getBusidref()) ;
+                    if (!(bus instanceof SqlBus))
+                        continue ;
+                    
+                    final Provider provider = model.getProvider(bus) ;
+                    if ((provider instanceof SqlProvider) && ((SqlProvider)provider).getTransacted())
+                        return true ;
+                }
+            }
+        }
+        return false ;
+    }
+
+    /**
+	 * Add a single ESB Aware Listener configuration node to configuration root. 
+	 * @param root Configuration root node.
+	 * @param listener The ESB Aware Listener configuration to be added.
+	 * @throws ConfigurationException Invalid listener configuration.
+	 */
+	private void addESBAwareConfig(Element root, Listener listener) throws ConfigurationException {
+		Element listenerConfigTree;
+		Service listenerService;
+		
+		// Of course we could do the following reflectively if we really want to - TODO perhaps!!
+		if(listener instanceof JmsListener) {
+			listenerConfigTree = JmsListenerMapper.map(root, (JmsListener)listener, model);
+        } else if (listener instanceof ScheduledListener) {
+            listenerConfigTree = ScheduledListenerMapper.map(root, (ScheduledListener) listener, model);
+        } else if(listener instanceof FsListener) {
+         listenerConfigTree = FsListenerMapper.map(root, (FsListener)listener, model);
+		} else if (listener instanceof FtpListener) {
+			listenerConfigTree = FtpListenerMapper.map(root, (FtpListener)listener, model);
+		} else if (listener instanceof SqlListener) {
+			listenerConfigTree = SqlListenerMapper.map(root, (SqlListener)listener, model);
+        } else if (listener instanceof JbrListener) {
+            logger.error("JbossRemoting listener only supported in Gateway mode.");
+            return;
+        } else if (listener instanceof GroovyListener) {
+            listenerConfigTree = GroovyListenerMapper.map(root, (GroovyListener)listener, model);
+		} else {
+			listenerConfigTree = UntypedListenerMapper.map(root, listener, model);
+		}
+
+        if (listener instanceof AbstractScheduledListener) {
+            ScheduleMapper.map(listenerConfigTree, (AbstractScheduledListener) listener, model);
+        }
+
+        // Locate the Service to which the listener is bound...
+		listenerService = model.getService(listener);
+		
+		// Map the actions and notiications...
+		ActionMapper.map(listenerConfigTree, listenerService, model);
+		NotificationMapper.map(listenerConfigTree, listenerService, model);
+	}
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -26,11 +26,10 @@
 import org.jboss.soa.esb.addressing.eprs.FileEpr;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FsBusDocument.FsBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FsListenerDocument.FsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FsMessageFilterDocument.FsMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FsProviderDocument.FsProvider;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FsBusDocument.FsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FsListenerDocument.FsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FsMessageFilterDocument.FsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FsProviderDocument.FsProvider;
 import org.jboss.soa.esb.listeners.gateway.FileGatewayListener;
 import org.w3c.dom.Element;
 

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -26,12 +26,11 @@
 import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpBusDocument.FtpBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpListenerDocument.FtpListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpMessageFilterDocument.FtpMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpMessageFilterDocument.FtpMessageFilter.Protocol;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpProviderDocument.FtpProvider;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpBusDocument.FtpBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpListenerDocument.FtpListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpMessageFilterDocument.FtpMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpMessageFilterDocument.FtpMessageFilter.Protocol;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpProviderDocument.FtpProvider;
 import org.jboss.soa.esb.listeners.gateway.ReadOnlyRemoteGatewayListener;
 import org.jboss.soa.esb.listeners.gateway.RemoteGatewayListener;
 import org.w3c.dom.Element;

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GatewayGenerator.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GatewayGenerator.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GatewayGenerator.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GatewayGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,147 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers;
+
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FsListenerDocument.FsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpListenerDocument.FtpListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.GroovyListenerDocument.GroovyListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.HibernateListenerDocument.HibernateListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbrListenerDocument.JbrListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SqlListenerDocument.SqlListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JcaGatewayDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.AbstractScheduledListener;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Gateway Listeners Configuration Generator.
+ * <p/>
+ * Generates a "ConfigTree" style configuration for the Gateways Listeners.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class GatewayGenerator {
+	
+	private static final Logger logger = Logger.getLogger(GatewayGenerator.class);
+
+    /**
+     * XMLBeans based configuration model instance.
+     */
+    private XMLBeansModel model;
+
+    /**
+     * Public constructor.
+     *
+     * @param model XMLBeans based configuration model instance.
+     */
+    public GatewayGenerator(XMLBeansModel model) {
+        this.model = model;
+    }
+
+    /**
+     * Generate the configuration DOM for the target Server.
+     *
+     * @return The configuration DOM.
+     * @throws ConfigurationException Error creating configuration.
+     */
+    public Document generate() throws ConfigurationException {
+        Document doc = YADOMUtil.createDocument();
+        Element root;
+
+        doc.appendChild(doc.createComment("\n\tNOTE: DO NOT MODIFY\n\tThis file was auto-generated.\n"));
+        root = YADOMUtil.addElement(doc, "jbossesb-gateways");
+        root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
+
+        List<Service> services = model.getServices();
+        HashMap<String, HashMap<String, String>> hm = new HashMap<String, HashMap<String, String>>();
+        for (Service service : services) {
+        	if (hm.containsKey(service.getCategory())) {
+        		HashMap<String, String> hc = hm.get(service.getCategory());
+        		
+        		if (hc.containsKey(service.getName())) {
+        			throw new ConfigurationException("Service names must be unique within a category.  "
+        					+ "The service name " + service.getName()
+        					+ " is already defined within the " + service.getCategory() + " category.");
+        		} else {
+        			hc.put(service.getName(), service.getName());
+        		}
+        	} else {
+        		HashMap <String,String> hc = new HashMap<String,String>();
+        		hc.put(service.getName(), service.getName());
+        		hm.put(service.getCategory(), hc);
+        	}
+        }
+        
+        // Iterate over all the gateway configs and map them to the gateway configuration...
+        List<Listener> gateways = model.getGatewayListeners();
+        for (Listener gateway : gateways) {
+            addGatewayConfig(root, gateway);
+        }
+
+        return doc;
+    }
+
+    /**
+     * Add a single gateway configuration node to configuration root.
+     *
+     * @param root    Configuration root node.
+     * @param gateway The Gateway Listener configuration to be added.
+     * @throws ConfigurationException Invalid listener configuration.
+     */
+    private void addGatewayConfig(Element root, Listener gateway) throws ConfigurationException {
+        Element listenerConfig;
+
+        // Of course we could do the following reflectively if we really want to - TODO perhaps!!
+        if (gateway instanceof JmsListener) {
+            listenerConfig = JmsListenerMapper.map(root, (JmsListener) gateway, model);
+        } else if (gateway instanceof FsListener) {
+            listenerConfig = FsListenerMapper.map(root, (FsListener) gateway, model);
+        } else if (gateway instanceof JcaGatewayDocument.JcaGateway) {
+            listenerConfig = JcaGatewayMapper.map(root, (JcaGatewayDocument.JcaGateway) gateway, model);
+        } else if (gateway instanceof FtpListener) {
+            listenerConfig = FtpListenerMapper.map(root, (FtpListener) gateway, model);
+        } else if (gateway instanceof SqlListener) {
+            listenerConfig = SqlListenerMapper.map(root, (SqlListener) gateway, model);
+        } else if (gateway instanceof JbrListener) {
+            listenerConfig = JbrListenerMapper.map(root, (JbrListener) gateway, model);
+        } else if (gateway instanceof GroovyListener) {
+            listenerConfig = GroovyListenerMapper.map(root, (GroovyListener) gateway, model);
+        } else if (gateway instanceof HibernateListener) {
+            listenerConfig = HibernateListenerMapper.map(root, (HibernateListener) gateway, model);
+        } else {
+            listenerConfig = UntypedListenerMapper.map(root, gateway, model);
+        }
+
+        if (gateway instanceof AbstractScheduledListener) {
+            ScheduleMapper.map(listenerConfig, (AbstractScheduledListener) gateway, model);
+        }
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -21,11 +21,9 @@
 
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.Generator;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.GroovyListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.GroovyListenerDocument;
 import org.jboss.soa.esb.listeners.gateway.GroovyGateway;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.ScheduleListener;
 import org.w3c.dom.Element;
 
 /**
@@ -35,7 +33,7 @@
  */
 public class GroovyListenerMapper {
 
-    public static Element map(Element root, GroovyListenerDocument.GroovyListener listener, Generator.XMLBeansModel model) throws ConfigurationException {
+    public static Element map(Element root, GroovyListenerDocument.GroovyListener listener, XMLBeansModel model) throws ConfigurationException {
         Element listenerNode = YADOMUtil.addElement(root, "listener");
 
         listenerNode.setAttribute("name", listener.getName());

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -27,11 +27,10 @@
 import org.jboss.soa.esb.addressing.eprs.HibernateEpr;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.HibernateBusDocument.HibernateBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.HibernateListenerDocument.HibernateListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.HibernateMessageFilterDocument.HibernateMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.HibernateProviderDocument.HibernateProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.HibernateBusDocument.HibernateBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.HibernateListenerDocument.HibernateListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.HibernateMessageFilterDocument.HibernateMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.HibernateProviderDocument.HibernateProvider;
 import org.jboss.soa.esb.listeners.gateway.HibernateGatewayListener;
 import org.w3c.dom.Element;
 

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -22,10 +22,9 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JbrBusDocument.JbrBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JbrListenerDocument.JbrListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JbrProviderDocument.JbrProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbrBusDocument.JbrBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbrListenerDocument.JbrListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbrProviderDocument.JbrProvider;
 import org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener;
 import org.w3c.dom.Element;
 

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -24,9 +24,8 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.Generator;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JcaGatewayDocument.JcaGateway;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JcaGatewayDocument.JcaGateway;
 import org.jboss.soa.esb.listeners.jca.JcaInflowGateway;
 import org.w3c.dom.Element;
 
@@ -38,7 +37,7 @@
  */
 public class JcaGatewayMapper
 {
-   public static Element map(Element root, JcaGateway gateway, Generator.XMLBeansModel model) throws ConfigurationException
+   public static Element map(Element root, JcaGateway gateway, XMLBeansModel model) throws ConfigurationException
    {
       Element listenerNode = YADOMUtil.addElement(root, "listener");
       gateway.setIsGateway(true);

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -33,15 +33,14 @@
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsProviderType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActivationConfigDocument.ActivationConfig;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsBusDocument.JmsBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsJcaProviderDocument.JmsJcaProvider;
-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.JmsMessageFilterDocument.JmsMessageFilter.DestType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsProviderType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ActivationConfigDocument.ActivationConfig;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsBusDocument.JmsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsJcaProviderDocument.JmsJcaProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsMessageFilterDocument.JmsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsMessageFilterDocument.JmsMessageFilter.DestType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property;
 import org.jboss.soa.esb.listeners.gateway.JmsGatewayListener;
 import org.jboss.soa.esb.listeners.gateway.PackageJmsMessageContents;
 import org.jboss.soa.esb.listeners.jca.JcaConstants;

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/MapperUtil.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/MapperUtil.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/MapperUtil.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -29,12 +29,11 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Bus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Provider;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument.Property;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
 import org.jboss.soa.esb.listeners.message.MessageAwareListener;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/NotificationMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/NotificationMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/NotificationMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -21,8 +21,7 @@
 
 package org.jboss.soa.esb.listeners.config.mappers;
 
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
 import org.w3c.dom.Element;
 
 /**

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -25,16 +25,13 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.Generator;
-import org.jboss.soa.esb.listeners.config.ScheduleProviderFactory;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.AbstractScheduledListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FrequencyUnit;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Schedule;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.CronScheduleDocument.CronSchedule;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ScheduleProviderDocument.ScheduleProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SimpleScheduleDocument.SimpleSchedule;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.AbstractScheduledListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FrequencyUnit;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Schedule;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.CronScheduleDocument.CronSchedule;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ScheduleProviderDocument.ScheduleProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SimpleScheduleDocument.SimpleSchedule;
 import org.jboss.soa.esb.schedule.SchedulerResource;
 import org.w3c.dom.Element;
 
@@ -130,7 +127,7 @@
     }
     
     private static int getPollLatencySeconds(AbstractScheduledListener scheduledListener) {
-        String value = Generator.XMLBeansModel.getProperty(scheduledListener.getPropertyList(), "pollLatencySeconds", "-1");
+        String value = XMLBeansModel.getProperty(scheduledListener.getPropertyList(), "pollLatencySeconds", "-1");
 
         try {
             return Integer.parseInt(value);
@@ -138,4 +135,4 @@
             return -1;
         }
     }
-}
\ No newline at end of file
+}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleProviderFactory.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleProviderFactory.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleProviderFactory.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduleProviderFactory.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,119 @@
+/*
+ * 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.mappers;
+
+import org.jboss.soa.esb.schedule.*;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ScheduleProviderDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SimpleScheduleDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.CronScheduleDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FrequencyUnit;
+
+import java.util.List;
+import java.util.Properties;
+import java.util.ArrayList;
+
+/**
+ * Factory class for creating and configuring a {@link ScheduleProvider}
+ * instance.
+ *
+ * @author <a href="daniel.bevenius at redpill.se">Daniel Bevenius</a>
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class ScheduleProviderFactory {
+
+    public static final String ATTR_SCHEDULE_ID_REF = "scheduleidref";
+    public static final String ATTR_FREQUENCY = "schedule-frequency";
+
+    public static ScheduleProvider createInstance(List<ManagedLifecycle> listeners, ScheduleProviderDocument.ScheduleProvider scheduleProviderConfig) throws ConfigurationException {
+        Properties schedulerConfig = null;
+        List<org.jboss.soa.esb.schedule.Schedule> schedules = null;
+        ScheduleProvider instance;
+
+        if(scheduleProviderConfig != null) {
+            schedulerConfig = XMLBeansModel.toProperties(scheduleProviderConfig.getPropertyList());
+            schedules = getSchedules(scheduleProviderConfig);
+        }
+        instance = new ScheduleProvider(schedulerConfig, schedules);
+
+        try {
+            for(ManagedLifecycle listener : listeners) {
+                if(listener instanceof ScheduledEventListener) {
+                    ConfigTree config = listener.getConfig();
+                    String scheduleIdRef = config.getAttribute(ATTR_SCHEDULE_ID_REF);
+
+                    if(scheduleIdRef != null) {
+                        instance.addListener((ScheduledEventListener) listener, scheduleIdRef);
+                    } else {
+                        long frequency = config.getLongAttribute(ATTR_FREQUENCY, 10);
+                        instance.addListener((ScheduledEventListener) listener, frequency);
+                    }
+                }
+            }
+        } catch (SchedulingException e) {
+            throw new ConfigurationException(e);
+        }
+
+        return instance;
+    }
+
+    private static List<Schedule> getSchedules(ScheduleProviderDocument.ScheduleProvider scheduleProviderConfig) throws ConfigurationException {
+        List<Schedule> schedules = new ArrayList<Schedule>();
+        List<org.jboss.soa.esb.listeners.config.xbeanmodel101.Schedule> scheduleConfigs = scheduleProviderConfig.getScheduleList();
+        List<String> schedulIds = new ArrayList<String>();
+
+        // We wouldn't have to do this if we were using JAXB!!!
+        // TODO: Get XMLBeans to fudge the class names for the generated binds - existing names are potentialy dangerous because they're the same as the non XMLBeans types
+        for(org.jboss.soa.esb.listeners.config.xbeanmodel101.Schedule scheduleConfig : scheduleConfigs) {
+            String scheduleId = scheduleConfig.getScheduleid();
+            Schedule schedule;
+
+            if(schedulIds.contains(scheduleId)) {
+                throw new ConfigurationException("Duplicate 'scheduleid' value of '" + scheduleId + "'.  Must be unique on a per <schedule-provider> basis.");
+            }
+            schedulIds.add(scheduleId);
+
+            if(scheduleConfig instanceof SimpleScheduleDocument.SimpleSchedule) {
+                SimpleSchedule simpleSchedule;
+                FrequencyUnit.Enum frequencyUnit = ((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequencyUnits();
+
+                schedule = simpleSchedule = new SimpleSchedule(scheduleId);
+                if(frequencyUnit == FrequencyUnit.SECONDS) {
+                    simpleSchedule.setFrequency(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequency() * 1000);
+                } else {
+                simpleSchedule.setFrequency(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequency());
+                }
+                simpleSchedule.setExecCount(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getExecCount());
+            } else {
+                CronSchedule cronSchedule;
+                
+                schedule = cronSchedule = new CronSchedule(scheduleId);
+                cronSchedule.setCronExpression(((CronScheduleDocument.CronSchedule)scheduleConfig).getCronExpression());
+            }
+            schedule.setStartDate(scheduleConfig.getStartDate());
+            schedule.setEndDate(scheduleConfig.getEndDate());
+            schedules.add(schedule);
+        }
+
+        return schedules;
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -20,9 +20,8 @@
 package org.jboss.soa.esb.listeners.config.mappers;
 
 import org.w3c.dom.Element;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ScheduledListenerDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ScheduledListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
 import org.jboss.soa.esb.listeners.ScheduleListener;
 import org.jboss.soa.esb.dom.YADOMUtil;

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SecurityMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SecurityMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SecurityMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -24,8 +24,8 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SecurityDocument.Security;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SecurityDocument.Security;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
 import org.w3c.dom.Element;
 
 /**

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -24,11 +24,10 @@
 import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SqlBusDocument.SqlBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SqlListenerDocument.SqlListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SqlMessageFilterDocument.SqlMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.SqlProviderDocument.SqlProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SqlBusDocument.SqlBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SqlListenerDocument.SqlListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SqlMessageFilterDocument.SqlMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.SqlProviderDocument.SqlProvider;
 import org.jboss.soa.esb.listeners.gateway.SqlTableGatewayListener;
 import org.w3c.dom.Element;
 

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -24,13 +24,12 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Bus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Provider;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.impl.BusImpl;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.impl.ListenerImpl;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.impl.BusProviderImpl;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.impl.BusImpl;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.impl.ListenerImpl;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.impl.BusProviderImpl;
 import org.w3c.dom.Element;
 
 /**

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/XMLBeansModel.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/XMLBeansModel.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/XMLBeansModel.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/XMLBeansModel.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,527 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
+import org.jboss.internal.soa.esb.publish.ContractPublisher;
+import org.jboss.internal.soa.esb.publish.Publish;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.listeners.config.ServicePublisher;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.AbstractScheduledListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.BusProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JcaGatewayDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ListenersDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.MepType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Schedule;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ActionDocument.Action;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ActionsDocument.Actions;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Jbossesb;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ProvidersDocument.Providers;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ScheduleProviderDocument.ScheduleProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServicesDocument.Services;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.w3c.dom.Document;
+
+/**
+ * XMLBeans based model implementation.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class XMLBeansModel {
+
+    /**
+     * XMLBeans config model instance.
+     */
+    private Jbossesb jbossesb;
+    
+    /**
+     * Constructor.
+     * @param xmlBeansDoc XMLBeans config model.
+     */
+    public XMLBeansModel(Jbossesb jbossesb) {
+        this.jbossesb = jbossesb;
+    }
+
+    /**
+     * Get the list of ESB Gateway Listeners from the configuration.
+     * @return The list of ESB Gateway Listeners from the configuration.
+     * @throws ConfigurationException Bad configuration.
+     */
+    public List<Listener> getGatewayListeners() throws ConfigurationException {
+        return getListeners(true);
+    }
+
+    /**
+     * Get the list of ESB Aware Listeners from the configuration.
+     * @return The list of ESB Aware Listeners from the configuration.
+     * @throws ConfigurationException Bad configuration.
+     */
+    public List<Listener> getESBAwareListeners() throws ConfigurationException {
+        return getListeners(false);
+    }
+
+    /**
+     * Get the Service to which the supplied {@link Listener} configuration instance is bound.
+     * @param listener The listener instance (Gateway or ESB Aware).
+     * @return The Service to which the 
+     */
+    public Service getService(Listener listener) {
+        List<Service> services = getServices();
+
+        for(Service service : services) {
+            ListenersDocument.Listeners listeners = service.getListeners();
+
+            if(listeners != null) {
+                List<Listener> listenerList = listeners.getListenerList();
+
+                if(listenerList != null) {
+                    for(Listener serviceListener : listenerList) {
+                        if(serviceListener == listener) {
+                            return service;
+                        }
+                    }
+                }
+            }
+        }
+        
+        throw new IllegalStateException("No Service instance found for the supplied Listener instance.  This should not be possible if the Listener instance was provided by this configuration.  Where has this Listener instance come from?");
+    }
+
+    /**
+     * Get the Service list.
+     * @return Service list.
+     */
+    public List<Service> getServices() {
+        final Services services = jbossesb.getServices();
+        if (services != null) {
+            return jbossesb.getServices().getServiceList();
+        } else {
+            return Collections.emptyList();
+        }
+    }
+
+    /**
+     * Get the &lt;bus&gt; configuration matching the supplied busid reference value.
+     * @param busid The required &lt;bus&gt; configuration reference value.
+     * @return The Bus configuration instance.
+     * @throws ConfigurationException Unknown busid reference value.
+     */
+    public Bus getBus(String busid) throws ConfigurationException {
+        List<Provider> providers = jbossesb.getProviders().getProviderList();
+        
+        for(Provider provider : providers) {
+            if(provider instanceof BusProvider) {
+                List<Bus> buses = ((BusProvider)provider).getBusList();
+
+                for(Bus bus : buses) {
+                    if(bus.getBusid().equals(busid)) {
+                        return bus;
+                    }
+                }
+            }
+        }
+        
+        throw new ConfigurationException("Invalid ESB Configuration: No <bus> configuration matching busid reference value [" + busid + "].");
+    }
+
+    /**
+     * Get the &lt;provider&gt; configuration containing the supplied Bus configuration instance.
+     * @param bus The Bus config instance whose Provider is being sought.
+     * @return The Provider configuration instance.
+     */
+    public Provider getProvider(Bus bus) {
+        List<Provider> providers = jbossesb.getProviders().getProviderList();
+        
+        for(Provider provider : providers) {
+            if(provider instanceof BusProvider) {
+                List<Bus> buses = ((BusProvider)provider).getBusList();
+
+                for(Bus installedBus : buses) {
+                    if(installedBus == bus) {
+                        return provider;
+                    }
+                }
+            }
+        }
+        
+        throw new IllegalStateException("No Provider instance found for the supplied Bus config instance.  This should not be possible if the Bus instance was provided by this configuration.  Where has this Bus instance come from?");
+    }
+
+    public Schedule getSchedule(final String id) {
+        if((id == null) || (jbossesb.getProviders() == null)) {
+            return null;
+        }
+
+        List<Provider> providers = jbossesb.getProviders().getProviderList();
+
+        for(Provider provider : providers) {
+            if(provider instanceof ScheduleProvider) {
+                final ScheduleProvider scheduleProvider = (ScheduleProvider)provider ;
+                final List<Schedule> schedules = scheduleProvider.getScheduleList() ;
+                for(Schedule schedule: schedules) {
+                    if (id.equals(schedule.getScheduleid())) {
+                        return schedule ;
+                    }
+                }
+            }
+        }
+
+        return null;
+    }
+
+    public ScheduleProvider getScheduleProvider() {
+        if(jbossesb.getProviders() == null) {
+            return null;
+        }
+
+        List<Provider> providers = jbossesb.getProviders().getProviderList();
+
+        for(Provider provider : providers) {
+            if(provider instanceof ScheduleProvider) {
+                return (ScheduleProvider) provider;
+            }
+        }
+
+        return null;
+    }
+    
+    public int getScheduledListenerCount() {
+        int count = 0 ;
+        if (jbossesb.getServices() != null) {
+            final List<Service> services = getServices() ;
+            for(Service service: services) {
+                final ListenersDocument.Listeners listeners = service.getListeners() ;
+                if (listeners != null) {
+                    for (Listener listener: listeners.getListenerList()) {
+                        if (listener instanceof AbstractScheduledListener) {
+                            count++ ;
+                        }
+                    }
+                }
+            }
+        }
+        return count ;
+    }
+
+    private boolean isGateway(Listener listener)
+    {
+        return listener.getIsGateway() || (listener instanceof JcaGatewayDocument.JcaGateway);
+    }
+
+    /**
+     * Get the list of ESB Listeners based on their Gateway flag.
+     * @return The list of ESB Aware or Gateway Listeners from the configuration.
+     * @param isGateway Is the listener a gateway or ESB aware listener.
+     * @throws ConfigurationException Bad configuration.
+     */
+    private List<Listener> getListeners(boolean isGateway) throws ConfigurationException {
+        List<Listener> gateways = new ArrayList<Listener>();
+        if (jbossesb.getServices() != null) {
+            List<Service> services = getServices();
+
+            for(Service service : services) {
+                boolean listenerAdded = false;
+                ListenersDocument.Listeners listeners = service.getListeners();
+
+                if(listeners != null) {
+                    for(Listener listener : listeners.getListenerList()) {
+                        if(isGateway(listener) == isGateway) {
+                            gateways.add(listener);
+                            listenerAdded = true;
+                        }
+                    }
+                }
+
+                // Make sure each Service config has a message aware listener...
+                // http://jira.jboss.com/jira/browse/JBESB-648
+                if(!exposesInVMListener(service) && !isGateway && !listenerAdded) {
+                    throw new ConfigurationException("Service configuration for Service '" + service.getCategory() + ":" + service.getName() + "' doesn't define a Message-Aware Listener (i.e. is-gateway='false').");
+                }
+            }
+        }
+        
+        return gateways;
+    }
+
+    /**
+     * Gets the setting for the number of seconds between reloads.
+     * 
+     * @return The param reload seconds config value.
+     */
+    public String getParameterReloadSecs() {
+        return jbossesb.getParameterReloadSecs().getStringValue();
+    }
+    
+    public static String getProperty(List<Property> properties, String name, String defaultVal) {
+        for (PropertyDocument.Property property : properties) {
+            if(property.getName().equals(name)) {
+                return property.getValue();
+            }
+        }
+
+        return defaultVal;
+    }
+    
+    public static boolean exposesInVMListener(Service service) {
+        if(service.xgetInvmScope() != null && service.xgetInvmScope().getStringValue() != null) {
+            return (service.xgetInvmScope().getStringValue().equals("GLOBAL"));
+        }
+
+        String systemDefaultScope = System.getProperty(Environment.DEFAULT_INVM_SCOPE, "GLOBAL");
+        String defaultScope = ModulePropertyManager.getPropertyManager("core").getProperty(Environment.DEFAULT_INVM_SCOPE, systemDefaultScope);
+
+        return defaultScope.equals("GLOBAL");
+    }
+    
+    /**
+     * Verify the schedule provider configuration.
+     * @throws ConfigurationException
+     */
+    public void verifyScheduleProviderConfig()
+        throws ConfigurationException {
+        Providers providersConfig = jbossesb.getProviders();
+
+        if(providersConfig == null) {
+            return;
+        }
+
+        List<Provider> providers = providersConfig.getProviderList();
+        int numScheduleProviders = 0;
+
+        for(Provider provider : providers) {
+            if(provider instanceof ScheduleProvider) {
+                numScheduleProviders++;
+            }
+        }
+
+        if(numScheduleProviders > 1) {
+            throw new ConfigurationException("Configuration contains " + numScheduleProviders + " <schedule-provider> configurations.  Only one of this provider type can exist per configuration.");
+        }
+    }
+
+
+    /**
+     * Get a map of service publishers provided by each service.
+     * 
+     * @return The map of service publishers, keyed by service.
+     */
+    public Map<org.jboss.soa.esb.Service, List<ServicePublisher>> getServicePublishers() {
+        List<Service> serviceConfigs = getServices();
+        final Map<org.jboss.soa.esb.Service, List<ServicePublisher>> servicePublishers = new LinkedHashMap<org.jboss.soa.esb.Service, List<ServicePublisher>>() ;
+
+        for (Service docService : serviceConfigs) {
+            ContractPublisher publisher = getContractPublisher(docService);
+            final org.jboss.soa.esb.Service service = new org.jboss.soa.esb.Service(docService.getCategory(), docService.getName()) ;
+            ServicePublisher servicePublisher = new ServicePublisher(service.getName(), service.getCategory(), publisher);
+
+            servicePublisher.setDescription(docService.getDescription());
+            addPublisher(servicePublishers, service, servicePublisher) ;
+        }
+        
+        return servicePublishers ;
+    }
+
+    /**
+     * Get the contract publisher for the service.
+     * @param service The current service definition.
+     * @return The contract publisher of null if none present.
+     */
+    private static ContractPublisher getContractPublisher(Service service) {
+        if(service.getActions() == null || service.getActions().getActionList() == null) {
+            return null;
+        }
+
+        for (Action action : service.getActions().getActionList()) {
+            Class<Class> actionClass;
+
+            try {
+                actionClass = (Class<Class>) ClassUtil.forName(action.getClass1(), ServicePublisher.class);
+            } catch (ClassNotFoundException e) {
+                throw new RuntimeException("Failed to find action class '" + action.getClass1() + "'.", e);
+            }
+
+            Publish publishAnnotation = (Publish) actionClass.getAnnotation(Publish.class);
+            if (publishAnnotation != null) {
+                Class publisherClass;
+                ActionContractPublisher publisher = null;
+
+                publisherClass = publishAnnotation.value();
+                try {
+                    publisher = (ActionContractPublisher) publisherClass.newInstance();
+                    final org.jboss.soa.esb.listeners.config.Action actionInfo = new org.jboss.soa.esb.listeners.config.Action(
+                        action.getName(), action.getClass1(), action.getProcess(), toProperties(action.getPropertyList())) ;
+                    publisher.setActionConfig(actionInfo);
+                    return publisher;
+                } catch (ClassCastException e) {
+                    throw new RuntimeException("Action Contract Publisher class '" + publisherClass.getName() + "' must implement " + ActionContractPublisher.class.getName());
+                } catch (Exception e) {
+                    throw new RuntimeException("Failed to instantiate Contract Publisher '" + publisherClass.getName() + "'. Class must implement a public default constructor.", e);
+                }
+            }
+        }
+
+        // No publisher configured on any of the actions in the processing chain...
+        return null;
+    }
+
+    
+    /**
+     * Add the publisher into map for the specified service.
+     * @param servicePublishers The service publishers
+     * @param service The service name
+     * @param publisher The publisher
+     */
+    private static void addPublisher(final Map<org.jboss.soa.esb.Service, List<ServicePublisher>> servicePublishers,
+            final org.jboss.soa.esb.Service service, final ServicePublisher publisher)
+    {
+        final List<ServicePublisher> publishers = servicePublishers.get(service) ;
+        if (publishers != null) {
+            publishers.add(publisher);
+        } else {
+            final List<ServicePublisher> newPublishers = new ArrayList<ServicePublisher>() ;
+            newPublishers.add(publisher) ;
+            servicePublishers.put(service, newPublishers) ;
+        }
+    }
+
+    /**
+     * Generate the ESB Aware configuration document.
+     * @return The ESB aware configuration.
+     * @throws ConfigurationException Error creating configuration. 
+     */
+    public Document generateESBAwareConfig()
+        throws ConfigurationException
+    {
+        // Generate and serialise the configuration for the ESB Aware listeners...
+        ESBAwareGenerator awareGenerator = new ESBAwareGenerator(this);
+        return awareGenerator.generate();
+    }
+
+    /**
+     * Generate the gateway configuration document.
+     * @return The gateway configuration.
+     * @throws ConfigurationException Error creating configuration. 
+     */
+    public Document generateGatewayConfig()
+        throws ConfigurationException
+    {
+        // Generate and serialise the configuration for the Gateway listeners...
+        GatewayGenerator gatewayGenerator = new GatewayGenerator(this);
+        return gatewayGenerator.generate();
+    }
+
+    /**
+     * Get the properties from the document.
+     * @param configProperties The document properties.
+     * @return The properties.
+     */
+    public static Properties toProperties(List<PropertyDocument.Property> configProperties) {
+        Properties properties = new Properties();
+
+        for(PropertyDocument.Property property : configProperties) {
+            properties.setProperty(property.getName(), property.getValue());
+        }
+
+        return properties;
+    }
+
+    /**
+     * Get the list of actions in this deployment.
+     * @return a list of actions or null if none present.
+     */
+    public Set<String> getActions()
+    {
+        final Services services = jbossesb.getServices() ;
+        if (services != null)
+        {
+            final Set<String> actionClasses = new HashSet<String>() ;
+            
+            for(final Service service : services.getServiceList())
+            {
+                final Actions actions = service.getActions() ;
+                if (actions != null)
+                {
+                    for (final Action action: actions.getActionList())
+                    {
+                        actionClasses.add(action.getClass1()) ;
+                    }
+                }
+            }
+            
+            return actionClasses ;
+        }
+        return null ;
+    }
+
+    
+    /**
+     * Get the list of services which require a webservice endpoint.
+     * @return The list of services.
+     */
+    public List<WebserviceInfo> getWebserviceServices()
+    {
+        final List<WebserviceInfo> endpointServices = new ArrayList<WebserviceInfo>() ;
+        final Services services = jbossesb.getServices() ;
+        if (services != null)
+        {
+            for(final Service service : services.getServiceList())
+            {
+                final Actions actions = service.getActions() ;
+                if (actions != null)
+                {
+                    if (!actions.isSetWebservice() || actions.getWebservice())
+                    {
+                        final String inXsd = actions.getInXsd() ;
+                        if (inXsd != null)
+                        {
+                            final WebserviceInfo webserviceInfo = new WebserviceInfo(
+                                new org.jboss.soa.esb.Service(service.getCategory(), service.getName()),
+                                actions.getInXsd(), actions.getOutXsd(), actions.getFaultXsd(),
+                                service.getDescription(), MepType.REQUEST_RESPONSE.equals(actions.getMep())) ;
+                            endpointServices.add(webserviceInfo) ;
+                        }
+                    }
+                }
+            }
+        }
+        return endpointServices ;
+    }
+}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110 (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,136 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.MepType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActionDocument.Action;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActionsDocument.Actions;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.w3c.dom.Element;
-
-/**
- * Performs the mapping of XSD based configuration service actions onto a "ConfigTree"
- * style listener configuration.
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ActionMapper {
-	private static final Logger logger = Logger.getLogger(ActionMapper.class);
-
-	/**
-	 * Perform the mapping.    Checks to ensure that action names are unique, and throws a ConfigurationException if 
-	 * a duplicate action name is registered.
-	 * @param listenerConfigTree The listener ConfigTree to which the actions are to be added.
-	 * @param listenerService The Service to which the listener is bound.  The Service defines the actions.
-	 * @param model The configuration model from which the mapping is being performed.
-	 * @throws ConfigurationException 
-	 */
-	public static void map(Element listenerConfigTree, Service listenerService, XMLBeansModel model) throws ConfigurationException {
-		if (listenerService.getActions()!=null) {
-		        final Actions actions = listenerService.getActions();
-		        final MepType.Enum mep  = actions.getMep() ;
-		        if (mep != null)
-		        {
-		            listenerConfigTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG, mep.toString()) ;
-		        }
-		        final String inxsd = actions.getInXsd();
-		        if (inxsd != null) 
-		        {
-		            listenerConfigTree.setAttribute(ListenerTagNames.IN_XSD_ATTRIBUTE_TAG, inxsd);	
-		        }
-		        final String outxsd = actions.getOutXsd();
-		        if (outxsd != null) 
-		        {
-		            listenerConfigTree.setAttribute(ListenerTagNames.OUT_XSD_ATTRIBUTE_TAG, outxsd);	
-		        }
-		        
-		        final String faultxsd = actions.getFaultXsd();
-		        
-		        if (faultxsd != null)
-		        {
-		            listenerConfigTree.setAttribute(ListenerTagNames.FAULT_XSD_ATTRIBUTE_TAG, faultxsd);
-		        }    
-		        
-		        if (actions.isSetValidate())
-		        {
-		            listenerConfigTree.setAttribute(ListenerTagNames.VALIDATE_ATTRIBUTE_TAG, Boolean.toString(actions.getValidate())) ;
-		        }
-                
-		        SecurityMapper.map(listenerConfigTree, listenerService);
-			List<Action> actionList = actions.getActionList();
-			
-			HashMap<String,String> hm = new HashMap<String,String>();
-			for(Action action : actionList) {
-				mapAction(listenerConfigTree, action);
-				if (hm.containsKey(action.getName())) {
-					throw new ConfigurationException("Tried to register a duplicate action name.  Service " 
-							+ listenerService.getName() + " already contains an action named "
-							+ action.getName() + ".    Action names must be unique per service.");
-				} else {
-					hm.put(action.getName(), action.getName());
-				}
-			}
-		}
-	}
-
-	/**
-	 * Map an action instance onto the listener ConfigTree.
-	 * @param listenerConfigTree The target listener ConfigTree.
-	 * @param action The action instance.
-	 */
-	private static void mapAction(Element listenerConfigTree, Action action) {
-		Element actionConfigTree = YADOMUtil.addElement(listenerConfigTree, "action");
-		List<Property> properties = action.getPropertyList();
-		
-		actionConfigTree.setAttribute(ListenerTagNames.ACTION_ELEMENT_TAG, action.getName());
-		actionConfigTree.setAttribute(ListenerTagNames.ACTION_CLASS_TAG, action.getClass1());
-		actionConfigTree.setAttribute(ListenerTagNames.PROCESS_METHOD_TAG, action.getProcess());
-		// The "okMethods" and "exceptionMethod" attributes are supported by adding them as child <property> elements.
-		
-		// Map the property elements to action attributes...
-		for(Property property : properties) {
-			Element propertyElement = listenerConfigTree.getOwnerDocument().createElement("property");
-			
-			MapperUtil.serialize(property, propertyElement);
-
-            if(property.getValue() != null) {
-                actionConfigTree.setAttribute(property.getName(), property.getValue());
-            }
-            // If the property has child content, add that directy to the action.  Of course it only really
-			// makes sense to do this with one property!
-			if(propertyElement.hasChildNodes()) {
-				YADOMUtil.copyChildNodes(propertyElement, actionConfigTree);
-			}
-		}
-		
-		// Remove any empty attributes set on the action config...
-		YADOMUtil.removeEmptyAttributes(actionConfigTree);
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ActionMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,136 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.MepType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActionDocument.Action;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActionsDocument.Actions;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.w3c.dom.Element;
+
+/**
+ * Performs the mapping of XSD based configuration service actions onto a "ConfigTree"
+ * style listener configuration.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ActionMapper {
+	private static final Logger logger = Logger.getLogger(ActionMapper.class);
+
+	/**
+	 * Perform the mapping.    Checks to ensure that action names are unique, and throws a ConfigurationException if 
+	 * a duplicate action name is registered.
+	 * @param listenerConfigTree The listener ConfigTree to which the actions are to be added.
+	 * @param listenerService The Service to which the listener is bound.  The Service defines the actions.
+	 * @param model The configuration model from which the mapping is being performed.
+	 * @throws ConfigurationException 
+	 */
+	public static void map(Element listenerConfigTree, Service listenerService, XMLBeansModel model) throws ConfigurationException {
+		if (listenerService.getActions()!=null) {
+		        final Actions actions = listenerService.getActions();
+		        final MepType.Enum mep  = actions.getMep() ;
+		        if (mep != null)
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG, mep.toString()) ;
+		        }
+		        final String inxsd = actions.getInXsd();
+		        if (inxsd != null) 
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.IN_XSD_ATTRIBUTE_TAG, inxsd);	
+		        }
+		        final String outxsd = actions.getOutXsd();
+		        if (outxsd != null) 
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.OUT_XSD_ATTRIBUTE_TAG, outxsd);	
+		        }
+		        
+		        final String faultxsd = actions.getFaultXsd();
+		        
+		        if (faultxsd != null)
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.FAULT_XSD_ATTRIBUTE_TAG, faultxsd);
+		        }    
+		        
+		        if (actions.isSetValidate())
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.VALIDATE_ATTRIBUTE_TAG, Boolean.toString(actions.getValidate())) ;
+		        }
+                
+		        SecurityMapper.map(listenerConfigTree, listenerService);
+			List<Action> actionList = actions.getActionList();
+			
+			HashMap<String,String> hm = new HashMap<String,String>();
+			for(Action action : actionList) {
+				mapAction(listenerConfigTree, action);
+				if (hm.containsKey(action.getName())) {
+					throw new ConfigurationException("Tried to register a duplicate action name.  Service " 
+							+ listenerService.getName() + " already contains an action named "
+							+ action.getName() + ".    Action names must be unique per service.");
+				} else {
+					hm.put(action.getName(), action.getName());
+				}
+			}
+		}
+	}
+
+	/**
+	 * Map an action instance onto the listener ConfigTree.
+	 * @param listenerConfigTree The target listener ConfigTree.
+	 * @param action The action instance.
+	 */
+	private static void mapAction(Element listenerConfigTree, Action action) {
+		Element actionConfigTree = YADOMUtil.addElement(listenerConfigTree, "action");
+		List<Property> properties = action.getPropertyList();
+		
+		actionConfigTree.setAttribute(ListenerTagNames.ACTION_ELEMENT_TAG, action.getName());
+		actionConfigTree.setAttribute(ListenerTagNames.ACTION_CLASS_TAG, action.getClass1());
+		actionConfigTree.setAttribute(ListenerTagNames.PROCESS_METHOD_TAG, action.getProcess());
+		// The "okMethods" and "exceptionMethod" attributes are supported by adding them as child <property> elements.
+		
+		// Map the property elements to action attributes...
+		for(Property property : properties) {
+			Element propertyElement = listenerConfigTree.getOwnerDocument().createElement("property");
+			
+			MapperUtil.serialize(property, propertyElement);
+
+            if(property.getValue() != null) {
+                actionConfigTree.setAttribute(property.getName(), property.getValue());
+            }
+            // If the property has child content, add that directy to the action.  Of course it only really
+			// makes sense to do this with one property!
+			if(propertyElement.hasChildNodes()) {
+				YADOMUtil.copyChildNodes(propertyElement, actionConfigTree);
+			}
+		}
+		
+		// Remove any empty attributes set on the action config...
+		YADOMUtil.removeEmptyAttributes(actionConfigTree);
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,226 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.InVMEpr;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.AbstractScheduledListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Bus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsProviderType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsListenerDocument.FsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument.FtpListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.GroovyListenerDocument.GroovyListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrListenerDocument.JbrListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsBusDocument.JmsBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsJcaProviderDocument.JmsJcaProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsMessageFilterDocument.JmsMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlBusDocument.SqlBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlListenerDocument.SqlListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlProviderDocument.SqlProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduledListenerDocument.ScheduledListener;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.message.MessageAwareListener;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * ESB Aware Listeners Configuration Generator.
- * <p/>
- * Generates a "ConfigTree" style configuration for the ESB Aware Listeners. 
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ESBAwareGenerator {
-
-    private static final Logger logger = Logger.getLogger(ESBAwareGenerator.class);
-
-    /**
-	 * XMLBeans based configuration model instance.
-	 */
-	private XMLBeansModel model;
-	
-	/**
-	 * Public constructor.
-	 * @param model XMLBeans based configuration model instance.
-	 */
-	public ESBAwareGenerator(XMLBeansModel model) {
-		this.model = model;
-	}
-
-	/**
-	 * Generate the configuration DOM for the target Server.
-	 * @return The configuration DOM.
-	 * @throws ConfigurationException Error creating configuration. 
-	 */
-	public Document generate() throws ConfigurationException {
-		Document doc = YADOMUtil.createDocument();
-		Element root;
-		
-		doc.appendChild(doc.createComment("\n\tNOTE: DO NOT MODIFY\n\tThis file was auto-generated.\n"));
-		root = YADOMUtil.addElement(doc, "jbossesb-listeners");
-		root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
-
-        // Add an InVM listener for each service...
-        List<Service> services = model.getServices();
-        for (int i = 0; i < services.size(); i++) {
-            Service service = services.get(i);
-            if(model.exposesInVMListener(service)) {
-                addInVMListener(root, service, i);
-            }
-        }
-		
-		// Iterate over all the ESB Aware listner configs and map them to the listener configuration...
-		List<Listener> listeners = model.getESBAwareListeners();
-		for(Listener listener : listeners) {
-			addESBAwareConfig(root, listener);
-		}
-		
-		return doc;
-	}
-
-    private void addInVMListener(Element root, Service service, int serviceIndex) throws ConfigurationException {
-        Element listenerNode = YADOMUtil.addElement(root, "InVM-" + serviceIndex);
-        Element properties = listenerNode.getOwnerDocument().createElement("properties");
-
-        MapperUtil.mapListenerServiceAttributes(listenerNode, service, false);
-        listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, MessageAwareListener.class.getName());
-
-        Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
-        eprNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, InVMEpr.INVM_PROTOCOL);
-
-        MapperUtil.mapProperties(service.getPropertyList(), properties);
-        eprNode.setAttribute(ListenerTagNames.URL_TAG, InVMEpr.INVM_PROTOCOL + "://"
-                + InVMEpr.createEncodedServiceId(service.getCategory(), service.getName())
-                + "/" + YADOMUtil.getAttribute(properties, "inVMPassByValue", "false")
-                + "?" + YADOMUtil.getAttribute(properties, "inVMLockStep", "false")
-                + "#" + YADOMUtil.getAttribute(properties, "inVMLockStepTimeout", "10000"));
-
-        listenerNode.setAttribute(ListenerTagNames.MAX_THREADS_TAG, YADOMUtil.getAttribute(properties, ListenerTagNames.MAX_THREADS_TAG, "1"));
-
-        listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(getInVMTransacted(service))) ;
-        YADOMUtil.removeEmptyAttributes(eprNode);
-
-        ActionMapper.map(listenerNode, service, model);
-    }
-    
-    /**
-     * Try to find the InVM transacted value.  Check to see if the transacted attribute
-     * has been explicitly set on the service.  If it has not been explicitly set then we
-     * check to see if any of the listener/bus configurations are transacted and assume the
-     * InVM is implicitly transacted.
-     * 
-     * @param service The current service.
-     * @return true if transacted, false otherwise.
-     */
-    private boolean getInVMTransacted(final Service service)
-        throws ConfigurationException
-    {
-        if (service.isSetInvmScope()) {
-            return service.getInvmTransacted() ;
-        } else if (service.isSetListeners()) {
-            for (Listener listener: service.getListeners().getListenerList()) {
-                if (listener instanceof ScheduledListener) {
-                    if (((ScheduledListener)listener).getTransacted())
-                        return true ;
-                }
-                else if (listener instanceof JmsListener) {
-                    final Bus bus = model.getBus(listener.getBusidref()) ;
-                    if (!(bus instanceof JmsBus))
-                        continue ;
-                    
-                    final Provider provider = model.getProvider(bus) ;
-                    if (provider instanceof JmsJcaProvider) {
-                        // Jms JCA provider defaults to true
-                        final JmsJcaProvider jmsJcaProvider = (JmsJcaProvider)provider ;
-                        if (!jmsJcaProvider.isSetTransacted() || jmsJcaProvider.getTransacted())
-                            return true ;
-                    } else if (provider instanceof JmsProviderType) {
-                        JmsMessageFilter filter = ((JmsListener)listener).getJmsMessageFilter() ;
-                        if (filter == null)
-                            filter = ((JmsBus)bus).getJmsMessageFilter() ;
-                        if ((filter != null) && filter.getTransacted())
-                            return true ;
-                    }
-                } else if (listener instanceof SqlListener) {
-                    final Bus bus = model.getBus(listener.getBusidref()) ;
-                    if (!(bus instanceof SqlBus))
-                        continue ;
-                    
-                    final Provider provider = model.getProvider(bus) ;
-                    if ((provider instanceof SqlProvider) && ((SqlProvider)provider).getTransacted())
-                        return true ;
-                }
-            }
-        }
-        return false ;
-    }
-
-    /**
-	 * Add a single ESB Aware Listener configuration node to configuration root. 
-	 * @param root Configuration root node.
-	 * @param listener The ESB Aware Listener configuration to be added.
-	 * @throws ConfigurationException Invalid listener configuration.
-	 */
-	private void addESBAwareConfig(Element root, Listener listener) throws ConfigurationException {
-		Element listenerConfigTree;
-		Service listenerService;
-		
-		// Of course we could do the following reflectively if we really want to - TODO perhaps!!
-		if(listener instanceof JmsListener) {
-			listenerConfigTree = JmsListenerMapper.map(root, (JmsListener)listener, model);
-        } else if (listener instanceof ScheduledListener) {
-            listenerConfigTree = ScheduledListenerMapper.map(root, (ScheduledListener) listener, model);
-        } else if(listener instanceof FsListener) {
-         listenerConfigTree = FsListenerMapper.map(root, (FsListener)listener, model);
-		} else if (listener instanceof FtpListener) {
-			listenerConfigTree = FtpListenerMapper.map(root, (FtpListener)listener, model);
-		} else if (listener instanceof SqlListener) {
-			listenerConfigTree = SqlListenerMapper.map(root, (SqlListener)listener, model);
-        } else if (listener instanceof JbrListener) {
-            logger.error("JbossRemoting listener only supported in Gateway mode.");
-            return;
-        } else if (listener instanceof GroovyListener) {
-            listenerConfigTree = GroovyListenerMapper.map(root, (GroovyListener)listener, model);
-		} else {
-			listenerConfigTree = UntypedListenerMapper.map(root, listener, model);
-		}
-
-        if (listener instanceof AbstractScheduledListener) {
-            ScheduleMapper.map(listenerConfigTree, (AbstractScheduledListener) listener, model);
-        }
-
-        // Locate the Service to which the listener is bound...
-		listenerService = model.getService(listener);
-		
-		// Map the actions and notiications...
-		ActionMapper.map(listenerConfigTree, listenerService, model);
-		NotificationMapper.map(listenerConfigTree, listenerService, model);
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ESBAwareGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,226 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.InVMEpr;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.AbstractScheduledListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsProviderType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsListenerDocument.FsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument.FtpListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.GroovyListenerDocument.GroovyListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrListenerDocument.JbrListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsBusDocument.JmsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsJcaProviderDocument.JmsJcaProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsMessageFilterDocument.JmsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlBusDocument.SqlBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlListenerDocument.SqlListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlProviderDocument.SqlProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduledListenerDocument.ScheduledListener;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.message.MessageAwareListener;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * ESB Aware Listeners Configuration Generator.
+ * <p/>
+ * Generates a "ConfigTree" style configuration for the ESB Aware Listeners. 
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ESBAwareGenerator {
+
+    private static final Logger logger = Logger.getLogger(ESBAwareGenerator.class);
+
+    /**
+	 * XMLBeans based configuration model instance.
+	 */
+	private XMLBeansModel model;
+	
+	/**
+	 * Public constructor.
+	 * @param model XMLBeans based configuration model instance.
+	 */
+	public ESBAwareGenerator(XMLBeansModel model) {
+		this.model = model;
+	}
+
+	/**
+	 * Generate the configuration DOM for the target Server.
+	 * @return The configuration DOM.
+	 * @throws ConfigurationException Error creating configuration. 
+	 */
+	public Document generate() throws ConfigurationException {
+		Document doc = YADOMUtil.createDocument();
+		Element root;
+		
+		doc.appendChild(doc.createComment("\n\tNOTE: DO NOT MODIFY\n\tThis file was auto-generated.\n"));
+		root = YADOMUtil.addElement(doc, "jbossesb-listeners");
+		root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
+
+        // Add an InVM listener for each service...
+        List<Service> services = model.getServices();
+        for (int i = 0; i < services.size(); i++) {
+            Service service = services.get(i);
+            if(model.exposesInVMListener(service)) {
+                addInVMListener(root, service, i);
+            }
+        }
+		
+		// Iterate over all the ESB Aware listner configs and map them to the listener configuration...
+		List<Listener> listeners = model.getESBAwareListeners();
+		for(Listener listener : listeners) {
+			addESBAwareConfig(root, listener);
+		}
+		
+		return doc;
+	}
+
+    private void addInVMListener(Element root, Service service, int serviceIndex) throws ConfigurationException {
+        Element listenerNode = YADOMUtil.addElement(root, "InVM-" + serviceIndex);
+        Element properties = listenerNode.getOwnerDocument().createElement("properties");
+
+        MapperUtil.mapListenerServiceAttributes(listenerNode, service, false);
+        listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, MessageAwareListener.class.getName());
+
+        Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+        eprNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, InVMEpr.INVM_PROTOCOL);
+
+        MapperUtil.mapProperties(service.getPropertyList(), properties);
+        eprNode.setAttribute(ListenerTagNames.URL_TAG, InVMEpr.INVM_PROTOCOL + "://"
+                + InVMEpr.createEncodedServiceId(service.getCategory(), service.getName())
+                + "/" + YADOMUtil.getAttribute(properties, "inVMPassByValue", "false")
+                + "?" + YADOMUtil.getAttribute(properties, "inVMLockStep", "false")
+                + "#" + YADOMUtil.getAttribute(properties, "inVMLockStepTimeout", "10000"));
+
+        listenerNode.setAttribute(ListenerTagNames.MAX_THREADS_TAG, YADOMUtil.getAttribute(properties, ListenerTagNames.MAX_THREADS_TAG, "1"));
+
+        listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(getInVMTransacted(service))) ;
+        YADOMUtil.removeEmptyAttributes(eprNode);
+
+        ActionMapper.map(listenerNode, service, model);
+    }
+    
+    /**
+     * Try to find the InVM transacted value.  Check to see if the transacted attribute
+     * has been explicitly set on the service.  If it has not been explicitly set then we
+     * check to see if any of the listener/bus configurations are transacted and assume the
+     * InVM is implicitly transacted.
+     * 
+     * @param service The current service.
+     * @return true if transacted, false otherwise.
+     */
+    private boolean getInVMTransacted(final Service service)
+        throws ConfigurationException
+    {
+        if (service.isSetInvmScope()) {
+            return service.getInvmTransacted() ;
+        } else if (service.isSetListeners()) {
+            for (Listener listener: service.getListeners().getListenerList()) {
+                if (listener instanceof ScheduledListener) {
+                    if (((ScheduledListener)listener).getTransacted())
+                        return true ;
+                }
+                else if (listener instanceof JmsListener) {
+                    final Bus bus = model.getBus(listener.getBusidref()) ;
+                    if (!(bus instanceof JmsBus))
+                        continue ;
+                    
+                    final Provider provider = model.getProvider(bus) ;
+                    if (provider instanceof JmsJcaProvider) {
+                        // Jms JCA provider defaults to true
+                        final JmsJcaProvider jmsJcaProvider = (JmsJcaProvider)provider ;
+                        if (!jmsJcaProvider.isSetTransacted() || jmsJcaProvider.getTransacted())
+                            return true ;
+                    } else if (provider instanceof JmsProviderType) {
+                        JmsMessageFilter filter = ((JmsListener)listener).getJmsMessageFilter() ;
+                        if (filter == null)
+                            filter = ((JmsBus)bus).getJmsMessageFilter() ;
+                        if ((filter != null) && filter.getTransacted())
+                            return true ;
+                    }
+                } else if (listener instanceof SqlListener) {
+                    final Bus bus = model.getBus(listener.getBusidref()) ;
+                    if (!(bus instanceof SqlBus))
+                        continue ;
+                    
+                    final Provider provider = model.getProvider(bus) ;
+                    if ((provider instanceof SqlProvider) && ((SqlProvider)provider).getTransacted())
+                        return true ;
+                }
+            }
+        }
+        return false ;
+    }
+
+    /**
+	 * Add a single ESB Aware Listener configuration node to configuration root. 
+	 * @param root Configuration root node.
+	 * @param listener The ESB Aware Listener configuration to be added.
+	 * @throws ConfigurationException Invalid listener configuration.
+	 */
+	private void addESBAwareConfig(Element root, Listener listener) throws ConfigurationException {
+		Element listenerConfigTree;
+		Service listenerService;
+		
+		// Of course we could do the following reflectively if we really want to - TODO perhaps!!
+		if(listener instanceof JmsListener) {
+			listenerConfigTree = JmsListenerMapper.map(root, (JmsListener)listener, model);
+        } else if (listener instanceof ScheduledListener) {
+            listenerConfigTree = ScheduledListenerMapper.map(root, (ScheduledListener) listener, model);
+        } else if(listener instanceof FsListener) {
+         listenerConfigTree = FsListenerMapper.map(root, (FsListener)listener, model);
+		} else if (listener instanceof FtpListener) {
+			listenerConfigTree = FtpListenerMapper.map(root, (FtpListener)listener, model);
+		} else if (listener instanceof SqlListener) {
+			listenerConfigTree = SqlListenerMapper.map(root, (SqlListener)listener, model);
+        } else if (listener instanceof JbrListener) {
+            logger.error("JbossRemoting listener only supported in Gateway mode.");
+            return;
+        } else if (listener instanceof GroovyListener) {
+            listenerConfigTree = GroovyListenerMapper.map(root, (GroovyListener)listener, model);
+		} else {
+			listenerConfigTree = UntypedListenerMapper.map(root, listener, model);
+		}
+
+        if (listener instanceof AbstractScheduledListener) {
+            ScheduleMapper.map(listenerConfigTree, (AbstractScheduledListener) listener, model);
+        }
+
+        // Locate the Service to which the listener is bound...
+		listenerService = model.getService(listener);
+		
+		// Map the actions and notiications...
+		ActionMapper.map(listenerConfigTree, listenerService, model);
+		NotificationMapper.map(listenerConfigTree, listenerService, model);
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,120 +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,
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import java.io.File;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsBusDocument.FsBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsListenerDocument.FsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsMessageFilterDocument.FsMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsProviderDocument.FsProvider;
-import org.jboss.soa.esb.listeners.gateway.FileGatewayListener;
-import org.w3c.dom.Element;
-
-/**
- * Performs the mapping of a &lt;fs-listener&gt; XSD based configuration to the "ConfigTree"
- * style configuration, adding the "ConfigTree" listener config to the "root" node.
- * 
- * @author <a href="mailto:kurt.stam at jboss.com">kurt.stam at jboss.com</a>
- */
-public class FsListenerMapper {
-
-	/**
-	 * Perform the mapping.
-	 * @param root The "ConfigTree" configuration root node.
-	 * @param listener The Jmslistener to be mapped into the ConfigTree.
-	 * @param model The configuration model from which the mapping is being performed.
-	 * @return The ConfigTree listener configuration node.
-	 * @throws ConfigurationException Invalid listener configuration.
-	 */
-	public static Element map(Element root, FsListener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, "listener");
-		FsBus bus;
-		FsProvider provider;
-
-        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>.");
-		}
-		try {
-			provider = (FsProvider) model.getProvider(bus);
-		} catch (ClassCastException e) {
-			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <fs-provider> instance.  Unexpected exception - this should have caused a validation error!");
-		}
-		
-		FsMessageFilter messageFilter = listener.getFsMessageFilter();
-		if(messageFilter == null) {
-			messageFilter = bus.getFsMessageFilter();
-			if(messageFilter == null) {
-				throw new ConfigurationException("No <fs-detination> defined on either <fs-listener> [" + listener.getName() + "] or <fs-bus> [" + bus.getBusid() + "].");
-			}
-		}
-		// 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.
-		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
-		if(listener.getIsGateway()) {
-			listenerNode.setAttribute("gatewayClass", FileGatewayListener.class.getName());
-			// Map EPR related attributes onto the listener - from the bus and provider and listener.
-			// Note: This will change - the Gateways will also support the EPR element...
-			mapFsEprProperties(listenerNode, provider, messageFilter);
-			MapperUtil.mapEPRProperties(listener, listenerNode, model);
-		} else {
-			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
-
-			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
-			mapFsEprProperties(eprNode, provider, messageFilter);
-			MapperUtil.mapEPRProperties(listener, eprNode, model);
-			// Remove any empty attributes set on the EPR config...
-			YADOMUtil.removeEmptyAttributes(eprNode);
-		}
-		
-		// Remove any empty attributes set on the listener config...
-		YADOMUtil.removeEmptyAttributes(listenerNode);
-		
-		return listenerNode;
-	}
-
-	private static void mapFsEprProperties(Element toElement, FsProvider provider, FsMessageFilter messageFilter) {
-		final File directory = new File(messageFilter.getDirectory()) ;
-		toElement.setAttribute(ListenerTagNames.URL_TAG, directory.toURI().toString());
-		toElement.setAttribute(FileEpr.INPUT_SUFFIX_TAG, messageFilter.getInputSuffix());
-		toElement.setAttribute(FileEpr.WORK_SUFFIX_TAG, messageFilter.getWorkSuffix());
-		toElement.setAttribute(FileEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
-		toElement.setAttribute(FileEpr.POST_RENAME_TAG, String.valueOf(messageFilter.getPostRename()));
-		if (!messageFilter.getPostDelete()) {
-			toElement.setAttribute(FileEpr.POST_DIR_TAG, messageFilter.getPostDirectory());
-			toElement.setAttribute(FileEpr.POST_SUFFIX_TAG, messageFilter.getPostSuffix());
-		}
-		toElement.setAttribute(FileEpr.ERROR_DEL_TAG, String.valueOf(messageFilter.getErrorDelete()));
-		if (!messageFilter.getErrorDelete()) {
-			toElement.setAttribute(FileEpr.ERROR_DIR_TAG, messageFilter.getErrorDirectory());
-			toElement.setAttribute(FileEpr.ERROR_SUFFIX_TAG, messageFilter.getErrorSuffix());
-		}
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FsListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,120 @@
+/*
+ * 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,
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import java.io.File;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.FileEpr;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsBusDocument.FsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsListenerDocument.FsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsMessageFilterDocument.FsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsProviderDocument.FsProvider;
+import org.jboss.soa.esb.listeners.gateway.FileGatewayListener;
+import org.w3c.dom.Element;
+
+/**
+ * Performs the mapping of a &lt;fs-listener&gt; XSD based configuration to the "ConfigTree"
+ * style configuration, adding the "ConfigTree" listener config to the "root" node.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">kurt.stam at jboss.com</a>
+ */
+public class FsListenerMapper {
+
+	/**
+	 * Perform the mapping.
+	 * @param root The "ConfigTree" configuration root node.
+	 * @param listener The Jmslistener to be mapped into the ConfigTree.
+	 * @param model The configuration model from which the mapping is being performed.
+	 * @return The ConfigTree listener configuration node.
+	 * @throws ConfigurationException Invalid listener configuration.
+	 */
+	public static Element map(Element root, FsListener listener, XMLBeansModel model) throws ConfigurationException {
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
+		FsBus bus;
+		FsProvider provider;
+
+        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>.");
+		}
+		try {
+			provider = (FsProvider) model.getProvider(bus);
+		} catch (ClassCastException e) {
+			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <fs-provider> instance.  Unexpected exception - this should have caused a validation error!");
+		}
+		
+		FsMessageFilter messageFilter = listener.getFsMessageFilter();
+		if(messageFilter == null) {
+			messageFilter = bus.getFsMessageFilter();
+			if(messageFilter == null) {
+				throw new ConfigurationException("No <fs-detination> defined on either <fs-listener> [" + listener.getName() + "] or <fs-bus> [" + bus.getBusid() + "].");
+			}
+		}
+		// 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.
+		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
+		if(listener.getIsGateway()) {
+			listenerNode.setAttribute("gatewayClass", FileGatewayListener.class.getName());
+			// Map EPR related attributes onto the listener - from the bus and provider and listener.
+			// Note: This will change - the Gateways will also support the EPR element...
+			mapFsEprProperties(listenerNode, provider, messageFilter);
+			MapperUtil.mapEPRProperties(listener, listenerNode, model);
+		} else {
+			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+
+			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
+			mapFsEprProperties(eprNode, provider, messageFilter);
+			MapperUtil.mapEPRProperties(listener, eprNode, model);
+			// Remove any empty attributes set on the EPR config...
+			YADOMUtil.removeEmptyAttributes(eprNode);
+		}
+		
+		// Remove any empty attributes set on the listener config...
+		YADOMUtil.removeEmptyAttributes(listenerNode);
+		
+		return listenerNode;
+	}
+
+	private static void mapFsEprProperties(Element toElement, FsProvider provider, FsMessageFilter messageFilter) {
+		final File directory = new File(messageFilter.getDirectory()) ;
+		toElement.setAttribute(ListenerTagNames.URL_TAG, directory.toURI().toString());
+		toElement.setAttribute(FileEpr.INPUT_SUFFIX_TAG, messageFilter.getInputSuffix());
+		toElement.setAttribute(FileEpr.WORK_SUFFIX_TAG, messageFilter.getWorkSuffix());
+		toElement.setAttribute(FileEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
+		toElement.setAttribute(FileEpr.POST_RENAME_TAG, String.valueOf(messageFilter.getPostRename()));
+		if (!messageFilter.getPostDelete()) {
+			toElement.setAttribute(FileEpr.POST_DIR_TAG, messageFilter.getPostDirectory());
+			toElement.setAttribute(FileEpr.POST_SUFFIX_TAG, messageFilter.getPostSuffix());
+		}
+		toElement.setAttribute(FileEpr.ERROR_DEL_TAG, String.valueOf(messageFilter.getErrorDelete()));
+		if (!messageFilter.getErrorDelete()) {
+			toElement.setAttribute(FileEpr.ERROR_DIR_TAG, messageFilter.getErrorDirectory());
+			toElement.setAttribute(FileEpr.ERROR_SUFFIX_TAG, messageFilter.getErrorSuffix());
+		}
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,146 +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,
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.FTPSEpr;
-import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpBusDocument.FtpBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument.FtpListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpMessageFilterDocument.FtpMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpMessageFilterDocument.FtpMessageFilter.Protocol;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpProviderDocument.FtpProvider;
-import org.jboss.soa.esb.listeners.gateway.ReadOnlyRemoteGatewayListener;
-import org.jboss.soa.esb.listeners.gateway.RemoteGatewayListener;
-import org.w3c.dom.Element;
-
-/**
- * Performs the mapping of a &lt;fs-listener&gt; XSD based configuration to the "ConfigTree"
- * style configuration, adding the "ConfigTree" listener config to the "root" node.
- * 
- * @author <a href="mailto:kurt.stam at jboss.com">kurt.stam at jboss.com</a>
- */
-public class FtpListenerMapper {
-
-	/**
-	 * Perform the mapping.
-	 * @param root The "ConfigTree" configuration root node.
-	 * @param listener The Jmslistener to be mapped into the ConfigTree.
-	 * @param model The configuration model from which the mapping is being performed.
-	 * @return The ConfigTree listener configuration node.
-	 * @throws ConfigurationException Invalid listener configuration.
-	 */
-	public static Element map(Element root, FtpListener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, "listener");
-		FtpBus bus;
-		FtpProvider provider;
-
-        listenerNode.setAttribute("name", listener.getName());
-		
-		try {
-			bus = (FtpBus) model.getBus(listener.getBusidref());
-		} catch (ClassCastException e) {
-			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <ftp-listener> must reference a <ftp-bus>.");
-		}
-		try {
-			provider = (FtpProvider) model.getProvider(bus);
-		} catch (ClassCastException e) {
-			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <ftp-provider> instance.  Unexpected exception - this should have caused a validation error!");
-		}
-		
-		FtpMessageFilter messageFilter = listener.getFtpMessageFilter();
-		if(messageFilter == null) {
-			messageFilter = bus.getFtpMessageFilter();
-			if(messageFilter == null) {
-				throw new ConfigurationException("No <ftp-detination> defined on either <ftp-listener> [" + listener.getName() + "] or <ftp-bus> [" + bus.getBusid() + "].");
-			}
-		}
-		// 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.
-		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
-		if(listener.getIsGateway()) {
-			if ( messageFilter.getReadOnly() )
-				listenerNode.setAttribute("gatewayClass", ReadOnlyRemoteGatewayListener.class.getName());
-			else
-				listenerNode.setAttribute("gatewayClass", RemoteGatewayListener.class.getName());
-			// Map EPR related attributes onto the listener - from the bus and provider and listener.
-			// Note: This will change - the Gateways will also support the EPR element...
-			mapFtpEprProperties(listenerNode, provider, messageFilter);
-			MapperUtil.mapEPRProperties(listener, listenerNode, model);
-		} else {
-			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
-
-			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
-			mapFtpEprProperties(eprNode, provider, messageFilter);
-			MapperUtil.mapEPRProperties(listener, eprNode, model);
-			// Remove any empty attributes set on the EPR config...
-			YADOMUtil.removeEmptyAttributes(eprNode);
-		}
-		
-		// Remove any empty attributes set on the listener config...
-		YADOMUtil.removeEmptyAttributes(listenerNode);
-		
-		return listenerNode;
-	}
-	
-	/**
-	 *  The separator used by the ftp protocol to separate the
-	 *  host:port section from the path
-	 */
-	private static final String FTP_SEPARATOR = "/";
-
-	private static void mapFtpEprProperties(Element toElement, FtpProvider provider, FtpMessageFilter messageFilter) 
-	{
-		String inputDir = messageFilter.getDirectory();
-		if ( ! inputDir.startsWith( FTP_SEPARATOR ) )
-			inputDir = FTP_SEPARATOR + inputDir;
-		
-		final String filterPassword = messageFilter.getPassword() ;
-		final String urlPassword = (filterPassword == null ? "" : ":" + filterPassword) ;
-		toElement.setAttribute(ListenerTagNames.URL_TAG, messageFilter.getProtocol() + "://" + messageFilter.getUsername()
-				+ urlPassword + "@" + provider.getHostname() + inputDir );
-		toElement.setAttribute(FTPEpr.INPUT_SUFFIX_TAG, messageFilter.getInputSuffix());
-		toElement.setAttribute(FTPEpr.WORK_SUFFIX_TAG, messageFilter.getWorkSuffix());
-		toElement.setAttribute(FTPEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
-		if (!messageFilter.getPostDelete()) {
-			toElement.setAttribute(FTPEpr.POST_DIR_TAG, messageFilter.getPostDirectory());
-			toElement.setAttribute(FTPEpr.POST_SUFFIX_TAG, messageFilter.getPostSuffix());
-		}
-		toElement.setAttribute(FTPEpr.ERROR_DEL_TAG, String.valueOf(messageFilter.getErrorDelete()));
-		if (!messageFilter.getErrorDelete()) {
-			toElement.setAttribute(FTPEpr.ERROR_DIR_TAG, messageFilter.getErrorDirectory());
-			toElement.setAttribute(FTPEpr.ERROR_SUFFIX_TAG, messageFilter.getErrorSuffix());
-		}
-		toElement.setAttribute(FTPEpr.PASSIVE_TAG, String.valueOf(messageFilter.getPassive()));
-		if (Protocol.SFTP.equals(messageFilter.getProtocol())) {
-			toElement.setAttribute(SFTPEpr.CERTIFICATE_TAG, messageFilter.getCertificateUrl());
-			toElement.setAttribute(SFTPEpr.PASSPHRASE_TAG, messageFilter.getCertificatePassphrase()) ;
-		}
-		if (Protocol.FTPS.equals(messageFilter.getProtocol())) {
-			toElement.setAttribute(FTPSEpr.CERTIFICATE_TAG, messageFilter.getCertificateUrl());
-			toElement.setAttribute(FTPSEpr.CERTIFICATE_NAME_TAG, messageFilter.getCertificateName());
-		}
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,146 @@
+/*
+ * 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,
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.FTPEpr;
+import org.jboss.soa.esb.addressing.eprs.FTPSEpr;
+import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpBusDocument.FtpBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument.FtpListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpMessageFilterDocument.FtpMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpMessageFilterDocument.FtpMessageFilter.Protocol;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpProviderDocument.FtpProvider;
+import org.jboss.soa.esb.listeners.gateway.ReadOnlyRemoteGatewayListener;
+import org.jboss.soa.esb.listeners.gateway.RemoteGatewayListener;
+import org.w3c.dom.Element;
+
+/**
+ * Performs the mapping of a &lt;fs-listener&gt; XSD based configuration to the "ConfigTree"
+ * style configuration, adding the "ConfigTree" listener config to the "root" node.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">kurt.stam at jboss.com</a>
+ */
+public class FtpListenerMapper {
+
+	/**
+	 * Perform the mapping.
+	 * @param root The "ConfigTree" configuration root node.
+	 * @param listener The Jmslistener to be mapped into the ConfigTree.
+	 * @param model The configuration model from which the mapping is being performed.
+	 * @return The ConfigTree listener configuration node.
+	 * @throws ConfigurationException Invalid listener configuration.
+	 */
+	public static Element map(Element root, FtpListener listener, XMLBeansModel model) throws ConfigurationException {
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
+		FtpBus bus;
+		FtpProvider provider;
+
+        listenerNode.setAttribute("name", listener.getName());
+		
+		try {
+			bus = (FtpBus) model.getBus(listener.getBusidref());
+		} catch (ClassCastException e) {
+			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <ftp-listener> must reference a <ftp-bus>.");
+		}
+		try {
+			provider = (FtpProvider) model.getProvider(bus);
+		} catch (ClassCastException e) {
+			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <ftp-provider> instance.  Unexpected exception - this should have caused a validation error!");
+		}
+		
+		FtpMessageFilter messageFilter = listener.getFtpMessageFilter();
+		if(messageFilter == null) {
+			messageFilter = bus.getFtpMessageFilter();
+			if(messageFilter == null) {
+				throw new ConfigurationException("No <ftp-detination> defined on either <ftp-listener> [" + listener.getName() + "] or <ftp-bus> [" + bus.getBusid() + "].");
+			}
+		}
+		// 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.
+		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
+		if(listener.getIsGateway()) {
+			if ( messageFilter.getReadOnly() )
+				listenerNode.setAttribute("gatewayClass", ReadOnlyRemoteGatewayListener.class.getName());
+			else
+				listenerNode.setAttribute("gatewayClass", RemoteGatewayListener.class.getName());
+			// Map EPR related attributes onto the listener - from the bus and provider and listener.
+			// Note: This will change - the Gateways will also support the EPR element...
+			mapFtpEprProperties(listenerNode, provider, messageFilter);
+			MapperUtil.mapEPRProperties(listener, listenerNode, model);
+		} else {
+			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+
+			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
+			mapFtpEprProperties(eprNode, provider, messageFilter);
+			MapperUtil.mapEPRProperties(listener, eprNode, model);
+			// Remove any empty attributes set on the EPR config...
+			YADOMUtil.removeEmptyAttributes(eprNode);
+		}
+		
+		// Remove any empty attributes set on the listener config...
+		YADOMUtil.removeEmptyAttributes(listenerNode);
+		
+		return listenerNode;
+	}
+	
+	/**
+	 *  The separator used by the ftp protocol to separate the
+	 *  host:port section from the path
+	 */
+	private static final String FTP_SEPARATOR = "/";
+
+	private static void mapFtpEprProperties(Element toElement, FtpProvider provider, FtpMessageFilter messageFilter) 
+	{
+		String inputDir = messageFilter.getDirectory();
+		if ( ! inputDir.startsWith( FTP_SEPARATOR ) )
+			inputDir = FTP_SEPARATOR + inputDir;
+		
+		final String filterPassword = messageFilter.getPassword() ;
+		final String urlPassword = (filterPassword == null ? "" : ":" + filterPassword) ;
+		toElement.setAttribute(ListenerTagNames.URL_TAG, messageFilter.getProtocol() + "://" + messageFilter.getUsername()
+				+ urlPassword + "@" + provider.getHostname() + inputDir );
+		toElement.setAttribute(FTPEpr.INPUT_SUFFIX_TAG, messageFilter.getInputSuffix());
+		toElement.setAttribute(FTPEpr.WORK_SUFFIX_TAG, messageFilter.getWorkSuffix());
+		toElement.setAttribute(FTPEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
+		if (!messageFilter.getPostDelete()) {
+			toElement.setAttribute(FTPEpr.POST_DIR_TAG, messageFilter.getPostDirectory());
+			toElement.setAttribute(FTPEpr.POST_SUFFIX_TAG, messageFilter.getPostSuffix());
+		}
+		toElement.setAttribute(FTPEpr.ERROR_DEL_TAG, String.valueOf(messageFilter.getErrorDelete()));
+		if (!messageFilter.getErrorDelete()) {
+			toElement.setAttribute(FTPEpr.ERROR_DIR_TAG, messageFilter.getErrorDirectory());
+			toElement.setAttribute(FTPEpr.ERROR_SUFFIX_TAG, messageFilter.getErrorSuffix());
+		}
+		toElement.setAttribute(FTPEpr.PASSIVE_TAG, String.valueOf(messageFilter.getPassive()));
+		if (Protocol.SFTP.equals(messageFilter.getProtocol())) {
+			toElement.setAttribute(SFTPEpr.CERTIFICATE_TAG, messageFilter.getCertificateUrl());
+			toElement.setAttribute(SFTPEpr.PASSPHRASE_TAG, messageFilter.getCertificatePassphrase()) ;
+		}
+		if (Protocol.FTPS.equals(messageFilter.getProtocol())) {
+			toElement.setAttribute(FTPSEpr.CERTIFICATE_TAG, messageFilter.getCertificateUrl());
+			toElement.setAttribute(FTPSEpr.CERTIFICATE_NAME_TAG, messageFilter.getCertificateName());
+		}
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,147 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsListenerDocument.FsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument.FtpListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.GroovyListenerDocument.GroovyListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateListenerDocument.HibernateListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrListenerDocument.JbrListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlListenerDocument.SqlListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JcaGatewayDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.AbstractScheduledListener;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Gateway Listeners Configuration Generator.
- * <p/>
- * Generates a "ConfigTree" style configuration for the Gateways Listeners.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class GatewayGenerator {
-	
-	private static final Logger logger = Logger.getLogger(GatewayGenerator.class);
-
-    /**
-     * XMLBeans based configuration model instance.
-     */
-    private XMLBeansModel model;
-
-    /**
-     * Public constructor.
-     *
-     * @param model XMLBeans based configuration model instance.
-     */
-    public GatewayGenerator(XMLBeansModel model) {
-        this.model = model;
-    }
-
-    /**
-     * Generate the configuration DOM for the target Server.
-     *
-     * @return The configuration DOM.
-     * @throws ConfigurationException Error creating configuration.
-     */
-    public Document generate() throws ConfigurationException {
-        Document doc = YADOMUtil.createDocument();
-        Element root;
-
-        doc.appendChild(doc.createComment("\n\tNOTE: DO NOT MODIFY\n\tThis file was auto-generated.\n"));
-        root = YADOMUtil.addElement(doc, "jbossesb-gateways");
-        root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
-
-        List<Service> services = model.getServices();
-        HashMap<String, HashMap<String, String>> hm = new HashMap<String, HashMap<String, String>>();
-        for (Service service : services) {
-        	if (hm.containsKey(service.getCategory())) {
-        		HashMap<String, String> hc = hm.get(service.getCategory());
-        		
-        		if (hc.containsKey(service.getName())) {
-        			throw new ConfigurationException("Service names must be unique within a category.  "
-        					+ "The service name " + service.getName()
-        					+ " is already defined within the " + service.getCategory() + " category.");
-        		} else {
-        			hc.put(service.getName(), service.getName());
-        		}
-        	} else {
-        		HashMap <String,String> hc = new HashMap<String,String>();
-        		hc.put(service.getName(), service.getName());
-        		hm.put(service.getCategory(), hc);
-        	}
-        }
-        
-        // Iterate over all the gateway configs and map them to the gateway configuration...
-        List<Listener> gateways = model.getGatewayListeners();
-        for (Listener gateway : gateways) {
-            addGatewayConfig(root, gateway);
-        }
-
-        return doc;
-    }
-
-    /**
-     * Add a single gateway configuration node to configuration root.
-     *
-     * @param root    Configuration root node.
-     * @param gateway The Gateway Listener configuration to be added.
-     * @throws ConfigurationException Invalid listener configuration.
-     */
-    private void addGatewayConfig(Element root, Listener gateway) throws ConfigurationException {
-        Element listenerConfig;
-
-        // Of course we could do the following reflectively if we really want to - TODO perhaps!!
-        if (gateway instanceof JmsListener) {
-            listenerConfig = JmsListenerMapper.map(root, (JmsListener) gateway, model);
-        } else if (gateway instanceof FsListener) {
-            listenerConfig = FsListenerMapper.map(root, (FsListener) gateway, model);
-        } else if (gateway instanceof JcaGatewayDocument.JcaGateway) {
-            listenerConfig = JcaGatewayMapper.map(root, (JcaGatewayDocument.JcaGateway) gateway, model);
-        } else if (gateway instanceof FtpListener) {
-            listenerConfig = FtpListenerMapper.map(root, (FtpListener) gateway, model);
-        } else if (gateway instanceof SqlListener) {
-            listenerConfig = SqlListenerMapper.map(root, (SqlListener) gateway, model);
-        } else if (gateway instanceof JbrListener) {
-            listenerConfig = JbrListenerMapper.map(root, (JbrListener) gateway, model);
-        } else if (gateway instanceof GroovyListener) {
-            listenerConfig = GroovyListenerMapper.map(root, (GroovyListener) gateway, model);
-        } else if (gateway instanceof HibernateListener) {
-            listenerConfig = HibernateListenerMapper.map(root, (HibernateListener) gateway, model);
-        } else {
-            listenerConfig = UntypedListenerMapper.map(root, gateway, model);
-        }
-
-        if (gateway instanceof AbstractScheduledListener) {
-            ScheduleMapper.map(listenerConfig, (AbstractScheduledListener) gateway, model);
-        }
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GatewayGenerator.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,147 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FsListenerDocument.FsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument.FtpListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.GroovyListenerDocument.GroovyListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateListenerDocument.HibernateListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrListenerDocument.JbrListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlListenerDocument.SqlListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JcaGatewayDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.AbstractScheduledListener;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Gateway Listeners Configuration Generator.
+ * <p/>
+ * Generates a "ConfigTree" style configuration for the Gateways Listeners.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class GatewayGenerator {
+	
+	private static final Logger logger = Logger.getLogger(GatewayGenerator.class);
+
+    /**
+     * XMLBeans based configuration model instance.
+     */
+    private XMLBeansModel model;
+
+    /**
+     * Public constructor.
+     *
+     * @param model XMLBeans based configuration model instance.
+     */
+    public GatewayGenerator(XMLBeansModel model) {
+        this.model = model;
+    }
+
+    /**
+     * Generate the configuration DOM for the target Server.
+     *
+     * @return The configuration DOM.
+     * @throws ConfigurationException Error creating configuration.
+     */
+    public Document generate() throws ConfigurationException {
+        Document doc = YADOMUtil.createDocument();
+        Element root;
+
+        doc.appendChild(doc.createComment("\n\tNOTE: DO NOT MODIFY\n\tThis file was auto-generated.\n"));
+        root = YADOMUtil.addElement(doc, "jbossesb-gateways");
+        root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
+
+        List<Service> services = model.getServices();
+        HashMap<String, HashMap<String, String>> hm = new HashMap<String, HashMap<String, String>>();
+        for (Service service : services) {
+        	if (hm.containsKey(service.getCategory())) {
+        		HashMap<String, String> hc = hm.get(service.getCategory());
+        		
+        		if (hc.containsKey(service.getName())) {
+        			throw new ConfigurationException("Service names must be unique within a category.  "
+        					+ "The service name " + service.getName()
+        					+ " is already defined within the " + service.getCategory() + " category.");
+        		} else {
+        			hc.put(service.getName(), service.getName());
+        		}
+        	} else {
+        		HashMap <String,String> hc = new HashMap<String,String>();
+        		hc.put(service.getName(), service.getName());
+        		hm.put(service.getCategory(), hc);
+        	}
+        }
+        
+        // Iterate over all the gateway configs and map them to the gateway configuration...
+        List<Listener> gateways = model.getGatewayListeners();
+        for (Listener gateway : gateways) {
+            addGatewayConfig(root, gateway);
+        }
+
+        return doc;
+    }
+
+    /**
+     * Add a single gateway configuration node to configuration root.
+     *
+     * @param root    Configuration root node.
+     * @param gateway The Gateway Listener configuration to be added.
+     * @throws ConfigurationException Invalid listener configuration.
+     */
+    private void addGatewayConfig(Element root, Listener gateway) throws ConfigurationException {
+        Element listenerConfig;
+
+        // Of course we could do the following reflectively if we really want to - TODO perhaps!!
+        if (gateway instanceof JmsListener) {
+            listenerConfig = JmsListenerMapper.map(root, (JmsListener) gateway, model);
+        } else if (gateway instanceof FsListener) {
+            listenerConfig = FsListenerMapper.map(root, (FsListener) gateway, model);
+        } else if (gateway instanceof JcaGatewayDocument.JcaGateway) {
+            listenerConfig = JcaGatewayMapper.map(root, (JcaGatewayDocument.JcaGateway) gateway, model);
+        } else if (gateway instanceof FtpListener) {
+            listenerConfig = FtpListenerMapper.map(root, (FtpListener) gateway, model);
+        } else if (gateway instanceof SqlListener) {
+            listenerConfig = SqlListenerMapper.map(root, (SqlListener) gateway, model);
+        } else if (gateway instanceof JbrListener) {
+            listenerConfig = JbrListenerMapper.map(root, (JbrListener) gateway, model);
+        } else if (gateway instanceof GroovyListener) {
+            listenerConfig = GroovyListenerMapper.map(root, (GroovyListener) gateway, model);
+        } else if (gateway instanceof HibernateListener) {
+            listenerConfig = HibernateListenerMapper.map(root, (HibernateListener) gateway, model);
+        } else {
+            listenerConfig = UntypedListenerMapper.map(root, gateway, model);
+        }
+
+        if (gateway instanceof AbstractScheduledListener) {
+            ScheduleMapper.map(listenerConfig, (AbstractScheduledListener) gateway, model);
+        }
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,56 +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.mappers110;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.GroovyListenerDocument;
-import org.jboss.soa.esb.listeners.gateway.GroovyGateway;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.w3c.dom.Element;
-
-/**
- * Config mapper class for the Groovy Listener.
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class GroovyListenerMapper {
-
-    public static Element map(Element root, GroovyListenerDocument.GroovyListener listener, XMLBeansModel model) throws ConfigurationException {
-        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.
-        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
-
-        if(listener.getIsGateway()) {
-            listenerNode.setAttribute("gatewayClass", GroovyGateway.class.getName());
-        } else {
-            listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, GroovyGateway.class.getName());
-        }
-
-        listenerNode.setAttribute("script", listener.getScript());
-
-        return listenerNode;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/GroovyListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,56 @@
+/*
+ * 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.mappers110;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.GroovyListenerDocument;
+import org.jboss.soa.esb.listeners.gateway.GroovyGateway;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.w3c.dom.Element;
+
+/**
+ * Config mapper class for the Groovy Listener.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class GroovyListenerMapper {
+
+    public static Element map(Element root, GroovyListenerDocument.GroovyListener listener, XMLBeansModel model) throws ConfigurationException {
+        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.
+        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
+
+        if(listener.getIsGateway()) {
+            listenerNode.setAttribute("gatewayClass", GroovyGateway.class.getName());
+        } else {
+            listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, GroovyGateway.class.getName());
+        }
+
+        listenerNode.setAttribute("script", listener.getScript());
+
+        return listenerNode;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,121 +0,0 @@
-/*
- * 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.
- */
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import java.util.List;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.HibernateEpr;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateBusDocument.HibernateBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateListenerDocument.HibernateListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateMessageFilterDocument.HibernateMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateProviderDocument.HibernateProvider;
-import org.jboss.soa.esb.listeners.gateway.HibernateGatewayListener;
-import org.w3c.dom.Element;
-
-/**
- * Performs the mapping of a &lt;fs-listener&gt; XSD based configuration to the "ConfigTree"
- * style configuration, adding the "ConfigTree" listener config to the "root" node.
- * 
- * @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
- */
-public class HibernateListenerMapper {
-
-	/**
-	 * Perform the mapping.
-	 * @param root The "ConfigTree" configuration root node.
-	 * @param listener The Jmslistener to be mapped into the ConfigTree.
-	 * @param model The configuration model from which the mapping is being performed.
-	 * @return The ConfigTree listener configuration node.
-	 * @throws ConfigurationException Invalid listener configuration.
-	 */
-	public static Element map(Element root, HibernateListener listener, XMLBeansModel model) throws ConfigurationException {
-		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) {
-			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <hibernate-listener> must reference a <hibernate-bus>.");
-		}
-		try {
-			provider = (HibernateProvider) model.getProvider(bus);
-		} catch (ClassCastException e) {
-			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <hibernate-provider> instance.  Unexpected exception - this should have caused a validation error!");
-		}
-		
-		List<HibernateMessageFilter> messageFilters = null;
-		messageFilters = listener.getHibernateMessageFilterList();
-		
-		if(messageFilters.size() == 0) {
-			messageFilters = bus.getHibernateMessageFilterList();
-			if(messageFilters == null) {
-				throw new ConfigurationException("No <hibernate-message-filter> defined on either <hibernate-listener> [" + listener.getName() + "] or <hibernate-bus> [" + bus.getBusid() + "].");
-			}
-		}
-		// 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.
-		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
-		if(listener.getIsGateway()) {
-			listenerNode.setAttribute("gatewayClass", HibernateGatewayListener.class.getName());
-			// Map EPR related attributes onto the listener - from the bus and provider and listener.
-			// Note: This will change - the Gateways will also support the EPR element...
-			mapHibernateEprProperties(listenerNode, provider, messageFilters);
-			MapperUtil.mapEPRProperties(listener, listenerNode, model);
-		} else {
-			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
-			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
-			mapHibernateEprProperties(eprNode, provider, messageFilters);
-			MapperUtil.mapEPRProperties(listener, eprNode, model);
-			// Remove any empty attributes set on the EPR config...
-			YADOMUtil.removeEmptyAttributes(eprNode);
-		}
-		
-		// Remove any empty attributes set on the listener config...
-		YADOMUtil.removeEmptyAttributes(listenerNode);
-		
-		return listenerNode;
-	}
-
-	/**
-	 * mapHibernateEprProperties creates a ConfigTree with the details we need
-	 * from the HibernateProvider and MessageFilters.
-	 * @param toElement the element we are passing on
-	 * @param provider the provider object
-	 * @param messageFilters collection of MessageFilters we need to implement
-	 */
-	private static void mapHibernateEprProperties(Element toElement, HibernateProvider provider, List<HibernateMessageFilter> messageFilters) {
-		toElement.setAttribute(HibernateEpr.HIBERNATE_CFG_TAG, provider.getHibernateCfgFile());
-		for (HibernateMessageFilter messageFilter: messageFilters) {	
-			Element temp = YADOMUtil.addElement(toElement, "messagefilter");
-			temp.setAttribute(HibernateEpr.CLASS_NAME_TAG, messageFilter.getClassname());
-			temp.setAttribute(HibernateEpr.EVENT_TAG, messageFilter.getEvent());
-			toElement.appendChild(temp);
-		}
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/HibernateListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,121 @@
+/*
+ * 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.
+ */
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import java.util.List;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.HibernateEpr;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateBusDocument.HibernateBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateListenerDocument.HibernateListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateMessageFilterDocument.HibernateMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.HibernateProviderDocument.HibernateProvider;
+import org.jboss.soa.esb.listeners.gateway.HibernateGatewayListener;
+import org.w3c.dom.Element;
+
+/**
+ * Performs the mapping of a &lt;fs-listener&gt; XSD based configuration to the "ConfigTree"
+ * style configuration, adding the "ConfigTree" listener config to the "root" node.
+ * 
+ * @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
+ */
+public class HibernateListenerMapper {
+
+	/**
+	 * Perform the mapping.
+	 * @param root The "ConfigTree" configuration root node.
+	 * @param listener The Jmslistener to be mapped into the ConfigTree.
+	 * @param model The configuration model from which the mapping is being performed.
+	 * @return The ConfigTree listener configuration node.
+	 * @throws ConfigurationException Invalid listener configuration.
+	 */
+	public static Element map(Element root, HibernateListener listener, XMLBeansModel model) throws ConfigurationException {
+		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) {
+			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <hibernate-listener> must reference a <hibernate-bus>.");
+		}
+		try {
+			provider = (HibernateProvider) model.getProvider(bus);
+		} catch (ClassCastException e) {
+			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <hibernate-provider> instance.  Unexpected exception - this should have caused a validation error!");
+		}
+		
+		List<HibernateMessageFilter> messageFilters = null;
+		messageFilters = listener.getHibernateMessageFilterList();
+		
+		if(messageFilters.size() == 0) {
+			messageFilters = bus.getHibernateMessageFilterList();
+			if(messageFilters == null) {
+				throw new ConfigurationException("No <hibernate-message-filter> defined on either <hibernate-listener> [" + listener.getName() + "] or <hibernate-bus> [" + bus.getBusid() + "].");
+			}
+		}
+		// 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.
+		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
+		if(listener.getIsGateway()) {
+			listenerNode.setAttribute("gatewayClass", HibernateGatewayListener.class.getName());
+			// Map EPR related attributes onto the listener - from the bus and provider and listener.
+			// Note: This will change - the Gateways will also support the EPR element...
+			mapHibernateEprProperties(listenerNode, provider, messageFilters);
+			MapperUtil.mapEPRProperties(listener, listenerNode, model);
+		} else {
+			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
+			mapHibernateEprProperties(eprNode, provider, messageFilters);
+			MapperUtil.mapEPRProperties(listener, eprNode, model);
+			// Remove any empty attributes set on the EPR config...
+			YADOMUtil.removeEmptyAttributes(eprNode);
+		}
+		
+		// Remove any empty attributes set on the listener config...
+		YADOMUtil.removeEmptyAttributes(listenerNode);
+		
+		return listenerNode;
+	}
+
+	/**
+	 * mapHibernateEprProperties creates a ConfigTree with the details we need
+	 * from the HibernateProvider and MessageFilters.
+	 * @param toElement the element we are passing on
+	 * @param provider the provider object
+	 * @param messageFilters collection of MessageFilters we need to implement
+	 */
+	private static void mapHibernateEprProperties(Element toElement, HibernateProvider provider, List<HibernateMessageFilter> messageFilters) {
+		toElement.setAttribute(HibernateEpr.HIBERNATE_CFG_TAG, provider.getHibernateCfgFile());
+		for (HibernateMessageFilter messageFilter: messageFilters) {	
+			Element temp = YADOMUtil.addElement(toElement, "messagefilter");
+			temp.setAttribute(HibernateEpr.CLASS_NAME_TAG, messageFilter.getClassname());
+			temp.setAttribute(HibernateEpr.EVENT_TAG, messageFilter.getEvent());
+			toElement.appendChild(temp);
+		}
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,87 +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.mappers110;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrBusDocument.JbrBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrListenerDocument.JbrListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrProviderDocument.JbrProvider;
-import org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener;
-import org.w3c.dom.Element;
-
-/**
- * JBoss Remoting listener mapper.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class JbrListenerMapper {
-
-    /**
-     * Perform the mapping.
-     * @param root The "ConfigTree" configuration root node.
-     * @param listener JBoss Remoting listener config.
-     * @param model The configuration model from which the mapping is being performed.
-     * @return The ConfigTree listener configuration node.
-     * @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");
-        JbrBus bus;
-        JbrProvider provider;
-
-        listenerNode.setAttribute("name", listener.getName());
-
-        try {
-            bus = (JbrBus) model.getBus(listener.getBusidref());
-        } catch (ClassCastException e) {
-            throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <jbr-listener> must reference a <jbr-bus>.");
-        }
-        try {
-            provider = (JbrProvider) model.getProvider(bus);
-        } catch (ClassCastException e) {
-            throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <jbr-provider> instance.  Unexpected exception - this should have caused a validation error!");
-        }
-
-        // 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.
-        MapperUtil.mapProperties(provider.getPropertyList(), listenerNode);
-        MapperUtil.mapProperties(bus.getPropertyList(), listenerNode);
-        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
-
-        if(listener.getIsGateway()) {
-            String host = provider.getHost();
-
-            listenerNode.setAttribute("gatewayClass", JBossRemotingGatewayListener.class.getName());
-			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
-
-            if(host != null) {
-                listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_HOST, host);
-            }
-            listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_PROTOCOL, provider.getProtocol().toString());
-            listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_PORT, Integer.toString(bus.getPort()));
-        } else {
-            throw new ConfigurationException("Invalid <jbr-listener> config [" + listener.getName() + "].  <jbr-listener> is currently only supported as a gateway listener.");
-        }
-
-        return listenerNode;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JbrListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,87 @@
+/*
+ * 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.mappers110;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrBusDocument.JbrBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrListenerDocument.JbrListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbrProviderDocument.JbrProvider;
+import org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener;
+import org.w3c.dom.Element;
+
+/**
+ * JBoss Remoting listener mapper.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JbrListenerMapper {
+
+    /**
+     * Perform the mapping.
+     * @param root The "ConfigTree" configuration root node.
+     * @param listener JBoss Remoting listener config.
+     * @param model The configuration model from which the mapping is being performed.
+     * @return The ConfigTree listener configuration node.
+     * @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");
+        JbrBus bus;
+        JbrProvider provider;
+
+        listenerNode.setAttribute("name", listener.getName());
+
+        try {
+            bus = (JbrBus) model.getBus(listener.getBusidref());
+        } catch (ClassCastException e) {
+            throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <jbr-listener> must reference a <jbr-bus>.");
+        }
+        try {
+            provider = (JbrProvider) model.getProvider(bus);
+        } catch (ClassCastException e) {
+            throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <jbr-provider> instance.  Unexpected exception - this should have caused a validation error!");
+        }
+
+        // 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.
+        MapperUtil.mapProperties(provider.getPropertyList(), listenerNode);
+        MapperUtil.mapProperties(bus.getPropertyList(), listenerNode);
+        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
+
+        if(listener.getIsGateway()) {
+            String host = provider.getHost();
+
+            listenerNode.setAttribute("gatewayClass", JBossRemotingGatewayListener.class.getName());
+			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+
+            if(host != null) {
+                listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_HOST, host);
+            }
+            listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_PROTOCOL, provider.getProtocol().toString());
+            listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_PORT, Integer.toString(bus.getPort()));
+        } else {
+            throw new ConfigurationException("Invalid <jbr-listener> config [" + listener.getName() + "].  <jbr-listener> is currently only supported as a gateway listener.");
+        }
+
+        return listenerNode;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,67 +0,0 @@
-/*
-* 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.
-*/
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JcaGatewayDocument.JcaGateway;
-import org.jboss.soa.esb.listeners.jca.JcaInflowGateway;
-import org.w3c.dom.Element;
-
-/**
- * comment
- *
- * @author <a href="bill at jboss.com">Bill Burke</a>
- * @version $Revision$
- */
-public class JcaGatewayMapper
-{
-   public static Element map(Element root, JcaGateway gateway, XMLBeansModel model) throws ConfigurationException
-   {
-      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());
-      listenerNode.setAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG, service.getName());
-
-      listenerNode.setAttribute("adapter", gateway.getAdapter());
-      listenerNode.setAttribute("endpointClass", gateway.getEndpointClass());
-      listenerNode.setAttribute("messagingType", gateway.getMessagingType());
-      listenerNode.setAttribute("jcaBridge", gateway.getJcaBridge());
-      listenerNode.setAttribute("transacted", gateway.getTransacted());
-
-      MapperUtil.mapProperties(gateway.getPropertyList(), listenerNode);
-      listenerNode.setAttribute("gatewayClass", JcaInflowGateway.class.getName());
-      Element activationConfig = YADOMUtil.addElement(listenerNode, "activation-config");
-      MapperUtil.serialize(gateway.getActivationConfig(), activationConfig);
-
-
-      YADOMUtil.removeEmptyAttributes(listenerNode);
-      return listenerNode;
-   }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JcaGatewayMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,67 @@
+/*
+* 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.
+*/
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JcaGatewayDocument.JcaGateway;
+import org.jboss.soa.esb.listeners.jca.JcaInflowGateway;
+import org.w3c.dom.Element;
+
+/**
+ * comment
+ *
+ * @author <a href="bill at jboss.com">Bill Burke</a>
+ * @version $Revision$
+ */
+public class JcaGatewayMapper
+{
+   public static Element map(Element root, JcaGateway gateway, XMLBeansModel model) throws ConfigurationException
+   {
+      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());
+      listenerNode.setAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG, service.getName());
+
+      listenerNode.setAttribute("adapter", gateway.getAdapter());
+      listenerNode.setAttribute("endpointClass", gateway.getEndpointClass());
+      listenerNode.setAttribute("messagingType", gateway.getMessagingType());
+      listenerNode.setAttribute("jcaBridge", gateway.getJcaBridge());
+      listenerNode.setAttribute("transacted", gateway.getTransacted());
+
+      MapperUtil.mapProperties(gateway.getPropertyList(), listenerNode);
+      listenerNode.setAttribute("gatewayClass", JcaInflowGateway.class.getName());
+      Element activationConfig = YADOMUtil.addElement(listenerNode, "activation-config");
+      MapperUtil.serialize(gateway.getActivationConfig(), activationConfig);
+
+
+      YADOMUtil.removeEmptyAttributes(listenerNode);
+      return listenerNode;
+   }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,299 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.Queue;
-import javax.jms.Topic;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsProviderType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActivationConfigDocument.ActivationConfig;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsBusDocument.JmsBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsJcaProviderDocument.JmsJcaProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsMessageFilterDocument.JmsMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsMessageFilterDocument.JmsMessageFilter.DestType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
-import org.jboss.soa.esb.listeners.gateway.JmsGatewayListener;
-import org.jboss.soa.esb.listeners.gateway.PackageJmsMessageContents;
-import org.jboss.soa.esb.listeners.jca.JcaConstants;
-import org.jboss.soa.esb.listeners.jca.JcaGatewayListener;
-import org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter;
-import org.jboss.soa.esb.listeners.jca.JcaJMSMessageAwareComposer;
-import org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * Performs the mapping of a &lt;jms-listener&gt; XSD based configuration to the "ConfigTree"
- * style configuration, adding the "ConfigTree" listener config to the "root" node.
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class JmsListenerMapper {
-	
-	@SuppressWarnings("unused")
-	private static Logger log = Logger.getLogger( JmsListenerMapper.class );
-
-	/**
-	 * Perform the mapping.
-	 * @param root The "ConfigTree" configuration root node.
-	 * @param listener The Jmslistener to be mapped into the ConfigTree.
-	 * @param model The configuration model from which the mapping is being performed.
-	 * @return The ConfigTree listener configuration node.
-	 * @throws ConfigurationException Invalid listener configuration.
-	 */
-	public static Element map(Element root, JmsListener listener, XMLBeansModel model) throws ConfigurationException {
-		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) {
-			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <jms-listener> must reference a <jms-bus>.");
-		}
-		try {
-			provider = (JmsProviderType) model.getProvider(bus);
-		} catch (ClassCastException e) {
-			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <jms-provider> instance.  Unexpected exception - this should have caused a validation error!");
-		}
-		
-		JmsMessageFilter messageFilter = listener.getJmsMessageFilter();
-		if(messageFilter == null) {
-			messageFilter = bus.getJmsMessageFilter();
-			if(messageFilter == null) {
-				throw new ConfigurationException("No <jms-detination> defined on either <jms-listener> [" + listener.getName() + "] or <jms-bus> [" + bus.getBusid() + "].");
-			}
-		}
-		
-		final Class<?> gatewayClass ;
-		if (provider instanceof JmsJcaProvider) {
-		    final JmsJcaProvider jmsJcaProvider = (JmsJcaProvider)provider ;
-                    mapJmsJcaAttributes(listener, listenerNode, jmsJcaProvider, messageFilter) ;
-		    gatewayClass = JcaGatewayListener.class ;
-		} else {
-		    gatewayClass = JmsGatewayListener.class ;
-		}
-		
-		// 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.
-		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
-		if(listener.getIsGateway()) {
-
-			listenerNode.setAttribute("gatewayClass", gatewayClass.getName());
-			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
-
-			// Map EPR related attributes onto the listener - from the bus and provider and listener.
-			// Note: This will change - the Gateways will also support the EPR element...
-			mapJmsEprProperties(listenerNode, provider, messageFilter);
-                        listenerNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, JMSEpr.JMS_PROTOCOL);
-                        
-			MapperUtil.mapEPRProperties(listener, listenerNode, model);
-		} else {
-			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
-
-			
-			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
-			mapJmsEprProperties(eprNode, provider, messageFilter);
-			eprNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, JMSEpr.JMS_PROTOCOL);
-
-			MapperUtil.mapEPRProperties(listener, eprNode, model);
-			// Remove any empty attributes set on the EPR config...
-			YADOMUtil.removeEmptyAttributes(eprNode);
-		}
-		
-		// Remove any empty attributes set on the listener config...
-		YADOMUtil.removeEmptyAttributes(listenerNode);
-		
-		return listenerNode;
-	}
-
-    private static void mapJmsEprProperties(Element toElement, JmsProviderType provider, JmsMessageFilter messageFilter) {
-		if(messageFilter.getDestType() == JmsMessageFilter.DestType.QUEUE) {
-            toElement.setAttribute(JMSEpr.DESTINATION_TYPE_TAG, JMSEpr.QUEUE_TYPE);
-        } else {
-            toElement.setAttribute(JMSEpr.DESTINATION_TYPE_TAG, JMSEpr.TOPIC_TYPE);
-        }
-        toElement.setAttribute(JMSEpr.DESTINATION_NAME_TAG, messageFilter.getDestName());
-		toElement.setAttribute(JMSEpr.MESSAGE_SELECTOR_TAG, messageFilter.getSelector());
-		toElement.setAttribute(JMSEpr.CONNECTION_FACTORY_TAG, provider.getConnectionFactory());
-		toElement.setAttribute(JMSEpr.JNDI_CONTEXT_FACTORY_TAG, provider.getJndiContextFactory());
-		toElement.setAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG, provider.getJndiPkgPrefix());
-		toElement.setAttribute(JMSEpr.JNDI_URL_TAG, provider.getJndiURL());
-		toElement.setAttribute(JMSEpr.PERSISTENT_TAG, Boolean.toString( messageFilter.getPersistent()));
-		toElement.setAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG, messageFilter.getAcknowledgeMode());
-		toElement.setAttribute(JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, messageFilter.getJmsSecurityPrincipal());
-		toElement.setAttribute(JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, messageFilter.getJmsSecurityCredential());
-		toElement.setAttribute(JMSEpr.TRANSACTED_TAG, Boolean.toString( messageFilter.getTransacted()));
-	}
-    
-    /*
-     * @throws ConfigurationException is one of the following activation-config
-     * properties are overridden:
-     * 	- destination
-     * 	- destinationType
-     * 	- messageSelector
-     * 	- maxMessages
-     */
-    private static void mapJmsJcaAttributes(final JmsListener listener,
-        final Element listenerNode, final JmsJcaProvider jmsJcaProvider,
-        final JmsMessageFilter messageFilter)
-        throws ConfigurationException {
-        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_ADAPTER,
-            jmsJcaProvider.getAdapter(), "jms-ra.rar") ;
-        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_ENDPOINT_CLASS,
-            jmsJcaProvider.getEndpointClass(), JcaJMSInflowMessageProcessorAdapter.class.getName()) ;
-        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_MESSAGING_TYPE,
-            jmsJcaProvider.getMessagingType()) ;
-        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_JCA_BRIDGE,
-            jmsJcaProvider.getJcaBridge()) ;
-        final boolean transacted ;
-        if (jmsJcaProvider.isSetTransacted())
-        {
-            transacted = jmsJcaProvider.getTransacted() ;
-        }
-        else
-        {
-            transacted = true ;
-        }
-        
-        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_TRANSACTED,
-            Boolean.toString(transacted)) ;
-        
-        if (listener.getIsGateway())
-        {
-            setAttribute(listenerNode, ListenerTagNames.GATEWAY_COMPOSER_CLASS_TAG,
-                PackageJmsMessageContents.class.getName()) ;
-            setAttribute(listenerNode, ListenerTagNames.GATEWAY_COMPOSER_METHOD_TAG,
-                "process") ;
-        }
-        else
-        {
-            setAttribute(listenerNode, ListenerTagNames.LISTENER_CLASS_TAG,
-                JcaMessageAwareListener.class.getName()) ;
-            setAttribute(listenerNode, JcaConstants.ATTRIBUTE_LISTENER_COMPOSER_CLASS,
-                JcaJMSMessageAwareComposer.class.getName()) ;
-        }
-        
-        final Element activationConfigElement = YADOMUtil.addElement(listenerNode, JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
-         addPropertyElement(activationConfigElement, "destination", messageFilter.getDestName()) ;
-        if (jmsJcaProvider.isSetProviderAdapterJNDI())
-        {
-            addPropertyElement(activationConfigElement, "providerAdapterJNDI", jmsJcaProvider.getProviderAdapterJNDI()) ;
-        }
-        final int destType = messageFilter.getDestType().intValue() ;
-        if (destType == DestType.INT_QUEUE)
-        {
-            addPropertyElement(activationConfigElement, "destinationType", Queue.class.getName()) ;
-        }
-        else if (destType == DestType.INT_TOPIC)
-        {
-            addPropertyElement(activationConfigElement, "destinationType", Topic.class.getName()) ;
-        }
-        else
-        {
-            throw new ConfigurationException("Unknown destination type: " + messageFilter.getDestType()) ;
-        }
-        
-        if (messageFilter.getSelector() != null)
-        {
-            addPropertyElement(activationConfigElement, "messageSelector", messageFilter.getSelector()) ;
-        }
-        if (listener.getMaxThreads() > 0)
-        {
-            addPropertyElement(activationConfigElement, "maxMessages", Integer.toString(listener.getMaxThreads())) ;
-        }
-        
-		final List<String> defaultPropertyNames = getDefaultActivationConfigNames( activationConfigElement );
-		log.debug("Default activation-config properties :" + defaultPropertyNames );
-        
-		/*
-		 * 	add user activation-config properties specified in the provider element.
-		 */
-        ActivationConfig activationConfig = jmsJcaProvider.getActivationConfig();
-        if ( activationConfig != null )
-        {
-            List<Property> propertyList = activationConfig.getPropertyList();
-            for (Iterator<Property> iterator = propertyList.iterator(); iterator.hasNext();)
-    		{
-    			Property prop = iterator.next();
-    			if ( defaultPropertyNames.contains( prop.getName() ))
-        			throw new ConfigurationException( "activation-config already contains [" + prop.getName() + "], which cannot be overridden");
-    			
-                addPropertyElement(activationConfigElement, prop.getName(), prop.getValue()) ;
-    		}
-        }
-    }
-    
-    private static List<String> getDefaultActivationConfigNames(final Element activationConfigElement )
-    {
-		NodeList defaultActivationProperties = activationConfigElement.getElementsByTagName( "property" );
-		final List<String> defaultPropertyNames = new ArrayList<String>(5);
-		for (int i = defaultActivationProperties.getLength() ; i-->0 ; )
-			defaultPropertyNames.add(defaultActivationProperties.item( i ).getAttributes().getNamedItem( "name" ).getNodeValue() );
-		
-		return defaultPropertyNames;
-    }
-
-    private static void setAttribute(final Element listenerNode,
-        final String name, final String value)
-    {
-        if (value != null)
-        {
-            listenerNode.setAttribute(name, value) ;
-        }
-    }
-
-    private static void setAttribute(final Element listenerNode,
-        final String name, final String value, final String defaultValue)
-    {
-        if (value == null)
-        {
-            listenerNode.setAttribute(name, defaultValue) ;
-        }
-        else
-        {
-            listenerNode.setAttribute(name, value) ;
-        }
-    }
-
-    private static void addPropertyElement(final Element activationConfigElement,
-        final String name, final String value)
-    {
-        final Element propertyElement = YADOMUtil.addElement(activationConfigElement,
-            JcaConstants.ELEMENT_PROPERTY) ;
-        propertyElement.setAttribute("name", name) ;
-        propertyElement.setAttribute("value", value) ;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,299 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsProviderType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActivationConfigDocument.ActivationConfig;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsBusDocument.JmsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsJcaProviderDocument.JmsJcaProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsMessageFilterDocument.JmsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsMessageFilterDocument.JmsMessageFilter.DestType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.gateway.JmsGatewayListener;
+import org.jboss.soa.esb.listeners.gateway.PackageJmsMessageContents;
+import org.jboss.soa.esb.listeners.jca.JcaConstants;
+import org.jboss.soa.esb.listeners.jca.JcaGatewayListener;
+import org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter;
+import org.jboss.soa.esb.listeners.jca.JcaJMSMessageAwareComposer;
+import org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * Performs the mapping of a &lt;jms-listener&gt; XSD based configuration to the "ConfigTree"
+ * style configuration, adding the "ConfigTree" listener config to the "root" node.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JmsListenerMapper {
+	
+	@SuppressWarnings("unused")
+	private static Logger log = Logger.getLogger( JmsListenerMapper.class );
+
+	/**
+	 * Perform the mapping.
+	 * @param root The "ConfigTree" configuration root node.
+	 * @param listener The Jmslistener to be mapped into the ConfigTree.
+	 * @param model The configuration model from which the mapping is being performed.
+	 * @return The ConfigTree listener configuration node.
+	 * @throws ConfigurationException Invalid listener configuration.
+	 */
+	public static Element map(Element root, JmsListener listener, XMLBeansModel model) throws ConfigurationException {
+		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) {
+			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <jms-listener> must reference a <jms-bus>.");
+		}
+		try {
+			provider = (JmsProviderType) model.getProvider(bus);
+		} catch (ClassCastException e) {
+			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <jms-provider> instance.  Unexpected exception - this should have caused a validation error!");
+		}
+		
+		JmsMessageFilter messageFilter = listener.getJmsMessageFilter();
+		if(messageFilter == null) {
+			messageFilter = bus.getJmsMessageFilter();
+			if(messageFilter == null) {
+				throw new ConfigurationException("No <jms-detination> defined on either <jms-listener> [" + listener.getName() + "] or <jms-bus> [" + bus.getBusid() + "].");
+			}
+		}
+		
+		final Class<?> gatewayClass ;
+		if (provider instanceof JmsJcaProvider) {
+		    final JmsJcaProvider jmsJcaProvider = (JmsJcaProvider)provider ;
+                    mapJmsJcaAttributes(listener, listenerNode, jmsJcaProvider, messageFilter) ;
+		    gatewayClass = JcaGatewayListener.class ;
+		} else {
+		    gatewayClass = JmsGatewayListener.class ;
+		}
+		
+		// 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.
+		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
+		if(listener.getIsGateway()) {
+
+			listenerNode.setAttribute("gatewayClass", gatewayClass.getName());
+			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+
+			// Map EPR related attributes onto the listener - from the bus and provider and listener.
+			// Note: This will change - the Gateways will also support the EPR element...
+			mapJmsEprProperties(listenerNode, provider, messageFilter);
+                        listenerNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, JMSEpr.JMS_PROTOCOL);
+                        
+			MapperUtil.mapEPRProperties(listener, listenerNode, model);
+		} else {
+			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+
+			
+			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
+			mapJmsEprProperties(eprNode, provider, messageFilter);
+			eprNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, JMSEpr.JMS_PROTOCOL);
+
+			MapperUtil.mapEPRProperties(listener, eprNode, model);
+			// Remove any empty attributes set on the EPR config...
+			YADOMUtil.removeEmptyAttributes(eprNode);
+		}
+		
+		// Remove any empty attributes set on the listener config...
+		YADOMUtil.removeEmptyAttributes(listenerNode);
+		
+		return listenerNode;
+	}
+
+    private static void mapJmsEprProperties(Element toElement, JmsProviderType provider, JmsMessageFilter messageFilter) {
+		if(messageFilter.getDestType() == JmsMessageFilter.DestType.QUEUE) {
+            toElement.setAttribute(JMSEpr.DESTINATION_TYPE_TAG, JMSEpr.QUEUE_TYPE);
+        } else {
+            toElement.setAttribute(JMSEpr.DESTINATION_TYPE_TAG, JMSEpr.TOPIC_TYPE);
+        }
+        toElement.setAttribute(JMSEpr.DESTINATION_NAME_TAG, messageFilter.getDestName());
+		toElement.setAttribute(JMSEpr.MESSAGE_SELECTOR_TAG, messageFilter.getSelector());
+		toElement.setAttribute(JMSEpr.CONNECTION_FACTORY_TAG, provider.getConnectionFactory());
+		toElement.setAttribute(JMSEpr.JNDI_CONTEXT_FACTORY_TAG, provider.getJndiContextFactory());
+		toElement.setAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG, provider.getJndiPkgPrefix());
+		toElement.setAttribute(JMSEpr.JNDI_URL_TAG, provider.getJndiURL());
+		toElement.setAttribute(JMSEpr.PERSISTENT_TAG, Boolean.toString( messageFilter.getPersistent()));
+		toElement.setAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG, messageFilter.getAcknowledgeMode());
+		toElement.setAttribute(JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, messageFilter.getJmsSecurityPrincipal());
+		toElement.setAttribute(JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, messageFilter.getJmsSecurityCredential());
+		toElement.setAttribute(JMSEpr.TRANSACTED_TAG, Boolean.toString( messageFilter.getTransacted()));
+	}
+    
+    /*
+     * @throws ConfigurationException is one of the following activation-config
+     * properties are overridden:
+     * 	- destination
+     * 	- destinationType
+     * 	- messageSelector
+     * 	- maxMessages
+     */
+    private static void mapJmsJcaAttributes(final JmsListener listener,
+        final Element listenerNode, final JmsJcaProvider jmsJcaProvider,
+        final JmsMessageFilter messageFilter)
+        throws ConfigurationException {
+        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_ADAPTER,
+            jmsJcaProvider.getAdapter(), "jms-ra.rar") ;
+        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_ENDPOINT_CLASS,
+            jmsJcaProvider.getEndpointClass(), JcaJMSInflowMessageProcessorAdapter.class.getName()) ;
+        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_MESSAGING_TYPE,
+            jmsJcaProvider.getMessagingType()) ;
+        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_JCA_BRIDGE,
+            jmsJcaProvider.getJcaBridge()) ;
+        final boolean transacted ;
+        if (jmsJcaProvider.isSetTransacted())
+        {
+            transacted = jmsJcaProvider.getTransacted() ;
+        }
+        else
+        {
+            transacted = true ;
+        }
+        
+        setAttribute(listenerNode, JcaConstants.ATTRIBUTE_TRANSACTED,
+            Boolean.toString(transacted)) ;
+        
+        if (listener.getIsGateway())
+        {
+            setAttribute(listenerNode, ListenerTagNames.GATEWAY_COMPOSER_CLASS_TAG,
+                PackageJmsMessageContents.class.getName()) ;
+            setAttribute(listenerNode, ListenerTagNames.GATEWAY_COMPOSER_METHOD_TAG,
+                "process") ;
+        }
+        else
+        {
+            setAttribute(listenerNode, ListenerTagNames.LISTENER_CLASS_TAG,
+                JcaMessageAwareListener.class.getName()) ;
+            setAttribute(listenerNode, JcaConstants.ATTRIBUTE_LISTENER_COMPOSER_CLASS,
+                JcaJMSMessageAwareComposer.class.getName()) ;
+        }
+        
+        final Element activationConfigElement = YADOMUtil.addElement(listenerNode, JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
+         addPropertyElement(activationConfigElement, "destination", messageFilter.getDestName()) ;
+        if (jmsJcaProvider.isSetProviderAdapterJNDI())
+        {
+            addPropertyElement(activationConfigElement, "providerAdapterJNDI", jmsJcaProvider.getProviderAdapterJNDI()) ;
+        }
+        final int destType = messageFilter.getDestType().intValue() ;
+        if (destType == DestType.INT_QUEUE)
+        {
+            addPropertyElement(activationConfigElement, "destinationType", Queue.class.getName()) ;
+        }
+        else if (destType == DestType.INT_TOPIC)
+        {
+            addPropertyElement(activationConfigElement, "destinationType", Topic.class.getName()) ;
+        }
+        else
+        {
+            throw new ConfigurationException("Unknown destination type: " + messageFilter.getDestType()) ;
+        }
+        
+        if (messageFilter.getSelector() != null)
+        {
+            addPropertyElement(activationConfigElement, "messageSelector", messageFilter.getSelector()) ;
+        }
+        if (listener.getMaxThreads() > 0)
+        {
+            addPropertyElement(activationConfigElement, "maxMessages", Integer.toString(listener.getMaxThreads())) ;
+        }
+        
+		final List<String> defaultPropertyNames = getDefaultActivationConfigNames( activationConfigElement );
+		log.debug("Default activation-config properties :" + defaultPropertyNames );
+        
+		/*
+		 * 	add user activation-config properties specified in the provider element.
+		 */
+        ActivationConfig activationConfig = jmsJcaProvider.getActivationConfig();
+        if ( activationConfig != null )
+        {
+            List<Property> propertyList = activationConfig.getPropertyList();
+            for (Iterator<Property> iterator = propertyList.iterator(); iterator.hasNext();)
+    		{
+    			Property prop = iterator.next();
+    			if ( defaultPropertyNames.contains( prop.getName() ))
+        			throw new ConfigurationException( "activation-config already contains [" + prop.getName() + "], which cannot be overridden");
+    			
+                addPropertyElement(activationConfigElement, prop.getName(), prop.getValue()) ;
+    		}
+        }
+    }
+    
+    private static List<String> getDefaultActivationConfigNames(final Element activationConfigElement )
+    {
+		NodeList defaultActivationProperties = activationConfigElement.getElementsByTagName( "property" );
+		final List<String> defaultPropertyNames = new ArrayList<String>(5);
+		for (int i = defaultActivationProperties.getLength() ; i-->0 ; )
+			defaultPropertyNames.add(defaultActivationProperties.item( i ).getAttributes().getNamedItem( "name" ).getNodeValue() );
+		
+		return defaultPropertyNames;
+    }
+
+    private static void setAttribute(final Element listenerNode,
+        final String name, final String value)
+    {
+        if (value != null)
+        {
+            listenerNode.setAttribute(name, value) ;
+        }
+    }
+
+    private static void setAttribute(final Element listenerNode,
+        final String name, final String value, final String defaultValue)
+    {
+        if (value == null)
+        {
+            listenerNode.setAttribute(name, defaultValue) ;
+        }
+        else
+        {
+            listenerNode.setAttribute(name, value) ;
+        }
+    }
+
+    private static void addPropertyElement(final Element activationConfigElement,
+        final String name, final String value)
+    {
+        final Element propertyElement = YADOMUtil.addElement(activationConfigElement,
+            JcaConstants.ELEMENT_PROPERTY) ;
+        propertyElement.setAttribute("name", name) ;
+        propertyElement.setAttribute("value", value) ;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,178 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import java.util.List;
-
-import org.apache.xmlbeans.XmlCursor;
-import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlCursor.TokenType;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Bus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.jboss.soa.esb.listeners.message.MessageAwareListener;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Mapper utility methods.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public abstract class MapperUtil {
-
-	/**
-	 * Map all default listener attributes onto the target listener ConfigTree.
-	 * @param listener The listener configuration instance.
-	 * @param listenerNode The target DOM ConfigTree listener element.
-	 * @param model The model.
-	 */
-    protected static void mapDefaultAttributes(Listener listener, Element listenerNode, XMLBeansModel model) {
-        Service service = model.getService(listener);
-        boolean isGateway = listener.getIsGateway();
-
-        // Map maxThreads - appears to be a JMS only attrib...
-        listenerNode.setAttribute(ListenerTagNames.MAX_THREADS_TAG, String.valueOf(listener.getMaxThreads()));
-
-        mapListenerServiceAttributes(listenerNode, service, isGateway);
-        if (!isGateway && !listenerNode.hasAttribute(ListenerTagNames.LISTENER_CLASS_TAG)) {
-            listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, MessageAwareListener.class.getName());
-        }
-    }
-
-    /**
-     * Map the Service specific attributes onto the listener configuration.
-     * @param listenerNode The listener config node.
-     * @param service The Service details (from the model).
-     * @param isGateway True if the listener is a gateway, otherwise false.
-     */
-    public static void mapListenerServiceAttributes(Element listenerNode, Service service, boolean isGateway) {
-        listenerNode.setAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG, service.getDescription());
-        if (isGateway) {
-            listenerNode.setAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, service.getCategory());
-            listenerNode.setAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG, service.getName());
-        } else {
-            listenerNode.setAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, service.getCategory());
-            listenerNode.setAttribute(ListenerTagNames.SERVICE_NAME_TAG, service.getName());
-        }
-    }
-	
-	/**
-	 * Map all the properties targeted at the supplied listener onto the target element.
-	 * <p/>
-	 * This involves copying the properties from the associated bus and provider nodes.
-	 * @param listener The listener config instance.
-	 * @param target The target DOM ConfigTree listener element.
-	 * @param model The model.
-	 * @throws ConfigurationException Bad bis configuration. 
-	 */
-	protected static void mapEPRProperties(Listener listener, Element target, XMLBeansModel model) throws ConfigurationException {
-		Bus bus = model.getBus(listener.getBusidref());
-		Provider provider = model.getProvider(bus);
-		
-		// Map the properties from the provider config...
-		mapProperties(provider.getPropertyList(), target);
-		// Map the properties from the bus config...
-		mapProperties(bus.getPropertyList(), target);
-	}
-	
-	/**
-	 * Map all the supplied properties onto the target element.
-	 * @param target The target DOM element.
-	 * @param properties The properties to be mapped.
-	 */
-	public static void mapProperties(List<Property> properties, Element target) {
-		// Map the property elements to actions attributes...
-		for(Property property : properties) {
-         Element propertyElement = target.getOwnerDocument().createElement("property");
-         serialize(property, propertyElement);
-         if (propertyElement.hasChildNodes())
-         {
-            YADOMUtil.copyChildNodes(propertyElement, target);
-         }
-         else
-         {
-            target.setAttribute(property.getName(), property.getValue());
-         }
-      }
-	}
-
-	/**
-	 * Serialise the supplied {@link XmlObject} instance to the supplied element.
-	 * @param xmlObject The XmlObject instance.
-	 * @param toElement The element to which the cursor is to be serialised.
-	 */
-	protected static void serialize(XmlObject xmlObject, Element toElement) {
-		XmlCursor cursor = xmlObject.newCursor();
-		
-		// Note there are methods on the XmlObject that "looked" as though they might be able
-		// to do this for us (save, newDomNode etc), but they kept throwing exceptions.
-		
-		serialize(cursor, toElement);
-		cursor.dispose();
-	}
-
-	/**
-	 * Serialise the XML content behind the supplied XmlCursor instance to the supplied
-	 * target element.
-	 * @param cursor The cursor instance.
-	 * @param toElement The target DOM Element.
-	 */
-	private static void serialize(XmlCursor cursor, Element toElement) {
-		TokenType token;
-		Document doc = toElement.getOwnerDocument();
-
-		while(true) {
-			token = cursor.toNextToken();
-			
-			switch (token.intValue()) {
-			case TokenType.INT_ATTR:
-				toElement.setAttribute(cursor.getName().getLocalPart(), cursor.getTextValue());
-				break;
-			case TokenType.INT_COMMENT:
-				toElement.appendChild(doc.createComment(cursor.getTextValue()));
-				break;
-			case TokenType.INT_START:
-				Element childElement = doc.createElement(cursor.getName().getLocalPart());
-				toElement.appendChild(childElement);
-				serialize(cursor, childElement);
-				break;
-			case TokenType.INT_TEXT:
-				toElement.appendChild(doc.createTextNode(cursor.getChars()));
-				break;
-			case TokenType.INT_END:
-			case TokenType.INT_STARTDOC:
-			case TokenType.INT_ENDDOC:
-			case TokenType.INT_NONE:
-				return;
-			case TokenType.INT_PROCINST:
-			case TokenType.INT_NAMESPACE:
-			default:
-				break;
-			}
-		}
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/MapperUtil.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,178 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import java.util.List;
+
+import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlCursor.TokenType;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.message.MessageAwareListener;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Mapper utility methods.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class MapperUtil {
+
+	/**
+	 * Map all default listener attributes onto the target listener ConfigTree.
+	 * @param listener The listener configuration instance.
+	 * @param listenerNode The target DOM ConfigTree listener element.
+	 * @param model The model.
+	 */
+    protected static void mapDefaultAttributes(Listener listener, Element listenerNode, XMLBeansModel model) {
+        Service service = model.getService(listener);
+        boolean isGateway = listener.getIsGateway();
+
+        // Map maxThreads - appears to be a JMS only attrib...
+        listenerNode.setAttribute(ListenerTagNames.MAX_THREADS_TAG, String.valueOf(listener.getMaxThreads()));
+
+        mapListenerServiceAttributes(listenerNode, service, isGateway);
+        if (!isGateway && !listenerNode.hasAttribute(ListenerTagNames.LISTENER_CLASS_TAG)) {
+            listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, MessageAwareListener.class.getName());
+        }
+    }
+
+    /**
+     * Map the Service specific attributes onto the listener configuration.
+     * @param listenerNode The listener config node.
+     * @param service The Service details (from the model).
+     * @param isGateway True if the listener is a gateway, otherwise false.
+     */
+    public static void mapListenerServiceAttributes(Element listenerNode, Service service, boolean isGateway) {
+        listenerNode.setAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG, service.getDescription());
+        if (isGateway) {
+            listenerNode.setAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, service.getCategory());
+            listenerNode.setAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG, service.getName());
+        } else {
+            listenerNode.setAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, service.getCategory());
+            listenerNode.setAttribute(ListenerTagNames.SERVICE_NAME_TAG, service.getName());
+        }
+    }
+	
+	/**
+	 * Map all the properties targeted at the supplied listener onto the target element.
+	 * <p/>
+	 * This involves copying the properties from the associated bus and provider nodes.
+	 * @param listener The listener config instance.
+	 * @param target The target DOM ConfigTree listener element.
+	 * @param model The model.
+	 * @throws ConfigurationException Bad bis configuration. 
+	 */
+	protected static void mapEPRProperties(Listener listener, Element target, XMLBeansModel model) throws ConfigurationException {
+		Bus bus = model.getBus(listener.getBusidref());
+		Provider provider = model.getProvider(bus);
+		
+		// Map the properties from the provider config...
+		mapProperties(provider.getPropertyList(), target);
+		// Map the properties from the bus config...
+		mapProperties(bus.getPropertyList(), target);
+	}
+	
+	/**
+	 * Map all the supplied properties onto the target element.
+	 * @param target The target DOM element.
+	 * @param properties The properties to be mapped.
+	 */
+	public static void mapProperties(List<Property> properties, Element target) {
+		// Map the property elements to actions attributes...
+		for(Property property : properties) {
+         Element propertyElement = target.getOwnerDocument().createElement("property");
+         serialize(property, propertyElement);
+         if (propertyElement.hasChildNodes())
+         {
+            YADOMUtil.copyChildNodes(propertyElement, target);
+         }
+         else
+         {
+            target.setAttribute(property.getName(), property.getValue());
+         }
+      }
+	}
+
+	/**
+	 * Serialise the supplied {@link XmlObject} instance to the supplied element.
+	 * @param xmlObject The XmlObject instance.
+	 * @param toElement The element to which the cursor is to be serialised.
+	 */
+	protected static void serialize(XmlObject xmlObject, Element toElement) {
+		XmlCursor cursor = xmlObject.newCursor();
+		
+		// Note there are methods on the XmlObject that "looked" as though they might be able
+		// to do this for us (save, newDomNode etc), but they kept throwing exceptions.
+		
+		serialize(cursor, toElement);
+		cursor.dispose();
+	}
+
+	/**
+	 * Serialise the XML content behind the supplied XmlCursor instance to the supplied
+	 * target element.
+	 * @param cursor The cursor instance.
+	 * @param toElement The target DOM Element.
+	 */
+	private static void serialize(XmlCursor cursor, Element toElement) {
+		TokenType token;
+		Document doc = toElement.getOwnerDocument();
+
+		while(true) {
+			token = cursor.toNextToken();
+			
+			switch (token.intValue()) {
+			case TokenType.INT_ATTR:
+				toElement.setAttribute(cursor.getName().getLocalPart(), cursor.getTextValue());
+				break;
+			case TokenType.INT_COMMENT:
+				toElement.appendChild(doc.createComment(cursor.getTextValue()));
+				break;
+			case TokenType.INT_START:
+				Element childElement = doc.createElement(cursor.getName().getLocalPart());
+				toElement.appendChild(childElement);
+				serialize(cursor, childElement);
+				break;
+			case TokenType.INT_TEXT:
+				toElement.appendChild(doc.createTextNode(cursor.getChars()));
+				break;
+			case TokenType.INT_END:
+			case TokenType.INT_STARTDOC:
+			case TokenType.INT_ENDDOC:
+			case TokenType.INT_NONE:
+				return;
+			case TokenType.INT_PROCINST:
+			case TokenType.INT_NAMESPACE:
+			default:
+				break;
+			}
+		}
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,43 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.w3c.dom.Element;
-
-/**
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class NotificationMapper {
-
-	/**
-	 * @param listenerConfigTree
-	 * @param listenerService
-	 * @param model
-	 */
-	public static void map(Element listenerConfigTree, Service listenerService, XMLBeansModel model) {
-		// TODO Auto-generated method stub
-		
-	}
-
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/NotificationMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,43 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.w3c.dom.Element;
+
+/**
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class NotificationMapper {
+
+	/**
+	 * @param listenerConfigTree
+	 * @param listenerService
+	 * @param model
+	 */
+	public static void map(Element listenerConfigTree, Service listenerService, XMLBeansModel model) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,138 +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.mappers110;
-
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.AbstractScheduledListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FrequencyUnit;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.CronScheduleDocument.CronSchedule;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduleProviderDocument.ScheduleProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SimpleScheduleDocument.SimpleSchedule;
-import org.jboss.soa.esb.schedule.SchedulerResource;
-import org.w3c.dom.Element;
-
-/**
- * Schedule Mapper.
- * <p/>
- * Maps the scheduling info from the Schedule based listener config, to the
- * ConfigTree config model.
- *
- * @author <a href="daniel.bevenius at redpill.se">Daniel Bevenius</a>
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ScheduleMapper {
-
-    private static Logger logger = Logger.getLogger(ScheduleMapper.class);
-
-    public static void map(Element listenerConfig, AbstractScheduledListener scheduledListener, final XMLBeansModel model) throws ConfigurationException {
-        String scheduleIdRef = scheduledListener.getScheduleidref();
-        Element domElement = (Element) scheduledListener.getDomNode();
-        int scheduleFrequency = scheduledListener.getScheduleFrequency();
-        int pollFrequency = scheduledListener.getPollFrequencySeconds();
-        int pollLatency = getPollLatencySeconds(scheduledListener);
-
-        if(scheduleIdRef != null) {
-            listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_ID_REF, scheduleIdRef);
-            final Schedule schedule = model.getSchedule(scheduleIdRef) ;
-            if (schedule.isSetStartDate()) {
-                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_START_DATE, Long.toString(schedule.getStartDate().getTimeInMillis())) ;
-            }
-            if (schedule.isSetEndDate()) {
-                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_END_DATE, Long.toString(schedule.getEndDate().getTimeInMillis())) ;
-            }
-            if (schedule instanceof SimpleSchedule) {
-                final SimpleSchedule simpleSchedule = (SimpleSchedule)schedule ;
-                final long simpleFrequency = simpleSchedule.getFrequency() ;
-                final FrequencyUnit.Enum unit = simpleSchedule.getFrequencyUnits() ;
-                final String frequencyVal ;
-                if (unit.equals(FrequencyUnit.SECONDS)) {
-                    frequencyVal = Long.toString(simpleFrequency * 1000) ;
-                } else {
-                    frequencyVal = Long.toString(simpleFrequency) ;
-                }
-                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_FREQUENCY, frequencyVal) ;
-                if (simpleSchedule.isSetExecCount()) {
-                    listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_EXEC, Integer.toString(simpleSchedule.getExecCount())) ;
-                }
-            } else if (schedule instanceof CronSchedule) {
-                final String cronExpression = ((CronSchedule)schedule).getCronExpression() ;
-                if (cronExpression == null) {
-                    throw new ConfigurationException("Missing cron expression from configuration") ;
-                }
-                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_CRON_EXPRESSION, cronExpression) ;
-            } else {
-                throw new ConfigurationException("Unknown schedule type specified in configuration: " + schedule.getClass().getName()) ;
-            }
-            
-            if(domElement.hasAttribute("poll-frequency-seconds") || domElement.hasAttribute("schedule-frequency") ) {
-                logger.warn("Schedule Listener '" + listenerConfig.getTagName() + "' defines both 'scheduleidref' and frequency attributes.  Using the 'scheduleidref'.");
-            }
-        } else if(scheduleFrequency > -1) {
-            listenerConfig.setAttribute(ScheduleProviderFactory.ATTR_FREQUENCY, Integer.toString(scheduleFrequency));
-        } else if(pollFrequency > -1) {
-            listenerConfig.setAttribute(ScheduleProviderFactory.ATTR_FREQUENCY, Integer.toString(pollFrequency));
-        } else if(pollLatency > -1) {
-            listenerConfig.setAttribute(ScheduleProviderFactory.ATTR_FREQUENCY, Integer.toString(pollLatency));
-        } else {
-            listenerConfig.setAttribute(ScheduleProviderFactory.ATTR_FREQUENCY, "10");
-        }
-
-        final ScheduleProvider scheduleProvider = model.getScheduleProvider() ;
-        if (scheduleProvider != null) {
-            // There is only one schedule provider allowed in the configuration at present
-            copyProperties(listenerConfig, model.getScheduleProvider().getPropertyList(), model.getScheduledListenerCount()) ;
-        }
-        
-        if(domElement.hasAttribute("poll-frequency-seconds")) {
-            logger.warn("Attrubute 'poll-frequency-seconds' is DEPRECATED.  Please change your configuration to use 'schedule-frequency'.");
-        }
-        if(pollLatency > -1) {
-            logger.warn("Property 'pollLatencySeconds' is DEPRECATED.  Please change your configuration to use 'schedule-frequency'.");
-        }
-    }
-
-    private static void copyProperties(final Element listenerConfig, final List<PropertyDocument.Property> properties, final int numScheduledListeners)
-    {
-        final Element schedulePropertyElement = YADOMUtil.addElement(listenerConfig, ListenerTagNames.SCHEDULE_PROPERTIES) ;
-        schedulePropertyElement.setAttribute(SchedulerResource.THREAD_COUNT, Integer.toString(numScheduledListeners)) ;
-
-        if ((properties != null) && (properties.size() > 0))
-        {
-            MapperUtil.mapProperties(properties, schedulePropertyElement) ;
-        }
-    }
-    
-    private static int getPollLatencySeconds(AbstractScheduledListener scheduledListener) {
-        String value = XMLBeansModel.getProperty(scheduledListener.getPropertyList(), "pollLatencySeconds", "-1");
-
-        try {
-            return Integer.parseInt(value);
-        } catch (NumberFormatException e) {
-            return -1;
-        }
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,138 @@
+/*
+ * 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.mappers110;
+
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.AbstractScheduledListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FrequencyUnit;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.CronScheduleDocument.CronSchedule;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduleProviderDocument.ScheduleProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SimpleScheduleDocument.SimpleSchedule;
+import org.jboss.soa.esb.schedule.SchedulerResource;
+import org.w3c.dom.Element;
+
+/**
+ * Schedule Mapper.
+ * <p/>
+ * Maps the scheduling info from the Schedule based listener config, to the
+ * ConfigTree config model.
+ *
+ * @author <a href="daniel.bevenius at redpill.se">Daniel Bevenius</a>
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ScheduleMapper {
+
+    private static Logger logger = Logger.getLogger(ScheduleMapper.class);
+
+    public static void map(Element listenerConfig, AbstractScheduledListener scheduledListener, final XMLBeansModel model) throws ConfigurationException {
+        String scheduleIdRef = scheduledListener.getScheduleidref();
+        Element domElement = (Element) scheduledListener.getDomNode();
+        int scheduleFrequency = scheduledListener.getScheduleFrequency();
+        int pollFrequency = scheduledListener.getPollFrequencySeconds();
+        int pollLatency = getPollLatencySeconds(scheduledListener);
+
+        if(scheduleIdRef != null) {
+            listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_ID_REF, scheduleIdRef);
+            final Schedule schedule = model.getSchedule(scheduleIdRef) ;
+            if (schedule.isSetStartDate()) {
+                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_START_DATE, Long.toString(schedule.getStartDate().getTimeInMillis())) ;
+            }
+            if (schedule.isSetEndDate()) {
+                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_END_DATE, Long.toString(schedule.getEndDate().getTimeInMillis())) ;
+            }
+            if (schedule instanceof SimpleSchedule) {
+                final SimpleSchedule simpleSchedule = (SimpleSchedule)schedule ;
+                final long simpleFrequency = simpleSchedule.getFrequency() ;
+                final FrequencyUnit.Enum unit = simpleSchedule.getFrequencyUnits() ;
+                final String frequencyVal ;
+                if (unit.equals(FrequencyUnit.SECONDS)) {
+                    frequencyVal = Long.toString(simpleFrequency * 1000) ;
+                } else {
+                    frequencyVal = Long.toString(simpleFrequency) ;
+                }
+                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_FREQUENCY, frequencyVal) ;
+                if (simpleSchedule.isSetExecCount()) {
+                    listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_EXEC, Integer.toString(simpleSchedule.getExecCount())) ;
+                }
+            } else if (schedule instanceof CronSchedule) {
+                final String cronExpression = ((CronSchedule)schedule).getCronExpression() ;
+                if (cronExpression == null) {
+                    throw new ConfigurationException("Missing cron expression from configuration") ;
+                }
+                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_CRON_EXPRESSION, cronExpression) ;
+            } else {
+                throw new ConfigurationException("Unknown schedule type specified in configuration: " + schedule.getClass().getName()) ;
+            }
+            
+            if(domElement.hasAttribute("poll-frequency-seconds") || domElement.hasAttribute("schedule-frequency") ) {
+                logger.warn("Schedule Listener '" + listenerConfig.getTagName() + "' defines both 'scheduleidref' and frequency attributes.  Using the 'scheduleidref'.");
+            }
+        } else if(scheduleFrequency > -1) {
+            listenerConfig.setAttribute(ScheduleProviderFactory.ATTR_FREQUENCY, Integer.toString(scheduleFrequency));
+        } else if(pollFrequency > -1) {
+            listenerConfig.setAttribute(ScheduleProviderFactory.ATTR_FREQUENCY, Integer.toString(pollFrequency));
+        } else if(pollLatency > -1) {
+            listenerConfig.setAttribute(ScheduleProviderFactory.ATTR_FREQUENCY, Integer.toString(pollLatency));
+        } else {
+            listenerConfig.setAttribute(ScheduleProviderFactory.ATTR_FREQUENCY, "10");
+        }
+
+        final ScheduleProvider scheduleProvider = model.getScheduleProvider() ;
+        if (scheduleProvider != null) {
+            // There is only one schedule provider allowed in the configuration at present
+            copyProperties(listenerConfig, model.getScheduleProvider().getPropertyList(), model.getScheduledListenerCount()) ;
+        }
+        
+        if(domElement.hasAttribute("poll-frequency-seconds")) {
+            logger.warn("Attrubute 'poll-frequency-seconds' is DEPRECATED.  Please change your configuration to use 'schedule-frequency'.");
+        }
+        if(pollLatency > -1) {
+            logger.warn("Property 'pollLatencySeconds' is DEPRECATED.  Please change your configuration to use 'schedule-frequency'.");
+        }
+    }
+
+    private static void copyProperties(final Element listenerConfig, final List<PropertyDocument.Property> properties, final int numScheduledListeners)
+    {
+        final Element schedulePropertyElement = YADOMUtil.addElement(listenerConfig, ListenerTagNames.SCHEDULE_PROPERTIES) ;
+        schedulePropertyElement.setAttribute(SchedulerResource.THREAD_COUNT, Integer.toString(numScheduledListeners)) ;
+
+        if ((properties != null) && (properties.size() > 0))
+        {
+            MapperUtil.mapProperties(properties, schedulePropertyElement) ;
+        }
+    }
+    
+    private static int getPollLatencySeconds(AbstractScheduledListener scheduledListener) {
+        String value = XMLBeansModel.getProperty(scheduledListener.getPropertyList(), "pollLatencySeconds", "-1");
+
+        try {
+            return Integer.parseInt(value);
+        } catch (NumberFormatException e) {
+            return -1;
+        }
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,119 +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.mappers110;
-
-import org.jboss.soa.esb.schedule.*;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduleProviderDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SimpleScheduleDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.CronScheduleDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FrequencyUnit;
-
-import java.util.List;
-import java.util.Properties;
-import java.util.ArrayList;
-
-/**
- * Factory class for creating and configuring a {@link ScheduleProvider}
- * instance.
- *
- * @author <a href="daniel.bevenius at redpill.se">Daniel Bevenius</a>
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public abstract class ScheduleProviderFactory {
-
-    public static final String ATTR_SCHEDULE_ID_REF = "scheduleidref";
-    public static final String ATTR_FREQUENCY = "schedule-frequency";
-
-    public static ScheduleProvider createInstance(List<ManagedLifecycle> listeners, ScheduleProviderDocument.ScheduleProvider scheduleProviderConfig) throws ConfigurationException {
-        Properties schedulerConfig = null;
-        List<org.jboss.soa.esb.schedule.Schedule> schedules = null;
-        ScheduleProvider instance;
-
-        if(scheduleProviderConfig != null) {
-            schedulerConfig = XMLBeansModel.toProperties(scheduleProviderConfig.getPropertyList());
-            schedules = getSchedules(scheduleProviderConfig);
-        }
-        instance = new ScheduleProvider(schedulerConfig, schedules);
-
-        try {
-            for(ManagedLifecycle listener : listeners) {
-                if(listener instanceof ScheduledEventListener) {
-                    ConfigTree config = listener.getConfig();
-                    String scheduleIdRef = config.getAttribute(ATTR_SCHEDULE_ID_REF);
-
-                    if(scheduleIdRef != null) {
-                        instance.addListener((ScheduledEventListener) listener, scheduleIdRef);
-                    } else {
-                        long frequency = config.getLongAttribute(ATTR_FREQUENCY, 10);
-                        instance.addListener((ScheduledEventListener) listener, frequency);
-                    }
-                }
-            }
-        } catch (SchedulingException e) {
-            throw new ConfigurationException(e);
-        }
-
-        return instance;
-    }
-
-    private static List<Schedule> getSchedules(ScheduleProviderDocument.ScheduleProvider scheduleProviderConfig) throws ConfigurationException {
-        List<Schedule> schedules = new ArrayList<Schedule>();
-        List<org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule> scheduleConfigs = scheduleProviderConfig.getScheduleList();
-        List<String> schedulIds = new ArrayList<String>();
-
-        // We wouldn't have to do this if we were using JAXB!!!
-        // TODO: Get XMLBeans to fudge the class names for the generated binds - existing names are potentialy dangerous because they're the same as the non XMLBeans types
-        for(org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule scheduleConfig : scheduleConfigs) {
-            String scheduleId = scheduleConfig.getScheduleid();
-            Schedule schedule;
-
-            if(schedulIds.contains(scheduleId)) {
-                throw new ConfigurationException("Duplicate 'scheduleid' value of '" + scheduleId + "'.  Must be unique on a per <schedule-provider> basis.");
-            }
-            schedulIds.add(scheduleId);
-
-            if(scheduleConfig instanceof SimpleScheduleDocument.SimpleSchedule) {
-                SimpleSchedule simpleSchedule;
-                FrequencyUnit.Enum frequencyUnit = ((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequencyUnits();
-
-                schedule = simpleSchedule = new SimpleSchedule(scheduleId);
-                if(frequencyUnit == FrequencyUnit.SECONDS) {
-                    simpleSchedule.setFrequency(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequency() * 1000);
-                } else {
-                simpleSchedule.setFrequency(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequency());
-                }
-                simpleSchedule.setExecCount(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getExecCount());
-            } else {
-                CronSchedule cronSchedule;
-                
-                schedule = cronSchedule = new CronSchedule(scheduleId);
-                cronSchedule.setCronExpression(((CronScheduleDocument.CronSchedule)scheduleConfig).getCronExpression());
-            }
-            schedule.setStartDate(scheduleConfig.getStartDate());
-            schedule.setEndDate(scheduleConfig.getEndDate());
-            schedules.add(schedule);
-        }
-
-        return schedules;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduleProviderFactory.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,119 @@
+/*
+ * 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.mappers110;
+
+import org.jboss.soa.esb.schedule.*;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduleProviderDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SimpleScheduleDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.CronScheduleDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FrequencyUnit;
+
+import java.util.List;
+import java.util.Properties;
+import java.util.ArrayList;
+
+/**
+ * Factory class for creating and configuring a {@link ScheduleProvider}
+ * instance.
+ *
+ * @author <a href="daniel.bevenius at redpill.se">Daniel Bevenius</a>
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class ScheduleProviderFactory {
+
+    public static final String ATTR_SCHEDULE_ID_REF = "scheduleidref";
+    public static final String ATTR_FREQUENCY = "schedule-frequency";
+
+    public static ScheduleProvider createInstance(List<ManagedLifecycle> listeners, ScheduleProviderDocument.ScheduleProvider scheduleProviderConfig) throws ConfigurationException {
+        Properties schedulerConfig = null;
+        List<org.jboss.soa.esb.schedule.Schedule> schedules = null;
+        ScheduleProvider instance;
+
+        if(scheduleProviderConfig != null) {
+            schedulerConfig = XMLBeansModel.toProperties(scheduleProviderConfig.getPropertyList());
+            schedules = getSchedules(scheduleProviderConfig);
+        }
+        instance = new ScheduleProvider(schedulerConfig, schedules);
+
+        try {
+            for(ManagedLifecycle listener : listeners) {
+                if(listener instanceof ScheduledEventListener) {
+                    ConfigTree config = listener.getConfig();
+                    String scheduleIdRef = config.getAttribute(ATTR_SCHEDULE_ID_REF);
+
+                    if(scheduleIdRef != null) {
+                        instance.addListener((ScheduledEventListener) listener, scheduleIdRef);
+                    } else {
+                        long frequency = config.getLongAttribute(ATTR_FREQUENCY, 10);
+                        instance.addListener((ScheduledEventListener) listener, frequency);
+                    }
+                }
+            }
+        } catch (SchedulingException e) {
+            throw new ConfigurationException(e);
+        }
+
+        return instance;
+    }
+
+    private static List<Schedule> getSchedules(ScheduleProviderDocument.ScheduleProvider scheduleProviderConfig) throws ConfigurationException {
+        List<Schedule> schedules = new ArrayList<Schedule>();
+        List<org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule> scheduleConfigs = scheduleProviderConfig.getScheduleList();
+        List<String> schedulIds = new ArrayList<String>();
+
+        // We wouldn't have to do this if we were using JAXB!!!
+        // TODO: Get XMLBeans to fudge the class names for the generated binds - existing names are potentialy dangerous because they're the same as the non XMLBeans types
+        for(org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule scheduleConfig : scheduleConfigs) {
+            String scheduleId = scheduleConfig.getScheduleid();
+            Schedule schedule;
+
+            if(schedulIds.contains(scheduleId)) {
+                throw new ConfigurationException("Duplicate 'scheduleid' value of '" + scheduleId + "'.  Must be unique on a per <schedule-provider> basis.");
+            }
+            schedulIds.add(scheduleId);
+
+            if(scheduleConfig instanceof SimpleScheduleDocument.SimpleSchedule) {
+                SimpleSchedule simpleSchedule;
+                FrequencyUnit.Enum frequencyUnit = ((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequencyUnits();
+
+                schedule = simpleSchedule = new SimpleSchedule(scheduleId);
+                if(frequencyUnit == FrequencyUnit.SECONDS) {
+                    simpleSchedule.setFrequency(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequency() * 1000);
+                } else {
+                simpleSchedule.setFrequency(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getFrequency());
+                }
+                simpleSchedule.setExecCount(((SimpleScheduleDocument.SimpleSchedule)scheduleConfig).getExecCount());
+            } else {
+                CronSchedule cronSchedule;
+                
+                schedule = cronSchedule = new CronSchedule(scheduleId);
+                cronSchedule.setCronExpression(((CronScheduleDocument.CronSchedule)scheduleConfig).getCronExpression());
+            }
+            schedule.setStartDate(scheduleConfig.getStartDate());
+            schedule.setEndDate(scheduleConfig.getEndDate());
+            schedules.add(schedule);
+        }
+
+        return schedules;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,53 +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.mappers110;
-
-import org.w3c.dom.Element;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduledListenerDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.ScheduleListener;
-import org.jboss.soa.esb.dom.YADOMUtil;
-
-/**
- * Mapper for the {@link ScheduleListener}.
- * @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 listener, XMLBeansModel model) {
-        Service service = model.getService(listener);
-        boolean isGateway = listener.getIsGateway();
-        Element listenerNode = YADOMUtil.addElement(root, "listener");
-
-        listenerNode.setAttribute("name", listener.getName());
-
-        listenerNode.setAttribute("event-processor", listener.getEventProcessor());
-        listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, ScheduleListener.class.getName());
-        if (listener.isSetTransacted()) {
-            listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(listener.getTransacted()));
-        }
-
-        MapperUtil.mapListenerServiceAttributes(listenerNode, service, isGateway) ;
-        // Map the <property> elements targeted at the listener - from the listener itself.
-        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
-
-        return listenerNode;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/ScheduledListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,53 @@
+/*
+ * 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.mappers110;
+
+import org.w3c.dom.Element;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduledListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.ScheduleListener;
+import org.jboss.soa.esb.dom.YADOMUtil;
+
+/**
+ * Mapper for the {@link ScheduleListener}.
+ * @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 listener, XMLBeansModel model) {
+        Service service = model.getService(listener);
+        boolean isGateway = listener.getIsGateway();
+        Element listenerNode = YADOMUtil.addElement(root, "listener");
+
+        listenerNode.setAttribute("name", listener.getName());
+
+        listenerNode.setAttribute("event-processor", listener.getEventProcessor());
+        listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, ScheduleListener.class.getName());
+        if (listener.isSetTransacted()) {
+            listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(listener.getTransacted()));
+        }
+
+        MapperUtil.mapListenerServiceAttributes(listenerNode, service, isGateway) ;
+        // Map the <property> elements targeted at the listener - from the listener itself.
+        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
+
+        return listenerNode;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,59 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SecurityDocument.Security;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.w3c.dom.Element;
-
-/**
- * Performs the mapping of XSD based configuration service actions onto a
- * "ConfigTree" style listener configuration.
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public class SecurityMapper
-{
-	private SecurityMapper() {}
-	
-	/**
-	 * Perform the mapping.
-	 * 
-	 * @param toConfigTree
-	 *            The listener ConfigTree to which the actions are to be added.
-	 * @param service
-	 *            The Service to which the listener is bound. The Service defines the actions.
-	 * @throws ConfigurationException
-	 */
-	public static void map( final Element toConfigTree, final Service service ) throws ConfigurationException
-	{
-		final Security security = service.getSecurity();
-		if ( security != null)
-		{
-    		final Element securityElement = YADOMUtil.addElement( toConfigTree, ListenerTagNames.SECURITY_TAG );
-			MapperUtil.serialize( security, securityElement );
-		}
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,59 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SecurityDocument.Security;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.w3c.dom.Element;
+
+/**
+ * Performs the mapping of XSD based configuration service actions onto a
+ * "ConfigTree" style listener configuration.
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class SecurityMapper
+{
+	private SecurityMapper() {}
+	
+	/**
+	 * Perform the mapping.
+	 * 
+	 * @param toConfigTree
+	 *            The listener ConfigTree to which the actions are to be added.
+	 * @param service
+	 *            The Service to which the listener is bound. The Service defines the actions.
+	 * @throws ConfigurationException
+	 */
+	public static void map( final Element toConfigTree, final Service service ) throws ConfigurationException
+	{
+		final Security security = service.getSecurity();
+		if ( security != null)
+		{
+    		final Element securityElement = YADOMUtil.addElement( toConfigTree, ListenerTagNames.SECURITY_TAG );
+			MapperUtil.serialize( security, securityElement );
+		}
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,146 +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,
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlBusDocument.SqlBus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlListenerDocument.SqlListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlMessageFilterDocument.SqlMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlProviderDocument.SqlProvider;
-import org.jboss.soa.esb.listeners.gateway.SqlTableGatewayListener;
-import org.w3c.dom.Element;
-
-/**
- * Performs the mapping of a &lt;fs-listener&gt; XSD based configuration to the "ConfigTree"
- * style configuration, adding the "ConfigTree" listener config to the "root" node.
- * 
- * @author <a href="mailto:kurt.stam at jboss.com">kurt.stam at jboss.com</a>
- */
-public class SqlListenerMapper {
-
-	/**
-	 * Perform the mapping.
-	 * @param root The "ConfigTree" configuration root node.
-	 * @param listener The Jmslistener to be mapped into the ConfigTree.
-	 * @param model The configuration model from which the mapping is being performed.
-	 * @return The ConfigTree listener configuration node.
-	 * @throws ConfigurationException Invalid listener configuration.
-	 */
-	public static Element map(Element root, SqlListener listener, XMLBeansModel model) throws ConfigurationException {
-		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) {
-			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <sql-listener> must reference a <sql-bus>.");
-		}
-		try {
-			provider = (SqlProvider) model.getProvider(bus);
-		} catch (ClassCastException e) {
-			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <sql-provider> instance.  Unexpected exception - this should have caused a validation error!");
-		}
-		
-		if (provider.getDatasource() != null) {
-			if ((provider.getUsername() != null)
-					|| (provider.getDriver() != null)) {	
-				throw new ConfigurationException ("Invalid sql-provider configuration : a datasource and a username/password/driver "
-						+ "combination cannot both be defined.   Use only one (datasource or JDBC connection info)." 
-						+ "Datasource : [" + provider.getDatasource() + "] JDBC URL [" + provider.getUrl() + "]");
-			}			
-		} else if (provider.getUrl() == null) {
-			throw new ConfigurationException ("Invalid sql-provider configuration : a datasource or a URL/username/password/driver "
-					+ "combination must be defined.   Use only one (datasource or JDBC connection info).  " 
-					+ "URL was null.");	
-		} else if (provider.getUsername() == null) {
-			throw new ConfigurationException ("Invalid sql-provider configuration :  a datasource or a URL/username/password/driver "
-					+ "combination must be defined.   Use only one (datasource or JDBC connection info).   " 
-					+ "Username was null.");	
-		} else if (provider.getDriver() == null) {
-			throw new ConfigurationException ("Invalid sql-provider configuration : either a datasource or a URL/username/password/driver "
-					+ "combination must be defined.   Use only one (datasource or JDBC connection info).   " 
-					+ "Driver was null.");		
-		}
-		
-		SqlMessageFilter messageFilter = listener.getSqlMessageFilter();
-		if(messageFilter == null) { 
-			messageFilter = bus.getSqlMessageFilter();
-			if(messageFilter == null) {
-				throw new ConfigurationException("No <sql-destination> defined on either <sql-listener> [" + listener.getName() + "] or <sql-bus> [" + bus.getBusid() + "].");
-			}
-		}
-        listenerNode.setAttribute("pollLatencySeconds", String.valueOf(listener.getPollFrequencySeconds()));
-        if (provider.isSetTransacted()) {
-            listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(provider.getTransacted())) ;
-        }
-		// 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.
-		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
-		if(listener.getIsGateway()) {
-			listenerNode.setAttribute("gatewayClass", SqlTableGatewayListener.class.getName());
-			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
-
-			// Map EPR related attributes onto the listener - from the bus and provider and listener.
-			// Note: This will change - the Gateways will also support the EPR element...
-			mapSqlEprProperties(listenerNode, provider, messageFilter);
-			MapperUtil.mapEPRProperties(listener, listenerNode, model);
-		} else {
-			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
-
-			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
-			mapSqlEprProperties(eprNode, provider, messageFilter);
-			MapperUtil.mapEPRProperties(listener, eprNode, model);
-			// Remove any empty attributes set on the EPR config...
-			YADOMUtil.removeEmptyAttributes(eprNode);
-		}
-		
-		// Remove any empty attributes set on the listener config...
-		YADOMUtil.removeEmptyAttributes(listenerNode);
-		
-		return listenerNode;
-	}
-
-	private static void mapSqlEprProperties(Element toElement, SqlProvider provider, SqlMessageFilter messageFilter) {
-		toElement.setAttribute(JDBCEpr.DATASOURCE_TAG, provider.getDatasource());
-		toElement.setAttribute(JDBCEpr.URL_TAG, provider.getUrl());
-		toElement.setAttribute(JDBCEpr.DRIVER_TAG, provider.getDriver());
-		toElement.setAttribute(JDBCEpr.USERNAME_TAG, provider.getUsername());
-		toElement.setAttribute(JDBCEpr.PASSWORD_TAG, provider.getPassword());
-		toElement.setAttribute(JDBCEpr.TABLE_NAME_TAG, messageFilter.getTablename());
-		toElement.setAttribute(JDBCEpr.WHERE_CONDITION_TAG, messageFilter.getWhereCondition());
-		toElement.setAttribute(JDBCEpr.ORDER_BY_TAG, messageFilter.getOrderBy());
-		toElement.setAttribute(JDBCEpr.MESSAGE_ID_COLUMN_TAG, messageFilter.getMessageIdColumn());
-		toElement.setAttribute(JDBCEpr.DATA_COLUMN_TAG, messageFilter.getMessageColumn());
-		toElement.setAttribute(JDBCEpr.STATUS_COLUMN_TAG, String.valueOf(messageFilter.getStatusColumn()));
-		toElement.setAttribute(JDBCEpr.TIMESTAMP_COLUMN_TAG, messageFilter.getInsertTimestampColumn());
-		toElement.setAttribute(JDBCEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
-		toElement.setAttribute(JDBCEpr.ERROR_DEL_TAG, String.valueOf(messageFilter.getErrorDelete()));
-		
-		
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/SqlListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,146 @@
+/*
+ * 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,
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlBusDocument.SqlBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlListenerDocument.SqlListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlMessageFilterDocument.SqlMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.SqlProviderDocument.SqlProvider;
+import org.jboss.soa.esb.listeners.gateway.SqlTableGatewayListener;
+import org.w3c.dom.Element;
+
+/**
+ * Performs the mapping of a &lt;fs-listener&gt; XSD based configuration to the "ConfigTree"
+ * style configuration, adding the "ConfigTree" listener config to the "root" node.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">kurt.stam at jboss.com</a>
+ */
+public class SqlListenerMapper {
+
+	/**
+	 * Perform the mapping.
+	 * @param root The "ConfigTree" configuration root node.
+	 * @param listener The Jmslistener to be mapped into the ConfigTree.
+	 * @param model The configuration model from which the mapping is being performed.
+	 * @return The ConfigTree listener configuration node.
+	 * @throws ConfigurationException Invalid listener configuration.
+	 */
+	public static Element map(Element root, SqlListener listener, XMLBeansModel model) throws ConfigurationException {
+		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) {
+			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <sql-listener> must reference a <sql-bus>.");
+		}
+		try {
+			provider = (SqlProvider) model.getProvider(bus);
+		} catch (ClassCastException e) {
+			throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <sql-provider> instance.  Unexpected exception - this should have caused a validation error!");
+		}
+		
+		if (provider.getDatasource() != null) {
+			if ((provider.getUsername() != null)
+					|| (provider.getDriver() != null)) {	
+				throw new ConfigurationException ("Invalid sql-provider configuration : a datasource and a username/password/driver "
+						+ "combination cannot both be defined.   Use only one (datasource or JDBC connection info)." 
+						+ "Datasource : [" + provider.getDatasource() + "] JDBC URL [" + provider.getUrl() + "]");
+			}			
+		} else if (provider.getUrl() == null) {
+			throw new ConfigurationException ("Invalid sql-provider configuration : a datasource or a URL/username/password/driver "
+					+ "combination must be defined.   Use only one (datasource or JDBC connection info).  " 
+					+ "URL was null.");	
+		} else if (provider.getUsername() == null) {
+			throw new ConfigurationException ("Invalid sql-provider configuration :  a datasource or a URL/username/password/driver "
+					+ "combination must be defined.   Use only one (datasource or JDBC connection info).   " 
+					+ "Username was null.");	
+		} else if (provider.getDriver() == null) {
+			throw new ConfigurationException ("Invalid sql-provider configuration : either a datasource or a URL/username/password/driver "
+					+ "combination must be defined.   Use only one (datasource or JDBC connection info).   " 
+					+ "Driver was null.");		
+		}
+		
+		SqlMessageFilter messageFilter = listener.getSqlMessageFilter();
+		if(messageFilter == null) { 
+			messageFilter = bus.getSqlMessageFilter();
+			if(messageFilter == null) {
+				throw new ConfigurationException("No <sql-destination> defined on either <sql-listener> [" + listener.getName() + "] or <sql-bus> [" + bus.getBusid() + "].");
+			}
+		}
+        listenerNode.setAttribute("pollLatencySeconds", String.valueOf(listener.getPollFrequencySeconds()));
+        if (provider.isSetTransacted()) {
+            listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(provider.getTransacted())) ;
+        }
+		// 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.
+		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
+		if(listener.getIsGateway()) {
+			listenerNode.setAttribute("gatewayClass", SqlTableGatewayListener.class.getName());
+			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+
+			// Map EPR related attributes onto the listener - from the bus and provider and listener.
+			// Note: This will change - the Gateways will also support the EPR element...
+			mapSqlEprProperties(listenerNode, provider, messageFilter);
+			MapperUtil.mapEPRProperties(listener, listenerNode, model);
+		} else {
+			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+
+			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
+			mapSqlEprProperties(eprNode, provider, messageFilter);
+			MapperUtil.mapEPRProperties(listener, eprNode, model);
+			// Remove any empty attributes set on the EPR config...
+			YADOMUtil.removeEmptyAttributes(eprNode);
+		}
+		
+		// Remove any empty attributes set on the listener config...
+		YADOMUtil.removeEmptyAttributes(listenerNode);
+		
+		return listenerNode;
+	}
+
+	private static void mapSqlEprProperties(Element toElement, SqlProvider provider, SqlMessageFilter messageFilter) {
+		toElement.setAttribute(JDBCEpr.DATASOURCE_TAG, provider.getDatasource());
+		toElement.setAttribute(JDBCEpr.URL_TAG, provider.getUrl());
+		toElement.setAttribute(JDBCEpr.DRIVER_TAG, provider.getDriver());
+		toElement.setAttribute(JDBCEpr.USERNAME_TAG, provider.getUsername());
+		toElement.setAttribute(JDBCEpr.PASSWORD_TAG, provider.getPassword());
+		toElement.setAttribute(JDBCEpr.TABLE_NAME_TAG, messageFilter.getTablename());
+		toElement.setAttribute(JDBCEpr.WHERE_CONDITION_TAG, messageFilter.getWhereCondition());
+		toElement.setAttribute(JDBCEpr.ORDER_BY_TAG, messageFilter.getOrderBy());
+		toElement.setAttribute(JDBCEpr.MESSAGE_ID_COLUMN_TAG, messageFilter.getMessageIdColumn());
+		toElement.setAttribute(JDBCEpr.DATA_COLUMN_TAG, messageFilter.getMessageColumn());
+		toElement.setAttribute(JDBCEpr.STATUS_COLUMN_TAG, String.valueOf(messageFilter.getStatusColumn()));
+		toElement.setAttribute(JDBCEpr.TIMESTAMP_COLUMN_TAG, messageFilter.getInsertTimestampColumn());
+		toElement.setAttribute(JDBCEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
+		toElement.setAttribute(JDBCEpr.ERROR_DEL_TAG, String.valueOf(messageFilter.getErrorDelete()));
+		
+		
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,112 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Bus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.impl.BusImpl;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.impl.ListenerImpl;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.impl.BusProviderImpl;
-import org.w3c.dom.Element;
-
-/**
- * Perform a mapping for an "untyped" listener configuration.
- * <p/>
- * By "untyped" we mean that the listener type is not defined in the XSD, but instead is being
- * defined using the base &lt;listener&gt; type, mapping all it's associated
- * &lt;property&gt; values (including those of the associated bus and provider) onto the listener
- * ConfigTree as attributes.
- * <p/>
- * This is effectively like the base transform - if we don't have a mapper for the listener, this one is applied.
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class UntypedListenerMapper {
-
-	/**
-	 * Perform the mapping.
-	 * @param root The "ConfigTree" configuration root node.
-	 * @param listener The listener to be mapped into the ConfigTree.
-	 * @param model The configuration model from which the mapping is being performed.
-	 * @return The ConfigTree listener configuration node.
-	 * @throws ConfigurationException Invalid listener configuration.
-	 */
-	public static Element map(Element root, Listener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, "listener");
-
-        listenerNode.setAttribute("name", listener.getName());
-
-		assertListenerConfigOK(listener, model);
-		
-		// 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.
-		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
-
-		if(listener.getIsGateway()) {
-			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
-			
-			MapperUtil.mapEPRProperties(listener, listenerNode, model);
-
-		} else {
-
-			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
-			MapperUtil.mapEPRProperties(listener, eprNode, model);
-
-			// Remove any empty attributes set on the EPR config...
-			YADOMUtil.removeEmptyAttributes(eprNode);
-		}
-		
-		// Remove any empty attributes set on the listener config...
-		YADOMUtil.removeEmptyAttributes(listenerNode);
-		
-		return listenerNode;
-	}
-
-	/**
-	 * Assert that a valid mapping can be performed from the supplied listener, and the bus + provider it reverences.
-	 * @param listener The listener to be checked.
-	 * @param model The config model instance.
-	 * @throws ConfigurationException Invalid mappng request.
-	 */
-
-	private static void assertListenerConfigOK(Listener listener, XMLBeansModel model) throws ConfigurationException {
-		
-		// Note we're purposely performing instanceof comparisons here...
-		
-		if(listener.getClass() != ListenerImpl.class) {
-			throw new ConfigurationException("Can only use the " + UntypedListenerMapper.class.getName() + " mapper on the base listener type.  Cannot use on " + listener.getClass().getName());
-		}
-		Bus bus = model.getBus(listener.getBusidref());
-		if(bus.getClass() != BusImpl.class) {
-			throw new ConfigurationException("The base Listener config [" + listener.getName() + "] must reference a base Bus config type (<bus>).");
-		}
-		Provider provider = model.getProvider(bus);
-		if(provider.getClass().isAssignableFrom(BusProviderImpl.class)) {
-			throw new ConfigurationException("A base Bus config type (<bus>) must be contained within a base Provider type (<bus-provider>).");
-		}
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/UntypedListenerMapper.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,112 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.impl.BusImpl;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.impl.ListenerImpl;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.impl.BusProviderImpl;
+import org.w3c.dom.Element;
+
+/**
+ * Perform a mapping for an "untyped" listener configuration.
+ * <p/>
+ * By "untyped" we mean that the listener type is not defined in the XSD, but instead is being
+ * defined using the base &lt;listener&gt; type, mapping all it's associated
+ * &lt;property&gt; values (including those of the associated bus and provider) onto the listener
+ * ConfigTree as attributes.
+ * <p/>
+ * This is effectively like the base transform - if we don't have a mapper for the listener, this one is applied.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class UntypedListenerMapper {
+
+	/**
+	 * Perform the mapping.
+	 * @param root The "ConfigTree" configuration root node.
+	 * @param listener The listener to be mapped into the ConfigTree.
+	 * @param model The configuration model from which the mapping is being performed.
+	 * @return The ConfigTree listener configuration node.
+	 * @throws ConfigurationException Invalid listener configuration.
+	 */
+	public static Element map(Element root, Listener listener, XMLBeansModel model) throws ConfigurationException {
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
+
+        listenerNode.setAttribute("name", listener.getName());
+
+		assertListenerConfigOK(listener, model);
+		
+		// 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.
+		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
+
+		if(listener.getIsGateway()) {
+			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+			
+			MapperUtil.mapEPRProperties(listener, listenerNode, model);
+
+		} else {
+
+			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+			MapperUtil.mapEPRProperties(listener, eprNode, model);
+
+			// Remove any empty attributes set on the EPR config...
+			YADOMUtil.removeEmptyAttributes(eprNode);
+		}
+		
+		// Remove any empty attributes set on the listener config...
+		YADOMUtil.removeEmptyAttributes(listenerNode);
+		
+		return listenerNode;
+	}
+
+	/**
+	 * Assert that a valid mapping can be performed from the supplied listener, and the bus + provider it reverences.
+	 * @param listener The listener to be checked.
+	 * @param model The config model instance.
+	 * @throws ConfigurationException Invalid mappng request.
+	 */
+
+	private static void assertListenerConfigOK(Listener listener, XMLBeansModel model) throws ConfigurationException {
+		
+		// Note we're purposely performing instanceof comparisons here...
+		
+		if(listener.getClass() != ListenerImpl.class) {
+			throw new ConfigurationException("Can only use the " + UntypedListenerMapper.class.getName() + " mapper on the base listener type.  Cannot use on " + listener.getClass().getName());
+		}
+		Bus bus = model.getBus(listener.getBusidref());
+		if(bus.getClass() != BusImpl.class) {
+			throw new ConfigurationException("The base Listener config [" + listener.getName() + "] must reference a base Bus config type (<bus>).");
+		}
+		Provider provider = model.getProvider(bus);
+		if(provider.getClass().isAssignableFrom(BusProviderImpl.class)) {
+			throw new ConfigurationException("A base Bus config type (<bus>) must be contained within a base Provider type (<bus-provider>).");
+		}
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,527 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
-import org.jboss.internal.soa.esb.publish.ContractPublisher;
-import org.jboss.internal.soa.esb.publish.Publish;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.listeners.config.ServicePublisher;
-import org.jboss.soa.esb.listeners.config.WebserviceInfo;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.AbstractScheduledListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Bus;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.BusProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JcaGatewayDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ListenersDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.MepType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActionDocument.Action;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActionsDocument.Actions;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Jbossesb;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ProvidersDocument.Providers;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduleProviderDocument.ScheduleProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServicesDocument.Services;
-import org.jboss.soa.esb.util.ClassUtil;
-import org.w3c.dom.Document;
-
-/**
- * XMLBeans based model implementation.
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class XMLBeansModel {
-
-    /**
-     * XMLBeans config model instance.
-     */
-    private Jbossesb jbossesb;
-    
-    /**
-     * Constructor.
-     * @param xmlBeansDoc XMLBeans config model.
-     */
-    public XMLBeansModel(Jbossesb jbossesb) {
-        this.jbossesb = jbossesb;
-    }
-
-    /**
-     * Get the list of ESB Gateway Listeners from the configuration.
-     * @return The list of ESB Gateway Listeners from the configuration.
-     * @throws ConfigurationException Bad configuration.
-     */
-    public List<Listener> getGatewayListeners() throws ConfigurationException {
-        return getListeners(true);
-    }
-
-    /**
-     * Get the list of ESB Aware Listeners from the configuration.
-     * @return The list of ESB Aware Listeners from the configuration.
-     * @throws ConfigurationException Bad configuration.
-     */
-    public List<Listener> getESBAwareListeners() throws ConfigurationException {
-        return getListeners(false);
-    }
-
-    /**
-     * Get the Service to which the supplied {@link Listener} configuration instance is bound.
-     * @param listener The listener instance (Gateway or ESB Aware).
-     * @return The Service to which the 
-     */
-    public Service getService(Listener listener) {
-        List<Service> services = getServices();
-
-        for(Service service : services) {
-            ListenersDocument.Listeners listeners = service.getListeners();
-
-            if(listeners != null) {
-                List<Listener> listenerList = listeners.getListenerList();
-
-                if(listenerList != null) {
-                    for(Listener serviceListener : listenerList) {
-                        if(serviceListener == listener) {
-                            return service;
-                        }
-                    }
-                }
-            }
-        }
-        
-        throw new IllegalStateException("No Service instance found for the supplied Listener instance.  This should not be possible if the Listener instance was provided by this configuration.  Where has this Listener instance come from?");
-    }
-
-    /**
-     * Get the Service list.
-     * @return Service list.
-     */
-    public List<Service> getServices() {
-        final Services services = jbossesb.getServices();
-        if (services != null) {
-            return jbossesb.getServices().getServiceList();
-        } else {
-            return Collections.emptyList();
-        }
-    }
-
-    /**
-     * Get the &lt;bus&gt; configuration matching the supplied busid reference value.
-     * @param busid The required &lt;bus&gt; configuration reference value.
-     * @return The Bus configuration instance.
-     * @throws ConfigurationException Unknown busid reference value.
-     */
-    public Bus getBus(String busid) throws ConfigurationException {
-        List<Provider> providers = jbossesb.getProviders().getProviderList();
-        
-        for(Provider provider : providers) {
-            if(provider instanceof BusProvider) {
-                List<Bus> buses = ((BusProvider)provider).getBusList();
-
-                for(Bus bus : buses) {
-                    if(bus.getBusid().equals(busid)) {
-                        return bus;
-                    }
-                }
-            }
-        }
-        
-        throw new ConfigurationException("Invalid ESB Configuration: No <bus> configuration matching busid reference value [" + busid + "].");
-    }
-
-    /**
-     * Get the &lt;provider&gt; configuration containing the supplied Bus configuration instance.
-     * @param bus The Bus config instance whose Provider is being sought.
-     * @return The Provider configuration instance.
-     */
-    public Provider getProvider(Bus bus) {
-        List<Provider> providers = jbossesb.getProviders().getProviderList();
-        
-        for(Provider provider : providers) {
-            if(provider instanceof BusProvider) {
-                List<Bus> buses = ((BusProvider)provider).getBusList();
-
-                for(Bus installedBus : buses) {
-                    if(installedBus == bus) {
-                        return provider;
-                    }
-                }
-            }
-        }
-        
-        throw new IllegalStateException("No Provider instance found for the supplied Bus config instance.  This should not be possible if the Bus instance was provided by this configuration.  Where has this Bus instance come from?");
-    }
-
-    public Schedule getSchedule(final String id) {
-        if((id == null) || (jbossesb.getProviders() == null)) {
-            return null;
-        }
-
-        List<Provider> providers = jbossesb.getProviders().getProviderList();
-
-        for(Provider provider : providers) {
-            if(provider instanceof ScheduleProvider) {
-                final ScheduleProvider scheduleProvider = (ScheduleProvider)provider ;
-                final List<Schedule> schedules = scheduleProvider.getScheduleList() ;
-                for(Schedule schedule: schedules) {
-                    if (id.equals(schedule.getScheduleid())) {
-                        return schedule ;
-                    }
-                }
-            }
-        }
-
-        return null;
-    }
-
-    public ScheduleProvider getScheduleProvider() {
-        if(jbossesb.getProviders() == null) {
-            return null;
-        }
-
-        List<Provider> providers = jbossesb.getProviders().getProviderList();
-
-        for(Provider provider : providers) {
-            if(provider instanceof ScheduleProvider) {
-                return (ScheduleProvider) provider;
-            }
-        }
-
-        return null;
-    }
-    
-    public int getScheduledListenerCount() {
-        int count = 0 ;
-        if (jbossesb.getServices() != null) {
-            final List<Service> services = getServices() ;
-            for(Service service: services) {
-                final ListenersDocument.Listeners listeners = service.getListeners() ;
-                if (listeners != null) {
-                    for (Listener listener: listeners.getListenerList()) {
-                        if (listener instanceof AbstractScheduledListener) {
-                            count++ ;
-                        }
-                    }
-                }
-            }
-        }
-        return count ;
-    }
-
-    private boolean isGateway(Listener listener)
-    {
-        return listener.getIsGateway() || (listener instanceof JcaGatewayDocument.JcaGateway);
-    }
-
-    /**
-     * Get the list of ESB Listeners based on their Gateway flag.
-     * @return The list of ESB Aware or Gateway Listeners from the configuration.
-     * @param isGateway Is the listener a gateway or ESB aware listener.
-     * @throws ConfigurationException Bad configuration.
-     */
-    private List<Listener> getListeners(boolean isGateway) throws ConfigurationException {
-        List<Listener> gateways = new ArrayList<Listener>();
-        if (jbossesb.getServices() != null) {
-            List<Service> services = getServices();
-
-            for(Service service : services) {
-                boolean listenerAdded = false;
-                ListenersDocument.Listeners listeners = service.getListeners();
-
-                if(listeners != null) {
-                    for(Listener listener : listeners.getListenerList()) {
-                        if(isGateway(listener) == isGateway) {
-                            gateways.add(listener);
-                            listenerAdded = true;
-                        }
-                    }
-                }
-
-                // Make sure each Service config has a message aware listener...
-                // http://jira.jboss.com/jira/browse/JBESB-648
-                if(!exposesInVMListener(service) && !isGateway && !listenerAdded) {
-                    throw new ConfigurationException("Service configuration for Service '" + service.getCategory() + ":" + service.getName() + "' doesn't define a Message-Aware Listener (i.e. is-gateway='false').");
-                }
-            }
-        }
-        
-        return gateways;
-    }
-
-    /**
-     * Gets the setting for the number of seconds between reloads.
-     * 
-     * @return The param reload seconds config value.
-     */
-    public String getParameterReloadSecs() {
-        return jbossesb.getParameterReloadSecs().getStringValue();
-    }
-    
-    public static String getProperty(List<Property> properties, String name, String defaultVal) {
-        for (PropertyDocument.Property property : properties) {
-            if(property.getName().equals(name)) {
-                return property.getValue();
-            }
-        }
-
-        return defaultVal;
-    }
-    
-    public static boolean exposesInVMListener(Service service) {
-        if(service.xgetInvmScope() != null && service.xgetInvmScope().getStringValue() != null) {
-            return (service.xgetInvmScope().getStringValue().equals("GLOBAL"));
-        }
-
-        String systemDefaultScope = System.getProperty(Environment.DEFAULT_INVM_SCOPE, "GLOBAL");
-        String defaultScope = ModulePropertyManager.getPropertyManager("core").getProperty(Environment.DEFAULT_INVM_SCOPE, systemDefaultScope);
-
-        return defaultScope.equals("GLOBAL");
-    }
-    
-    /**
-     * Verify the schedule provider configuration.
-     * @throws ConfigurationException
-     */
-    public void verifyScheduleProviderConfig()
-        throws ConfigurationException {
-        Providers providersConfig = jbossesb.getProviders();
-
-        if(providersConfig == null) {
-            return;
-        }
-
-        List<Provider> providers = providersConfig.getProviderList();
-        int numScheduleProviders = 0;
-
-        for(Provider provider : providers) {
-            if(provider instanceof ScheduleProvider) {
-                numScheduleProviders++;
-            }
-        }
-
-        if(numScheduleProviders > 1) {
-            throw new ConfigurationException("Configuration contains " + numScheduleProviders + " <schedule-provider> configurations.  Only one of this provider type can exist per configuration.");
-        }
-    }
-
-
-    /**
-     * Get a map of service publishers provided by each service.
-     * 
-     * @return The map of service publishers, keyed by service.
-     */
-    public Map<org.jboss.soa.esb.Service, List<ServicePublisher>> getServicePublishers() {
-        List<Service> serviceConfigs = getServices();
-        final Map<org.jboss.soa.esb.Service, List<ServicePublisher>> servicePublishers = new LinkedHashMap<org.jboss.soa.esb.Service, List<ServicePublisher>>() ;
-
-        for (Service docService : serviceConfigs) {
-            ContractPublisher publisher = getContractPublisher(docService);
-            final org.jboss.soa.esb.Service service = new org.jboss.soa.esb.Service(docService.getCategory(), docService.getName()) ;
-            ServicePublisher servicePublisher = new ServicePublisher(service.getName(), service.getCategory(), publisher);
-
-            servicePublisher.setDescription(docService.getDescription());
-            addPublisher(servicePublishers, service, servicePublisher) ;
-        }
-        
-        return servicePublishers ;
-    }
-
-    /**
-     * Get the contract publisher for the service.
-     * @param service The current service definition.
-     * @return The contract publisher of null if none present.
-     */
-    private static ContractPublisher getContractPublisher(Service service) {
-        if(service.getActions() == null || service.getActions().getActionList() == null) {
-            return null;
-        }
-
-        for (Action action : service.getActions().getActionList()) {
-            Class<Class> actionClass;
-
-            try {
-                actionClass = (Class<Class>) ClassUtil.forName(action.getClass1(), ServicePublisher.class);
-            } catch (ClassNotFoundException e) {
-                throw new RuntimeException("Failed to find action class '" + action.getClass1() + "'.", e);
-            }
-
-            Publish publishAnnotation = (Publish) actionClass.getAnnotation(Publish.class);
-            if (publishAnnotation != null) {
-                Class publisherClass;
-                ActionContractPublisher publisher = null;
-
-                publisherClass = publishAnnotation.value();
-                try {
-                    publisher = (ActionContractPublisher) publisherClass.newInstance();
-                    final org.jboss.soa.esb.listeners.config.Action actionInfo = new org.jboss.soa.esb.listeners.config.Action(
-                        action.getName(), action.getClass1(), action.getProcess(), toProperties(action.getPropertyList())) ;
-                    publisher.setActionConfig(actionInfo);
-                    return publisher;
-                } catch (ClassCastException e) {
-                    throw new RuntimeException("Action Contract Publisher class '" + publisherClass.getName() + "' must implement " + ActionContractPublisher.class.getName());
-                } catch (Exception e) {
-                    throw new RuntimeException("Failed to instantiate Contract Publisher '" + publisherClass.getName() + "'. Class must implement a public default constructor.", e);
-                }
-            }
-        }
-
-        // No publisher configured on any of the actions in the processing chain...
-        return null;
-    }
-
-    
-    /**
-     * Add the publisher into map for the specified service.
-     * @param servicePublishers The service publishers
-     * @param service The service name
-     * @param publisher The publisher
-     */
-    private static void addPublisher(final Map<org.jboss.soa.esb.Service, List<ServicePublisher>> servicePublishers,
-            final org.jboss.soa.esb.Service service, final ServicePublisher publisher)
-    {
-        final List<ServicePublisher> publishers = servicePublishers.get(service) ;
-        if (publishers != null) {
-            publishers.add(publisher);
-        } else {
-            final List<ServicePublisher> newPublishers = new ArrayList<ServicePublisher>() ;
-            newPublishers.add(publisher) ;
-            servicePublishers.put(service, newPublishers) ;
-        }
-    }
-
-    /**
-     * Generate the ESB Aware configuration document.
-     * @return The ESB aware configuration.
-     * @throws ConfigurationException Error creating configuration. 
-     */
-    public Document generateESBAwareConfig()
-        throws ConfigurationException
-    {
-        // Generate and serialise the configuration for the ESB Aware listeners...
-        ESBAwareGenerator awareGenerator = new ESBAwareGenerator(this);
-        return awareGenerator.generate();
-    }
-
-    /**
-     * Generate the gateway configuration document.
-     * @return The gateway configuration.
-     * @throws ConfigurationException Error creating configuration. 
-     */
-    public Document generateGatewayConfig()
-        throws ConfigurationException
-    {
-        // Generate and serialise the configuration for the Gateway listeners...
-        GatewayGenerator gatewayGenerator = new GatewayGenerator(this);
-        return gatewayGenerator.generate();
-    }
-
-    /**
-     * Get the properties from the document.
-     * @param configProperties The document properties.
-     * @return The properties.
-     */
-    public static Properties toProperties(List<PropertyDocument.Property> configProperties) {
-        Properties properties = new Properties();
-
-        for(PropertyDocument.Property property : configProperties) {
-            properties.setProperty(property.getName(), property.getValue());
-        }
-
-        return properties;
-    }
-
-    /**
-     * Get the list of actions in this deployment.
-     * @return a list of actions or null if none present.
-     */
-    public Set<String> getActions()
-    {
-        final Services services = jbossesb.getServices() ;
-        if (services != null)
-        {
-            final Set<String> actionClasses = new HashSet<String>() ;
-            
-            for(final Service service : services.getServiceList())
-            {
-                final Actions actions = service.getActions() ;
-                if (actions != null)
-                {
-                    for (final Action action: actions.getActionList())
-                    {
-                        actionClasses.add(action.getClass1()) ;
-                    }
-                }
-            }
-            
-            return actionClasses ;
-        }
-        return null ;
-    }
-
-    
-    /**
-     * Get the list of services which require a webservice endpoint.
-     * @return The list of services.
-     */
-    public List<WebserviceInfo> getWebserviceServices()
-    {
-        final List<WebserviceInfo> endpointServices = new ArrayList<WebserviceInfo>() ;
-        final Services services = jbossesb.getServices() ;
-        if (services != null)
-        {
-            for(final Service service : services.getServiceList())
-            {
-                final Actions actions = service.getActions() ;
-                if (actions != null)
-                {
-                    if (!actions.isSetWebservice() || actions.getWebservice())
-                    {
-                        final String inXsd = actions.getInXsd() ;
-                        if (inXsd != null)
-                        {
-                            final WebserviceInfo webserviceInfo = new WebserviceInfo(
-                                new org.jboss.soa.esb.Service(service.getCategory(), service.getName()),
-                                actions.getInXsd(), actions.getOutXsd(), actions.getFaultXsd(),
-                                service.getDescription(), MepType.REQUEST_RESPONSE.equals(actions.getMep())) ;
-                            endpointServices.add(webserviceInfo) ;
-                        }
-                    }
-                }
-            }
-        }
-        return endpointServices ;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/XMLBeansModel.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,527 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
+import org.jboss.internal.soa.esb.publish.ContractPublisher;
+import org.jboss.internal.soa.esb.publish.Publish;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.listeners.config.ServicePublisher;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.AbstractScheduledListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Bus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.BusProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JcaGatewayDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ListenersDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.MepType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActionDocument.Action;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActionsDocument.Actions;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Jbossesb;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ProvidersDocument.Providers;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ScheduleProviderDocument.ScheduleProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServicesDocument.Services;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.w3c.dom.Document;
+
+/**
+ * XMLBeans based model implementation.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class XMLBeansModel {
+
+    /**
+     * XMLBeans config model instance.
+     */
+    private Jbossesb jbossesb;
+    
+    /**
+     * Constructor.
+     * @param xmlBeansDoc XMLBeans config model.
+     */
+    public XMLBeansModel(Jbossesb jbossesb) {
+        this.jbossesb = jbossesb;
+    }
+
+    /**
+     * Get the list of ESB Gateway Listeners from the configuration.
+     * @return The list of ESB Gateway Listeners from the configuration.
+     * @throws ConfigurationException Bad configuration.
+     */
+    public List<Listener> getGatewayListeners() throws ConfigurationException {
+        return getListeners(true);
+    }
+
+    /**
+     * Get the list of ESB Aware Listeners from the configuration.
+     * @return The list of ESB Aware Listeners from the configuration.
+     * @throws ConfigurationException Bad configuration.
+     */
+    public List<Listener> getESBAwareListeners() throws ConfigurationException {
+        return getListeners(false);
+    }
+
+    /**
+     * Get the Service to which the supplied {@link Listener} configuration instance is bound.
+     * @param listener The listener instance (Gateway or ESB Aware).
+     * @return The Service to which the 
+     */
+    public Service getService(Listener listener) {
+        List<Service> services = getServices();
+
+        for(Service service : services) {
+            ListenersDocument.Listeners listeners = service.getListeners();
+
+            if(listeners != null) {
+                List<Listener> listenerList = listeners.getListenerList();
+
+                if(listenerList != null) {
+                    for(Listener serviceListener : listenerList) {
+                        if(serviceListener == listener) {
+                            return service;
+                        }
+                    }
+                }
+            }
+        }
+        
+        throw new IllegalStateException("No Service instance found for the supplied Listener instance.  This should not be possible if the Listener instance was provided by this configuration.  Where has this Listener instance come from?");
+    }
+
+    /**
+     * Get the Service list.
+     * @return Service list.
+     */
+    public List<Service> getServices() {
+        final Services services = jbossesb.getServices();
+        if (services != null) {
+            return jbossesb.getServices().getServiceList();
+        } else {
+            return Collections.emptyList();
+        }
+    }
+
+    /**
+     * Get the &lt;bus&gt; configuration matching the supplied busid reference value.
+     * @param busid The required &lt;bus&gt; configuration reference value.
+     * @return The Bus configuration instance.
+     * @throws ConfigurationException Unknown busid reference value.
+     */
+    public Bus getBus(String busid) throws ConfigurationException {
+        List<Provider> providers = jbossesb.getProviders().getProviderList();
+        
+        for(Provider provider : providers) {
+            if(provider instanceof BusProvider) {
+                List<Bus> buses = ((BusProvider)provider).getBusList();
+
+                for(Bus bus : buses) {
+                    if(bus.getBusid().equals(busid)) {
+                        return bus;
+                    }
+                }
+            }
+        }
+        
+        throw new ConfigurationException("Invalid ESB Configuration: No <bus> configuration matching busid reference value [" + busid + "].");
+    }
+
+    /**
+     * Get the &lt;provider&gt; configuration containing the supplied Bus configuration instance.
+     * @param bus The Bus config instance whose Provider is being sought.
+     * @return The Provider configuration instance.
+     */
+    public Provider getProvider(Bus bus) {
+        List<Provider> providers = jbossesb.getProviders().getProviderList();
+        
+        for(Provider provider : providers) {
+            if(provider instanceof BusProvider) {
+                List<Bus> buses = ((BusProvider)provider).getBusList();
+
+                for(Bus installedBus : buses) {
+                    if(installedBus == bus) {
+                        return provider;
+                    }
+                }
+            }
+        }
+        
+        throw new IllegalStateException("No Provider instance found for the supplied Bus config instance.  This should not be possible if the Bus instance was provided by this configuration.  Where has this Bus instance come from?");
+    }
+
+    public Schedule getSchedule(final String id) {
+        if((id == null) || (jbossesb.getProviders() == null)) {
+            return null;
+        }
+
+        List<Provider> providers = jbossesb.getProviders().getProviderList();
+
+        for(Provider provider : providers) {
+            if(provider instanceof ScheduleProvider) {
+                final ScheduleProvider scheduleProvider = (ScheduleProvider)provider ;
+                final List<Schedule> schedules = scheduleProvider.getScheduleList() ;
+                for(Schedule schedule: schedules) {
+                    if (id.equals(schedule.getScheduleid())) {
+                        return schedule ;
+                    }
+                }
+            }
+        }
+
+        return null;
+    }
+
+    public ScheduleProvider getScheduleProvider() {
+        if(jbossesb.getProviders() == null) {
+            return null;
+        }
+
+        List<Provider> providers = jbossesb.getProviders().getProviderList();
+
+        for(Provider provider : providers) {
+            if(provider instanceof ScheduleProvider) {
+                return (ScheduleProvider) provider;
+            }
+        }
+
+        return null;
+    }
+    
+    public int getScheduledListenerCount() {
+        int count = 0 ;
+        if (jbossesb.getServices() != null) {
+            final List<Service> services = getServices() ;
+            for(Service service: services) {
+                final ListenersDocument.Listeners listeners = service.getListeners() ;
+                if (listeners != null) {
+                    for (Listener listener: listeners.getListenerList()) {
+                        if (listener instanceof AbstractScheduledListener) {
+                            count++ ;
+                        }
+                    }
+                }
+            }
+        }
+        return count ;
+    }
+
+    private boolean isGateway(Listener listener)
+    {
+        return listener.getIsGateway() || (listener instanceof JcaGatewayDocument.JcaGateway);
+    }
+
+    /**
+     * Get the list of ESB Listeners based on their Gateway flag.
+     * @return The list of ESB Aware or Gateway Listeners from the configuration.
+     * @param isGateway Is the listener a gateway or ESB aware listener.
+     * @throws ConfigurationException Bad configuration.
+     */
+    private List<Listener> getListeners(boolean isGateway) throws ConfigurationException {
+        List<Listener> gateways = new ArrayList<Listener>();
+        if (jbossesb.getServices() != null) {
+            List<Service> services = getServices();
+
+            for(Service service : services) {
+                boolean listenerAdded = false;
+                ListenersDocument.Listeners listeners = service.getListeners();
+
+                if(listeners != null) {
+                    for(Listener listener : listeners.getListenerList()) {
+                        if(isGateway(listener) == isGateway) {
+                            gateways.add(listener);
+                            listenerAdded = true;
+                        }
+                    }
+                }
+
+                // Make sure each Service config has a message aware listener...
+                // http://jira.jboss.com/jira/browse/JBESB-648
+                if(!exposesInVMListener(service) && !isGateway && !listenerAdded) {
+                    throw new ConfigurationException("Service configuration for Service '" + service.getCategory() + ":" + service.getName() + "' doesn't define a Message-Aware Listener (i.e. is-gateway='false').");
+                }
+            }
+        }
+        
+        return gateways;
+    }
+
+    /**
+     * Gets the setting for the number of seconds between reloads.
+     * 
+     * @return The param reload seconds config value.
+     */
+    public String getParameterReloadSecs() {
+        return jbossesb.getParameterReloadSecs().getStringValue();
+    }
+    
+    public static String getProperty(List<Property> properties, String name, String defaultVal) {
+        for (PropertyDocument.Property property : properties) {
+            if(property.getName().equals(name)) {
+                return property.getValue();
+            }
+        }
+
+        return defaultVal;
+    }
+    
+    public static boolean exposesInVMListener(Service service) {
+        if(service.xgetInvmScope() != null && service.xgetInvmScope().getStringValue() != null) {
+            return (service.xgetInvmScope().getStringValue().equals("GLOBAL"));
+        }
+
+        String systemDefaultScope = System.getProperty(Environment.DEFAULT_INVM_SCOPE, "GLOBAL");
+        String defaultScope = ModulePropertyManager.getPropertyManager("core").getProperty(Environment.DEFAULT_INVM_SCOPE, systemDefaultScope);
+
+        return defaultScope.equals("GLOBAL");
+    }
+    
+    /**
+     * Verify the schedule provider configuration.
+     * @throws ConfigurationException
+     */
+    public void verifyScheduleProviderConfig()
+        throws ConfigurationException {
+        Providers providersConfig = jbossesb.getProviders();
+
+        if(providersConfig == null) {
+            return;
+        }
+
+        List<Provider> providers = providersConfig.getProviderList();
+        int numScheduleProviders = 0;
+
+        for(Provider provider : providers) {
+            if(provider instanceof ScheduleProvider) {
+                numScheduleProviders++;
+            }
+        }
+
+        if(numScheduleProviders > 1) {
+            throw new ConfigurationException("Configuration contains " + numScheduleProviders + " <schedule-provider> configurations.  Only one of this provider type can exist per configuration.");
+        }
+    }
+
+
+    /**
+     * Get a map of service publishers provided by each service.
+     * 
+     * @return The map of service publishers, keyed by service.
+     */
+    public Map<org.jboss.soa.esb.Service, List<ServicePublisher>> getServicePublishers() {
+        List<Service> serviceConfigs = getServices();
+        final Map<org.jboss.soa.esb.Service, List<ServicePublisher>> servicePublishers = new LinkedHashMap<org.jboss.soa.esb.Service, List<ServicePublisher>>() ;
+
+        for (Service docService : serviceConfigs) {
+            ContractPublisher publisher = getContractPublisher(docService);
+            final org.jboss.soa.esb.Service service = new org.jboss.soa.esb.Service(docService.getCategory(), docService.getName()) ;
+            ServicePublisher servicePublisher = new ServicePublisher(service.getName(), service.getCategory(), publisher);
+
+            servicePublisher.setDescription(docService.getDescription());
+            addPublisher(servicePublishers, service, servicePublisher) ;
+        }
+        
+        return servicePublishers ;
+    }
+
+    /**
+     * Get the contract publisher for the service.
+     * @param service The current service definition.
+     * @return The contract publisher of null if none present.
+     */
+    private static ContractPublisher getContractPublisher(Service service) {
+        if(service.getActions() == null || service.getActions().getActionList() == null) {
+            return null;
+        }
+
+        for (Action action : service.getActions().getActionList()) {
+            Class<Class> actionClass;
+
+            try {
+                actionClass = (Class<Class>) ClassUtil.forName(action.getClass1(), ServicePublisher.class);
+            } catch (ClassNotFoundException e) {
+                throw new RuntimeException("Failed to find action class '" + action.getClass1() + "'.", e);
+            }
+
+            Publish publishAnnotation = (Publish) actionClass.getAnnotation(Publish.class);
+            if (publishAnnotation != null) {
+                Class publisherClass;
+                ActionContractPublisher publisher = null;
+
+                publisherClass = publishAnnotation.value();
+                try {
+                    publisher = (ActionContractPublisher) publisherClass.newInstance();
+                    final org.jboss.soa.esb.listeners.config.Action actionInfo = new org.jboss.soa.esb.listeners.config.Action(
+                        action.getName(), action.getClass1(), action.getProcess(), toProperties(action.getPropertyList())) ;
+                    publisher.setActionConfig(actionInfo);
+                    return publisher;
+                } catch (ClassCastException e) {
+                    throw new RuntimeException("Action Contract Publisher class '" + publisherClass.getName() + "' must implement " + ActionContractPublisher.class.getName());
+                } catch (Exception e) {
+                    throw new RuntimeException("Failed to instantiate Contract Publisher '" + publisherClass.getName() + "'. Class must implement a public default constructor.", e);
+                }
+            }
+        }
+
+        // No publisher configured on any of the actions in the processing chain...
+        return null;
+    }
+
+    
+    /**
+     * Add the publisher into map for the specified service.
+     * @param servicePublishers The service publishers
+     * @param service The service name
+     * @param publisher The publisher
+     */
+    private static void addPublisher(final Map<org.jboss.soa.esb.Service, List<ServicePublisher>> servicePublishers,
+            final org.jboss.soa.esb.Service service, final ServicePublisher publisher)
+    {
+        final List<ServicePublisher> publishers = servicePublishers.get(service) ;
+        if (publishers != null) {
+            publishers.add(publisher);
+        } else {
+            final List<ServicePublisher> newPublishers = new ArrayList<ServicePublisher>() ;
+            newPublishers.add(publisher) ;
+            servicePublishers.put(service, newPublishers) ;
+        }
+    }
+
+    /**
+     * Generate the ESB Aware configuration document.
+     * @return The ESB aware configuration.
+     * @throws ConfigurationException Error creating configuration. 
+     */
+    public Document generateESBAwareConfig()
+        throws ConfigurationException
+    {
+        // Generate and serialise the configuration for the ESB Aware listeners...
+        ESBAwareGenerator awareGenerator = new ESBAwareGenerator(this);
+        return awareGenerator.generate();
+    }
+
+    /**
+     * Generate the gateway configuration document.
+     * @return The gateway configuration.
+     * @throws ConfigurationException Error creating configuration. 
+     */
+    public Document generateGatewayConfig()
+        throws ConfigurationException
+    {
+        // Generate and serialise the configuration for the Gateway listeners...
+        GatewayGenerator gatewayGenerator = new GatewayGenerator(this);
+        return gatewayGenerator.generate();
+    }
+
+    /**
+     * Get the properties from the document.
+     * @param configProperties The document properties.
+     * @return The properties.
+     */
+    public static Properties toProperties(List<PropertyDocument.Property> configProperties) {
+        Properties properties = new Properties();
+
+        for(PropertyDocument.Property property : configProperties) {
+            properties.setProperty(property.getName(), property.getValue());
+        }
+
+        return properties;
+    }
+
+    /**
+     * Get the list of actions in this deployment.
+     * @return a list of actions or null if none present.
+     */
+    public Set<String> getActions()
+    {
+        final Services services = jbossesb.getServices() ;
+        if (services != null)
+        {
+            final Set<String> actionClasses = new HashSet<String>() ;
+            
+            for(final Service service : services.getServiceList())
+            {
+                final Actions actions = service.getActions() ;
+                if (actions != null)
+                {
+                    for (final Action action: actions.getActionList())
+                    {
+                        actionClasses.add(action.getClass1()) ;
+                    }
+                }
+            }
+            
+            return actionClasses ;
+        }
+        return null ;
+    }
+
+    
+    /**
+     * Get the list of services which require a webservice endpoint.
+     * @return The list of services.
+     */
+    public List<WebserviceInfo> getWebserviceServices()
+    {
+        final List<WebserviceInfo> endpointServices = new ArrayList<WebserviceInfo>() ;
+        final Services services = jbossesb.getServices() ;
+        if (services != null)
+        {
+            for(final Service service : services.getServiceList())
+            {
+                final Actions actions = service.getActions() ;
+                if (actions != null)
+                {
+                    if (!actions.isSetWebservice() || actions.getWebservice())
+                    {
+                        final String inXsd = actions.getInXsd() ;
+                        if (inXsd != null)
+                        {
+                            final WebserviceInfo webserviceInfo = new WebserviceInfo(
+                                new org.jboss.soa.esb.Service(service.getCategory(), service.getName()),
+                                actions.getInXsd(), actions.getOutXsd(), actions.getFaultXsd(),
+                                service.getDescription(), MepType.REQUEST_RESPONSE.equals(actions.getMep())) ;
+                            endpointServices.add(webserviceInfo) ;
+                        }
+                    }
+                }
+            }
+        }
+        return endpointServices ;
+    }
+}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,160 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.model;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.xmlbeans.XmlException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.Service;
-import org.jboss.soa.esb.listeners.config.ServicePublisher;
-import org.jboss.soa.esb.listeners.config.WebserviceInfo;
-import org.jboss.soa.esb.listeners.config.mappers.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Factory;
-import org.w3c.dom.Document;
-
-/**
- * Schema parser for jbossesb-1.0.1.xsd schema.
- * 
- * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
- */
-class Model101SchemaParser implements SchemaParser
-{
-    /**
-     * The namespace associated with this parser.
-     */
-    static final String NAMESPACE = "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" ;
-    
-    /**
-     * The schema resource for validation.
-     */
-    static final String SCHEMA = "/jbossesb-1.0.1.xsd";
-
-    
-    /**
-     * Obtain a model adapter from the specified stream.
-     * @param reader The XML stream reader.
-     * @return The model adapter
-     * @throws XMLStreamException for errors during parsing.
-     */
-    public ModelAdapter parse(final XMLStreamReader reader)
-        throws ModelException
-    {
-        try
-        {
-           return new Model101Adapter(new XMLBeansModel(Factory.parse(reader).getJbossesb())) ;
-        }
-        catch (final XmlException xmle)
-        {
-            throw new ModelException("Error during schema parsing", xmle) ;
-        }
-    }
-    
-    /**
-     * Model adapter for the jbossesb-1.0.1.xsd schema.
-     * 
-     * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
-     *
-     */
-    private static final class Model101Adapter implements ModelAdapter
-    {
-        /**
-         * The model for jbossesb-1.0.1.xsd.
-         */
-        private final XMLBeansModel model ;
-        
-        /**
-         * Create the jbossesb-1.0.1 model adapter.
-         * @param model The jbossesb-1.0.1 model.
-         */
-        Model101Adapter(final XMLBeansModel model)
-        {
-            this.model = model ;
-        }
-        
-        /**
-         * Verify the schedule provider configuration.
-         * @throws ConfigurationException
-         */
-        public void verifyScheduleProviderConfig()
-            throws ConfigurationException
-        {
-            model.verifyScheduleProviderConfig() ;
-        }
-
-        /**
-         * Get a map of service publishers provided by each service.
-         * 
-         * @return The map of service publishers, keyed by service.
-         */
-        public Map<Service, List<ServicePublisher>> getServicePublishers()
-        {
-            return model.getServicePublishers() ;
-        }
-        
-
-        /**
-         * Generate the ESB Aware configuration document.
-         * @return The ESB aware configuration.
-         * @throws ConfigurationException Error creating configuration. 
-         */
-        public Document generateESBAwareConfig()
-            throws ConfigurationException
-        {
-            return model.generateESBAwareConfig() ;
-        }
-
-        /**
-         * Generate the gateway configuration document.
-         * @return The gateway configuration.
-         * @throws ConfigurationException Error creating configuration. 
-         */
-        public Document generateGatewayConfig()
-            throws ConfigurationException
-        {
-            return model.generateGatewayConfig() ;
-        }
-        
-        /**
-         * Get the list of actions in this deployment.
-         * @return a list of actions or null if none present.
-         */
-        public Set<String> getActions()
-        {
-            return model.getActions() ;
-        }
-        
-        /**
-         * Get the list of services which require a webservice endpoint.
-         * @return The list of services.
-         */
-        public List<WebserviceInfo> getWebserviceServices()
-        {
-            return model.getWebserviceServices() ;
-        }
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model101SchemaParser.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,160 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.model;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.xmlbeans.XmlException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.listeners.config.ServicePublisher;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
+import org.jboss.soa.esb.listeners.config.mappers.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Factory;
+import org.w3c.dom.Document;
+
+/**
+ * Schema parser for jbossesb-1.0.1.xsd schema.
+ * 
+ * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
+ */
+class Model101SchemaParser implements SchemaParser
+{
+    /**
+     * The namespace associated with this parser.
+     */
+    static final String NAMESPACE = "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" ;
+    
+    /**
+     * The schema resource for validation.
+     */
+    static final String SCHEMA = "/jbossesb-1.0.1.xsd";
+
+    
+    /**
+     * Obtain a model adapter from the specified stream.
+     * @param reader The XML stream reader.
+     * @return The model adapter
+     * @throws XMLStreamException for errors during parsing.
+     */
+    public ModelAdapter parse(final XMLStreamReader reader)
+        throws ModelException
+    {
+        try
+        {
+           return new Model101Adapter(new XMLBeansModel(Factory.parse(reader).getJbossesb())) ;
+        }
+        catch (final XmlException xmle)
+        {
+            throw new ModelException("Error during schema parsing", xmle) ;
+        }
+    }
+    
+    /**
+     * Model adapter for the jbossesb-1.0.1.xsd schema.
+     * 
+     * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
+     *
+     */
+    private static final class Model101Adapter implements ModelAdapter
+    {
+        /**
+         * The model for jbossesb-1.0.1.xsd.
+         */
+        private final XMLBeansModel model ;
+        
+        /**
+         * Create the jbossesb-1.0.1 model adapter.
+         * @param model The jbossesb-1.0.1 model.
+         */
+        Model101Adapter(final XMLBeansModel model)
+        {
+            this.model = model ;
+        }
+        
+        /**
+         * Verify the schedule provider configuration.
+         * @throws ConfigurationException
+         */
+        public void verifyScheduleProviderConfig()
+            throws ConfigurationException
+        {
+            model.verifyScheduleProviderConfig() ;
+        }
+
+        /**
+         * Get a map of service publishers provided by each service.
+         * 
+         * @return The map of service publishers, keyed by service.
+         */
+        public Map<Service, List<ServicePublisher>> getServicePublishers()
+        {
+            return model.getServicePublishers() ;
+        }
+        
+
+        /**
+         * Generate the ESB Aware configuration document.
+         * @return The ESB aware configuration.
+         * @throws ConfigurationException Error creating configuration. 
+         */
+        public Document generateESBAwareConfig()
+            throws ConfigurationException
+        {
+            return model.generateESBAwareConfig() ;
+        }
+
+        /**
+         * Generate the gateway configuration document.
+         * @return The gateway configuration.
+         * @throws ConfigurationException Error creating configuration. 
+         */
+        public Document generateGatewayConfig()
+            throws ConfigurationException
+        {
+            return model.generateGatewayConfig() ;
+        }
+        
+        /**
+         * Get the list of actions in this deployment.
+         * @return a list of actions or null if none present.
+         */
+        public Set<String> getActions()
+        {
+            return model.getActions() ;
+        }
+        
+        /**
+         * Get the list of services which require a webservice endpoint.
+         * @return The list of services.
+         */
+        public List<WebserviceInfo> getWebserviceServices()
+        {
+            return model.getWebserviceServices() ;
+        }
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,159 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.model;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.xmlbeans.XmlException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.Service;
-import org.jboss.soa.esb.listeners.config.ServicePublisher;
-import org.jboss.soa.esb.listeners.config.WebserviceInfo;
-import org.jboss.soa.esb.listeners.config.mappers110.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
-import org.w3c.dom.Document;
-
-/**
- * Schema parser for jbossesb-1.1.0.xsd schema.
- * 
- * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
- */
-class Model110SchemaParser implements SchemaParser
-{
-    /**
-     * The namespace associated with this parser.
-     */
-    static final String NAMESPACE = "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" ;
-    
-    /**
-     * The schema resource for validation.
-     */
-    static final String SCHEMA = "/jbossesb-1.1.0.xsd";
-    
-    /**
-     * Obtain a model adapter from the specified stream.
-     * @param reader The XML stream reader.
-     * @return The model adapter
-     * @throws XMLStreamException for errors during parsing.
-     */
-    public ModelAdapter parse(final XMLStreamReader reader)
-        throws ModelException
-    {
-        try
-        {
-           return new Model110Adapter(new XMLBeansModel(Factory.parse(reader).getJbossesb())) ;
-        }
-        catch (final XmlException xmle)
-        {
-            throw new ModelException("Error during schema parsing", xmle) ;
-        }
-    }
-    
-    /**
-     * Model adapter for the jbossesb-1.1.0.xsd schema.
-     * 
-     * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
-     *
-     */
-    private static final class Model110Adapter implements ModelAdapter
-    {
-        /**
-         * The model for jbossesb-1.1.0.xsd.
-         */
-        private final XMLBeansModel model ;
-        
-        /**
-         * Create the jbossesb-1.1.0 model adapter.
-         * @param model The jbossesb-1.1.0 model.
-         */
-        Model110Adapter(final XMLBeansModel model)
-        {
-            this.model = model ;
-        }
-        
-        /**
-         * Verify the schedule provider configuration.
-         * @throws ConfigurationException
-         */
-        public void verifyScheduleProviderConfig()
-            throws ConfigurationException
-        {
-            model.verifyScheduleProviderConfig() ;
-        }
-
-        /**
-         * Get a map of service publishers provided by each service.
-         * 
-         * @return The map of service publishers, keyed by service.
-         */
-        public Map<Service, List<ServicePublisher>> getServicePublishers()
-        {
-            return model.getServicePublishers() ;
-        }
-        
-
-        /**
-         * Generate the ESB Aware configuration document.
-         * @return The ESB aware configuration.
-         * @throws ConfigurationException Error creating configuration. 
-         */
-        public Document generateESBAwareConfig()
-            throws ConfigurationException
-        {
-            return model.generateESBAwareConfig() ;
-        }
-
-        /**
-         * Generate the gateway configuration document.
-         * @return The gateway configuration.
-         * @throws ConfigurationException Error creating configuration. 
-         */
-        public Document generateGatewayConfig()
-            throws ConfigurationException
-        {
-            return model.generateGatewayConfig() ;
-        }
-        
-        /**
-         * Get the list of actions in this deployment.
-         * @return a list of actions or null if none present.
-         */
-        public Set<String> getActions()
-        {
-            return model.getActions() ;
-        }
-        
-        /**
-         * Get the list of services which require a webservice endpoint.
-         * @return The list of services.
-         */
-        public List<WebserviceInfo> getWebserviceServices()
-        {
-            return model.getWebserviceServices() ;
-        }
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/Model110SchemaParser.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,159 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.model;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.xmlbeans.XmlException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.listeners.config.ServicePublisher;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
+import org.jboss.soa.esb.listeners.config.mappers110.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
+import org.w3c.dom.Document;
+
+/**
+ * Schema parser for jbossesb-1.1.0.xsd schema.
+ * 
+ * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
+ */
+class Model110SchemaParser implements SchemaParser
+{
+    /**
+     * The namespace associated with this parser.
+     */
+    static final String NAMESPACE = "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" ;
+    
+    /**
+     * The schema resource for validation.
+     */
+    static final String SCHEMA = "/jbossesb-1.1.0.xsd";
+    
+    /**
+     * Obtain a model adapter from the specified stream.
+     * @param reader The XML stream reader.
+     * @return The model adapter
+     * @throws XMLStreamException for errors during parsing.
+     */
+    public ModelAdapter parse(final XMLStreamReader reader)
+        throws ModelException
+    {
+        try
+        {
+           return new Model110Adapter(new XMLBeansModel(Factory.parse(reader).getJbossesb())) ;
+        }
+        catch (final XmlException xmle)
+        {
+            throw new ModelException("Error during schema parsing", xmle) ;
+        }
+    }
+    
+    /**
+     * Model adapter for the jbossesb-1.1.0.xsd schema.
+     * 
+     * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
+     *
+     */
+    private static final class Model110Adapter implements ModelAdapter
+    {
+        /**
+         * The model for jbossesb-1.1.0.xsd.
+         */
+        private final XMLBeansModel model ;
+        
+        /**
+         * Create the jbossesb-1.1.0 model adapter.
+         * @param model The jbossesb-1.1.0 model.
+         */
+        Model110Adapter(final XMLBeansModel model)
+        {
+            this.model = model ;
+        }
+        
+        /**
+         * Verify the schedule provider configuration.
+         * @throws ConfigurationException
+         */
+        public void verifyScheduleProviderConfig()
+            throws ConfigurationException
+        {
+            model.verifyScheduleProviderConfig() ;
+        }
+
+        /**
+         * Get a map of service publishers provided by each service.
+         * 
+         * @return The map of service publishers, keyed by service.
+         */
+        public Map<Service, List<ServicePublisher>> getServicePublishers()
+        {
+            return model.getServicePublishers() ;
+        }
+        
+
+        /**
+         * Generate the ESB Aware configuration document.
+         * @return The ESB aware configuration.
+         * @throws ConfigurationException Error creating configuration. 
+         */
+        public Document generateESBAwareConfig()
+            throws ConfigurationException
+        {
+            return model.generateESBAwareConfig() ;
+        }
+
+        /**
+         * Generate the gateway configuration document.
+         * @return The gateway configuration.
+         * @throws ConfigurationException Error creating configuration. 
+         */
+        public Document generateGatewayConfig()
+            throws ConfigurationException
+        {
+            return model.generateGatewayConfig() ;
+        }
+        
+        /**
+         * Get the list of actions in this deployment.
+         * @return a list of actions or null if none present.
+         */
+        public Set<String> getActions()
+        {
+            return model.getActions() ;
+        }
+        
+        /**
+         * Get the list of services which require a webservice endpoint.
+         * @return The list of services.
+         */
+        public List<WebserviceInfo> getWebserviceServices()
+        {
+            return model.getWebserviceServices() ;
+        }
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,82 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.model;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.Service;
-import org.jboss.soa.esb.listeners.config.ServicePublisher;
-import org.jboss.soa.esb.listeners.config.WebserviceInfo;
-import org.w3c.dom.Document;
-
-/**
- * Adapter interface for external querying of the model.
- * 
- * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
- */
-public interface ModelAdapter
-{
-    /**
-     * Verify the schedule provider configuration.
-     * @throws ConfigurationException
-     */
-    public void verifyScheduleProviderConfig()
-        throws ConfigurationException ;
-
-    /**
-     * Get a map of service publishers provided by each service.
-     * 
-     * @return The map of service publishers, keyed by service.
-     */
-    public Map<Service, List<ServicePublisher>> getServicePublishers() ;
-
-    /**
-     * Generate the ESB Aware configuration document.
-     * @return The ESB aware configuration.
-     * @throws ConfigurationException Error creating configuration. 
-     */
-    public Document generateESBAwareConfig()
-        throws ConfigurationException ;
-
-    /**
-     * Generate the gateway configuration document.
-     * @return The gateway configuration.
-     * @throws ConfigurationException Error creating configuration. 
-     */
-    public Document generateGatewayConfig()
-        throws ConfigurationException ;
-
-    /**
-     * Get the list of actions in this deployment.
-     * @return a list of actions or null if none present.
-     */
-    public Set<String> getActions() ;
-
-    /**
-     * Get the list of services which require a webservice endpoint.
-     * @return The list of services.
-     */
-    public List<WebserviceInfo> getWebserviceServices() ;
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelAdapter.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,82 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.model;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.listeners.config.ServicePublisher;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
+import org.w3c.dom.Document;
+
+/**
+ * Adapter interface for external querying of the model.
+ * 
+ * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
+ */
+public interface ModelAdapter
+{
+    /**
+     * Verify the schedule provider configuration.
+     * @throws ConfigurationException
+     */
+    public void verifyScheduleProviderConfig()
+        throws ConfigurationException ;
+
+    /**
+     * Get a map of service publishers provided by each service.
+     * 
+     * @return The map of service publishers, keyed by service.
+     */
+    public Map<Service, List<ServicePublisher>> getServicePublishers() ;
+
+    /**
+     * Generate the ESB Aware configuration document.
+     * @return The ESB aware configuration.
+     * @throws ConfigurationException Error creating configuration. 
+     */
+    public Document generateESBAwareConfig()
+        throws ConfigurationException ;
+
+    /**
+     * Generate the gateway configuration document.
+     * @return The gateway configuration.
+     * @throws ConfigurationException Error creating configuration. 
+     */
+    public Document generateGatewayConfig()
+        throws ConfigurationException ;
+
+    /**
+     * Get the list of actions in this deployment.
+     * @return a list of actions or null if none present.
+     */
+    public Set<String> getActions() ;
+
+    /**
+     * Get the list of services which require a webservice endpoint.
+     * @return The list of services.
+     */
+    public List<WebserviceInfo> getWebserviceServices() ;
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,71 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.model;
-
-/**
- * Exception representing errors during parsing of the model.
- * 
- * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
- */
-public class ModelException extends Exception
-{
-    /**
-     * The serial version UID for this class.
-     */
-    private static final long serialVersionUID = 6108565070668277643L;
-
-    /**
-     * Default constructor for the exception
-     */
-    public ModelException()
-    {
-    }
-
-    /**
-     * Create an exception with a specified message.
-     * @param message The message associated with this exception.
-     */
-    public ModelException(final String message)
-    {
-        super(message) ;
-    }
-
-    /**
-     * Create an exception with a specified cause.
-     * @param cause The cause associated with this exception.
-     */
-    public ModelException(final Throwable cause)
-    {
-        super(cause) ;
-    }
-
-    /**
-     * Create an exception with a specified message and cause.
-     * @param message The message associated with this exception.
-     * @param cause The cause associated with this exception.
-     */
-    public ModelException(final String message, final Throwable cause)
-    {
-        super(message, cause) ;
-    }
-
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelException.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,71 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.model;
+
+/**
+ * Exception representing errors during parsing of the model.
+ * 
+ * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
+ */
+public class ModelException extends Exception
+{
+    /**
+     * The serial version UID for this class.
+     */
+    private static final long serialVersionUID = 6108565070668277643L;
+
+    /**
+     * Default constructor for the exception
+     */
+    public ModelException()
+    {
+    }
+
+    /**
+     * Create an exception with a specified message.
+     * @param message The message associated with this exception.
+     */
+    public ModelException(final String message)
+    {
+        super(message) ;
+    }
+
+    /**
+     * Create an exception with a specified cause.
+     * @param cause The cause associated with this exception.
+     */
+    public ModelException(final Throwable cause)
+    {
+        super(cause) ;
+    }
+
+    /**
+     * Create an exception with a specified message and cause.
+     * @param message The message associated with this exception.
+     * @param cause The cause associated with this exception.
+     */
+    public ModelException(final String message, final Throwable cause)
+    {
+        super(message, cause) ;
+    }
+
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,196 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.model;
-
-import java.io.Reader;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.validation.Schema;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.util.XMLHelper;
-import org.jboss.internal.soa.esb.util.stax.StreamHelper;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Handle parsing of different schemas into model adapter.
- * 
- * <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
- */
-public class ModelParser
-{
-    /**
-     * Map of namespaces to schema parsers.
-     */
-    private static final Map<String, SchemaParser> SCHEMA_PARSERS = new HashMap<String, SchemaParser>() ;
-    
-    /**
-     * The parser singleton.
-     */
-    private static final ModelParser PARSER = new ModelParser() ;
-    
-    /**
-     * The schema to validate against.
-     */
-    private static Schema SCHEMA ;
-    
-    /**
-     * The logger for this class.
-     */
-    private static Logger LOG = Logger.getLogger(XmlErrorHandler.class) ;
-    
-    static
-    {
-        SCHEMA_PARSERS.put(Model101SchemaParser.NAMESPACE, new Model101SchemaParser()) ;
-        SCHEMA_PARSERS.put(Model110SchemaParser.NAMESPACE, new Model110SchemaParser()) ;
-
-        Schema schema = null ;
-        try
-        {
-            schema = XMLHelper.getSchema(new String[] {Model101SchemaParser.SCHEMA,
-                Model110SchemaParser.SCHEMA}) ;
-        }
-        catch (SAXException saxe)
-        {
-            LOG.warn("Unexpected exception loading schemas", saxe) ;
-        }
-        SCHEMA = schema ;
-    }
-    
-    /**
-     * Get the model parser singleton.
-     * @return The model parser singleton.
-     */
-    public static ModelParser getParser()
-    {
-        return PARSER ;
-    }
-    
-    /**
-     * Get a model adapter from the input.
-     * @param config The configuration input.
-     * @return The appropriate model adapter.
-     */
-    public ModelAdapter parse(final Reader config)
-        throws ModelException
-    {
-        final XMLStreamReader reader ;
-        try
-        {
-            reader = XMLHelper.getXMLStreamReader(config) ;
-            StreamHelper.skipToStartElement(reader) ;
-        }
-        catch (final XMLStreamException xmlse)
-        {
-            throw new ModelException("Error parsing schema", xmlse) ;
-        }
-        
-        final QName name = reader.getName() ;
-        final String namespace = name.getNamespaceURI() ;
-        final SchemaParser parser = SCHEMA_PARSERS.get(namespace) ;
-        if (parser != null)
-        {
-            return parser.parse(reader) ;
-        }
-        else
-        {
-            throw new ModelException("Unsupported schema namespace: " + namespace) ;
-        }
-    }
-
-    /**
-     * Validate a model from the input.
-     * @param config The configuration input.
-     * @return true if valid, false otherwise.
-     */
-    public boolean validate(Reader config)
-    {
-        if (SCHEMA == null)
-        {
-            return true ;
-        }
-        
-        try
-        {
-            final DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance() ;
-            builderFactory.setNamespaceAware(true) ;
-            builderFactory.setSchema(SCHEMA) ;
-            final DocumentBuilder parser = builderFactory.newDocumentBuilder() ;
-            final XmlErrorHandler errorHandler = new XmlErrorHandler() ;
-            parser.setErrorHandler(errorHandler) ;
-            parser.parse(new InputSource(config)); 
-            return errorHandler.isValid() ;
-        }
-        catch (final Exception ex)
-        {
-            LOG.error("Unexpected exception", ex);
-            return false ;
-        }
-    }
-
-    /**
-     * The XML Error handler for validation.
-     * @author <href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
-     *
-     */
-    private static class XmlErrorHandler implements ErrorHandler 
-    {
-        /**
-         * The valid flag.
-         */
-        private boolean valid = true ;
-        
-        public void warning(final SAXParseException exception)
-            throws SAXException
-        {
-            LOG.warn("WARNING-"+exception.getSystemId()+"-"+exception.getLineNumber()+":"+exception.getMessage()) ;
-        }
-
-        public void error(final SAXParseException exception)
-            throws SAXException
-        {
-            LOG.error("ERROR-"+exception.getSystemId()+"-"+exception.getLineNumber()+":"+exception.getMessage()) ;
-            valid = false ;
-        }
-
-        public void fatalError(final SAXParseException exception)
-            throws SAXException
-        {
-            LOG.fatal("FATAL-"+exception.getSystemId()+"-"+exception.getLineNumber()+":"+exception.getMessage()) ;
-            valid = false ;
-        }
-        
-        boolean isValid()
-        {
-            return valid ;
-        }
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/ModelParser.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,196 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.model;
+
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.validation.Schema;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.util.XMLHelper;
+import org.jboss.internal.soa.esb.util.stax.StreamHelper;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Handle parsing of different schemas into model adapter.
+ * 
+ * <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
+ */
+public class ModelParser
+{
+    /**
+     * Map of namespaces to schema parsers.
+     */
+    private static final Map<String, SchemaParser> SCHEMA_PARSERS = new HashMap<String, SchemaParser>() ;
+    
+    /**
+     * The parser singleton.
+     */
+    private static final ModelParser PARSER = new ModelParser() ;
+    
+    /**
+     * The schema to validate against.
+     */
+    private static Schema SCHEMA ;
+    
+    /**
+     * The logger for this class.
+     */
+    private static Logger LOG = Logger.getLogger(XmlErrorHandler.class) ;
+    
+    static
+    {
+        SCHEMA_PARSERS.put(Model101SchemaParser.NAMESPACE, new Model101SchemaParser()) ;
+        SCHEMA_PARSERS.put(Model110SchemaParser.NAMESPACE, new Model110SchemaParser()) ;
+
+        Schema schema = null ;
+        try
+        {
+            schema = XMLHelper.getSchema(new String[] {Model101SchemaParser.SCHEMA,
+                Model110SchemaParser.SCHEMA}) ;
+        }
+        catch (SAXException saxe)
+        {
+            LOG.warn("Unexpected exception loading schemas", saxe) ;
+        }
+        SCHEMA = schema ;
+    }
+    
+    /**
+     * Get the model parser singleton.
+     * @return The model parser singleton.
+     */
+    public static ModelParser getParser()
+    {
+        return PARSER ;
+    }
+    
+    /**
+     * Get a model adapter from the input.
+     * @param config The configuration input.
+     * @return The appropriate model adapter.
+     */
+    public ModelAdapter parse(final Reader config)
+        throws ModelException
+    {
+        final XMLStreamReader reader ;
+        try
+        {
+            reader = XMLHelper.getXMLStreamReader(config) ;
+            StreamHelper.skipToStartElement(reader) ;
+        }
+        catch (final XMLStreamException xmlse)
+        {
+            throw new ModelException("Error parsing schema", xmlse) ;
+        }
+        
+        final QName name = reader.getName() ;
+        final String namespace = name.getNamespaceURI() ;
+        final SchemaParser parser = SCHEMA_PARSERS.get(namespace) ;
+        if (parser != null)
+        {
+            return parser.parse(reader) ;
+        }
+        else
+        {
+            throw new ModelException("Unsupported schema namespace: " + namespace) ;
+        }
+    }
+
+    /**
+     * Validate a model from the input.
+     * @param config The configuration input.
+     * @return true if valid, false otherwise.
+     */
+    public boolean validate(Reader config)
+    {
+        if (SCHEMA == null)
+        {
+            return true ;
+        }
+        
+        try
+        {
+            final DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance() ;
+            builderFactory.setNamespaceAware(true) ;
+            builderFactory.setSchema(SCHEMA) ;
+            final DocumentBuilder parser = builderFactory.newDocumentBuilder() ;
+            final XmlErrorHandler errorHandler = new XmlErrorHandler() ;
+            parser.setErrorHandler(errorHandler) ;
+            parser.parse(new InputSource(config)); 
+            return errorHandler.isValid() ;
+        }
+        catch (final Exception ex)
+        {
+            LOG.error("Unexpected exception", ex);
+            return false ;
+        }
+    }
+
+    /**
+     * The XML Error handler for validation.
+     * @author <href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+     *
+     */
+    private static class XmlErrorHandler implements ErrorHandler 
+    {
+        /**
+         * The valid flag.
+         */
+        private boolean valid = true ;
+        
+        public void warning(final SAXParseException exception)
+            throws SAXException
+        {
+            LOG.warn("WARNING-"+exception.getSystemId()+"-"+exception.getLineNumber()+":"+exception.getMessage()) ;
+        }
+
+        public void error(final SAXParseException exception)
+            throws SAXException
+        {
+            LOG.error("ERROR-"+exception.getSystemId()+"-"+exception.getLineNumber()+":"+exception.getMessage()) ;
+            valid = false ;
+        }
+
+        public void fatalError(final SAXParseException exception)
+            throws SAXException
+        {
+            LOG.fatal("FATAL-"+exception.getSystemId()+"-"+exception.getLineNumber()+":"+exception.getMessage()) ;
+            valid = false ;
+        }
+        
+        boolean isValid()
+        {
+            return valid ;
+        }
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,41 +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,
- * @author JBoss Inc.
- */
-
-package org.jboss.soa.esb.listeners.config.model;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Schema parser interface.
- * 
- * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
- */
-interface SchemaParser
-{
-    /**
-     * Obtain a model adapter from the specified stream.
-     * @param reader The XML stream reader.
-     * @return The model adapter
-     * @throws ModelException for errors during parsing.
-     */
-    public ModelAdapter parse(final XMLStreamReader reader)
-        throws ModelException ;
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/model/SchemaParser.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,41 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config.model;
+
+import javax.xml.stream.XMLStreamReader;
+
+/**
+ * Schema parser interface.
+ * 
+ * <a href='mailto:Kevin.Conner at jboss.com>Kevin Conner</a>
+ */
+interface SchemaParser
+{
+    /**
+     * Obtain a model adapter from the specified stream.
+     * @param reader The XML stream reader.
+     * @return The model adapter
+     * @throws ModelException for errors during parsing.
+     */
+    public ModelAdapter parse(final XMLStreamReader reader)
+        throws ModelException ;
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -56,6 +56,7 @@
 import org.jboss.soa.esb.lifecycle.LifecycleResourceException;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
 import org.jboss.soa.esb.listeners.message.errors.Factory;
+import org.jboss.soa.esb.listeners.message.ServiceMessageCounter;
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.message.Properties;
 import org.jboss.soa.esb.services.persistence.MessageStore;
@@ -941,16 +942,16 @@
 
     /**
      * Retrieves the authentication reqeust from the Message context using
-     * {@link SecurityService#AUTH_REQUEST} as the key.
+     * {@link org.jboss.soa.esb.services.security.SecurityService#AUTH_REQUEST} as the key.
      * <p/>
      * This location may contain an encrypted AuthenticationRequest and if one
      * exists it will be decryped and return. If one does not exist this
      * method will return null.
      *
      * @param message The ESB Message object.
-     * @return {@link AuthenticationRequest} The decrypted AuthenticationRequest or null if one did not exist.
+     * @return {@link org.jboss.soa.esb.services.security.auth.AuthenticationRequest} The decrypted AuthenticationRequest or null if one did not exist.
      *
-     * @throws SecurityServiceException If a problem occurs during decryption.
+     * @throws org.jboss.soa.esb.services.security.SecurityServiceException If a problem occurs during decryption.
      */
     private AuthenticationRequest getAutenticationRequest(final Message message) throws SecurityServiceException
     {

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/build.xml	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/build.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -18,7 +18,8 @@
 	<!-- Load deployment properties File -->
 	<property file="${org.jboss.esb.deployment.properties}"/>
 	<property name="gendir" location="${org.jboss.esb.internal.dest}/schema-model" />
-
+	<property name="model101.classes" location="${gendir}/classes" />
+	<property name="model110.classes" location="${gendir}/classes110" />
 	
 	<property name="org.jboss.esb.test.persistdb.dir" location="${org.jboss.esb.internal.dest}/testdb"/>
 
@@ -33,7 +34,8 @@
         <fileset dir="${org.jboss.esb.root.dir}/../testlib" includes="*.jar"/>
         <fileset dir="${org.jboss.esb.ftp.lib.dir}" includes="*.jar"/>
 		<pathelement location="${org.jboss.esb.module.classes.root.dir}/rosetta"/>
-		<pathelement location="${gendir}/classes"/>
+		<pathelement location="${model101.classes}"/>
+		<pathelement location="${model110.classes}"/>
         <pathelement location="${org.jboss.esb.module.classes.dir}"/>
     	<pathelement location="${org.jboss.esb.root.dir}/rosetta/tests/resources/etc"/>
 		<pathelement location="${org.jboss.esb.module.tests.conf.dir}"/>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -32,7 +32,7 @@
 
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.listeners.config.Generator;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
 import org.jboss.soa.esb.util.ClassUtil;
 import org.xml.sax.InputSource;
 
@@ -41,14 +41,26 @@
         executeTest("jbossesb_config_06.xml") ;
     }
     
+    public void testRequestResponseFault110() throws Exception {
+        executeTest("jbossesb_config_06.110.xml") ;
+    }
+    
     public void testRequestResponse() throws Exception {
         executeTest("jbossesb_config_07.xml") ;
     }
     
+    public void testRequestResponse110() throws Exception {
+        executeTest("jbossesb_config_07.110.xml") ;
+    }
+    
     public void testRequest() throws Exception {
         executeTest("jbossesb_config_08.xml") ;
     }
     
+    public void testRequest110() throws Exception {
+        executeTest("jbossesb_config_08.110.xml") ;
+    }
+    
     private void executeTest(final String resourceName) throws Exception {
         final InputStream is = ClassUtil.getResourceAsStream(resourceName, getClass()) ;
         final byte[] configBytes = StreamUtils.readStream(is) ;
@@ -56,8 +68,8 @@
         ByteArrayOutputStream gatewayXml = new ByteArrayOutputStream();
         Generator generator = new Generator(new ByteArrayInputStream(configBytes), listenerXml, gatewayXml);
         generator.generate();
-        List<Service> services = generator.getModel().getServices();
-        final Service service = services.get(0) ;
+        List<WebserviceInfo> services = generator.getModel().getWebserviceServices();
+        final WebserviceInfo service = services.get(0) ;
         final ESBServiceEndpointInfo endpointInfo = new ESBServiceEndpointInfo(service) ;
         String wsdl = ESBContractGenerator.generateWSDL(service, endpointInfo);
         java.io.StringReader strReader = new java.io.StringReader(wsdl);

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,18 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+	<services>
+		<service category="FirstServiceESB" name="SimpleListener"
+			description="Hello World" invmScope="GLOBAL">>
+			<actions 
+				inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd"
+				outXsd="/org/jboss/internal/soa/esb/webservice/response.xsd"
+				faultXsd="/org/jboss/internal/soa/esb/webservice/fault.xsd">
+				<action name="action2"
+					class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="printfull" value="true" />
+				</action>
+			</actions>
+		</service>
+	</services>
+</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_07.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,17 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+	<services>
+		<service category="FirstServiceESB" name="SimpleListener"
+			description="Hello World" invmScope="GLOBAL">>
+			<actions 
+				inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd"
+				outXsd="/org/jboss/internal/soa/esb/webservice/response.xsd">
+				<action name="action2"
+					class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="printfull" value="true" />
+				</action>
+			</actions>
+		</service>
+	</services>
+</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_08.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,16 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+	<services>
+		<service category="FirstServiceESB" name="SimpleListener"
+			description="Hello World" invmScope="GLOBAL">>
+			<actions 
+				inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd">
+				<action name="action2"
+					class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="printfull" value="true" />
+				</action>
+			</actions>
+		</service>
+	</services>
+</jbossesb>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerConfigUtil.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerConfigUtil.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerConfigUtil.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -24,9 +24,8 @@
 
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.config.ESBAwareGenerator;
-import org.jboss.soa.esb.listeners.config.GatewayGenerator;
 import org.jboss.soa.esb.listeners.config.Generator;
+import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
 import org.w3c.dom.Document;
 
 /**
@@ -47,10 +46,9 @@
      * @throws IOException            Unable to read the ESB listener configuration.
      */
     public static ConfigTree getESBAwareListenerConfig(InputStream config, String listenerName) throws ConfigurationException, IOException {
-        Generator.XMLBeansModel model = Generator.parseConfig(config);
+        final ModelAdapter model = Generator.parseConfig(config);
 
-        ESBAwareGenerator awareGenerator = new ESBAwareGenerator(model);
-        Document awareConfig = awareGenerator.generate();
+        Document awareConfig = model.generateESBAwareConfig();
 
         return getConfigTree(awareConfig, listenerName);
     }
@@ -66,10 +64,9 @@
      * @throws IOException            Unable to read the ESB listener configuration.
      */
     public static ConfigTree getGatewayListenerConfig(InputStream config, String listenerName) throws ConfigurationException, IOException {
-        Generator.XMLBeansModel model = Generator.parseConfig(config);
+        final ModelAdapter model = Generator.parseConfig(config);
 
-        GatewayGenerator gatewayGenerator = new GatewayGenerator(model);
-        Document gatewayConfig = gatewayGenerator.generate();
+        Document gatewayConfig = model.generateGatewayConfig();
 
         return getConfigTree(gatewayConfig, listenerName);
     }

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -79,6 +79,45 @@
         gatewayFile.delete();
 	}
 	
+    
+    @Test
+    public void readAndGenerateConfig110() throws Exception
+    {
+        String configFileName = TestEnvironmentUtil.getUserDir("product") 
+            + "rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml";
+        //Make sure this file exists
+        File configFile = new File(configFileName);
+        assertTrue("File '" + configFile + "' doesn't exist.", configFile.exists());
+        //Remove the listener and gateway configuration files if they exist
+        File currentDir = configFile.getParentFile();
+        if (null==currentDir)
+            currentDir=new File("");
+        File listenerFile = new File(currentDir + File.separator + "jbossesb-listener.xml");
+        if (listenerFile.exists()) {
+            listenerFile.delete();
+        }
+        File gatewayFile = new File(currentDir + File.separator + "jbossesb-gateway.xml");
+        if (gatewayFile.exists()) {
+            gatewayFile.delete();
+        }
+        String validationFileName = TestEnvironmentUtil.getUserDir("product") 
+            + "etc/schemas/xml/jbossesb-1.1.0.xsd";
+//      Make sure this file exists
+        File validationFile = new File(validationFileName);
+        assertTrue("File '" + validationFile + "' doesn't exist.", validationFile.exists());
+
+        ConfigurationController controller = new ConfigurationController(configFileName, validationFileName);
+        for (int i=0; i<currentDir.listFiles().length;i++){
+            logger.info(currentDir.listFiles()[i].getName());
+        }
+
+        assertTrue("file=" + listenerFile.getAbsolutePath() + " does not exist, while it should have.  Actually exists in " + controller.getListenerConfigFile(), listenerFile.exists());
+        listenerFile.delete();
+
+        assertTrue("file=" + gatewayFile.getAbsolutePath() + " does not exist, while it should have.  Actually exists in " + controller.getGatewayConfigFile(), gatewayFile.exists());
+        gatewayFile.delete();
+    }
+    
 	public static junit.framework.Test suite() {
 		return new JUnit4TestAdapter(ConfigurationControlerUnitTest.class);
 	}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator101ModelUnitTest.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator101ModelUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator101ModelUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator101ModelUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,95 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.listeners.config.mappers.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsProviderType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsBusDocument.JmsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsMessageFilterDocument.JmsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.List;
+
+/**
+ * Model specific unit tests extracted from GeneratorUnitTest.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class Generator101ModelUnitTest extends TestCase {
+
+	public void test_model() throws Exception {
+		final InputStream is = getClass().getResourceAsStream("jbossesb_config_01.xml");
+		final Reader reader = new InputStreamReader(is) ;
+		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+
+		JmsBus bus = (JmsBus)model.getBus("server1-jms");
+		JmsProviderType provider = (JmsProviderType) model.getProvider(bus);
+		assertEquals("server1-jms", bus.getBusid());
+		assertEquals("com.xyz.provider.XYZConnectionFactory", provider.getConnectionFactory());
+		assertEquals("com.xyz.provider.NamingContextFactory", provider.getJndiContextFactory());
+		assertEquals("xyz://server1:9876", provider.getJndiURL());
+		assertEquals("com.xyz", provider.getJndiPkgPrefix());
+		JmsMessageFilter busDestination = bus.getJmsMessageFilter();
+		assertEquals("queue/A", busDestination.getDestName());
+		assertEquals(JmsMessageFilter.DestType.QUEUE, busDestination.getDestType());
+		assertEquals("service='Reconciliation'", busDestination.getSelector());
+
+		List<Listener> gateways = model.getGatewayListeners();
+		assertEquals(2, gateways.size());
+		JmsListener gatewayListener = (JmsListener)gateways.get(0);
+		assertEquals("Bank-JMS-Gateway", gatewayListener.getName());
+		assertEquals("server1-jms", gatewayListener.getBusidref());
+		assertTrue(gatewayListener.getIsGateway());
+		assertEquals(1, gatewayListener.getMaxThreads());
+
+		List<Listener> awareListeners = model.getESBAwareListeners();
+		assertEquals(4, awareListeners.size());
+		JmsListener awareListener = (JmsListener)awareListeners.get(0);
+		assertEquals("Bank-Listener", awareListener.getName());
+		assertEquals("local-jms", awareListener.getBusidref());
+		assertTrue(!awareListener.getIsGateway());
+		assertEquals(2, awareListener.getMaxThreads());
+		JmsMessageFilter listenerDestination = awareListener.getJmsMessageFilter();
+		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);
+		assertEquals("Bank", awareService.getCategory());
+		assertEquals("Reconciliation", awareService.getName());
+		assertEquals("Bank Reconciliation Service", awareService.getDescription());
+	}
+}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator110ModelUnitTest.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator110ModelUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator110ModelUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/Generator110ModelUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,95 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.listeners.config;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.listeners.config.mappers110.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsProviderType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsBusDocument.JmsBus;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsMessageFilterDocument.JmsMessageFilter;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.List;
+
+/**
+ * Model specific unit tests extracted from GeneratorUnitTest.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class Generator110ModelUnitTest extends TestCase {
+
+	public void test_model() throws Exception {
+		final InputStream is = getClass().getResourceAsStream("jbossesb_config_01.110.xml");
+		final Reader reader = new InputStreamReader(is) ;
+		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+
+		JmsBus bus = (JmsBus)model.getBus("server1-jms");
+		JmsProviderType provider = (JmsProviderType) model.getProvider(bus);
+		assertEquals("server1-jms", bus.getBusid());
+		assertEquals("com.xyz.provider.XYZConnectionFactory", provider.getConnectionFactory());
+		assertEquals("com.xyz.provider.NamingContextFactory", provider.getJndiContextFactory());
+		assertEquals("xyz://server1:9876", provider.getJndiURL());
+		assertEquals("com.xyz", provider.getJndiPkgPrefix());
+		JmsMessageFilter busDestination = bus.getJmsMessageFilter();
+		assertEquals("queue/A", busDestination.getDestName());
+		assertEquals(JmsMessageFilter.DestType.QUEUE, busDestination.getDestType());
+		assertEquals("service='Reconciliation'", busDestination.getSelector());
+
+		List<Listener> gateways = model.getGatewayListeners();
+		assertEquals(2, gateways.size());
+		JmsListener gatewayListener = (JmsListener)gateways.get(0);
+		assertEquals("Bank-JMS-Gateway", gatewayListener.getName());
+		assertEquals("server1-jms", gatewayListener.getBusidref());
+		assertTrue(gatewayListener.getIsGateway());
+		assertEquals(1, gatewayListener.getMaxThreads());
+
+		List<Listener> awareListeners = model.getESBAwareListeners();
+		assertEquals(4, awareListeners.size());
+		JmsListener awareListener = (JmsListener)awareListeners.get(0);
+		assertEquals("Bank-Listener", awareListener.getName());
+		assertEquals("local-jms", awareListener.getBusidref());
+		assertTrue(!awareListener.getIsGateway());
+		assertEquals(2, awareListener.getMaxThreads());
+		JmsMessageFilter listenerDestination = awareListener.getJmsMessageFilter();
+		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);
+		assertEquals("Bank", awareService.getCategory());
+		assertEquals("Reconciliation", awareService.getName());
+		assertEquals("Bank Reconciliation Service", awareService.getDescription());
+	}
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -25,18 +25,10 @@
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-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.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.
@@ -59,16 +51,26 @@
 		}
 	}
 
-	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_badargs() throws ConfigurationException, IOException {
+		test_generate_badargs(null, "null 'outdir' arg in method call", "jbossesb_config_01.xml");
+		test_generate_badargs(new File("build.xml"), "'outdir' exists, but is not a directory", "jbossesb_config_01.xml");
 	}
 
+    public void test_generate_badargs_110() throws ConfigurationException, IOException {
+        test_generate_badargs(null, "null 'outdir' arg in method call", "jbossesb_config_01.110.xml");
+        test_generate_badargs(new File("build.xml"), "'outdir' exists, but is not a directory", "jbossesb_config_01.110.xml");
+    }
+
 	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_files110() throws ConfigurationException, IOException {
+        test_generate_files("jbossesb_config_01.110.xml");
+        test_generate_files("jbossesb_config_02.110.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();
@@ -111,6 +113,19 @@
 		}
 	}
 
+    public void test_bad_base_listener_busref_110() throws ConfigurationException, IOException {
+        Generator generator = new Generator(getClass().getResourceAsStream("jbossesb_config_03.110.xml"));
+
+        try {
+            generator.generate(outdir);
+            fail("Expected ConfigurationException");
+        } catch(ConfigurationException e) {
+            if(!e.getMessage().equals("The base Listener config [JMS-ESBListener] must reference a base Bus config type (<bus>).")) {
+                fail("Wrong exception");
+            }
+        }
+    }
+
 	public static String removeEOL(String string) {
 		StringBuffer stringBuf = new StringBuffer(string.length());
 
@@ -125,58 +140,9 @@
 		return stringBuf.toString();
 	}
 
-	public void test_model() throws ConfigurationException, IOException {
-		Generator generator = new Generator(getClass().getResourceAsStream("jbossesb_config_01.xml"));
-		XMLBeansModel model = generator.getModel();
+	private void test_generate_badargs(File outdir, String expectedMessage, final String config) throws ConfigurationException, IOException {
+		Generator generator = new Generator(getClass().getResourceAsStream(config));
 
-		JmsBus bus = (JmsBus)model.getBus("server1-jms");
-		JmsProviderType provider = (JmsProviderType) model.getProvider(bus);
-		assertEquals("server1-jms", bus.getBusid());
-		assertEquals("com.xyz.provider.XYZConnectionFactory", provider.getConnectionFactory());
-		assertEquals("com.xyz.provider.NamingContextFactory", provider.getJndiContextFactory());
-		assertEquals("xyz://server1:9876", provider.getJndiURL());
-		assertEquals("com.xyz", provider.getJndiPkgPrefix());
-		JmsMessageFilter busDestination = bus.getJmsMessageFilter();
-		assertEquals("queue/A", busDestination.getDestName());
-		assertEquals(JmsMessageFilter.DestType.QUEUE, busDestination.getDestType());
-		assertEquals("service='Reconciliation'", busDestination.getSelector());
-
-		List<Listener> gateways = model.getGatewayListeners();
-		assertEquals(2, gateways.size());
-		JmsListener gatewayListener = (JmsListener)gateways.get(0);
-		assertEquals("Bank-JMS-Gateway", gatewayListener.getName());
-		assertEquals("server1-jms", gatewayListener.getBusidref());
-		assertTrue(gatewayListener.getIsGateway());
-		assertEquals(1, gatewayListener.getMaxThreads());
-
-		List<Listener> awareListeners = model.getESBAwareListeners();
-		assertEquals(4, awareListeners.size());
-		JmsListener awareListener = (JmsListener)awareListeners.get(0);
-		assertEquals("Bank-Listener", awareListener.getName());
-		assertEquals("local-jms", awareListener.getBusidref());
-		assertTrue(!awareListener.getIsGateway());
-		assertEquals(2, awareListener.getMaxThreads());
-		JmsMessageFilter listenerDestination = awareListener.getJmsMessageFilter();
-		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);
-		assertEquals("Bank", awareService.getCategory());
-		assertEquals("Reconciliation", awareService.getName());
-		assertEquals("Bank Reconciliation Service", awareService.getDescription());
-	}
-
-	private void test_generate_badargs(File outdir, String expectedMessage) throws ConfigurationException, IOException {
-		Generator generator = new Generator(getClass().getResourceAsStream("jbossesb_config_01.xml"));
-
 		try {
 			generator.generate(outdir);
 			fail("Expected IllegalArgumentException.");

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/MockContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/MockContractPublisher.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/MockContractPublisher.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -3,7 +3,6 @@
 import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
 import org.jboss.internal.soa.esb.publish.ContractInfo;
 import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument;
 import org.jboss.soa.esb.addressing.EPR;
 
 /**
@@ -12,7 +11,7 @@
 public class MockContractPublisher implements ActionContractPublisher {
     public static ContractInfo contractInfo;
 
-    public void setActionConfig(ActionDocument.Action actionConfig) throws ConfigurationException {
+    public void setActionConfig(Action actionConfig) throws ConfigurationException {
     }
 
     public ContractInfo getContractInfo(EPR epr) {

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -17,15 +17,15 @@
  */
 public class ServicePublisherUnitTest extends TestCase {
 
-    public void test() throws ConfigurationException, IOException {
+    public void test_101() throws ConfigurationException, IOException {
         Generator generator;
-        ManagedLifecycleController controller1 = new ManagedLifecycleController(null); // TODO: Introduce an interface and Mock for ManagedLifecycleController
-        ManagedLifecycleController controller2 = new ManagedLifecycleController(null); // TODO: Introduce an interface and Mock for ManagedLifecycleController
+        ManagedLifecycleController controller1 = new ManagedLifecycleController(null);
+        ManagedLifecycleController controller2 = new ManagedLifecycleController(null);
 
         assertEquals("Service count", 0, ServicePublisher.getServices().size());
         
         generator = new Generator(getClass().getResourceAsStream("jbossesb_config_04.xml"));
-        ServicePublisher.addServicePublishers(controller1, generator.getModel());
+        ServicePublisher.addServicePublishers(controller1, generator.getModel().getServicePublishers());
         List<ServicePublisher> publishers = ServicePublisher.getServicePublishers();
         assertEquals(2, publishers.size());
         assertEquals("A1", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
@@ -36,7 +36,7 @@
         assertEquals("Service count", 2, ServicePublisher.getServices().size());
         
         generator = new Generator(getClass().getResourceAsStream("jbossesb_config_05.xml"));
-        ServicePublisher.addServicePublishers(controller2, generator.getModel());
+        ServicePublisher.addServicePublishers(controller2, generator.getModel().getServicePublishers());
         publishers = ServicePublisher.getServicePublishers();
         assertEquals(4, publishers.size());
         assertEquals("A1", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
@@ -77,5 +77,71 @@
         assertEquals("B2", 0, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
         assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
         assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
+        
+        ServicePublisher.removeServicePublishers(controller2) ;
     }
+
+    public void test_110() throws ConfigurationException, IOException {
+        Generator generator;
+        ManagedLifecycleController controller1 = new ManagedLifecycleController(null);
+        ManagedLifecycleController controller2 = new ManagedLifecycleController(null);
+
+        assertEquals("Service count", 0, ServicePublisher.getServices().size());
+        
+        generator = new Generator(getClass().getResourceAsStream("jbossesb_config_04.110.xml"));
+        ServicePublisher.addServicePublishers(controller1, generator.getModel().getServicePublishers());
+        List<ServicePublisher> publishers = ServicePublisher.getServicePublishers();
+        assertEquals(2, publishers.size());
+        assertEquals("A1", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
+        assertEquals(null, publishers.get(0).getContractPublisher());
+        assertEquals("B2", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
+        assertEquals(null, publishers.get(1).getContractPublisher());
+
+        assertEquals("Service count", 2, ServicePublisher.getServices().size());
+        
+        generator = new Generator(getClass().getResourceAsStream("jbossesb_config_05.110.xml"));
+        ServicePublisher.addServicePublishers(controller2, generator.getModel().getServicePublishers());
+        publishers = ServicePublisher.getServicePublishers();
+        assertEquals(4, publishers.size());
+        assertEquals("A1", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
+        assertEquals(null, publishers.get(0).getContractPublisher());
+        assertEquals("B2", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
+        assertEquals(null, publishers.get(1).getContractPublisher());
+        assertEquals("C3", publishers.get(2).getCategory() + publishers.get(2).getServiceName());
+        assertEquals(null, publishers.get(2).getContractPublisher());
+        assertEquals("D4", publishers.get(3).getCategory() + publishers.get(3).getServiceName());
+        assertTrue(publishers.get(3).getContractPublisher() instanceof MockContractPublisher);
+        
+        assertEquals("A1", 1, ServicePublisher.getServicePublishers(new Service("A", "1")).size()) ;
+        assertEquals("B2", 1, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
+        assertEquals("C3", 1, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
+        assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
+        
+        assertEquals("Service count", 4, ServicePublisher.getServices().size());
+
+        final ESBServiceContractPublisher publisher = new ESBServiceContractPublisher(new Service("C", "3"), "test", "endpoint") ;
+        ServicePublisher.addContractReferencePublishers(controller2, Arrays.asList(publisher)) ;
+        assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
+        
+        assertEquals("Service count", 4, ServicePublisher.getServices().size());
+        
+        ServicePublisher.removeServicePublishers(controller1);
+        publishers = ServicePublisher.getServicePublishers();
+        assertEquals(3, publishers.size());
+        assertEquals("C3", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
+        assertEquals(null, publishers.get(0).getContractPublisher());
+        assertEquals("C3", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
+        assertTrue("ContractReferencePublisher", publishers.get(1).getPublisher() instanceof ContractReferencePublisher);
+        assertEquals("D4", publishers.get(2).getCategory() + publishers.get(2).getServiceName());
+        assertTrue(publishers.get(2).getContractPublisher() instanceof MockContractPublisher);
+        
+        assertEquals("Service count", 2, ServicePublisher.getServices().size());
+        
+        assertEquals("A1", 0, ServicePublisher.getServicePublishers(new Service("A", "1")).size()) ;
+        assertEquals("B2", 0, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
+        assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
+        assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
+        
+        ServicePublisher.removeServicePublishers(controller2) ;
+    }
 }

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,113 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+
+	<providers>
+		<jms-provider name="JBossMQ" connection-factory="ConnectionFactory" jndi-URL="jnp://localhost:1099">
+			<jms-bus busid="local-jms" />
+		</jms-provider>
+		
+		<jms-provider name="JBossMessaging" connection-factory="com.xyz.provider.XYZConnectionFactory" 
+					jndi-context-factory="com.xyz.provider.NamingContextFactory"
+					jndi-URL="xyz://server1:9876" 
+					jndi-pkg-prefix="com.xyz">
+			<jms-bus busid="server1-jms">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/A" selector="service='Reconciliation'" />
+			</jms-bus>
+		</jms-provider>
+		
+		<ftp-provider name="FTP" hostname="localhost:21">
+			<ftp-bus busid="Ftp-ServerTest">
+				<ftp-message-filter directory="/Temp" input-suffix=".txt" username="joe" password="secret"/>
+			</ftp-bus>
+		</ftp-provider>
+		
+		<sql-provider name="HSQLDB" url="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" username="joe" password="secret">
+			<sql-bus busid="SQL-Test">
+				<sql-message-filter tablename="testtable" message-id-column="message_id" message-column="message" status-column="status" insert-timestamp-column="insert_timestamp"/>
+			</sql-bus>
+		</sql-provider>
+
+        <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
+            <jbr-bus busid="HTTP-1" port="8765" />
+            <jbr-bus busid="HTTP-2" port="8766" />
+        </jbr-provider>
+
+        <bus-provider name="JBossAS">
+			<property name="my-generic-provider" value="my-generic-provider#someattribvalue" />
+			
+			<bus busid="my-generic-bus">
+				<property name="my-generic-bus" value="my-generic-bus#someattribvalue" />
+			</bus>
+		</bus-provider>
+
+       
+
+    </providers>
+	<services>    
+		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service">
+		
+			<listeners>  
+				<jms-listener name="Bank-JMS-Gateway"
+					busidref="server1-jms"
+					maxThreads="1"
+					is-gateway="true"/>  	    
+                <jbr-listener name="Bank-HTTP-Gateway"
+                    busidref="HTTP-1"
+                    maxThreads="1"
+                    is-gateway="true"/>
+				<jms-listener name="Bank-Listener"
+							busidref="local-jms"
+							maxThreads="2">
+					<jms-message-filter dest-type="TOPIC" dest-name="queue/B" selector="service='Reconciliation'" />
+				</jms-listener>
+				<listener name="Bank-Listener-Generic" 
+							busidref="my-generic-bus"
+							maxThreads="2">
+					<property name="my-generic-listener" value="my-generic-listener#someattribvalue" />
+				</listener>
+			</listeners>    	
+			  
+			<actions>    	    
+				<action name="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+					<property name="propName" value="propValue" />
+					<property name="propName">
+						This is some complex..
+						<!-- property -->
+						value.
+						<xxxx>
+							boooo
+							<yyyy/>
+						</xxxx>
+						<![CDATA[ Some CDATA data...]]>
+					</property>
+				</action>
+			</actions>
+			
+		</service>
+		<service category="Test2" name="FTPTest" description="FTP server Test">
+		
+			<listeners>    	    
+				<ftp-listener name="test-ftp-listener"
+							busidref="Ftp-ServerTest"
+							maxThreads="1"/>
+			</listeners>
+			<actions mep="OneWay">    	    
+				<action name="TestFtpRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+			</actions> 	
+			
+		</service>
+		<service category="Test3" name="SQLTest" description="SQL server Test">
+		
+			<listeners>    	    
+				<sql-listener name="test-sql-listener"
+							busidref="SQL-Test"
+							maxThreads="1"/>
+			</listeners>
+			<actions mep="RequestResponse">    	    
+				<action name="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+			</actions> 	
+			
+		</service>
+	</services>
+	
+</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,163 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+
+	<providers>
+		<bus-provider name="JBossMQ">
+			<property name="connection-factory" value="ConnectionFactory" />
+			<property name="jndi-URL" value="jnp://localhost:1099" />
+			<property name="protocol" value="jms" />
+			
+			<bus busid="local-jms">
+				<property name="destination-type" value="topic" />
+				<property name="destination-name" value="queue/B" />
+				<property name="message-selector" value="service='Reconciliation'"/>
+				<property name="persistent" value="true" />
+				<property name="acknowledge-mode" value="AUTO_ACKNOWLEDGE" />
+				<property name="transacted" value="false" />
+			</bus>
+		</bus-provider>
+		
+		<bus-provider name="JBossMessaging">
+			<property name="connection-factory" value="com.xyz.provider.XYZConnectionFactory" />
+			<property name="jndi-context-factory" value="com.xyz.provider.NamingContextFactory" />
+			<property name="jndi-URL" value="xyz://server1:9876" />
+			<property name="jndi-pkg-prefix" value="com.xyz" />
+			<property name="protocol" value="jms" />
+
+			<bus busid="server1-jms">
+				<property name="destination-type" value="queue" />
+				<property name="destination-name" value="queue/A" />
+				<property name="message-selector" value="service='Reconciliation'" />
+				<property name="persistent" value="true" />
+				<property name="acknowledge-mode" value="AUTO_ACKNOWLEDGE" />
+				<property name="transacted" value="false" />
+			</bus>
+		</bus-provider>
+		
+		<bus-provider name="FTP">
+			<property name="URL" value="ftp://joe:secret@localhost:21/Temp" />
+
+			<bus busid="Ftp-ServerTest">
+				<property name="inputSuffix" value=".txt" />
+				<property name="errorDelete" value="true" />
+				<property name="postDelete" value="true" />
+				<property name="passive" value="false" />
+				<property name="workSuffix" value=".esbInProcess" />
+			</bus>
+		</bus-provider>
+		
+		<bus-provider name="HSQLDB">
+			<property name="URL" value="jdbc:postgresql://myhost:5432/testDB" />
+			<property name="driver" value="org.postgresql.Driver" />
+			<property name="username" value="joe" />
+			<property name="password" value="secret" />
+			
+			<bus busid="SQL-Test">
+				<property name="tablename" value="testtable" />
+
+				<property name="tablename" value="testtable" />
+				<property name="message_column" value="message" />
+				<property name="message_id_column" value="message_id" />
+				<property name="status_column" value="status" />
+				<property name="errorDelete" value="true" />
+				<property name="insert_timestamp_column" value="insert_timestamp" />
+				<property name="postDelete" value="true" />
+			</bus>
+		</bus-provider>
+
+        <bus-provider name="JBR">
+            <property name="jbr-serverBindAddress" value="192.168.1.111" />
+            <property name="jbr-serverProtocol" value="http" />
+
+            <bus busid="HTTP-1">
+                <property name="jbr-serverBindPort" value="8765" />
+            </bus>
+            <bus busid="HTTP-2">
+                <property name="jbr-serverBindPort" value="8766" />
+            </bus>
+        </bus-provider>
+
+        <bus-provider name="JBossAS">
+			<property name="my-generic-provider" value="my-generic-provider#someattribvalue" />
+			
+			<bus busid="my-generic-bus">
+				<property name="my-generic-bus" value="my-generic-bus#someattribvalue" />
+			</bus>
+		</bus-provider>
+
+	</providers>
+	<services>    
+		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service">
+		
+			<listeners>
+				<listener name="Bank-JMS-Gateway"
+					busidref="server1-jms"
+					maxThreads="1"
+					is-gateway="true">
+					<property name="gatewayClass" value="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" />
+				</listener> 	    
+                <listener name="Bank-HTTP-Gateway"
+                    busidref="HTTP-1"
+                    maxThreads="1"
+                    is-gateway="true">
+                    <property name="gatewayClass" value="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" />
+                </listener>
+				<listener name="Bank-Listener"
+							busidref="local-jms"
+							maxThreads="2">
+				</listener>
+				<listener name="Bank-Listener-Generic" 
+							busidref="my-generic-bus"
+							maxThreads="2">
+					<property name="my-generic-listener" value="my-generic-listener#someattribvalue" />
+				</listener>
+			</listeners>    	
+			  
+			<actions>    	    
+				<action name="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter">
+					<property name="propName" value="propValue" />
+					<property name="propName">
+						This is some complex..
+						<!-- property -->
+						value.
+						<xxxx>
+							boooo
+							<yyyy/>
+						</xxxx>
+						<![CDATA[ Some CDATA data...]]>
+					</property>
+				</action>
+			</actions>
+			
+		</service>
+		<service category="Test2" name="FTPTest" description="FTP server Test">
+		
+			<listeners>    	    
+				<listener name="test-ftp-listener"
+							busidref="Ftp-ServerTest"
+							maxThreads="1">
+							<property name="schedule-frequency" value="10" />
+				</listener>
+			</listeners>
+			<actions mep="OneWay">    	    
+				<action name="TestFtpRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+			</actions> 	
+			
+		</service>
+		<service category="Test3" name="SQLTest" description="SQL server Test">
+		
+			<listeners>    	    
+				<listener name="test-sql-listener"
+							busidref="SQL-Test"
+							maxThreads="1">
+							<property name="pollLatencySeconds" value="10" />
+				</listener>
+			</listeners>
+			<actions mep="RequestResponse">    	    
+				<action name="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+			</actions> 	
+			
+		</service>
+	</services>
+	
+</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,43 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" >
+
+	<!-- 
+		This is a bad configuration.  The listener below is of the base listener type, yet it references a non-base type bus (jms-bus).
+		Should generate an error.
+	-->
+
+    <providers>
+          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+                      jndi-context-factory="org.jnp.interfaces.NamingContextFactory "
+                      jndi-URL="localhost" >
+                      
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/B"
+                  />
+              </jms-bus>
+
+          </jms-provider>
+      </providers>
+      
+      <services>
+          
+        <service category="HelloWorld_ActionESB" name="SimpleListener" description="Hello World">
+            <listeners>
+                <listener name="JMS-ESBListener"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />                
+            </listeners>
+            <actions>
+               <action name="displayAction" 
+               		class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction" 
+               		process="displayMessage">
+               		<property name="exceptionMethod" value="exceptionHandler"/>
+               </action>
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_04.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,47 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+
+	<providers>
+
+        <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
+            <jbr-bus busid="HTTP-1" port="8765" />
+            <jbr-bus busid="HTTP-2" port="8766" />
+        </jbr-provider>
+
+	</providers>
+	<services>
+
+        <service category="A" name="1" description="A1">
+			<listeners>
+                <jbr-listener name="A1-HTTP"
+                    busidref="HTTP-1"
+                    maxThreads="1"
+                    is-gateway="true"/>
+                <jbr-listener name="A2-HTTP"
+                    busidref="HTTP-2"
+                    maxThreads="1" />
+            </listeners>
+
+			<actions>    	    
+				<action name="a1" class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+			</actions>
+		</service>
+        <service category="B" name="2" description="A1">
+			<listeners>
+                <jbr-listener name="A1-HTTP"
+                    busidref="HTTP-1"
+                    maxThreads="1"
+                    is-gateway="true"/>
+                <jbr-listener name="A2-HTTP"
+                    busidref="HTTP-2"
+                    maxThreads="1" />
+			</listeners>
+
+			<actions>
+				<action name="a1" class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+			</actions>
+		</service>
+
+    </services>
+	
+</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_05.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,47 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+
+	<providers>
+
+        <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
+            <jbr-bus busid="HTTP-1" port="8765" />
+            <jbr-bus busid="HTTP-2" port="8766" />
+        </jbr-provider>
+
+	</providers>
+	<services>
+
+        <service category="C" name="3" description="A1">
+			<listeners>
+                <jbr-listener name="A1-HTTP"
+                    busidref="HTTP-1"
+                    maxThreads="1"
+                    is-gateway="true"/>
+                <jbr-listener name="A2-HTTP"
+                    busidref="HTTP-2"
+                    maxThreads="1" />
+			</listeners>
+			  
+			<actions>    	    
+				<action name="a1" class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+			</actions>
+		</service>
+        <service category="D" name="4" description="A1">
+			<listeners>
+                <jbr-listener name="A1-HTTP"
+                    busidref="HTTP-1"
+                    maxThreads="1"
+                    is-gateway="true"/>
+                <jbr-listener name="A2-HTTP"
+                    busidref="HTTP-2"
+                    maxThreads="1" />
+			</listeners>
+
+			<actions>
+				<action name="a1" class="org.jboss.soa.esb.listeners.config.MyPublishedAction" />
+			</actions>
+		</service>
+
+    </services>
+	
+</jbossesb>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,16 +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">
-	<services>
-		<service category="FirstServiceESB" name="SimpleListener"
-			description="Hello World" invmScope="GLOBAL">>
-			<actions mep="OneWay"
-				inXsd="/org/jboss/soa/esb/listeners/config/request.xsd">
-				<action name="action2"
-					class="org.jboss.soa.esb.actions.SystemPrintln">
-					<property name="printfull" value="true" />
-				</action>
-			</actions>
-		</service>
-	</services>
-</jbossesb>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -21,23 +21,22 @@
  */
 package org.jboss.soa.esb.listeners.config.mappers;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
 import junit.framework.TestCase;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
 import java.util.List;
 
 import org.apache.log4j.Logger;
+import org.apache.xmlbeans.XmlException;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.Generator;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpListenerDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.FtpBusDocument;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpBusDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Factory;
 import org.jboss.soa.esb.listeners.gateway.ReadOnlyRemoteGatewayListener;
 import org.junit.Test;
 import org.w3c.dom.Document;
@@ -85,11 +84,11 @@
 		assertEquals( ReadOnlyRemoteGatewayListener.class.getName(), gatewayClass.getNodeValue() );
 	}
 	
-	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException
+	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
 	{
 		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG_READ_ONLY );
-		GeneratorMock mock = new GeneratorMock( inputStream );
-		XMLBeansModel model = mock.getModel();
+		final Reader reader = new InputStreamReader(inputStream);
+		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
 		return model;
 	}
 	
@@ -100,27 +99,4 @@
 		root.setAttribute("parameterReloadSecs", "1000" );
 		return root;
 	}
-	
-	
-	/**
-	 * Just here to get proved access to the XMLBeansModel
-	 *
-	 */
-	private class GeneratorMock extends Generator
-	{
-
-		public GeneratorMock(InputStream config) throws ConfigurationException, IOException
-		{
-			super( config );
-		}
-
-		@Override
-		public XMLBeansModel getModel()
-		{
-			return super.getModel();
-		}
-		
-		
-	}
-
 }

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -27,22 +27,24 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
 import java.util.List;
 
 import junit.framework.JUnit4TestAdapter;
 
+import org.apache.xmlbeans.XmlException;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.Generator;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsBusDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsListenerDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.Provider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActivationConfigDocument.ActivationConfig;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsJcaProviderDocument.JmsJcaProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument.Property;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsBusDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ActivationConfigDocument.ActivationConfig;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsJcaProviderDocument.JmsJcaProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property;
 import org.junit.Before;
 import org.junit.Test;
 import org.w3c.dom.Document;
@@ -90,7 +92,7 @@
 	//	setup methods
 	
 	@Before
-	public void setup() throws ConfigurationException, IOException
+	public void setup() throws ConfigurationException, IOException, XmlException
 	{
 		root = createRootElement();
 		model = getXmlBeanModel( ESB_CONFIG );
@@ -141,11 +143,11 @@
 		return (JmsJcaProvider) provider;
 	}
 	
-	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException
+	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
 	{
 		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
-		GeneratorMock mock = new GeneratorMock( inputStream );
-		XMLBeansModel model = mock.getModel();
+		final Reader reader = new InputStreamReader(inputStream);
+		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
 		return model;
 	}
 	
@@ -157,26 +159,6 @@
 		return root;
 	}
 	
-	
-	/**
-	 * Just here to get proved access to the XMLBeansModel
-	 *
-	 */
-	private class GeneratorMock extends Generator
-	{
-
-		public GeneratorMock(InputStream config) throws ConfigurationException, IOException
-		{
-			super( config );
-		}
-
-		@Override
-		public XMLBeansModel getModel()
-		{
-			return super.getModel();
-		}
-	}
-	
 	public static junit.framework.Test suite()
 	{
 		return new JUnit4TestAdapter( JmsListenerMapperUnitTest.class );

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/SecurityMapperUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/SecurityMapperUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/SecurityMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -26,15 +26,17 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
 
 import junit.framework.JUnit4TestAdapter;
 
+import org.apache.xmlbeans.XmlException;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.Generator;
-import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service;
 import org.junit.Before;
 import org.junit.Test;
 import org.w3c.dom.Document;
@@ -86,7 +88,7 @@
 	//	setup methods
 	
 	@Before
-	public void setup() throws ConfigurationException, IOException
+	public void setup() throws ConfigurationException, IOException, XmlException
 	{
 		root = createRootElement();
 		model = getXmlBeanModel( ESB_CONFIG );
@@ -96,11 +98,11 @@
 		securityNode = root.getFirstChild();
 	}
 	
-	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException
+	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
 	{
 		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
-		GeneratorMock mock = new GeneratorMock( inputStream );
-		XMLBeansModel model = mock.getModel();
+		final Reader reader = new InputStreamReader(inputStream);
+		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
 		return model;
 	}
 	
@@ -112,25 +114,6 @@
 		return root;
 	}
 	
-	/**
-	 * Just here to get proved access to the XMLBeansModel
-	 *
-	 */
-	private class GeneratorMock extends Generator
-	{
-
-		public GeneratorMock(InputStream config) throws ConfigurationException, IOException
-		{
-			super( config );
-		}
-
-		@Override
-		public XMLBeansModel getModel()
-		{
-			return super.getModel();
-		}
-	}
-	
 	public static junit.framework.Test suite()
 	{
 		return new JUnit4TestAdapter( SecurityMapperUnitTest.class );

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_01.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_01.xml	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_01.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,32 +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>
-		
-		<ftp-provider name="FTP" hostname="localhost:21">
-			<ftp-bus busid="FtpMapperTest">
-				<ftp-message-filter directory="/Temp" read-only="true" input-suffix=".txt" username="joe" password="secret"/>
-			</ftp-bus>
-		</ftp-provider>
-
-        <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
-            <jbr-bus busid="HTTP-2" port="8766" />
-        </jbr-provider>
-
-    </providers>
-	<services>    
-		<service category="Test2" name="FTPTest" description="FTP server Test">
-			
-			<listeners>    	    
-				<ftp-listener name="FtpMapperListener"
-							busidref="FtpMapperTest"
-							is-gateway="true"
-							maxThreads="1"/>
-                <jbr-listener name="A2-HTTP"
-                    busidref="HTTP-2"
-                    maxThreads="1" />
-			</listeners>
-		</service>
-	</services>
-	
-</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110 (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,102 +0,0 @@
-/*
- * 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.
- */
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import junit.framework.TestCase;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.apache.xmlbeans.XmlException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpBusDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.gateway.ReadOnlyRemoteGatewayListener;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * Tests the class FtpListenerMapper 
- * 
- * @author Daniel Bevenius
- *
- */
-public class FtpListenerMapperUnitTest extends TestCase
-{
-	@SuppressWarnings("unused")
-	private Logger log = Logger.getLogger(FtpListenerMapperUnitTest.class);
-	
-	private static final String ESB_CONFIG_READ_ONLY = "jbossesb_config_readonly.xml";
-	
-	private static final String GATEWAY_CLASS_ATTRIBUTE = "gatewayClass";
-		
-	@Test
-	public void testReadOnlyConfiguration() throws Exception
-	{
-		Element root = createRootElement();
-		XMLBeansModel model = getXmlBeanModel( ESB_CONFIG_READ_ONLY );
-		
-		List<Listener> gateways = model.getGatewayListeners();
-		FtpListenerDocument.FtpListener ftpListener = (FtpListenerDocument.FtpListener) gateways.get(0);
-		assertEquals ( true, ftpListener.getIsGateway() );
-		
-		FtpBusDocument.FtpBus ftpBus = (FtpBusDocument.FtpBus) model.getBus( ftpListener.getBusidref() );
-		assertNotNull( "FtpBus element should exist", ftpBus );
-		assertEquals ( "read-only attribute should be true", true, ftpBus.getFtpMessageFilter().getReadOnly() );
-		
-		FtpListenerMapper.map( root , ftpListener, model );
-		
-		Node ftpMapperListener = root.getFirstChild();
-		assertNotNull ("ftpMapperListener should not be null", ftpMapperListener ); 
-		
-		NamedNodeMap attributes = ftpMapperListener.getAttributes();
-		Node gatewayClass = attributes.getNamedItem( GATEWAY_CLASS_ATTRIBUTE );
-		assertNotNull( "gatewayClass should have been set", gatewayClass );
-		assertEquals( ReadOnlyRemoteGatewayListener.class.getName(), gatewayClass.getNodeValue() );
-	}
-	
-	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
-	{
-		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG_READ_ONLY );
-		final Reader reader = new InputStreamReader(inputStream);
-		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
-		return model;
-	}
-	
-	private Element createRootElement() throws ConfigurationException
-	{
-		Document doc = YADOMUtil.createDocument();
-		Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
-		root.setAttribute("parameterReloadSecs", "1000" );
-		return root;
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,102 @@
+/*
+ * 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.
+ */
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import junit.framework.TestCase;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.apache.xmlbeans.XmlException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpBusDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.gateway.ReadOnlyRemoteGatewayListener;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * Tests the class FtpListenerMapper 
+ * 
+ * @author Daniel Bevenius
+ *
+ */
+public class FtpListenerMapperUnitTest extends TestCase
+{
+	@SuppressWarnings("unused")
+	private Logger log = Logger.getLogger(FtpListenerMapperUnitTest.class);
+	
+	private static final String ESB_CONFIG_READ_ONLY = "jbossesb_config_readonly.xml";
+	
+	private static final String GATEWAY_CLASS_ATTRIBUTE = "gatewayClass";
+		
+	@Test
+	public void testReadOnlyConfiguration() throws Exception
+	{
+		Element root = createRootElement();
+		XMLBeansModel model = getXmlBeanModel( ESB_CONFIG_READ_ONLY );
+		
+		List<Listener> gateways = model.getGatewayListeners();
+		FtpListenerDocument.FtpListener ftpListener = (FtpListenerDocument.FtpListener) gateways.get(0);
+		assertEquals ( true, ftpListener.getIsGateway() );
+		
+		FtpBusDocument.FtpBus ftpBus = (FtpBusDocument.FtpBus) model.getBus( ftpListener.getBusidref() );
+		assertNotNull( "FtpBus element should exist", ftpBus );
+		assertEquals ( "read-only attribute should be true", true, ftpBus.getFtpMessageFilter().getReadOnly() );
+		
+		FtpListenerMapper.map( root , ftpListener, model );
+		
+		Node ftpMapperListener = root.getFirstChild();
+		assertNotNull ("ftpMapperListener should not be null", ftpMapperListener ); 
+		
+		NamedNodeMap attributes = ftpMapperListener.getAttributes();
+		Node gatewayClass = attributes.getNamedItem( GATEWAY_CLASS_ATTRIBUTE );
+		assertNotNull( "gatewayClass should have been set", gatewayClass );
+		assertEquals( ReadOnlyRemoteGatewayListener.class.getName(), gatewayClass.getNodeValue() );
+	}
+	
+	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
+	{
+		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG_READ_ONLY );
+		final Reader reader = new InputStreamReader(inputStream);
+		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+		return model;
+	}
+	
+	private Element createRootElement() throws ConfigurationException
+	{
+		Document doc = YADOMUtil.createDocument();
+		Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
+		root.setAttribute("parameterReloadSecs", "1000" );
+		return root;
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,166 +0,0 @@
-/*
- * 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.
- */
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.List;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.xmlbeans.XmlException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsBusDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActivationConfigDocument.ActivationConfig;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsJcaProviderDocument.JmsJcaProvider;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
-import org.junit.Before;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Unit test for JmsListenerMapper
- * 
- * @author Daniel Bevenius
- *
- */
-public class JmsListenerMapperUnitTest
-{
-	private static final String ESB_CONFIG = "jbossesb_config_jms_jca.xml";
-	
-	private Element root;
-	private XMLBeansModel model;
-	private JmsListenerDocument.JmsListener jmsListener;
-	private JmsJcaProvider jmsJcaProvider;
-	
-	@Test ( expected = ConfigurationException.class )
-	public void tryToOverrideDestinationActivationConfigProperty() throws ConfigurationException, IOException
-	{
-		callJmsListenerMap( "destination", "/queue/dummyQueue" );
-	}
-	
-	@Test ( expected = ConfigurationException.class )
-	public void tryToOverride_DestinationType_ActivationConfigProperty() throws ConfigurationException, IOException
-	{
-		callJmsListenerMap( "destinationType", "Topic" );
-	}
-	
-	@Test ( expected = ConfigurationException.class )
-	public void tryToOverrideMessageSelectorActivationConfigProperty() throws ConfigurationException, IOException
-	{
-		callJmsListenerMap( "messageSelector", "dummyselector" );
-	}
-	
-	@Test ( expected = ConfigurationException.class )
-	public void tryToOverrideMaxMessagesActivationConfigProperty() throws ConfigurationException, IOException
-	{
-		callJmsListenerMap( "maxMessages", "300" );
-	}
-	
-	//	setup methods
-	
-	@Before
-	public void setup() throws ConfigurationException, IOException, XmlException
-	{
-		root = createRootElement();
-		model = getXmlBeanModel( ESB_CONFIG );
-		jmsListener = getListener( model );
-		jmsJcaProvider = getJmsJcaProvider( model );
-	}
-	
-	// 	helper methods
-	
-	private void callJmsListenerMap(
-			String activationConfigPropertyName,
-			String activationConfigPropertyValue
-			) throws ConfigurationException
-	{
-		ActivationConfig activationConfig = jmsJcaProvider.getActivationConfig();
-		createActivationProperty( activationConfig, activationConfigPropertyName, activationConfigPropertyValue );
-		
-		JmsListenerMapper.map( root , jmsListener, model );
-	}
-			
-	private Property createActivationProperty( 
-			final ActivationConfig activationConfig, 
-			final String name, 
-			final String value )
-	{
-		Property property = activationConfig.addNewProperty();
-		property.setName( name );
-		property.setValue( value ); 
-		return property;
-	}
-	
-	private JmsListener getListener( final XMLBeansModel model ) throws ConfigurationException
-	{
-		List<Listener> listeners = model.getESBAwareListeners();
-		return (JmsListener) listeners.get(0);
-	}
-	
-	private JmsJcaProvider getJmsJcaProvider( final XMLBeansModel model ) throws ConfigurationException, IOException
-	{
-		List<Listener> listeners = model.getESBAwareListeners();
-		JmsListenerDocument.JmsListener jmsListener = (JmsListener) listeners.get(0);
-		assertEquals ( false, jmsListener.getIsGateway() );
-		
-		JmsBusDocument.JmsBus jmsBus = (JmsBusDocument.JmsBus) model.getBus( jmsListener.getBusidref() );
-		assertNotNull( "JmsBus element should exist", jmsBus );
-		Provider provider = model.getProvider( jmsBus );
-		assertTrue( provider instanceof JmsJcaProvider );
-		return (JmsJcaProvider) provider;
-	}
-	
-	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
-	{
-		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
-		final Reader reader = new InputStreamReader(inputStream);
-		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
-		return model;
-	}
-	
-	private Element createRootElement() throws ConfigurationException
-	{
-		Document doc = YADOMUtil.createDocument();
-		Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
-		root.setAttribute("parameterReloadSecs", "1000" );
-		return root;
-	}
-	
-	public static junit.framework.Test suite()
-	{
-		return new JUnit4TestAdapter( JmsListenerMapperUnitTest.class );
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/JmsListenerMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,166 @@
+/*
+ * 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.
+ */
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.List;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.xmlbeans.XmlException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsBusDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.Provider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ActivationConfigDocument.ActivationConfig;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsJcaProviderDocument.JmsJcaProvider;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JmsListenerDocument.JmsListener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property;
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Unit test for JmsListenerMapper
+ * 
+ * @author Daniel Bevenius
+ *
+ */
+public class JmsListenerMapperUnitTest
+{
+	private static final String ESB_CONFIG = "jbossesb_config_jms_jca.xml";
+	
+	private Element root;
+	private XMLBeansModel model;
+	private JmsListenerDocument.JmsListener jmsListener;
+	private JmsJcaProvider jmsJcaProvider;
+	
+	@Test ( expected = ConfigurationException.class )
+	public void tryToOverrideDestinationActivationConfigProperty() throws ConfigurationException, IOException
+	{
+		callJmsListenerMap( "destination", "/queue/dummyQueue" );
+	}
+	
+	@Test ( expected = ConfigurationException.class )
+	public void tryToOverride_DestinationType_ActivationConfigProperty() throws ConfigurationException, IOException
+	{
+		callJmsListenerMap( "destinationType", "Topic" );
+	}
+	
+	@Test ( expected = ConfigurationException.class )
+	public void tryToOverrideMessageSelectorActivationConfigProperty() throws ConfigurationException, IOException
+	{
+		callJmsListenerMap( "messageSelector", "dummyselector" );
+	}
+	
+	@Test ( expected = ConfigurationException.class )
+	public void tryToOverrideMaxMessagesActivationConfigProperty() throws ConfigurationException, IOException
+	{
+		callJmsListenerMap( "maxMessages", "300" );
+	}
+	
+	//	setup methods
+	
+	@Before
+	public void setup() throws ConfigurationException, IOException, XmlException
+	{
+		root = createRootElement();
+		model = getXmlBeanModel( ESB_CONFIG );
+		jmsListener = getListener( model );
+		jmsJcaProvider = getJmsJcaProvider( model );
+	}
+	
+	// 	helper methods
+	
+	private void callJmsListenerMap(
+			String activationConfigPropertyName,
+			String activationConfigPropertyValue
+			) throws ConfigurationException
+	{
+		ActivationConfig activationConfig = jmsJcaProvider.getActivationConfig();
+		createActivationProperty( activationConfig, activationConfigPropertyName, activationConfigPropertyValue );
+		
+		JmsListenerMapper.map( root , jmsListener, model );
+	}
+			
+	private Property createActivationProperty( 
+			final ActivationConfig activationConfig, 
+			final String name, 
+			final String value )
+	{
+		Property property = activationConfig.addNewProperty();
+		property.setName( name );
+		property.setValue( value ); 
+		return property;
+	}
+	
+	private JmsListener getListener( final XMLBeansModel model ) throws ConfigurationException
+	{
+		List<Listener> listeners = model.getESBAwareListeners();
+		return (JmsListener) listeners.get(0);
+	}
+	
+	private JmsJcaProvider getJmsJcaProvider( final XMLBeansModel model ) throws ConfigurationException, IOException
+	{
+		List<Listener> listeners = model.getESBAwareListeners();
+		JmsListenerDocument.JmsListener jmsListener = (JmsListener) listeners.get(0);
+		assertEquals ( false, jmsListener.getIsGateway() );
+		
+		JmsBusDocument.JmsBus jmsBus = (JmsBusDocument.JmsBus) model.getBus( jmsListener.getBusidref() );
+		assertNotNull( "JmsBus element should exist", jmsBus );
+		Provider provider = model.getProvider( jmsBus );
+		assertTrue( provider instanceof JmsJcaProvider );
+		return (JmsJcaProvider) provider;
+	}
+	
+	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
+	{
+		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
+		final Reader reader = new InputStreamReader(inputStream);
+		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+		return model;
+	}
+	
+	private Element createRootElement() throws ConfigurationException
+	{
+		Document doc = YADOMUtil.createDocument();
+		Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
+		root.setAttribute("parameterReloadSecs", "1000" );
+		return root;
+	}
+	
+	public static junit.framework.Test suite()
+	{
+		return new JUnit4TestAdapter( JmsListenerMapperUnitTest.class );
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,121 +0,0 @@
-/*
- * 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.
- */
-package org.jboss.soa.esb.listeners.config.mappers110;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.xmlbeans.XmlException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
-import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
-import org.junit.Before;
-import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Unit test for {@link SecurityMapper}
- * <p/>
- * 
- * @author Daniel Bevenius
- *
- */
-public class SecurityMapperUnitTest
-{
-	private static final String ESB_CONFIG = "jbossesb_config_security.xml";
-	
-	private Element root;
-	private XMLBeansModel model;
-
-	private Service service;
-
-	private Node securityNode;
-	
-	@Test
-	public void mapRunAs() throws ConfigurationException
-	{
-		Node runAsNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.RUN_AS_TAG );
-		assertNotNull( runAsNode.getNodeName() );
-		assertEquals( "MrPoon", runAsNode.getNodeValue() );
-	}
-	
-	@Test
-	public void mapModuleName() throws ConfigurationException
-	{
-		Node moduleNameNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.MODULE_NAME_TAG );
-		assertNotNull( moduleNameNode.getNodeName() );
-		assertEquals( "mod1", moduleNameNode.getNodeValue());
-	}
-	
-	@Test
-	public void mapUseCallersIdentity() throws ConfigurationException
-	{
-		Node userIdentityNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.USE_CALLERS_IDENTIDY_TAG );
-		assertNotNull( userIdentityNode.getNodeName() );
-		assertEquals( "user1", userIdentityNode.getNodeValue());
-	}
-	
-	//	setup methods
-	
-	@Before
-	public void setup() throws ConfigurationException, IOException, XmlException
-	{
-		root = createRootElement();
-		model = getXmlBeanModel( ESB_CONFIG );
-		service = model.getServices().get( 0 );
-		
-		SecurityMapper.map( root, service );
-		securityNode = root.getFirstChild();
-	}
-	
-	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
-	{
-		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
-		final Reader reader = new InputStreamReader(inputStream);
-		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
-		return model;
-	}
-	
-	private Element createRootElement() throws ConfigurationException
-	{
-		Document doc = YADOMUtil.createDocument();
-		Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
-		root.setAttribute("parameterReloadSecs", "1000" );
-		return root;
-	}
-	
-	public static junit.framework.Test suite()
-	{
-		return new JUnit4TestAdapter( SecurityMapperUnitTest.class );
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/SecurityMapperUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,121 @@
+/*
+ * 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.
+ */
+package org.jboss.soa.esb.listeners.config.mappers110;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.xmlbeans.XmlException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.JbossesbDocument.Factory;
+import org.jboss.soa.esb.listeners.config.xbeanmodel110.ServiceDocument.Service;
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Unit test for {@link SecurityMapper}
+ * <p/>
+ * 
+ * @author Daniel Bevenius
+ *
+ */
+public class SecurityMapperUnitTest
+{
+	private static final String ESB_CONFIG = "jbossesb_config_security.xml";
+	
+	private Element root;
+	private XMLBeansModel model;
+
+	private Service service;
+
+	private Node securityNode;
+	
+	@Test
+	public void mapRunAs() throws ConfigurationException
+	{
+		Node runAsNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.RUN_AS_TAG );
+		assertNotNull( runAsNode.getNodeName() );
+		assertEquals( "MrPoon", runAsNode.getNodeValue() );
+	}
+	
+	@Test
+	public void mapModuleName() throws ConfigurationException
+	{
+		Node moduleNameNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.MODULE_NAME_TAG );
+		assertNotNull( moduleNameNode.getNodeName() );
+		assertEquals( "mod1", moduleNameNode.getNodeValue());
+	}
+	
+	@Test
+	public void mapUseCallersIdentity() throws ConfigurationException
+	{
+		Node userIdentityNode = securityNode.getAttributes().getNamedItem( ListenerTagNames.USE_CALLERS_IDENTIDY_TAG );
+		assertNotNull( userIdentityNode.getNodeName() );
+		assertEquals( "user1", userIdentityNode.getNodeValue());
+	}
+	
+	//	setup methods
+	
+	@Before
+	public void setup() throws ConfigurationException, IOException, XmlException
+	{
+		root = createRootElement();
+		model = getXmlBeanModel( ESB_CONFIG );
+		service = model.getServices().get( 0 );
+		
+		SecurityMapper.map( root, service );
+		securityNode = root.getFirstChild();
+	}
+	
+	private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
+	{
+		InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG );
+		final Reader reader = new InputStreamReader(inputStream);
+		XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
+		return model;
+	}
+	
+	private Element createRootElement() throws ConfigurationException
+	{
+		Document doc = YADOMUtil.createDocument();
+		Element root = YADOMUtil.addElement(doc, "jbossesb-gateways");
+		root.setAttribute("parameterReloadSecs", "1000" );
+		return root;
+	}
+	
+	public static junit.framework.Test suite()
+	{
+		return new JUnit4TestAdapter( SecurityMapperUnitTest.class );
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,38 +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.1.0.xsd">
-
-	<providers>
-	
-    	<jms-jca-provider
-            name="JBossMessaging"
-            connection-factory="XAConnectionFactory"
-            jndi-URL="jnp://127.0.0.1:1099"
-            transacted="true"
-            jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-            jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
-            <jms-bus busid="quickstartEsbChannel">
-                <jms-message-filter
-                    dest-type="QUEUE"
-                    dest-name="queue/quickstart_jms_transacted_Request_esb"
-                    selector="CorrelationID = '13'"
-                    transacted="true" />
-            </jms-bus>
-            <activation-config>
-                <property name="dLQMaxResent" value="12"/>
-                <property name="dLQJNDIName" value="/queue/quickstart_jms_transacted_error"/>
-                <property name="reconnectInterval" value="1000"/>
-            </activation-config>
-        </jms-jca-provider>
-	
-    </providers>
-	<services>    
-		<service category="Test2" name="JMSJCATest" description="JMS JCA Test">
-			
-			<listeners>    	    
-				<jms-listener name="JMSListener" busidref="quickstartEsbChannel" maxThreads="1"/>
-			</listeners>
-		</service>
-	</services>
-	
-</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_jms_jca.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,38 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+
+	<providers>
+	
+    	<jms-jca-provider
+            name="JBossMessaging"
+            connection-factory="XAConnectionFactory"
+            jndi-URL="jnp://127.0.0.1:1099"
+            transacted="true"
+            jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+            jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+
+            <jms-bus busid="quickstartEsbChannel">
+                <jms-message-filter
+                    dest-type="QUEUE"
+                    dest-name="queue/quickstart_jms_transacted_Request_esb"
+                    selector="CorrelationID = '13'"
+                    transacted="true" />
+            </jms-bus>
+            <activation-config>
+                <property name="dLQMaxResent" value="12"/>
+                <property name="dLQJNDIName" value="/queue/quickstart_jms_transacted_error"/>
+                <property name="reconnectInterval" value="1000"/>
+            </activation-config>
+        </jms-jca-provider>
+	
+    </providers>
+	<services>    
+		<service category="Test2" name="JMSJCATest" description="JMS JCA Test">
+			
+			<listeners>    	    
+				<jms-listener name="JMSListener" busidref="quickstartEsbChannel" maxThreads="1"/>
+			</listeners>
+		</service>
+	</services>
+	
+</jbossesb>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,32 +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.1.0.xsd">
-
-	<providers>
-		
-		<ftp-provider name="FTP" hostname="localhost:21">
-			<ftp-bus busid="FtpMapperTest">
-				<ftp-message-filter directory="/Temp" read-only="true" input-suffix=".txt" username="joe" password="secret"/>
-			</ftp-bus>
-		</ftp-provider>
-
-        <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
-            <jbr-bus busid="HTTP-2" port="8766" />
-        </jbr-provider>
-		
-	</providers>
-	<services>    
-		<service category="Test2" name="FTPTest" description="FTP server Test">
-			
-			<listeners>    	    
-				<ftp-listener name="FtpMapperListener"
-							busidref="FtpMapperTest"
-							is-gateway="true"
-							maxThreads="1"/>
-                <jbr-listener name="A2-HTTP"
-                    busidref="HTTP-2"
-                    maxThreads="1" />
-			</listeners>
-		</service>
-	</services>
-	
-</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_readonly.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,32 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+
+	<providers>
+		
+		<ftp-provider name="FTP" hostname="localhost:21">
+			<ftp-bus busid="FtpMapperTest">
+				<ftp-message-filter directory="/Temp" read-only="true" input-suffix=".txt" username="joe" password="secret"/>
+			</ftp-bus>
+		</ftp-provider>
+
+        <jbr-provider name="JBR" host="192.168.1.111" protocol="http">
+            <jbr-bus busid="HTTP-2" port="8766" />
+        </jbr-provider>
+		
+	</providers>
+	<services>    
+		<service category="Test2" name="FTPTest" description="FTP server Test">
+			
+			<listeners>    	    
+				<ftp-listener name="FtpMapperListener"
+							busidref="FtpMapperTest"
+							is-gateway="true"
+							maxThreads="1"/>
+                <jbr-listener name="A2-HTTP"
+                    busidref="HTTP-2"
+                    maxThreads="1" />
+			</listeners>
+		</service>
+	</services>
+	
+</jbossesb>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml	2009-01-18 23:35:33 UTC (rev 24768)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -1,34 +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.1.0.xsd">
-
-	<providers>
-	
-    	<jms-provider
-            name="JBossMessaging"
-            connection-factory="XAConnectionFactory"
-            jndi-URL="jnp://127.0.0.1:1099"
-            jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-            jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
-            <jms-bus busid="quickstartEsbChannel">
-                <jms-message-filter
-                    dest-type="QUEUE"
-                    dest-name="queue/quickstart_jms_transacted_Request_esb"
-                    selector="CorrelationID = '13'"/>
-            </jms-bus>
-        </jms-provider>
-	
-    </providers>
-	<services>    
-		<service category="Test2" name="JMSJCATest" description="JMS JCA Test">
-            <security runAs="MrPoon" moduleName="mod1" useCallersIdentity="user1"/>
-			<listeners>    	    
-				<jms-listener name="JMSListener" busidref="quickstartEsbChannel" maxThreads="1"/>
-			</listeners>
-			<actions>    	    
-				<action name="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
-			</actions>
-		</service>
-	</services>
-	
-</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_security.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,34 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+
+	<providers>
+	
+    	<jms-provider
+            name="JBossMessaging"
+            connection-factory="XAConnectionFactory"
+            jndi-URL="jnp://127.0.0.1:1099"
+            jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+            jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+
+            <jms-bus busid="quickstartEsbChannel">
+                <jms-message-filter
+                    dest-type="QUEUE"
+                    dest-name="queue/quickstart_jms_transacted_Request_esb"
+                    selector="CorrelationID = '13'"/>
+            </jms-bus>
+        </jms-provider>
+	
+    </providers>
+	<services>    
+		<service category="Test2" name="JMSJCATest" description="JMS JCA Test">
+            <security runAs="MrPoon" moduleName="mod1" useCallersIdentity="user1"/>
+			<listeners>    	    
+				<jms-listener name="JMSListener" busidref="quickstartEsbChannel" maxThreads="1"/>
+			</listeners>
+			<actions>    	    
+				<action name="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/>
+			</actions>
+		</service>
+	</services>
+	
+</jbossesb>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -22,4 +22,12 @@
     }
 
 
+    public void test110() throws ConfigurationException, IOException, SAXException {
+        ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("jboss-esb.110.xml"));
+
+        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\""));
+    }
+
 }

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.110.xml (from rev 24768, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.110.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.110.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/jboss-esb.110.xml	2009-02-18 22:43:27 UTC (rev 25327)
@@ -0,0 +1,142 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+        xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd"
+        parameterReloadSecs="5">
+
+    <providers>
+        <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+                      jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+                      jndi-URL="localhost">
+
+            <jms-bus busid="OrderManagerGateway">
+                <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_gw"/>
+            </jms-bus>
+            <jms-bus busid="OrderManagerService">
+                <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_esb"
+                                    selector="service='ordermanager'"/>
+            </jms-bus>
+            <jms-bus busid="ShipperService">
+                <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_esb"
+                                    selector="service='shipper'"/>
+            </jms-bus>
+            <jms-bus busid="OrderNotificationService">
+                <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_esb"
+                                    selector="service='orderNotifier'"/>
+            </jms-bus>
+        </jms-provider>
+
+        <jbr-provider name="JBR-Http-1" protocol="http" host="localhost">
+            <jbr-bus busid="Http-1" port="8865"/>
+        </jbr-provider>
+
+        <jbr-provider name="JBR-Http-2" protocol="http" host="localhost">
+            <jbr-bus busid="Http-2" port="8866"/>
+        </jbr-provider>
+
+        <jbr-provider name="JBR-Socket" protocol="socket" host="localhost">
+            <jbr-bus busid="Socket-1" port="8988"/>
+        </jbr-provider>
+
+        <fs-provider name="File Sys Provider">
+            <fs-bus busid="notificationChannel">
+                <fs-message-filter
+                        directory="/ae-demo/orders"
+                        input-suffix=".in.csv"
+                        work-suffix=".esbWorking"
+                        post-delete="false"
+                        post-directory="/ae-demo/orders"
+                        post-suffix=".done.csv"
+                        error-delete="false"
+                        error-directory="/ae-demo/orders"
+                        error-suffix=".IN_ERROR.csv"
+                        />
+            </fs-bus>
+        </fs-provider>
+
+    </providers>
+
+    <services>
+
+        <service category="ABI_OrderManager" name="ABI_OrderManager" description="ABI OrderManager Service">
+
+            <listeners>
+                <jms-listener name="JMS-Gateway" busidref="OrderManagerGateway" is-gateway="true" maxThreads="1"/>
+                <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" maxThreads="1"/>
+                <jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true" maxThreads="1"/>
+
+                <jms-listener name="JMS-ESBListener" busidref="OrderManagerService" maxThreads="1"/>
+            </listeners>
+            <actions>
+                <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message"
+                              value="[Quickstart_webservice_bpel] Message before invoking 'ABI_OrderManager' endpoint"/>
+                </action>
+                <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
+                    <property name="jbossws-endpoint" value="ABI_OrderManager"/>
+                </action>
+                <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message"
+                              value="[Quickstart_webservice_bpel] Message after invoking 'ABI_OrderManager' endpoint"/>
+                </action>
+            </actions>
+        </service>
+
+        <service category="ABI_Shipper" name="ABI_Shipper" description="ABI Shipper Service">
+
+            <listeners>
+                <jbr-listener name="Http-Gateway" busidref="Http-2" is-gateway="true" maxThreads="1"/>
+
+                <jms-listener name="JMS-ESBListener" busidref="ShipperService" maxThreads="1"/>
+            </listeners>
+            <actions>
+                <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message"
+                              value="[Quickstart_webservice_bpel] Message before invoking 'ABI_Shipping' endpoint"/>
+                </action>
+                <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
+                    <property name="jbossws-endpoint" value="ABI_Shipping"/>
+                </action>
+                <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message"
+                              value="[Quickstart_webservice_bpel] Message after invoking 'ABI_Shipping' endpoint"/>
+                </action>
+            </actions>
+        </service>
+
+        <service category="OrderNotificationService" name="OrderNotificationService"
+                 description="Order Notification Service">
+            <listeners>
+                <fs-listener name="FileGateway" busidref="notificationChannel" is-gateway="true"
+                             poll-frequency-seconds="10"/>
+                <jms-listener name="OrderNotificationService" busidref="OrderNotificationService"/>
+            </listeners>
+            <actions>
+                <!-- Transform the incoming CSV order approval record into a populated
+                     com.activebpel.ordermanagement.SalesOrderNotification instance. -->
+                <action name="message-populator" class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
+                    <property name="from" value="OrderManager"/>
+                    <property name="from-type" value="text/csv:orderApproval"/>
+                    <property name="to" value="RetailerCallback"/>
+                    <property name="to-type" value="text/xml:SendSalesOrderNotification"/>
+                </action>
+                <action name="print-after-transform" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message" value="[Quickstart_webservice_bpel] Message after transform and before SOAPClient"/>
+                </action>
+                <!-- Inject the com.activebpel.ordermanagement.SalesOrderNotification instance
+                     into the SOAPClient. SOAPClient will use SOAPUI to construct a soap request
+                     template and will then use OGNL to populate the values (from the Smooks 
+                     EXTRACTED_BEANS_HASH) into the soap message. -->
+                <action name="soapui-client" class="org.jboss.soa.esb.actions.soap.SOAPClient">
+                    <property name="wsdl" value="http://localhost:18080/active-bpel/services/RetailerCallback?wsdl"/>
+                    <property name="operation" value="SendSalesOrderNotification"/>
+                    <property name="paramsLocation" value="EXTRACTED_BEANS_HASH"/>
+                    <property name="responseXStreamConfig">
+                        <alias name="customerOrderAck" class="java.lang.Boolean" />
+                    </property>
+                </action>
+            </actions>
+        </service>
+
+    </services>
+
+</jbossesb>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_mtom/src/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_mtom/src/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_mtom/src/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -71,7 +71,7 @@
         URL wsdlURL = new URL("http://localhost:8080/contract/contract.jsp?serviceCat=MyServiceCategory&serviceName=MyMTOMService&protocol=http");
         //URL wsdlURL = new URL("http://127.0.0.1:8080/Quickstart_webservice_mtom/MTOMService?wsdl");
 
-        Service service = Service.create(wsdlURL, serviceName);
+        WeberviceInfo service = WeberviceInfo.create(wsdlURL, serviceName);
         mtomEndpoint = service.getPort(MTOMEndpoint.class);
 
         // enable MTOM

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -26,8 +26,7 @@
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument;
+import org.jboss.soa.esb.listeners.config.Action;
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.milyn.Smooks;
 import org.milyn.container.ExecutionContext;
@@ -45,7 +44,7 @@
 import java.lang.reflect.Proxy;
 import java.net.URI;
 import java.net.URL;
-import java.util.List;
+import java.util.Properties;
 
 /**
  * Contract publisher for a Webservice endpoint.
@@ -63,16 +62,13 @@
      * @param actionConfig action config.
      * @throws ConfigurationException Bad config.
      */
-    public void setActionConfig(ActionDocument.Action actionConfig) throws ConfigurationException {
-        List<PropertyDocument.Property> properties = actionConfig.getPropertyList();
+    public void setActionConfig(Action actionConfig) throws ConfigurationException {
+        final Properties properties = actionConfig.getProperties();
 
-        for(PropertyDocument.Property property : properties) {
-            if(property.getName().equals(SOAPProcessor.JBOSSWS_ENDPOINT)) {
-                endpointName = property.getValue();
-            }
-            if(property.getName().equals(SOAPProcessor.REWRITE_ENDPOINT_URL)) {
-                rewriteEndpointUrl = !property.getValue().equals("false");
-            }
+        endpointName = properties.getProperty(SOAPProcessor.JBOSSWS_ENDPOINT);
+        final String rewriteEndpointUrlVal = properties.getProperty(SOAPProcessor.REWRITE_ENDPOINT_URL);
+        if (rewriteEndpointUrlVal != null) {
+            rewriteEndpointUrl = !rewriteEndpointUrlVal.equals("false");
         }
 
         if(endpointName == null) {

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java	2009-02-18 16:40:19 UTC (rev 25326)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java	2009-02-18 22:43:27 UTC (rev 25327)
@@ -24,13 +24,13 @@
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument;
+import org.jboss.soa.esb.listeners.config.Action;
 import org.jboss.soa.esb.testutils.StringUtils;
 import org.xml.sax.SAXException;
 
 import java.io.IOException;
 import java.net.URI;
+import java.util.Properties;
 
 /**
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -78,21 +78,12 @@
         assertTrue("WSDL Update failed.  \n\n*** Expected:\n\n" + wsdlOutExpected + "\n\n*** Got:\n\n" + wsdlOut, StringUtils.equalsIgnoreLinebreaks(wsdlOutExpected, wsdlOut, false));
     }
 
-    private ActionDocument.Action buildActionConfig(boolean rewriteUrls) {
-        ActionDocument.Action action = ActionDocument.Action.Factory.newInstance();
-        PropertyDocument.Property[] properties = new PropertyDocument.Property[2];
+    private Action buildActionConfig(boolean rewriteUrls) {
+        final Properties properties = new Properties() ;
 
-        properties[0] = newConfigProperty(SOAPProcessor.JBOSSWS_ENDPOINT, "BlahEndpoint");
-        properties[1] = newConfigProperty(SOAPProcessor.REWRITE_ENDPOINT_URL, Boolean.toString(rewriteUrls));
-        action.setPropertyArray(properties);
-
-        return action;
+        properties.put(SOAPProcessor.JBOSSWS_ENDPOINT, "BlahEndpoint");
+        properties.put(SOAPProcessor.REWRITE_ENDPOINT_URL, Boolean.toString(rewriteUrls));
+        
+        return new Action("name", "class", "process", properties) ;
     }
-
-    private PropertyDocument.Property newConfigProperty(String name, String value) {
-        PropertyDocument.Property property = PropertyDocument.Property.Factory.newInstance();
-        property.setName(name);
-        property.setValue(value);
-        return property;
-    }
 }




More information about the jboss-svn-commits mailing list