[jboss-svn-commits] JBL Code SVN: r8960 - in labs/jbossesb/trunk: product and 180 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jan 22 06:01:18 EST 2007


Author: kevin.conner at jboss.com
Date: 2007-01-22 06:01:15 -0500 (Mon, 22 Jan 2007)
New Revision: 8960

Modified:
   labs/jbossesb/trunk/integration-build.xml
   labs/jbossesb/trunk/product/build.xml
   labs/jbossesb/trunk/product/console/build.properties
   labs/jbossesb/trunk/product/console/build.xml
   labs/jbossesb/trunk/product/console/distro/distro-build.xml
   labs/jbossesb/trunk/product/console/distro/hsqldb-distro-build.xml
   labs/jbossesb/trunk/product/console/distro/hsqldb-hibernate.cfg.xml
   labs/jbossesb/trunk/product/console/distro/jboss-esb-console-ds.xml
   labs/jbossesb/trunk/product/console/distro/postgres-distro-build.xml
   labs/jbossesb/trunk/product/console/distro/postgres-hibernate.cfg.xml
   labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml
   labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/seam.properties
   labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml
   labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml
   labs/jbossesb/trunk/product/console/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/console/resources/WEB-INF/navigation.xml
   labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml
   labs/jbossesb/trunk/product/console/resources/WEB-INF/web.xml
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/SeamUtils.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/SeamViewIdStack.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/Toggle.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/ManageContracts.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/MessageContract.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/NewContract.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/MessageExchange.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/TransformationConfigRejoin.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/participant/ManageParticipants.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/participant/Participant.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ListAllResources.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ManageResourceSpecs.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ManageResources.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResource.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResourceSpec.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceList.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverter.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksUtils.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformation.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformationView.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResource.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameterSpec.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceSpec.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/configimport/ResourceImport.java
   labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/configimport/ResourceLocation.java
   labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/MessageTypeTest.java
   labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverterTest.java
   labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/SmooksUtilsTest.java
   labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/flow/MessageContractTest.java
   labs/jbossesb/trunk/product/core/build.xml
   labs/jbossesb/trunk/product/core/listeners/build.xml
   labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml
   labs/jbossesb/trunk/product/core/listeners/src/log4j.properties
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/listeners/DefaultListenerManager.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionProcessingException.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionProcessor.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionUtils.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/CbrProxyAction.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/Notifier.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/ByteArrayToString.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/ObjectToCSVString.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/ObjectToXStream.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/SmooksTransformer.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/AbstractRouter.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/EchoRouter.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/HttpRouter.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockAction.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockComposer.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/AbstractManagedListener.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIService.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIServiceMBean.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerInitializationException.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerManager.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerManagerFactory.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerUtil.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/StandAloneBootStrapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/State.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerService.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerServiceMBean.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/MockXmlValidatorImpl.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidatorException.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidatorImpl.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/MapperUtil.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/NotificationMapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListener.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayException.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerController.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerService.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerServiceMBean.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/CbrListener.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/HttpListener.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java
   labs/jbossesb/trunk/product/core/listeners/tests/build.xml
   labs/jbossesb/trunk/product/core/listeners/tests/resources/conf/log4j.properties
   labs/jbossesb/trunk/product/core/listeners/tests/src/device-profile.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/BaseTestActionProcessor.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/TestBean.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/ToNowhereRouter.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/ByteArrayToStringUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/LongToDateConverter.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/ObjectToCSVStringUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/ObjectToXStreamUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/SmooksTransformerUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/StringToLongConverter.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerBaseTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerFTPIntegrationTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerFileUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJMSXntegrationTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/XmlValidatorUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerBaseTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/juddi-unittest.properties
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/juddi-unittest.properties
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/listenerFile.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/listenerFtp.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/listenerJdbc.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/listenerJms.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/util/MockNotificationTarget.java
   labs/jbossesb/trunk/product/core/log4j.xml
   labs/jbossesb/trunk/product/core/rosetta/build.xml
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/command/CommandQueue.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/command/CommandQueueException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/command/InMemoryCommandQueue.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/command/JmsCommandQueue.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/DeliverOnlyCourier.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/FileCourier.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/PickUpOnlyCourier.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourierImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/FileHandler.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/FileHandlerFactory.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/FtpFileHandler.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/LocalFileHandler.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/MessageFactoryImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/AttachmentImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/BodyImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/FaultImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/HeaderImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/MessageImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/PropertiesImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/SerializedMessagePlugin.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/AttachmentImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/BodyImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/ContextImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/HeaderImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/PropertiesImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLMessagePlugin.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLUtil.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalManager.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalPlugin.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/SerializedMarshalUnmarshalPlugin.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/notification/MacroExpander.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/parameters/ParamFileRepository.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/thirdparty/Base64.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/FtpUtils.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpUserInfo.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/BaseException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/ConfigurationException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/MarshalException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/ProtocolNotSupportedException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/SendFailedException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/UnmarshalException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/EPR.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/MalformedEPRException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/XMLUtil.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/EmailEpr.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FTPEpr.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FileEpr.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/HTTPEpr.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JDBCEpr.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/SFTPEpr.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/util/EPRManager.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Configuration.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Environment.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Factory.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/ModulePropertyManager.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/TagNames.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierTimeoutException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/TwoWayCourier.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/Email.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/KeyValuePair.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlField.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Attachment.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Body.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Context.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Fault.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Header.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Message.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Properties.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageFactory.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessagePlugin.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationList.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyConsole.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyEmail.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifySqlTable.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyUtil.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepository.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/DefaultEncryptionFactory.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/Encryption.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/EncryptionFailedException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/NotificationManager.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStore.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStoreException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStoreFactory.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/transform/TransformationException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/transform/TransformationService.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocator.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocatorSorter.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemException.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemFactory.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java
   labs/jbossesb/trunk/product/core/rosetta/tests/build.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/resources/device-profile.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/resources/etc/jbossesb-test-properties.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/resources/etc/persistUnitTestDB.properties
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/CourierIntegrationTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/CourierUtilUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/FileCourierUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/FtpFileHandlerIntegrationTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/util/SecureFtpTestConfig.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StreamUtils.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StringUtils.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/W3CDomUtils.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/EmailUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/FTPUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/HTTPUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JDBCUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/CallUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/EPRUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRHelperUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRManagerUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/command/InMemoryCommandQueueUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/BaseTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/MockDataSource.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/propertymanager/PropertyManagerUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/utils/DrainQueuesAndTopics.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/ConfigTreeUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/KeyValuePairUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_01.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_02.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_03.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConnUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/persist/SimpleDataSourceUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile1.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile2.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile3.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile4.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessageImpl.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessagePlugin.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/MessageFactoryUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/AttachmentUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/BodyUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/ExampleObject.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/MessageUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/PropertiesUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/SerializedMessageUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest_expected1.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest_testfile1.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyEmailUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyFilesUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTable_testfile1.xml
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyUtilUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget1.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget2.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/HsqldbUtil.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/TestEnvironmentUtil.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java
   labs/jbossesb/trunk/product/core/services/build.xml
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/MessageStoreFactoryImpl.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/MessageStorePlugin.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/db/DBConnectionManager.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/db/DBConnectionManagerDBCP.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStorePlugin.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/DslHelper.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/persistence/MessageStoreType.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryException.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouter.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouterException.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/CBRException.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java
   labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouterFactory.java
   labs/jbossesb/trunk/product/core/services/tests/application.xml
   labs/jbossesb/trunk/product/core/services/tests/build.xml
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/MockRegistry.java
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/MockRegistryUnitTest.java
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouterUnitTest.java
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/esb/persistence/tests/MessageStoreUnitTest.java
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/DummyUnitTest.java
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/RegistryUnitTest.java
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/juddi-unittest.properties
   labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRoutingUnitTest.java
   labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerEasier2ReadExample.xml
   labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerExample.xml
   labs/jbossesb/trunk/product/etc/examples/listeners/gatewayExample.xml
   labs/jbossesb/trunk/product/etc/examples/listeners/jbossesb_config_01.xml
   labs/jbossesb/trunk/product/etc/schemas/validation/build.xml
   labs/jbossesb/trunk/product/etc/schemas/validation/log4j.xml
   labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-email-epr-example.xml
   labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-ftp-epr-example.xml
   labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jdbc-epr-example.xml
   labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jms-epr-example.xml
   labs/jbossesb/trunk/product/etc/schemas/validation/src/org/jboss/soa/esb/services/xml/XmlValidation.java
   labs/jbossesb/trunk/product/etc/schemas/validation/src/org/jboss/soa/esb/services/xml/XmlValidationTest.java
   labs/jbossesb/trunk/product/etc/schemas/xml/common/common.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/contract.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/dispatcher.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/email.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/ftp.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/jdbc.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/jms.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/plugin.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/routing.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/common/ws-addr.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/email-epr.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/ftp-epr.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb.xml
   labs/jbossesb/trunk/product/etc/schemas/xml/jdbc-epr.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/jms-epr.xsd
   labs/jbossesb/trunk/product/etc/schemas/xml/message.xsd
   labs/jbossesb/trunk/product/etc/test/resources/jbossesb-unittest-properties.xml
   labs/jbossesb/trunk/product/etc/test/resources/log4j.xml
   labs/jbossesb/trunk/product/install/build.xml
   labs/jbossesb/trunk/product/install/conf/jbossesb-gateway.xml
   labs/jbossesb/trunk/product/install/conf/jbossesb-listener.xml
   labs/jbossesb/trunk/product/install/conf/jbossesb-properties.xml
   labs/jbossesb/trunk/product/install/conf/jbossesb.xml
   labs/jbossesb/trunk/product/install/conf/juddi.properties
   labs/jbossesb/trunk/product/install/conf/log4j.xml
   labs/jbossesb/trunk/product/install/data/hypersonic/default.properties
   labs/jbossesb/trunk/product/install/deploy/hsqldb-ds.xml
   labs/jbossesb/trunk/product/install/jUDDI-registry/juddi-ds.xml
   labs/jbossesb/trunk/product/install/jUDDI-registry/juddi.properties
   labs/jbossesb/trunk/product/product.properties
   labs/jbossesb/trunk/product/samples/quickstarts/esb-quickstart-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/SampleOrder.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-res.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/Customer.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/DVDStoreAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderHeader.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderItem.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/test/SendEsbMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/base-build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/HsqldbUtil.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/Launcher.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/src/quickstart/hw_file_action/MyAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/src/quickstart/hw_file_action/test/CreateTestFile.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/src/quickstart/hw_ftp_action/MyAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/quickstart/hw_sql_action/MyAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/CustomConfigAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/StatefulAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/quickstarts.properties
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/SampleOrder.xml
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/ReturnJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteExpressShipping.java
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteNormalShipping.java
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/ReceiveJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/static_router/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/static_router/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/static_router/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/static_router/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/static_router/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/static_router/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/static_router/src/quickstart/static_router/SimpleFileAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/static_router/src/quickstart/static_router/test/CreateTestFile.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/SampleOrder.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/smooks-res.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/org/jboss/soa/esb/dvdstore/Customer.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/org/jboss/soa/esb/dvdstore/DVDStoreAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/org/jboss/soa/esb/dvdstore/OrderHeader.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/org/jboss/soa/esb/dvdstore/OrderItem.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/ReturnJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/ReceiveJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/SampleOrder.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/base-build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/smooks-res.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/quickstart/helloworld/test/OrderDate.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/quickstart/helloworld/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/SampleOrder.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/base-build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/smooks-res.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/src/quickstart/helloworld/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties
   labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml
   labs/jbossesb/trunk/product/samples/trailblazer/banks/log4j.xml
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/build.properties
   labs/jbossesb/trunk/product/samples/trailblazer/build.xml
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl.xml
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/jboss-web.xml
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/Customer.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/CustomerMasterFile.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb-trailblazer-service.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/log4j.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/TbBootStrapper.java
   labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties
   labs/jbossesb/trunk/product/samples/trailblazer/log4j.xml
   labs/jbossesb/trunk/qa/build.xml
   labs/jbossesb/trunk/qa/jbossesb-unittest-properties.xml
   labs/jbossesb/trunk/qa/junit/build.xml
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.xml
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTestFragment.xml
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/MessageBox.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerTest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/CbrListenerTest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/CbrListenerTest.xml
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/MessageBox.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/HsqldbUtil.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreClient.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreTest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/DrainQueuesAndTopics.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessageAttachmentSerializeTest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessagePropertiesSerializeTest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/Util.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/services/registry/juddi-qatest.properties
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/ClassUtils.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/DbUtils.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/FileUtils.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/JMSClientUtil.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/TestCaseUtils.java
   labs/jbossesb/trunk/qa/load_tests/transform_load/build.xml
   labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config-gateway.xml
   labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config.xml
   labs/jbossesb/trunk/qa/load_tests/transform_load/jbossesb-properties.xml
   labs/jbossesb/trunk/qa/load_tests/transform_load/jndi.properties
   labs/jbossesb/trunk/qa/load_tests/transform_load/juddi.properties
   labs/jbossesb/trunk/qa/load_tests/transform_load/log4j.xml
   labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/Assertion.java
   labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/HsqldbUtil.java
   labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/Launcher.java
   labs/jbossesb/trunk/qa/load_tests/transform_load/test.properties
   labs/jbossesb/trunk/qa/load_tests/transform_load/transform/smooks-trans.xml
   labs/jbossesb/trunk/qa/log4j.xml
   labs/jbossesb/trunk/qa/test.properties
Log:
Added native eol property


Property changes on: labs/jbossesb/trunk/integration-build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/build.xml
===================================================================
--- labs/jbossesb/trunk/product/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -123,7 +123,7 @@
 		    </target>
 
     <!-- javadocs paths -->
-	<path id="org.jboss.esb.javadocs.path">
+	<path id="org.jboss.esb.javadocs.path">
 		<pathelement path="build/schema-model/src"/>
 		<pathelement path="core/rosetta/src"/>
 		<pathelement path="core/listeners/src"/>


Property changes on: labs/jbossesb/trunk/product/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/console/build.properties
===================================================================
--- labs/jbossesb/trunk/product/console/build.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/console/build.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-deploy.dir=H:/jboss-4.0.4.GA/server/default/deploy
-
-db.host=localhost
-db.port=5432
-db.name=jbossesb
-db.username=postgres
-db.password=password
+deploy.dir=H:/jboss-4.0.4.GA/server/default/deploy
+
+db.host=localhost
+db.port=5432
+db.name=jbossesb
+db.username=postgres
+db.password=password


Property changes on: labs/jbossesb/trunk/product/console/build.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/distro/distro-build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/distro/hsqldb-distro-build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/distro/hsqldb-hibernate.cfg.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/distro/jboss-esb-console-ds.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/distro/postgres-distro-build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/console/distro/postgres-hibernate.cfg.xml
===================================================================
--- labs/jbossesb/trunk/product/console/distro/postgres-hibernate.cfg.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/console/distro/postgres-hibernate.cfg.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -13,7 +13,7 @@
 		<property name="connection.release_mode">after_statement</property>
 		<property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
 		<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
-		
+		
 		<mapping class="org.jboss.soa.esb.admin.console.exchange.participant.Participant"/>
 		<mapping class="org.jboss.soa.esb.admin.console.contract.MessageContract"/>
 		<mapping class="org.jboss.soa.esb.admin.console.transform.TransformationResource"/>


Property changes on: labs/jbossesb/trunk/product/console/distro/postgres-hibernate.cfg.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/seam.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,22 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://jboss.com/products/seam/components"
-            xmlns:core="http://jboss.com/products/seam/core"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation=
-                "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd 
-                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
-
-    <core:init debug="true"/>    
-
-    <core:pages no-conversation-view-id="/home.xhtml"/>
-
-    <core:manager conversation-timeout="1200000" 
-                  concurrent-request-timeout="500"
-                  conversation-id-parameter="cid"
-                  conversation-is-long-running-parameter="clr"/>
-                  
-    <core:hibernate-session-factory name="hibernateSessionFactory"/>
-    
-    <core:managed-hibernate-session name="esbDatabase"/>
-    
-</components>
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+            xmlns:core="http://jboss.com/products/seam/core"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation=
+                "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd 
+                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
+
+    <core:init debug="true"/>    
+
+    <core:pages no-conversation-view-id="/home.xhtml"/>
+
+    <core:manager conversation-timeout="1200000" 
+                  concurrent-request-timeout="500"
+                  conversation-id-parameter="cid"
+                  conversation-is-long-running-parameter="clr"/>
+                  
+    <core:hibernate-session-factory name="hibernateSessionFactory"/>
+    
+    <core:managed-hibernate-session name="esbDatabase"/>
+    
+</components>


Property changes on: labs/jbossesb/trunk/product/console/resources/WEB-INF/components.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE faces-config 
-    PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
-    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
-    
-<faces-config>
-
-    <lifecycle>
-      <phase-listener>
-        org.jboss.seam.jsf.TransactionalSeamPhaseListener
-      </phase-listener>
-    </lifecycle>
-	
-	<converter>
-		<converter-id>SmooksResourceListConverter</converter-id>
-		<converter-class>org.jboss.soa.esb.admin.console.transform.SmooksResourceListConverter</converter-class>
-	</converter>
-	
-</faces-config>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config 
+    PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+    
+<faces-config>
+
+    <lifecycle>
+      <phase-listener>
+        org.jboss.seam.jsf.TransactionalSeamPhaseListener
+      </phase-listener>
+    </lifecycle>
+	
+	<converter>
+		<converter-id>SmooksResourceListConverter</converter-id>
+		<converter-class>org.jboss.soa.esb.admin.console.transform.SmooksResourceListConverter</converter-class>
+	</converter>
+	
+</faces-config>


Property changes on: labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/resources/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/navigation.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/navigation.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/navigation.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,103 +1,103 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE faces-config 
-    PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
-    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
-    
-<faces-config>
-
-    <!-- Navigation rules for the Admin Console app -->
-
-    <navigation-rule>
-
-        <navigation-case>
-            <from-outcome>home</from-outcome>
-            <to-view-id>/home.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>error</from-outcome>
-            <to-view-id>/error.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-		<!-- ==============================================================================================
-			Message Transformation Config View navigation rules.
-		=============================================================================================== -->
-
-        <navigation-case>
-            <from-outcome>select-message-exchange</from-outcome>
-            <to-view-id>/transform/select-message-exchange-from.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>select-message-exchange-from</from-outcome>
-            <to-view-id>/transform/select-message-exchange-from.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>select-message-exchange-to</from-outcome>
-            <to-view-id>/transform/select-message-exchange-to.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>select-message-exchange-finish</from-outcome>
-            <to-view-id>/transform/select-message-exchange-finish.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>new-trans-resource-select-spec</from-outcome>
-            <to-view-id>/transform/new-trans-resource-select-spec.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>add-resource-parameter</from-outcome>
-            <to-view-id>/transform/add-resource-parameter.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>new-trans-resource-create</from-outcome>
-            <to-view-id>/transform/new-trans-resource-create.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>new-trans-resource-target</from-outcome>
-            <to-view-id>/transform/new-trans-resource-target.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>new-trans-resource-spec-create</from-outcome>
-            <to-view-id>/transform/new-trans-resource-spec-create.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>list-resource-specs</from-outcome>
-            <to-view-id>/transform/list-resource-specs.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>list-resources</from-outcome>
-            <to-view-id>/transform/list-resources.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>view-resource</from-outcome>
-            <to-view-id>/transform/view-resource.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config 
+    PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+    
+<faces-config>
 
+    <!-- Navigation rules for the Admin Console app -->
+
+    <navigation-rule>
+
         <navigation-case>
+            <from-outcome>home</from-outcome>
+            <to-view-id>/home.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>error</from-outcome>
+            <to-view-id>/error.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+		<!-- ==============================================================================================
+			Message Transformation Config View navigation rules.
+		=============================================================================================== -->
+
+        <navigation-case>
+            <from-outcome>select-message-exchange</from-outcome>
+            <to-view-id>/transform/select-message-exchange-from.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>select-message-exchange-from</from-outcome>
+            <to-view-id>/transform/select-message-exchange-from.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>select-message-exchange-to</from-outcome>
+            <to-view-id>/transform/select-message-exchange-to.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>select-message-exchange-finish</from-outcome>
+            <to-view-id>/transform/select-message-exchange-finish.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>new-trans-resource-select-spec</from-outcome>
+            <to-view-id>/transform/new-trans-resource-select-spec.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>add-resource-parameter</from-outcome>
+            <to-view-id>/transform/add-resource-parameter.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>new-trans-resource-create</from-outcome>
+            <to-view-id>/transform/new-trans-resource-create.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>new-trans-resource-target</from-outcome>
+            <to-view-id>/transform/new-trans-resource-target.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>new-trans-resource-spec-create</from-outcome>
+            <to-view-id>/transform/new-trans-resource-spec-create.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>list-resource-specs</from-outcome>
+            <to-view-id>/transform/list-resource-specs.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>list-resources</from-outcome>
+            <to-view-id>/transform/list-resources.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>view-resource</from-outcome>
+            <to-view-id>/transform/view-resource.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
             <from-outcome>update-resource-parameter</from-outcome>
             <to-view-id>/transform/update-resource-parameter.xhtml</to-view-id>
             <redirect />
@@ -108,45 +108,45 @@
             <to-view-id>/transform/test-transformation.xhtml</to-view-id>
             <redirect />
         </navigation-case>
-
-        <navigation-case>
-            <from-outcome>smooks-config</from-outcome>
-            <to-view-id>/transform/smooks-config.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>import-resources</from-outcome>
-            <to-view-id>/transform/import-resources.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-        
-		<!-- ==============================================================================================
-			Message Contract Config View navigation rules.
-		=============================================================================================== -->
-
-        <navigation-case>
-            <from-outcome>new-message-contract</from-outcome>
-            <to-view-id>/contract/new-message-contract.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>list-message-contracts</from-outcome>
-            <to-view-id>/contract/list-message-contracts.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-        <navigation-case>
-            <from-outcome>manage-participants</from-outcome>
-            <to-view-id>/participant/manage-participants.xhtml</to-view-id>
-            <redirect />
-        </navigation-case>
-
-    </navigation-rule>
-
-	<navigation-rule>
-		<from-view-id>/home.xhtml</from-view-id>
-	</navigation-rule>
-	
-</faces-config>
+
+        <navigation-case>
+            <from-outcome>smooks-config</from-outcome>
+            <to-view-id>/transform/smooks-config.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>import-resources</from-outcome>
+            <to-view-id>/transform/import-resources.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+        
+		<!-- ==============================================================================================
+			Message Contract Config View navigation rules.
+		=============================================================================================== -->
+
+        <navigation-case>
+            <from-outcome>new-message-contract</from-outcome>
+            <to-view-id>/contract/new-message-contract.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>list-message-contracts</from-outcome>
+            <to-view-id>/contract/list-message-contracts.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+        <navigation-case>
+            <from-outcome>manage-participants</from-outcome>
+            <to-view-id>/participant/manage-participants.xhtml</to-view-id>
+            <redirect />
+        </navigation-case>
+
+    </navigation-rule>
+
+	<navigation-rule>
+		<from-view-id>/home.xhtml</from-view-id>
+	</navigation-rule>
+	
+</faces-config>


Property changes on: labs/jbossesb/trunk/product/console/resources/WEB-INF/navigation.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,17 +1,17 @@
-<!DOCTYPE pages PUBLIC
-  "-//JBoss/Seam Pages Configuration DTD 1.1//EN"
-  "http://jboss.com/products/seam/pages-1.1.dtd">
-
-<pages>
-	<!-- Make sure that the Message Exchange gets initialised... -->
-	<page view-id="/transform/select-message-exchange-from.xhtml" action="#{messageExchangeSelect.initialise}" />
-
-	<!-- Make sure newResource gets initialised... -->
-	<page view-id="/transform/new-trans-resource-select-spec.xhtml" action="#{newResource.initialise}" />
-
-	<!-- Make sure manageResources gets initialised... -->
-	<page view-id="/transform/list-resources.xhtml" action="#{manageResources.initialise}" />
-
-	<!-- Support GET requests for the configuration data i.e. the ESB reading the configurations... -->
-	<page view-id="/transform/smooks-config.xhtml" action="#{listAllResources.list}" />
+<!DOCTYPE pages PUBLIC
+  "-//JBoss/Seam Pages Configuration DTD 1.1//EN"
+  "http://jboss.com/products/seam/pages-1.1.dtd">
+
+<pages>
+	<!-- Make sure that the Message Exchange gets initialised... -->
+	<page view-id="/transform/select-message-exchange-from.xhtml" action="#{messageExchangeSelect.initialise}" />
+
+	<!-- Make sure newResource gets initialised... -->
+	<page view-id="/transform/new-trans-resource-select-spec.xhtml" action="#{newResource.initialise}" />
+
+	<!-- Make sure manageResources gets initialised... -->
+	<page view-id="/transform/list-resources.xhtml" action="#{manageResources.initialise}" />
+
+	<!-- Support GET requests for the configuration data i.e. the ESB reading the configurations... -->
+	<page view-id="/transform/smooks-config.xhtml" action="#{listAllResources.list}" />
 </pages>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/web.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/web.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/web.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,76 +1,76 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>   
-      
-    <context-param>      
-      <param-name>javax.faces.CONFIG_FILES</param-name>      
-      <param-value>/WEB-INF/navigation.xml</param-value>   
-    </context-param>	   
-    
-    <!-- Ajax4jsf (must come first!) -->		   
-    <filter>     
-      <display-name>Ajax4jsf Filter</display-name>     
-      <filter-name>ajax4jsf</filter-name>     
-      <filter-class>org.ajax4jsf.Filter</filter-class>   
-    </filter>	   
-    <filter-mapping>     
-      <filter-name>ajax4jsf</filter-name>     
-      <url-pattern>*.seam</url-pattern>   
-    </filter-mapping>   
-    <context-param>     
-      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>     
-      <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>   
-    </context-param>
-    
-    <!-- Seam -->           
-    <listener>              
-      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>        
-    </listener>    
-    <!-- Propagate conversations across redirects -->    
-    <filter>        
-      <filter-name>Seam Redirect Filter</filter-name>        
-      <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>    
-    </filter>        
-    <filter-mapping>        
-      <filter-name>Seam Redirect Filter</filter-name>        
-      <url-pattern>*.seam</url-pattern>    
-    </filter-mapping>    
-    <filter>        
-      <filter-name>Seam Exception Filter</filter-name>        
-      <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>    
-    </filter>        
-    <filter-mapping>        
-      <filter-name>Seam Exception Filter</filter-name>        
-      <url-pattern>*.seam</url-pattern>    
-    </filter-mapping>      
-    
-    <!-- Faces Servlet -->    
-    <servlet>              
-      <servlet-name>Faces Servlet</servlet-name>              
-      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>              
-      <load-on-startup>1</load-on-startup>        
-    </servlet>    
-    <!-- Faces Servlet Mapping -->    
-    <servlet-mapping>              
-      <servlet-name>Faces Servlet</servlet-name>              
-      <url-pattern>*.seam</url-pattern>        
-    </servlet-mapping>
-    <!-- JSF parameters -->  
-    <context-param>              
-      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>              
-      <param-value>client</param-value>        
-    </context-param>    
-    <context-param>        
-      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>        
-      <param-value>.xhtml</param-value>    
-    </context-param>    
-    <context-param>        
-      <param-name>facelets.DEVELOPMENT</param-name>        
-      <param-value>true</param-value>    
-    </context-param>  
-    
-    <!-- MyFaces -->    
-    <listener>        
-      <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>    
-    </listener>     
-    
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app>   
+      
+    <context-param>      
+      <param-name>javax.faces.CONFIG_FILES</param-name>      
+      <param-value>/WEB-INF/navigation.xml</param-value>   
+    </context-param>	   
+    
+    <!-- Ajax4jsf (must come first!) -->		   
+    <filter>     
+      <display-name>Ajax4jsf Filter</display-name>     
+      <filter-name>ajax4jsf</filter-name>     
+      <filter-class>org.ajax4jsf.Filter</filter-class>   
+    </filter>	   
+    <filter-mapping>     
+      <filter-name>ajax4jsf</filter-name>     
+      <url-pattern>*.seam</url-pattern>   
+    </filter-mapping>   
+    <context-param>     
+      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>     
+      <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>   
+    </context-param>
+    
+    <!-- Seam -->           
+    <listener>              
+      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>        
+    </listener>    
+    <!-- Propagate conversations across redirects -->    
+    <filter>        
+      <filter-name>Seam Redirect Filter</filter-name>        
+      <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>    
+    </filter>        
+    <filter-mapping>        
+      <filter-name>Seam Redirect Filter</filter-name>        
+      <url-pattern>*.seam</url-pattern>    
+    </filter-mapping>    
+    <filter>        
+      <filter-name>Seam Exception Filter</filter-name>        
+      <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>    
+    </filter>        
+    <filter-mapping>        
+      <filter-name>Seam Exception Filter</filter-name>        
+      <url-pattern>*.seam</url-pattern>    
+    </filter-mapping>      
+    
+    <!-- Faces Servlet -->    
+    <servlet>              
+      <servlet-name>Faces Servlet</servlet-name>              
+      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>              
+      <load-on-startup>1</load-on-startup>        
+    </servlet>    
+    <!-- Faces Servlet Mapping -->    
+    <servlet-mapping>              
+      <servlet-name>Faces Servlet</servlet-name>              
+      <url-pattern>*.seam</url-pattern>        
+    </servlet-mapping>
+    <!-- JSF parameters -->  
+    <context-param>              
+      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>              
+      <param-value>client</param-value>        
+    </context-param>    
+    <context-param>        
+      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>        
+      <param-value>.xhtml</param-value>    
+    </context-param>    
+    <context-param>        
+      <param-name>facelets.DEVELOPMENT</param-name>        
+      <param-value>true</param-value>    
+    </context-param>  
+    
+    <!-- MyFaces -->    
+    <listener>        
+      <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>    
+    </listener>     
+    
 </web-app>


Property changes on: labs/jbossesb/trunk/product/console/resources/WEB-INF/web.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/SeamUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/SeamViewIdStack.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/Toggle.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/ManageContracts.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/MessageContract.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/NewContract.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/MessageExchange.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/TransformationConfigRejoin.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/participant/ManageParticipants.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/participant/Participant.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ListAllResources.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ManageResourceSpecs.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/ManageResources.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResource.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/NewResourceSpec.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceList.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformation.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformationView.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResource.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameterSpec.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceSpec.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/configimport/ResourceImport.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/configimport/ResourceLocation.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/MessageTypeTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverterTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/SmooksUtilsTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/flow/MessageContractTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,108 +1,108 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-    <!-- =================================================================== -->
-    <!-- build.xml  -   Builds all subprojects in child directories          -->
-    <!-- =================================================================== -->
-
-<project name="JbossEsb" default="org.jboss.esb.core.compile" basedir=".">
-
-    <property name="org.jboss.esb.core.name.jar" value="name.jar-NOT_SET.jar"/>
-    <property environment="env"/>
-
-    <!-- =================================================================== -->
-    <!-- Initialize                                                          -->
-    <!-- =================================================================== -->
-    <target name="org.jboss.esb.core.init">
-	<tstamp>
-	    <format property="TODAY" pattern="dd-MM-yy"/>
-	</tstamp>
-    </target>
-
-	<path id="emma.libs">
-		<fileset dir="../lib/ext" includes="emma*.jar"/>
-	</path>
-	<taskdef resource="emma_ant.properties" classpathref="emma.libs" />
-	
-    <!-- =================================================================== -->
-    <!-- Prepares the directory structure                                    -->
-    <!-- =================================================================== -->
-    <target name="org.jboss.esb.core.prepare" depends="org.jboss.esb.core.init">
-	<mkdir dir="${org.jboss.esb.internal.dest}/jbossesb"/>
-	<mkdir dir="${org.jboss.esb.internal.dest}/jbossesb/lib"/>
-    </target>
-
-    <!-- =================================================================== -->
-    <!-- Compiles all the classes                                            -->
-    <!-- =================================================================== -->
-    <target name="org.jboss.esb.core.compile" depends="org.jboss.esb.core.prepare" description="Compile subprojects">
-    		<echo message="Compiling submodules"/>
-    		<ant dir="rosetta"/>
-    		<ant dir="services"/>
-    		<ant dir="listeners"/>
-    </target>
-
-    <!-- =================================================================== -->
-    <!-- Test all the classes excluding integration test                     -->
-    <!-- =================================================================== -->
-    <target name="org.jboss.esb.core.test" depends="org.jboss.esb.core.compile" description="Test subprojects">
-        <echo message="Testing submodules"/>
-        <ant dir="rosetta" target="org.jboss.esb.rosetta.test"/>
-        <ant dir="services" target="org.jboss.esb.services.test"/>
-        <ant dir="listeners" target="org.jboss.esb.listeners.test"/>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+    <!-- =================================================================== -->
+    <!-- build.xml  -   Builds all subprojects in child directories          -->
+    <!-- =================================================================== -->
+
+<project name="JbossEsb" default="org.jboss.esb.core.compile" basedir=".">
+
+    <property name="org.jboss.esb.core.name.jar" value="name.jar-NOT_SET.jar"/>
+    <property environment="env"/>
+
+    <!-- =================================================================== -->
+    <!-- Initialize                                                          -->
+    <!-- =================================================================== -->
+    <target name="org.jboss.esb.core.init">
+	<tstamp>
+	    <format property="TODAY" pattern="dd-MM-yy"/>
+	</tstamp>
     </target>
+
+	<path id="emma.libs">
+		<fileset dir="../lib/ext" includes="emma*.jar"/>
+	</path>
+	<taskdef resource="emma_ant.properties" classpathref="emma.libs" />
 	
+    <!-- =================================================================== -->
+    <!-- Prepares the directory structure                                    -->
+    <!-- =================================================================== -->
+    <target name="org.jboss.esb.core.prepare" depends="org.jboss.esb.core.init">
+	<mkdir dir="${org.jboss.esb.internal.dest}/jbossesb"/>
+	<mkdir dir="${org.jboss.esb.internal.dest}/jbossesb/lib"/>
+    </target>
+
+    <!-- =================================================================== -->
+    <!-- Compiles all the classes                                            -->
+    <!-- =================================================================== -->
+    <target name="org.jboss.esb.core.compile" depends="org.jboss.esb.core.prepare" description="Compile subprojects">
+    		<echo message="Compiling submodules"/>
+    		<ant dir="rosetta"/>
+    		<ant dir="services"/>
+    		<ant dir="listeners"/>
+    </target>
+
+    <!-- =================================================================== -->
+    <!-- Test all the classes excluding integration test                     -->
+    <!-- =================================================================== -->
+    <target name="org.jboss.esb.core.test" depends="org.jboss.esb.core.compile" description="Test subprojects">
+        <echo message="Testing submodules"/>
+        <ant dir="rosetta" target="org.jboss.esb.rosetta.test"/>
+        <ant dir="services" target="org.jboss.esb.services.test"/>
+        <ant dir="listeners" target="org.jboss.esb.listeners.test"/>
+    </target>
+	
 	<!-- =================================================================== -->
 	<!-- Run unit, functional and integration tests                          -->
 	<!-- =================================================================== -->
 	    <target name="org.jboss.esb.core.integration.test" depends="org.jboss.esb.core.compile" description="Integration test subprojects">
 	        <echo message="Testing submodule integration tests"/>
 	        <ant dir="rosetta" target="org.jboss.esb.rosetta.integration.test"/>
-	        <ant dir="services" target="org.jboss.esb.services.integration.test"/>
+	        <ant dir="services" target="org.jboss.esb.services.integration.test"/>
 	        <ant dir="listeners" target="org.jboss.esb.listeners.integration.test"/>
 	    </target>
-	
-    <!-- =================================================================== -->
-    <!-- Assemble  jars                                                      -->
-    <!-- =================================================================== -->
-    <target name="jar" description="Build jar files">
-    		<echo message="Building jar"/>
-    		<ant dir="rosetta" target="jar"/>
-    		<ant dir="services" target="jar"/>
-            <ant dir="listeners" target="jar"/>
-    </target>
-
-	<property name="classes.dir" location="${org.jboss.esb.internal.dest}/classes"/>
-    <property name="coverage.dir" location="${org.jboss.esb.internal.dest}/tests/coverage"/>
-
-	<target name="instr-report">
-	    <emma>
-			<report sort="+block,+name,+method,+class" metrics="method:70,block:80,line:80,class:100">
-		        <fileset dir="${coverage.dir}" >
-					<include name="*/*.emma" />
-		        </fileset>
-				<sourcepath><dirset dir="./" includes="rosetta/src,listeners/src,services/src" /></sourcepath>					
-		        <txt outfile="${coverage.dir}/coverage.txt"/>
-			</report>
-	    </emma>
-	</target>
-	
-    <!-- =================================================================== -->
-    <!-- Clean  all                                                          -->
-    <!-- =================================================================== -->
-    <target name="clean" description="Clean dist directory and cleans subprojects">
-        <delete dir="${org.jboss.esb.internal.dest}/classes"/>
- 
-            <ant dir="rosetta" target="clean"/>
-    	    <ant dir="listeners" target="clean"/>
-    	    <ant dir="services" target="clean"/>
-
-        <delete dir="${org.jboss.esb.internal.dest}/jbossesb"/>
-	</target>
-
-    <!-- =================================================================== -->
-    <!-- Rebuild everything from scratch                                     -->
-    <!-- =================================================================== -->
-    <target name="all" depends="clean,jar" />
-    <target name="recompile" depends="clean,org.jboss.esb.core.compile" />
-
-</project>
+	
+    <!-- =================================================================== -->
+    <!-- Assemble  jars                                                      -->
+    <!-- =================================================================== -->
+    <target name="jar" description="Build jar files">
+    		<echo message="Building jar"/>
+    		<ant dir="rosetta" target="jar"/>
+    		<ant dir="services" target="jar"/>
+            <ant dir="listeners" target="jar"/>
+    </target>
+
+	<property name="classes.dir" location="${org.jboss.esb.internal.dest}/classes"/>
+    <property name="coverage.dir" location="${org.jboss.esb.internal.dest}/tests/coverage"/>
+
+	<target name="instr-report">
+	    <emma>
+			<report sort="+block,+name,+method,+class" metrics="method:70,block:80,line:80,class:100">
+		        <fileset dir="${coverage.dir}" >
+					<include name="*/*.emma" />
+		        </fileset>
+				<sourcepath><dirset dir="./" includes="rosetta/src,listeners/src,services/src" /></sourcepath>					
+		        <txt outfile="${coverage.dir}/coverage.txt"/>
+			</report>
+	    </emma>
+	</target>
+	
+    <!-- =================================================================== -->
+    <!-- Clean  all                                                          -->
+    <!-- =================================================================== -->
+    <target name="clean" description="Clean dist directory and cleans subprojects">
+        <delete dir="${org.jboss.esb.internal.dest}/classes"/>
+ 
+            <ant dir="rosetta" target="clean"/>
+    	    <ant dir="listeners" target="clean"/>
+    	    <ant dir="services" target="clean"/>
+
+        <delete dir="${org.jboss.esb.internal.dest}/jbossesb"/>
+	</target>
+
+    <!-- =================================================================== -->
+    <!-- Rebuild everything from scratch                                     -->
+    <!-- =================================================================== -->
+    <target name="all" depends="clean,jar" />
+    <target name="recompile" depends="clean,org.jboss.esb.core.compile" />
+
+</project>


Property changes on: labs/jbossesb/trunk/product/core/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,147 +1,147 @@
-<?xml version="1.0"?>
-<project name="BuildJbossEsbListeners" default="org.jboss.esb.listeners.compile" basedir=".">
-
-	<property name="org.jboss.esb.listeners.jar.name" value="jbossesb-listeners"/>
-	<property name="org.jboss.esb.listeners.distrib.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
-	<property name="org.jboss.esb.listeners.classes.dir" location="${org.jboss.esb.internal.dest}/classes/listeners"/>
-    <property name="org.jboss.esb.listeners.src.dir" location="src"/>
-	<property name="org.jboss.esb.root.dir" location="../.."/>
-	<property name="gendir" location="${org.jboss.esb.internal.dest}/schema-model" />
-    <property environment="env"/>
-
-	<property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
-	<condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/client">
-		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
-	</condition>
-	
-	<path id="org.jboss.esb.listeners.base.classpath">
-        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="xbean.jar,jsr173_1.0_api.jar"/>
-		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
-    </path>
-
-	<path id="org.jboss.esb.listeners.default.classpath">
-        <path refid="org.jboss.esb.listeners.base.classpath"/>
-		<pathelement location="${gendir}/classes"/>
-		<pathelement location="${org.jboss.esb.classes.dir}"/>
-		<pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
-		<pathelement location="${org.jboss.esb.internal.dest}/classes/services"/>
-    </path>
-
-    <target name="org.jboss.esb.listeners.init">
-        <tstamp>
-            <format property="TODAY" pattern="dd-MM-yy"/>
-        </tstamp>
-    </target>
-
-    <target name="org.jboss.esb.listeners.prepare" depends="org.jboss.esb.listeners.init">
-        <mkdir dir="${org.jboss.esb.listeners.classes.dir}"/>
-        <mkdir dir="${org.jboss.esb.listeners.distrib.dir}"/>
-        <mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib"/>
-    </target>
-
-    <target name="clean" description="Remove classes directory">
-		<ant dir="tests" target="clean"/>
-		<delete dir="${org.jboss.esb.listeners.classes.dir}"/>
-    </target>
-	
-	<target name="generate-config-model-1.0" depends="org.jboss.esb.listeners.prepare">
-			<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpathref="xbeans-classpath" />
-			<delete dir="${gendir}" /><mkdir dir="${gendir}" />
-			
-			<xmlbean
-				classgendir="${gendir}/classes" 
-				javasource="1.5"
-				srcgendir="${gendir}/src"
-				destfile="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb-config-model-1.0.jar" 
-				classpathref="xbeans-classpath">
-				<fileset dir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.0.xsd,jbossesb-1.0.xsdconfig"/>
-			</xmlbean>
-		    <!-- now add the xsd to it -->
-		    <jar destfile="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb-config-model-1.0.jar" update="true"
-				basedir="${org.jboss.esb.root.dir}/etc/schemas/xml/"
-				includes="jbossesb-1.0.xsd"/>
-		</target>
-
-		<path id="xbeans-classpath">
-			<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
-		</path>
-		
-
-    <target name="org.jboss.esb.listeners.compile">
-        <!-- Compile listeners -->
-    	<echo>internal listener compile</echo>
-        <antcall target="org.jboss.esb.listeners.internal.compile"/>
-        <!-- Compile listener tests -->
-        <ant inheritAll="true" dir="tests" target="org.jboss.esb.listeners.tests.compile"/>
+<?xml version="1.0"?>
+<project name="BuildJbossEsbListeners" default="org.jboss.esb.listeners.compile" basedir=".">
+
+	<property name="org.jboss.esb.listeners.jar.name" value="jbossesb-listeners"/>
+	<property name="org.jboss.esb.listeners.distrib.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
+	<property name="org.jboss.esb.listeners.classes.dir" location="${org.jboss.esb.internal.dest}/classes/listeners"/>
+    <property name="org.jboss.esb.listeners.src.dir" location="src"/>
+	<property name="org.jboss.esb.root.dir" location="../.."/>
+	<property name="gendir" location="${org.jboss.esb.internal.dest}/schema-model" />
+    <property environment="env"/>
+
+	<property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
+	<condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/client">
+		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+	</condition>
+	
+	<path id="org.jboss.esb.listeners.base.classpath">
+        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="xbean.jar,jsr173_1.0_api.jar"/>
+		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
+    </path>
+
+	<path id="org.jboss.esb.listeners.default.classpath">
+        <path refid="org.jboss.esb.listeners.base.classpath"/>
+		<pathelement location="${gendir}/classes"/>
+		<pathelement location="${org.jboss.esb.classes.dir}"/>
+		<pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
+		<pathelement location="${org.jboss.esb.internal.dest}/classes/services"/>
+    </path>
+
+    <target name="org.jboss.esb.listeners.init">
+        <tstamp>
+            <format property="TODAY" pattern="dd-MM-yy"/>
+        </tstamp>
     </target>
-	
-    <target name="org.jboss.esb.listeners.internal.compile" depends="generate-config-model-1.0"
-        description="Compile all classes">
-
-        <javac
-            destdir="${org.jboss.esb.listeners.classes.dir}"
-            classpathref="org.jboss.esb.listeners.default.classpath"
-            debug="${org.jboss.esb.debug}"
-            optimize="${org.jboss.esb.optimize}"
-            >
-            <src path="${org.jboss.esb.listeners.src.dir}"/>
-        </javac>
-
-    </target>
-
-	<target name="recompile" depends="clean,org.jboss.esb.listeners.compile"
-        description="Clean and compile"/>
-
-    <target name="jar" depends="org.jboss.esb.listeners.compile" description="Assemble jar files">
-    	<delete file="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.listeners.jar.name}.jar" />
-        <jar    destfile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.listeners.jar.name}.jar" 
-                basedir="${org.jboss.esb.listeners.classes.dir}" 
-                includes="**/*.class"
-		        excludes="test/**"
-                />
-    	
-    	<echo message="Building JBoss ESB sar file"/>
-    			<delete dir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar" />
-    			<mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar" />
-    			<mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar/META-INF" />
-    			<copy file="${org.jboss.esb.listeners.src.dir}/jboss-service.xml" 
-    				todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar/META-INF"/>
-    			<copy todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar">
-    				<fileset dir="${org.jboss.esb.listeners.distrib.dir}/lib" includes="jbossesb*.jar"/></copy>
-    			<copy todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar">
-    				<!-- xbean for reading/marchallinng the configuration -->
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xbean.jar,stax-api-1.0.1.jar,xmlpublic.jar"/>
-    				<!-- scout and juddi -->
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="commons-discovery.jar,jbossts-common.jar,
-    				jaxr-api-1.0-SNAPSHOT.jar,scout-1.0-SNAPSHOT.jar,juddi-1.0-SNAPSHOT.jar"/>
-    				<!-- xerces for validation
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xercesImpl-2.7.1.jar"/>  -->
-    				<!-- jboss rules for CBR -->
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="antlr-3.0ea8.jar,antlr-2.7.6.jar,
-    				core-3.2.0.666.jar,drools-compiler-3.0.4.jar,drools-core-3.0.4.jar,stringtemplate-2.3b6.jar,
-    				commons-jci-core-1.0-406301.jar,commons-jci-eclipse-3.2.0.666.jar"/>
-    				<!-- xpath for rules 
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xalan-2.7.0.jar"/> -->
-    				<!-- smooks for transformation -->
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="milyn-commons-0.8-SNAPSHOT.jar,
-    			    milyn-smooks-core-0.8-SNAPSHOT.jar,milyn-smooks-javabean-0.1.1.jar,milyn-smooks-misc-0.2.jar,
-    				milyn-smooks-templating-0.2.jar,milyn-tinak-0.7.1.jar,
-    				commons-lang-2.1.jar,commons-logging.jar"/>
-    				<!-- ftp -->
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="edtftpj.jar"/>
-    			</copy>
-    </target>
-	
-    <target name="org.jboss.esb.listeners.test" description="Run tests for this module">
-        <!-- Compile listener tests -->
-        <ant dir="tests" target="org.jboss.esb.listeners.internal.test"/>
+
+    <target name="org.jboss.esb.listeners.prepare" depends="org.jboss.esb.listeners.init">
+        <mkdir dir="${org.jboss.esb.listeners.classes.dir}"/>
+        <mkdir dir="${org.jboss.esb.listeners.distrib.dir}"/>
+        <mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib"/>
     </target>
+
+    <target name="clean" description="Remove classes directory">
+		<ant dir="tests" target="clean"/>
+		<delete dir="${org.jboss.esb.listeners.classes.dir}"/>
+    </target>
 	
+	<target name="generate-config-model-1.0" depends="org.jboss.esb.listeners.prepare">
+			<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpathref="xbeans-classpath" />
+			<delete dir="${gendir}" /><mkdir dir="${gendir}" />
+			
+			<xmlbean
+				classgendir="${gendir}/classes" 
+				javasource="1.5"
+				srcgendir="${gendir}/src"
+				destfile="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb-config-model-1.0.jar" 
+				classpathref="xbeans-classpath">
+				<fileset dir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.0.xsd,jbossesb-1.0.xsdconfig"/>
+			</xmlbean>
+		    <!-- now add the xsd to it -->
+		    <jar destfile="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb-config-model-1.0.jar" update="true"
+				basedir="${org.jboss.esb.root.dir}/etc/schemas/xml/"
+				includes="jbossesb-1.0.xsd"/>
+		</target>
+
+		<path id="xbeans-classpath">
+			<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
+		</path>
+		
+
+    <target name="org.jboss.esb.listeners.compile">
+        <!-- Compile listeners -->
+    	<echo>internal listener compile</echo>
+        <antcall target="org.jboss.esb.listeners.internal.compile"/>
+        <!-- Compile listener tests -->
+        <ant inheritAll="true" dir="tests" target="org.jboss.esb.listeners.tests.compile"/>
+    </target>
+	
+    <target name="org.jboss.esb.listeners.internal.compile" depends="generate-config-model-1.0"
+        description="Compile all classes">
+
+        <javac
+            destdir="${org.jboss.esb.listeners.classes.dir}"
+            classpathref="org.jboss.esb.listeners.default.classpath"
+            debug="${org.jboss.esb.debug}"
+            optimize="${org.jboss.esb.optimize}"
+            >
+            <src path="${org.jboss.esb.listeners.src.dir}"/>
+        </javac>
+
+    </target>
+
+	<target name="recompile" depends="clean,org.jboss.esb.listeners.compile"
+        description="Clean and compile"/>
+
+    <target name="jar" depends="org.jboss.esb.listeners.compile" description="Assemble jar files">
+    	<delete file="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.listeners.jar.name}.jar" />
+        <jar    destfile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.listeners.jar.name}.jar" 
+                basedir="${org.jboss.esb.listeners.classes.dir}" 
+                includes="**/*.class"
+		        excludes="test/**"
+                />
+    	
+    	<echo message="Building JBoss ESB sar file"/>
+    			<delete dir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar" />
+    			<mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar" />
+    			<mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar/META-INF" />
+    			<copy file="${org.jboss.esb.listeners.src.dir}/jboss-service.xml" 
+    				todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar/META-INF"/>
+    			<copy todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar">
+    				<fileset dir="${org.jboss.esb.listeners.distrib.dir}/lib" includes="jbossesb*.jar"/></copy>
+    			<copy todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar">
+    				<!-- xbean for reading/marchallinng the configuration -->
+    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xbean.jar,stax-api-1.0.1.jar,xmlpublic.jar"/>
+    				<!-- scout and juddi -->
+    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="commons-discovery.jar,jbossts-common.jar,
+    				jaxr-api-1.0-SNAPSHOT.jar,scout-1.0-SNAPSHOT.jar,juddi-1.0-SNAPSHOT.jar"/>
+    				<!-- xerces for validation
+    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xercesImpl-2.7.1.jar"/>  -->
+    				<!-- jboss rules for CBR -->
+    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="antlr-3.0ea8.jar,antlr-2.7.6.jar,
+    				core-3.2.0.666.jar,drools-compiler-3.0.4.jar,drools-core-3.0.4.jar,stringtemplate-2.3b6.jar,
+    				commons-jci-core-1.0-406301.jar,commons-jci-eclipse-3.2.0.666.jar"/>
+    				<!-- xpath for rules 
+    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xalan-2.7.0.jar"/> -->
+    				<!-- smooks for transformation -->
+    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="milyn-commons-0.8-SNAPSHOT.jar,
+    			    milyn-smooks-core-0.8-SNAPSHOT.jar,milyn-smooks-javabean-0.1.1.jar,milyn-smooks-misc-0.2.jar,
+    				milyn-smooks-templating-0.2.jar,milyn-tinak-0.7.1.jar,
+    				commons-lang-2.1.jar,commons-logging.jar"/>
+    				<!-- ftp -->
+    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="edtftpj.jar"/>
+    			</copy>
+    </target>
+	
+    <target name="org.jboss.esb.listeners.test" description="Run tests for this module">
+        <!-- Compile listener tests -->
+        <ant dir="tests" target="org.jboss.esb.listeners.internal.test"/>
+    </target>
+	
 	<target name="org.jboss.esb.listeners.integration.test" description="Run integration tests for this module">
 		        <!-- Compile listener integration tests -->
 		        <ant dir="tests" target="org.jboss.esb.listeners.internal.integration.test"/>
-		    </target>
-    
-    <target name="all" depends="recompile,jar" />
-
-</project>
+		    </target>
+    
+    <target name="all" depends="recompile,jar" />
+
+</project>


Property changes on: labs/jbossesb/trunk/product/core/listeners/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-  <!--  Starts the listener controler -->
-  <mbean code="org.jboss.soa.esb.listeners.config.ConfigurationControllerService" 
-  	     name="jboss.org:service=ConfigurationController"
-  	     description="Configuration controller which generated the config files for the listener and gateway controllers">
-    <attribute name="ConfigurationFile">jbossesb.xml</attribute>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+  <!--  Starts the listener controler -->
+  <mbean code="org.jboss.soa.esb.listeners.config.ConfigurationControllerService" 
+  	     name="jboss.org:service=ConfigurationController"
+  	     description="Configuration controller which generated the config files for the listener and gateway controllers">
+    <attribute name="ConfigurationFile">jbossesb.xml</attribute>
     <depends>jboss.org:service=JuddiRMI</depends>
-  </mbean>
-  <!--  Starts the listener controler -->
-  <mbean code="org.jboss.soa.esb.listeners.message.ListenerManagerService" 
-  	     name="jboss.org:service=ListenerManager"
-  	     description="ESB Aware Listener">
-    <attribute name="MessageAwareConfigFile">jbossesb-listener.xml</attribute>
+  </mbean>
+  <!--  Starts the listener controler -->
+  <mbean code="org.jboss.soa.esb.listeners.message.ListenerManagerService" 
+  	     name="jboss.org:service=ListenerManager"
+  	     description="ESB Aware Listener">
+    <attribute name="MessageAwareConfigFile">jbossesb-listener.xml</attribute>
     <depends>jboss.org:service=ConfigurationController</depends>
-    <depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
-  </mbean>
-  <!--  Starts the gateway controller -->
-  <mbean code="org.jboss.soa.esb.listeners.gateway.GatewayListenerControllerService" 
-         name="jboss.org:service=GatewayListenerController"
-         description="Gateway Listener">
-    <attribute name="GatewayConfigFile">jbossesb-gateway.xml</attribute>
-    <depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
+    <depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
+  </mbean>
+  <!--  Starts the gateway controller -->
+  <mbean code="org.jboss.soa.esb.listeners.gateway.GatewayListenerControllerService" 
+         name="jboss.org:service=GatewayListenerController"
+         description="Gateway Listener">
+    <attribute name="GatewayConfigFile">jbossesb-gateway.xml</attribute>
+    <depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
     <depends>jboss.org:service=ListenerManager</depends>
-  </mbean>
-  <!--  Registers the Juddi RMI Service to JNDI -->
-  <mbean code="org.jboss.soa.esb.listeners.JuddiRMIService" 
-         name="jboss.org:service=JuddiRMI"
-         description="Juddi RMI Service">
-    <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
-  </mbean>
-  <loader-repository>
-		org.jboss.soa.esb:loader=jbossesb.sar
-  </loader-repository>
+  </mbean>
+  <!--  Registers the Juddi RMI Service to JNDI -->
+  <mbean code="org.jboss.soa.esb.listeners.JuddiRMIService" 
+         name="jboss.org:service=JuddiRMI"
+         description="Juddi RMI Service">
+    <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
+  </mbean>
+  <loader-repository>
+		org.jboss.soa.esb:loader=jbossesb.sar
+  </loader-repository>
 </server>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/log4j.properties
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/log4j.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/log4j.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-### direct log messages to stdout ###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-### set log levels - for more verbose logging change 'info' to 'debug' ###
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+### set log levels - for more verbose logging change 'info' to 'debug' ###
 log4j.rootLogger=info, stdout
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/log4j.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/listeners/DefaultListenerManager.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionProcessingException.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionProcessor.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionUtils.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionUtils.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionUtils.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,110 +1,110 @@
-/*
- * 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.actions;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.notification.NotificationList;
-
-/**
- * Contains utility methods for actions 
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @since Version 4.0
- */
-public class ActionUtils 
-{
-	public  static final String BEFORE_ACTION="org.jboss.soa.esb.actions.current.before";
-	private static final String CURRENT_OBJECT="org.jboss.soa.esb.actions.current.after";
-
-    /**
-     * Obtain the current object from standard spot within message 
-     * @param message - from where to obtain the 'current object'
-     * @return Object stored in Body with key ActionProcessor.CURRENT_OBJECT
-     */
-    public static Object getTaskObject(Message message)
-    {
-    	Object payload = (null==message)? null : message.getBody().get(CURRENT_OBJECT);
-    	
-    	if(payload == null) {
-    		payload = message.getBody().getContents();
-    	}
-    	
-    	return payload;
-    }
-    /**
-     * Obtain previous 'current object' from standard spot within message 
-     * @param message - from where to obtain the value
-     * @return Object stored in Body with key ActionProcessor.BEFORE_ACTION
-     */
-    public static Object getTaskBeforeObject(Message message)
-    {
-    	return (null==message)? null : message.getBody().get(BEFORE_ACTION);
-    }
-    /**
-     * Copy 'current object' to a temporary holder within message 
-     * @param message 
-     */
-    public static void copyCurrentToPrevious(Message message)
-    {
-    	Body body = message.getBody();
-    	body.remove(BEFORE_ACTION);
-    	Object obj = body.get(CURRENT_OBJECT);
-    	if (null != obj)
-    		body.add(BEFORE_ACTION,obj);
-    }
-    /**
-     * Put current object in standard spot within message
-     * <br/>NULL values are not stored 
-     * @param message - to operate on
-     * @param obj - Object to store - Won't be stored if &lt;null&gt;
-     * @return Object previous 'current object'
-     */
-    public static Object setTaskObject(Message message, Object obj)
-    {
-    	Object oRet = message.getBody().remove(CURRENT_OBJECT);
-    	
-    	if (null!=obj) {
-    		message.getBody().add(CURRENT_OBJECT,obj);
-    	}
-    	if(obj instanceof byte[]) {
-    		message.getBody().setContents((byte[])obj);
-    	}
-    	
-    	return oRet;
-    }	
-
-    public static NotificationList getNotifyList(ConfigTree tree, String type)
-    {
-    	ConfigTree[] array = tree.getChildren("NotificationList");
-    	for (ConfigTree curr : array)
-    	{
-    		String sType = curr.getAttribute(NotificationList.TYPE);
-    		if (null==sType)
-    			continue;
-    		if (type.toLowerCase().startsWith(sType.toLowerCase()))
-    			return new NotificationList(curr);
-    	}
-    	return null;
-    }
-}
+/*
+ * 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.actions;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.notification.NotificationList;
+
+/**
+ * Contains utility methods for actions 
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @since Version 4.0
+ */
+public class ActionUtils 
+{
+	public  static final String BEFORE_ACTION="org.jboss.soa.esb.actions.current.before";
+	private static final String CURRENT_OBJECT="org.jboss.soa.esb.actions.current.after";
+
+    /**
+     * Obtain the current object from standard spot within message 
+     * @param message - from where to obtain the 'current object'
+     * @return Object stored in Body with key ActionProcessor.CURRENT_OBJECT
+     */
+    public static Object getTaskObject(Message message)
+    {
+    	Object payload = (null==message)? null : message.getBody().get(CURRENT_OBJECT);
+    	
+    	if(payload == null) {
+    		payload = message.getBody().getContents();
+    	}
+    	
+    	return payload;
+    }
+    /**
+     * Obtain previous 'current object' from standard spot within message 
+     * @param message - from where to obtain the value
+     * @return Object stored in Body with key ActionProcessor.BEFORE_ACTION
+     */
+    public static Object getTaskBeforeObject(Message message)
+    {
+    	return (null==message)? null : message.getBody().get(BEFORE_ACTION);
+    }
+    /**
+     * Copy 'current object' to a temporary holder within message 
+     * @param message 
+     */
+    public static void copyCurrentToPrevious(Message message)
+    {
+    	Body body = message.getBody();
+    	body.remove(BEFORE_ACTION);
+    	Object obj = body.get(CURRENT_OBJECT);
+    	if (null != obj)
+    		body.add(BEFORE_ACTION,obj);
+    }
+    /**
+     * Put current object in standard spot within message
+     * <br/>NULL values are not stored 
+     * @param message - to operate on
+     * @param obj - Object to store - Won't be stored if &lt;null&gt;
+     * @return Object previous 'current object'
+     */
+    public static Object setTaskObject(Message message, Object obj)
+    {
+    	Object oRet = message.getBody().remove(CURRENT_OBJECT);
+    	
+    	if (null!=obj) {
+    		message.getBody().add(CURRENT_OBJECT,obj);
+    	}
+    	if(obj instanceof byte[]) {
+    		message.getBody().setContents((byte[])obj);
+    	}
+    	
+    	return oRet;
+    }	
+
+    public static NotificationList getNotifyList(ConfigTree tree, String type)
+    {
+    	ConfigTree[] array = tree.getChildren("NotificationList");
+    	for (ConfigTree curr : array)
+    	{
+    		String sType = curr.getAttribute(NotificationList.TYPE);
+    		if (null==sType)
+    			continue;
+    		if (type.toLowerCase().startsWith(sType.toLowerCase()))
+    			return new NotificationList(curr);
+    	}
+    	return null;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ActionUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/CbrProxyAction.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/CbrProxyAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/CbrProxyAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,343 +1,343 @@
-/*
- * 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.actions;
-
-import java.net.URISyntaxException;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.couriers.Courier;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierFactory;
-import org.jboss.soa.esb.couriers.CourierTimeoutException;
-import org.jboss.soa.esb.couriers.CourierUtil;
-import org.jboss.soa.esb.couriers.TwoWayCourier;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.ListenerUtil;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.notification.NotificationList;
-import org.jboss.soa.esb.services.registry.Registry;
-import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.registry.RegistryFactory;
-import org.jboss.soa.esb.services.routing.MessageRouter;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-
-/**
- * Action proxy to call the Content Based Router.
- * 
- * @author kstam at redhat.com
- * 
- */
-public class CbrProxyAction
-{
-	private static Logger _logger = Logger.getLogger(CbrProxyAction.class);
-
-	/** Collection of EPRS for the Content Based Router */
-	protected Collection<EPR> _eprs;
-
-	/** Configuration Tree */
-	protected ConfigTree _config;
-
-	/** Default 1 minute Listener Timeout in millis */
-	final private static long DEFAULT_REPLY_LISTENER_TIMEOUT = 60000;
-
-	/** replyListenerTimout */
-	private long _replyListenerTimeout = DEFAULT_REPLY_LISTENER_TIMEOUT;
-
-	/** replyToEPR */
-	private EPR _repliesToMe;
-
-	/**
-	 * Constructor of the Content Based Router Proxy. This constructor obtains
-	 * the EPRs of the Content Based Router.
-	 * 
-	 * @param config
-	 * @throws RegistryException
-	 */
-	public CbrProxyAction(ConfigTree config) throws RegistryException
-	{
-		_config = config;
-		ConfigTree replyElement = _config
-				.getFirstChild(ListenerTagNames.REPLY_TO_EPR_TAG);
-		if (null != replyElement)
-		{
-			try
-			{
-				_repliesToMe = ListenerUtil.assembleEpr(replyElement);
-			}
-			catch (ConfigurationException e)
-			{
-				_logger.fatal("Invalid " + ListenerTagNames.REPLY_TO_EPR_TAG
-						+ " element");
-			}
-		}
-		Registry registry = RegistryFactory.getRegistry();
-		String serviceCategoryName = config
-				.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
-		String serviceName = config
-				.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
-		_eprs = registry.findEPRs(serviceCategoryName, serviceName);
-		if (config.getAttribute(ListenerTagNames.REPLY_LISTENER_TIMEOUT_TAG) != null)
-		{
-			try
-			{
-				_replyListenerTimeout = Long
-						.parseLong(config
-								.getAttribute(ListenerTagNames.REPLY_LISTENER_TIMEOUT_TAG));
-			}
-			catch (NumberFormatException nfe)
-			{
-				_logger
-						.error(
-								"Could not parse "
-										+ config
-												.getAttribute(ListenerTagNames.REPLY_LISTENER_TIMEOUT_TAG)
-										+ " to long.", nfe);
-			}
-		}
-	}
-
-	/**
-	 * No-Op method. This is here for notification purposes.
-	 * 
-	 * @param message
-	 * @return the same message as passed in.
-	 */
-	public Message noOperation(Message message)
-	{
-		return message;
-	}
-
-	/**
-	 * By default this process method forwards this request to routeAndDeliver.
-	 * 
-	 * @see #routeAndDeliver(Message message).
-	 * 
-	 * @param message -
-	 *            the message to be routed.
-	 * @return - the same message as was passed in.
-	 */
-	public Message process(Message message)
-	{
-		_logger.info("Process was called, using the default routeAndDeliver.");
-		return routeAndDeliver(message);
-	}
-
-	/**
-	 * Just route. The routing returns the message with a Collection of
-	 * destinationService names.
-	 * 
-	 * @param message
-	 * @return message, a collection of service destinations is added to the
-	 *         message.
-	 */
-	public Message route(Message message) throws MessageRouterException
-	{
-		message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES,
-				Boolean.FALSE);
-		Message replyMessage = null;
-		try
-		{
-
-			for (Iterator<EPR> eprIterator = _eprs.iterator(); eprIterator
-					.hasNext();)
-			{
-				try
-				{
-					// Just use the first EPR in the list.
-					EPR epr = eprIterator.next();
-					TwoWayCourier courier = CourierFactory
-							.getCourier(epr, null);
-					EPR replyEpr = getReplyToEpr(epr);
-					if (message.getHeader().getCall() == null)
-					{
-						Call call = new Call();
-						message.getHeader().setCall(call);
-					}
-					message.getHeader().getCall().setReplyTo(replyEpr);
-					// If not successful try the next EPR
-					if (courier.deliver(message))
-					{
-						courier.setReplyToEpr(replyEpr);
-						try
-						{
-							// wait for the reply.
-							replyMessage = courier
-									.pickup(_replyListenerTimeout);
-						}
-						catch (CourierTimeoutException e)
-						{
-							throw new MessageRouterException(e
-									.getLocalizedMessage(), e);
-						}
-						// if we get here we were successful so we can break
-						// from the loop and reply.
-						break;
-					}
-					else
-					{
-						_logger
-								.warn("Could not deliver the message, maybe there is another JMS-EPR we can use.");
-					}
-				}
-				catch (MalformedEPRException e)
-				{
-					_logger.warn("Malformed EPR.");
-					// Let's be optimistic and try to see if there is another
-					// epr.
-					continue;
-				}
-				catch (URISyntaxException e)
-				{
-					_logger.warn(e.getLocalizedMessage(), e);
-					// Let's be optimistic and try to see if there is another
-					// epr.
-					continue;
-				}
-			}
-		}
-		catch (CourierException ce)
-		{
-			_logger.error("Could not send to the CBR. "
-					+ ce.getLocalizedMessage(), ce);
-			
-			throw new MessageRouterException(ce);
-		}
-		return replyMessage;
-	}
-
-	/**
-	 * Builds a temporary EPR to which we can reply to.
-	 * 
-	 * @param epr -
-	 *            the toEPR
-	 * @return
-	 * @throws URISyntaxException
-	 */
-	private EPR getReplyToEpr(EPR toEpr) throws URISyntaxException,
-			CourierException, MalformedEPRException
-	{
-		EPR replyToEpr = CourierUtil.getTemporaryReplyToEpr(toEpr);
-		return replyToEpr;
-	}
-
-	EPR newReplyToEpr() throws URISyntaxException, CourierException, MalformedEPRException
-	{
-		EPR replyToEpr = CourierUtil.getTemporaryReplyToEpr(_repliesToMe);
-		return replyToEpr;
-	}
-
-	/**
-	 * Do *not* route, just deliver. Pulls the destinationServices from the
-	 * message and deliver the message to the destination(s).
-	 * 
-	 * @param message
-	 * @return the message that was passed in.
-	 */
-	@SuppressWarnings("unchecked")
-	public Message deliver(Message message)
-	{
-		Collection<String> destinationServices = (Collection) message
-				.getProperties().getProperty(
-						MessageRouter.ROUTING_DESTINATION_SERVICE_LIST);
-		if (destinationServices != null)
-		{
-			// TODO there is no error handling for CBR.
-			
-			// TODO Remove the property from the message?
-			MessageRouter.deliverMessages(destinationServices, message);
-		}
-		else
-		{
-			_logger
-					.error("No destination services were found, the message was not delivered");
-		}
-		return message;
-	}
-
-	/**
-	 * Route and Deliver to the destination Services.
-	 * 
-	 * @param message -
-	 *            to be routed and delivered
-	 * @return message - same message is returned
-	 */
-	public Message routeAndDeliver(Message message)
-	{
-		try
-		{
-			for (Iterator<EPR> eprIterator = _eprs.iterator(); eprIterator
-					.hasNext();)
-			{
-				// Just use the first EPR in the list.
-				EPR epr = eprIterator.next();
-				Courier courier = CourierFactory.getCourier(epr);
-				// If not successful try the next EPR
-				if (courier.deliver(message))
-				{
-					break; // we were successful so we are done
-				}
-			}
-		}
-		catch (MalformedEPRException e)
-		{
-			// TODO better error handling
-			
-			_logger.error("Could not send to the CBR because of malformed EPR.");
-		}
-		catch (CourierException ce)
-		{
-			_logger.error("Could not send to the CBR. "
-					+ ce.getLocalizedMessage(), ce);
-		}
-		return message;
-	}
-
-	public void exceptionCallback(Message message, Throwable t)
-	{
-		String sMsg = new StringBuilder(
-				" ExceptionTrower.exceptionCallback CALLED ").append(message)
-				.toString();
-		_logger.fatal(sMsg, t);
-		@SuppressWarnings("unused")
-		NotificationList nl = ActionUtils.getNotifyList(_config, "err");
-		// Here you can send notifications to everybody
-	}
-
-	public void okMethod(Message message)
-	{
-		Collection destinationServices = (Collection) message.getProperties()
-				.getProperty(MessageRouter.ROUTING_DESTINATION_SERVICE_LIST);
-		// Do something with the callBack info
-		_logger.log(Priority.INFO, destinationServices);
-
-	}
-
+/*
+ * 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.actions;
+
+import java.net.URISyntaxException;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.couriers.Courier;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierFactory;
+import org.jboss.soa.esb.couriers.CourierTimeoutException;
+import org.jboss.soa.esb.couriers.CourierUtil;
+import org.jboss.soa.esb.couriers.TwoWayCourier;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.ListenerUtil;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.notification.NotificationList;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.registry.RegistryFactory;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+
+/**
+ * Action proxy to call the Content Based Router.
+ * 
+ * @author kstam at redhat.com
+ * 
+ */
+public class CbrProxyAction
+{
+	private static Logger _logger = Logger.getLogger(CbrProxyAction.class);
+
+	/** Collection of EPRS for the Content Based Router */
+	protected Collection<EPR> _eprs;
+
+	/** Configuration Tree */
+	protected ConfigTree _config;
+
+	/** Default 1 minute Listener Timeout in millis */
+	final private static long DEFAULT_REPLY_LISTENER_TIMEOUT = 60000;
+
+	/** replyListenerTimout */
+	private long _replyListenerTimeout = DEFAULT_REPLY_LISTENER_TIMEOUT;
+
+	/** replyToEPR */
+	private EPR _repliesToMe;
+
+	/**
+	 * Constructor of the Content Based Router Proxy. This constructor obtains
+	 * the EPRs of the Content Based Router.
+	 * 
+	 * @param config
+	 * @throws RegistryException
+	 */
+	public CbrProxyAction(ConfigTree config) throws RegistryException
+	{
+		_config = config;
+		ConfigTree replyElement = _config
+				.getFirstChild(ListenerTagNames.REPLY_TO_EPR_TAG);
+		if (null != replyElement)
+		{
+			try
+			{
+				_repliesToMe = ListenerUtil.assembleEpr(replyElement);
+			}
+			catch (ConfigurationException e)
+			{
+				_logger.fatal("Invalid " + ListenerTagNames.REPLY_TO_EPR_TAG
+						+ " element");
+			}
+		}
+		Registry registry = RegistryFactory.getRegistry();
+		String serviceCategoryName = config
+				.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+		String serviceName = config
+				.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+		_eprs = registry.findEPRs(serviceCategoryName, serviceName);
+		if (config.getAttribute(ListenerTagNames.REPLY_LISTENER_TIMEOUT_TAG) != null)
+		{
+			try
+			{
+				_replyListenerTimeout = Long
+						.parseLong(config
+								.getAttribute(ListenerTagNames.REPLY_LISTENER_TIMEOUT_TAG));
+			}
+			catch (NumberFormatException nfe)
+			{
+				_logger
+						.error(
+								"Could not parse "
+										+ config
+												.getAttribute(ListenerTagNames.REPLY_LISTENER_TIMEOUT_TAG)
+										+ " to long.", nfe);
+			}
+		}
+	}
+
+	/**
+	 * No-Op method. This is here for notification purposes.
+	 * 
+	 * @param message
+	 * @return the same message as passed in.
+	 */
+	public Message noOperation(Message message)
+	{
+		return message;
+	}
+
+	/**
+	 * By default this process method forwards this request to routeAndDeliver.
+	 * 
+	 * @see #routeAndDeliver(Message message).
+	 * 
+	 * @param message -
+	 *            the message to be routed.
+	 * @return - the same message as was passed in.
+	 */
+	public Message process(Message message)
+	{
+		_logger.info("Process was called, using the default routeAndDeliver.");
+		return routeAndDeliver(message);
+	}
+
+	/**
+	 * Just route. The routing returns the message with a Collection of
+	 * destinationService names.
+	 * 
+	 * @param message
+	 * @return message, a collection of service destinations is added to the
+	 *         message.
+	 */
+	public Message route(Message message) throws MessageRouterException
+	{
+		message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES,
+				Boolean.FALSE);
+		Message replyMessage = null;
+		try
+		{
+
+			for (Iterator<EPR> eprIterator = _eprs.iterator(); eprIterator
+					.hasNext();)
+			{
+				try
+				{
+					// Just use the first EPR in the list.
+					EPR epr = eprIterator.next();
+					TwoWayCourier courier = CourierFactory
+							.getCourier(epr, null);
+					EPR replyEpr = getReplyToEpr(epr);
+					if (message.getHeader().getCall() == null)
+					{
+						Call call = new Call();
+						message.getHeader().setCall(call);
+					}
+					message.getHeader().getCall().setReplyTo(replyEpr);
+					// If not successful try the next EPR
+					if (courier.deliver(message))
+					{
+						courier.setReplyToEpr(replyEpr);
+						try
+						{
+							// wait for the reply.
+							replyMessage = courier
+									.pickup(_replyListenerTimeout);
+						}
+						catch (CourierTimeoutException e)
+						{
+							throw new MessageRouterException(e
+									.getLocalizedMessage(), e);
+						}
+						// if we get here we were successful so we can break
+						// from the loop and reply.
+						break;
+					}
+					else
+					{
+						_logger
+								.warn("Could not deliver the message, maybe there is another JMS-EPR we can use.");
+					}
+				}
+				catch (MalformedEPRException e)
+				{
+					_logger.warn("Malformed EPR.");
+					// Let's be optimistic and try to see if there is another
+					// epr.
+					continue;
+				}
+				catch (URISyntaxException e)
+				{
+					_logger.warn(e.getLocalizedMessage(), e);
+					// Let's be optimistic and try to see if there is another
+					// epr.
+					continue;
+				}
+			}
+		}
+		catch (CourierException ce)
+		{
+			_logger.error("Could not send to the CBR. "
+					+ ce.getLocalizedMessage(), ce);
+			
+			throw new MessageRouterException(ce);
+		}
+		return replyMessage;
+	}
+
+	/**
+	 * Builds a temporary EPR to which we can reply to.
+	 * 
+	 * @param epr -
+	 *            the toEPR
+	 * @return
+	 * @throws URISyntaxException
+	 */
+	private EPR getReplyToEpr(EPR toEpr) throws URISyntaxException,
+			CourierException, MalformedEPRException
+	{
+		EPR replyToEpr = CourierUtil.getTemporaryReplyToEpr(toEpr);
+		return replyToEpr;
+	}
+
+	EPR newReplyToEpr() throws URISyntaxException, CourierException, MalformedEPRException
+	{
+		EPR replyToEpr = CourierUtil.getTemporaryReplyToEpr(_repliesToMe);
+		return replyToEpr;
+	}
+
+	/**
+	 * Do *not* route, just deliver. Pulls the destinationServices from the
+	 * message and deliver the message to the destination(s).
+	 * 
+	 * @param message
+	 * @return the message that was passed in.
+	 */
+	@SuppressWarnings("unchecked")
+	public Message deliver(Message message)
+	{
+		Collection<String> destinationServices = (Collection) message
+				.getProperties().getProperty(
+						MessageRouter.ROUTING_DESTINATION_SERVICE_LIST);
+		if (destinationServices != null)
+		{
+			// TODO there is no error handling for CBR.
+			
+			// TODO Remove the property from the message?
+			MessageRouter.deliverMessages(destinationServices, message);
+		}
+		else
+		{
+			_logger
+					.error("No destination services were found, the message was not delivered");
+		}
+		return message;
+	}
+
+	/**
+	 * Route and Deliver to the destination Services.
+	 * 
+	 * @param message -
+	 *            to be routed and delivered
+	 * @return message - same message is returned
+	 */
+	public Message routeAndDeliver(Message message)
+	{
+		try
+		{
+			for (Iterator<EPR> eprIterator = _eprs.iterator(); eprIterator
+					.hasNext();)
+			{
+				// Just use the first EPR in the list.
+				EPR epr = eprIterator.next();
+				Courier courier = CourierFactory.getCourier(epr);
+				// If not successful try the next EPR
+				if (courier.deliver(message))
+				{
+					break; // we were successful so we are done
+				}
+			}
+		}
+		catch (MalformedEPRException e)
+		{
+			// TODO better error handling
+			
+			_logger.error("Could not send to the CBR because of malformed EPR.");
+		}
+		catch (CourierException ce)
+		{
+			_logger.error("Could not send to the CBR. "
+					+ ce.getLocalizedMessage(), ce);
+		}
+		return message;
+	}
+
+	public void exceptionCallback(Message message, Throwable t)
+	{
+		String sMsg = new StringBuilder(
+				" ExceptionTrower.exceptionCallback CALLED ").append(message)
+				.toString();
+		_logger.fatal(sMsg, t);
+		@SuppressWarnings("unused")
+		NotificationList nl = ActionUtils.getNotifyList(_config, "err");
+		// Here you can send notifications to everybody
+	}
+
+	public void okMethod(Message message)
+	{
+		Collection destinationServices = (Collection) message.getProperties()
+				.getProperty(MessageRouter.ROUTING_DESTINATION_SERVICE_LIST);
+		// Do something with the callBack info
+		_logger.log(Priority.INFO, destinationServices);
+
+	}
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/CbrProxyAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/Notifier.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/Notifier.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/Notifier.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,103 +1,103 @@
-/*
- * 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.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.notification.NotificationList;
-
-/**
- * Stand alone action class that replaces the NotificationHandler EJB (beta 1) 
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @since Version 4.0
- */
-public class Notifier 
-{
-	public Notifier(ConfigTree config)
-	{
-		_config = config;
-		if (null==_config)
-		{
-			_notifyOK = _notifyError = new ConfigTree[]{};
-		}
-		else
-		{
-			_notifyOK 	= getNotificationList("ok");
-			_notifyError= getNotificationList("err");
-		}
-	} //________________________________
-	
-	/**
-	 * This is equivalent to a No Operation
-	 * @param message
-	 * @return - this method will always return arg0 unchanged
-	 */
-	public Message process 	(Message message) 
-	{
-		return message;
-	} //________________________________
-	
-	public void notifyOK 	(Message message) 
-	{
-		NotificationList.notifyAll(_notifyOK, messageAsString(message)); 
-	} //________________________________
-	public void notifyError (Message message) 
-	{ 
-		NotificationList.notifyAll(_notifyError, messageAsString(message)); 
-	} //________________________________
-	
-	public String messageAsString (Message message) 
-	{ 
-		byte[] ba = null;
-		return (null==message) ? "<null message>"
-			:(null==(ba=message.getBody().getContents())) ? "<null body content>"
-			: new String(ba); 
-	} //________________________________
-	
-	private ConfigTree[] getNotificationList(String type)
-	{
-		List<ConfigTree> list = new ArrayList<ConfigTree>();
-		if (null!=type)
-			type = type.toLowerCase();
-		
-		for (ConfigTree tree : _config.getChildren(NotificationList.ELEMENT))
-		{
-			String sType = tree.getAttribute(NotificationList.TYPE);
-			if (null==sType)
-				continue;
-			if (null==type || sType.toLowerCase().equals(type))
-				list.add(tree);
-		}
-		
-		ConfigTree[] array = new ConfigTree[list.size()];
-		return list.toArray(array);
-	} //________________________________
-	
-	protected ConfigTree 	_config;
-	protected ConfigTree[]	_notifyOK	,_notifyError;
-	protected static Logger	_logger = Logger.getLogger(Notifier.class);
-} //____________________________________________________________________________
+/*
+ * 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.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.notification.NotificationList;
+
+/**
+ * Stand alone action class that replaces the NotificationHandler EJB (beta 1) 
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @since Version 4.0
+ */
+public class Notifier 
+{
+	public Notifier(ConfigTree config)
+	{
+		_config = config;
+		if (null==_config)
+		{
+			_notifyOK = _notifyError = new ConfigTree[]{};
+		}
+		else
+		{
+			_notifyOK 	= getNotificationList("ok");
+			_notifyError= getNotificationList("err");
+		}
+	} //________________________________
+	
+	/**
+	 * This is equivalent to a No Operation
+	 * @param message
+	 * @return - this method will always return arg0 unchanged
+	 */
+	public Message process 	(Message message) 
+	{
+		return message;
+	} //________________________________
+	
+	public void notifyOK 	(Message message) 
+	{
+		NotificationList.notifyAll(_notifyOK, messageAsString(message)); 
+	} //________________________________
+	public void notifyError (Message message) 
+	{ 
+		NotificationList.notifyAll(_notifyError, messageAsString(message)); 
+	} //________________________________
+	
+	public String messageAsString (Message message) 
+	{ 
+		byte[] ba = null;
+		return (null==message) ? "<null message>"
+			:(null==(ba=message.getBody().getContents())) ? "<null body content>"
+			: new String(ba); 
+	} //________________________________
+	
+	private ConfigTree[] getNotificationList(String type)
+	{
+		List<ConfigTree> list = new ArrayList<ConfigTree>();
+		if (null!=type)
+			type = type.toLowerCase();
+		
+		for (ConfigTree tree : _config.getChildren(NotificationList.ELEMENT))
+		{
+			String sType = tree.getAttribute(NotificationList.TYPE);
+			if (null==sType)
+				continue;
+			if (null==type || sType.toLowerCase().equals(type))
+				list.add(tree);
+		}
+		
+		ConfigTree[] array = new ConfigTree[list.size()];
+		return list.toArray(array);
+	} //________________________________
+	
+	protected ConfigTree 	_config;
+	protected ConfigTree[]	_notifyOK	,_notifyError;
+	protected static Logger	_logger = Logger.getLogger(Notifier.class);
+} //____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/Notifier.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/ByteArrayToString.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/ObjectToCSVString.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/ObjectToXStream.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/SmooksTransformer.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/AbstractRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/EchoRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/HttpRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockAction.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,67 +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.actions.templates;
-
-import java.text.SimpleDateFormat;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.util.Util;
-
-
-/**
- * Use this class to tune your XML configurations <p/>Once your config works
- * with this dummy class, you can switch to your own action class <p/>You will
- * have to implement these three methods in your own action class
- * 
- * @author Esteban
- * 
- */
-public class MockAction 
-{
-    /**
-     * Class Logger.
-     */
-    private static Logger logger = Logger.getLogger(MockAction.class);
-
-    public Message process(Message message) 
-    {
-    	Object oCurr = null;
-    	if (null==message)
-    		oCurr = "null";
-    	else
-	    	try { oCurr = Util.serialize(message); }
-	    	catch (Exception e) 
-	    		{ oCurr = message.toString();}
-        logger.info(getStamp() + " process was called with <<" + oCurr.toString() + ">>");
-        return message;
-    } // ________________________________
-
-    private SimpleDateFormat s_oTS = new SimpleDateFormat(
-            "yyyy/MM/dd hh:mm:ss.SSS");
-
-    private String getStamp() {
-        return s_oTS.format(new java.util.Date(System.currentTimeMillis()));
-    }
-
-} // ____________________________________________________________________________
+/*
+ * 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.actions.templates;
+
+import java.text.SimpleDateFormat;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.util.Util;
+
+
+/**
+ * Use this class to tune your XML configurations <p/>Once your config works
+ * with this dummy class, you can switch to your own action class <p/>You will
+ * have to implement these three methods in your own action class
+ * 
+ * @author Esteban
+ * 
+ */
+public class MockAction 
+{
+    /**
+     * Class Logger.
+     */
+    private static Logger logger = Logger.getLogger(MockAction.class);
+
+    public Message process(Message message) 
+    {
+    	Object oCurr = null;
+    	if (null==message)
+    		oCurr = "null";
+    	else
+	    	try { oCurr = Util.serialize(message); }
+	    	catch (Exception e) 
+	    		{ oCurr = message.toString();}
+        logger.info(getStamp() + " process was called with <<" + oCurr.toString() + ">>");
+        return message;
+    } // ________________________________
+
+    private SimpleDateFormat s_oTS = new SimpleDateFormat(
+            "yyyy/MM/dd hh:mm:ss.SSS");
+
+    private String getStamp() {
+        return s_oTS.format(new java.util.Date(System.currentTimeMillis()));
+    }
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockComposer.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockComposer.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockComposer.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,62 +1,62 @@
-/*
- * 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.actions.templates;
-
-import java.text.SimpleDateFormat;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
-import org.jboss.soa.esb.message.Message;
-
-
-/**
- * Use this class to tune your XML configurations <p/>Once your config works
- * with this dummy class, you can switch to your own action class 
- * 
- * @author Esteban
- * 
- */
-public class MockComposer
-{
-    private static Logger _logger = Logger.getLogger(MockComposer.class);
-
-    public Message composeEmptyMessage(Object obj) 
-    {
-        _logger.info(getLogMessage("process was called with <<" + obj.toString() + ">>"));
-        MessageImpl message = new MessageImpl();
-        return message;
-    } // ________________________________
-
-    private SimpleDateFormat s_oTS = new SimpleDateFormat(
-            "yyyy/MM/dd hh:mm:ss.SSS");
-
-    private String getLogMessage(String text)
-    {
-    	return new StringBuilder()
-    	.append(s_oTS.format(new java.util.Date(System.currentTimeMillis())))
-    	.append(" ").append(text)
-    	.toString()
-    	;
-    }
-
-} // ____________________________________________________________________________
+/*
+ * 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.actions.templates;
+
+import java.text.SimpleDateFormat;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
+import org.jboss.soa.esb.message.Message;
+
+
+/**
+ * Use this class to tune your XML configurations <p/>Once your config works
+ * with this dummy class, you can switch to your own action class 
+ * 
+ * @author Esteban
+ * 
+ */
+public class MockComposer
+{
+    private static Logger _logger = Logger.getLogger(MockComposer.class);
+
+    public Message composeEmptyMessage(Object obj) 
+    {
+        _logger.info(getLogMessage("process was called with <<" + obj.toString() + ">>"));
+        MessageImpl message = new MessageImpl();
+        return message;
+    } // ________________________________
+
+    private SimpleDateFormat s_oTS = new SimpleDateFormat(
+            "yyyy/MM/dd hh:mm:ss.SSS");
+
+    private String getLogMessage(String text)
+    {
+    	return new StringBuilder()
+    	.append(s_oTS.format(new java.util.Date(System.currentTimeMillis())))
+    	.append(" ").append(text)
+    	.toString()
+    	;
+    }
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/templates/MockComposer.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/AbstractManagedListener.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIService.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIService.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIService.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,33 +1,33 @@
-package org.jboss.soa.esb.listeners;
-
-import java.io.File;
-import java.net.URI;
-
-import javax.naming.InitialContext;
-
-import org.apache.juddi.registry.rmi.JNDIRegistration;
-import org.apache.log4j.Logger;
-import org.jboss.system.ServiceMBeanSupport;
-
-public class JuddiRMIService extends ServiceMBeanSupport implements JuddiRMIServiceMBean
-{
-	private Logger logger = Logger.getLogger(this.getClass());
-	
-	protected void startService() throws Exception 
-	{
-		logger.info("starting juddi RMI service");
-		final String confURL = System.getProperty("jboss.server.config.url") ;
-		final URI confDirURI = new URI(confURL) ;
-		final File confDir = new File(confDirURI) ;
-		System.setProperty("juddi.propertiesFile", confDir + "/juddi.properties");
-		JNDIRegistration.register();
-	}
-
-	protected void stopService() throws Exception 
-	{
-		logger.info("Unbinding juddi services");
-		final InitialContext ic = new InitialContext() ;
-		ic.unbind(JNDIRegistration.INQUIRY_SERVICE) ;
-		ic.unbind(JNDIRegistration.PUBLISH_SERVICE) ;
-	}
-}
+package org.jboss.soa.esb.listeners;
+
+import java.io.File;
+import java.net.URI;
+
+import javax.naming.InitialContext;
+
+import org.apache.juddi.registry.rmi.JNDIRegistration;
+import org.apache.log4j.Logger;
+import org.jboss.system.ServiceMBeanSupport;
+
+public class JuddiRMIService extends ServiceMBeanSupport implements JuddiRMIServiceMBean
+{
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	protected void startService() throws Exception 
+	{
+		logger.info("starting juddi RMI service");
+		final String confURL = System.getProperty("jboss.server.config.url") ;
+		final URI confDirURI = new URI(confURL) ;
+		final File confDir = new File(confDirURI) ;
+		System.setProperty("juddi.propertiesFile", confDir + "/juddi.properties");
+		JNDIRegistration.register();
+	}
+
+	protected void stopService() throws Exception 
+	{
+		logger.info("Unbinding juddi services");
+		final InitialContext ic = new InitialContext() ;
+		ic.unbind(JNDIRegistration.INQUIRY_SERVICE) ;
+		ic.unbind(JNDIRegistration.PUBLISH_SERVICE) ;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIService.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIServiceMBean.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIServiceMBean.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,8 +1,8 @@
-package org.jboss.soa.esb.listeners;
-
-import org.jboss.system.ServiceMBean;
-
-public interface JuddiRMIServiceMBean extends ServiceMBean
-{
-  
-}
+package org.jboss.soa.esb.listeners;
+
+import org.jboss.system.ServiceMBean;
+
+public interface JuddiRMIServiceMBean extends ServiceMBean
+{
+  
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JuddiRMIServiceMBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerInitializationException.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerInitializationException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerInitializationException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,47 +1,47 @@
-package org.jboss.soa.esb.listeners;
-
-import org.jboss.soa.esb.BaseException;
-
-/**
- * @author <a href="mailto:johan.kumps at telenet.be">Johan Kumps</a>
- */
-public class ListenerInitializationException extends BaseException{
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = -6872003497155955428L;
-	
-	/**
-	 * Public Default Constructor.
-	 */
-	public ListenerInitializationException() {
-		super();
-	}
-
-	/**
-	 * Public Constructor.
-	 * @param message Exception message.
-	 */
-	public ListenerInitializationException(String message) {
-		super(message);
-	}
-
-	/**
-	 * Public Constructor.
-	 * @param message Exception message.
-	 * @param cause Exception cause.
-	 */
-	public ListenerInitializationException(String message, Throwable cause) {
-		super(message, cause);
-	}
-
-	/**
-	 * Public Constructor.
-	 * @param cause Exception cause.
-	 */
-	public ListenerInitializationException(Throwable cause) {
-		super(cause);
-	}
-
-}
+package org.jboss.soa.esb.listeners;
+
+import org.jboss.soa.esb.BaseException;
+
+/**
+ * @author <a href="mailto:johan.kumps at telenet.be">Johan Kumps</a>
+ */
+public class ListenerInitializationException extends BaseException{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -6872003497155955428L;
+	
+	/**
+	 * Public Default Constructor.
+	 */
+	public ListenerInitializationException() {
+		super();
+	}
+
+	/**
+	 * Public Constructor.
+	 * @param message Exception message.
+	 */
+	public ListenerInitializationException(String message) {
+		super(message);
+	}
+
+	/**
+	 * Public Constructor.
+	 * @param message Exception message.
+	 * @param cause Exception cause.
+	 */
+	public ListenerInitializationException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	/**
+	 * Public Constructor.
+	 * @param cause Exception cause.
+	 */
+	public ListenerInitializationException(Throwable cause) {
+		super(cause);
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerInitializationException.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerManager.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerManagerFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,98 +1,98 @@
-/*
- * 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.
- */
-/**
- * Contains tag names as they can be used in the configuration.
- * 
- */
-package org.jboss.soa.esb.listeners;
-
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-
-public class ListenerTagNames 
-{
-	/** EPRs */
-	public static final String EPR_TAG						= "EPR";
-	public static final String REPLY_TO_EPR_TAG				= "replyToEPR";
-	public static final String URL_TAG						= JDBCEpr.URL_TAG; // change only in one place // TODO huh?!
-	public static final String PROTOCOL_TAG					= "protocol";
-
-	/** Threading */
-	public static final String MAX_THREADS_TAG				= "maxThreads";
-
-	/** Registry */
-    public static final String SERVICE_CATEGORY_NAME_TAG    = "service-category";
-	public static final String SERVICE_NAME_TAG			    = "service-name";
-	public static final String SERVICE_DESCRIPTION_TAG      = "service-description";
-	public static final String EPR_DESCRIPTION_TAG          = "epr-description";
-
-	/**  Gateways  */
-    public static final String TARGET_SERVICE_CATEGORY_TAG	= "target-service-category";
-	public static final String TARGET_SERVICE_NAME_TAG	    = "target-service-name";
-	public static final String GATEWAY_CLASS_TAG            = "gatewayClass";
-	
-	/** Listeners */
-	public static final String LISTENER_CLASS_TAG            = "listenerClass";
-    
-	/** ActionProcessingPipeline */
-    public static final String ACTION_ELEMENT_TAG		    = "action";
-    public static final String ACTION_CLASS_TAG			    = "class";
-    public static final String PROCESS_METHOD_TAG		    = "process";
-    public static final String ACTION_PROPERTY_TAG   	    = "property";
-    public static final String NORMAL_COMPLETION_METHOD_TAG = "okMethod";
-    public static final String EXCEPTION_METHOD_TAG		    = "exceptionMethod";
-    public static final String HTTP_ROUTER_ROUTE_URL        = "routeUrl";
-    
-   
-    /** Content Based Routing */
-    /** RuleSet reference (Filename) */
-    public static final String RULE_SET_TAG                 = "ruleSet";
-    public static final String RULE_LANGUAGE_TAG            = "ruleLanguage";
-    public static final String RULE_RELOAD_TAG              = "ruleReload";
-
-    /** Poller tagnames   */
-    public static final String POLL_LATENCY_SECS_TAG		= "pollLatencySeconds";
-    
-    /** File Actions  */
-    public static final String FILE_INPUT_DIR_TAG			= "inputDir";
-    public static final String FILE_INPUT_SFX_TAG			= "inputSuffix";
-    public static final String FILE_WORK_SFX_TAG			= "workSuffix";
-    public static final String FILE_ERROR_DIR_TAG			= "errorDir";
-    public static final String FILE_ERROR_SFX_TAG			= "errorSuffix";
-    public static final String FILE_POST_DIR_TAG			= "postDir";
-    public static final String FILE_POST_SFX_TAG			= "postSuffix";
-    public static final String FILE_POST_DEL_TAG			= "postDelete";
-    
-    /** SQL related  */
-    public static final String SQL_ROW_DATA_TAG				= "sqlRowData";
-
-    public static final String SQL_TABLE_NAME_TAG			= "tableName";
-    public static final String SQL_SELECT_FIELDS_TAG		= "selectFields";
-    public static final String SQL_KEY_FIELDS_TAG			= "keyFields";
-    public static final String SQL_IN_PROCESS_FIELD_TAG		= "inProcessField";
-    public static final String SQL_IN_PROCESS_VALUES_TAG	= "inProcessValues";
-    public static final String SQL_WHERE_CONDITION_TAG		= "whereCondition";
-    public static final String SQL_ORDER_BY_TAG				= "orderBy";
-    public static final String SQL_POST_DEL_TAG				= "postDelete";
-
-    /** Reply Listener */
-    public static final String REPLY_LISTENER_TIMEOUT_TAG   = "replyListenerTimeout";
-}
+/*
+ * 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.
+ */
+/**
+ * Contains tag names as they can be used in the configuration.
+ * 
+ */
+package org.jboss.soa.esb.listeners;
+
+import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+
+public class ListenerTagNames 
+{
+	/** EPRs */
+	public static final String EPR_TAG						= "EPR";
+	public static final String REPLY_TO_EPR_TAG				= "replyToEPR";
+	public static final String URL_TAG						= JDBCEpr.URL_TAG; // change only in one place // TODO huh?!
+	public static final String PROTOCOL_TAG					= "protocol";
+
+	/** Threading */
+	public static final String MAX_THREADS_TAG				= "maxThreads";
+
+	/** Registry */
+    public static final String SERVICE_CATEGORY_NAME_TAG    = "service-category";
+	public static final String SERVICE_NAME_TAG			    = "service-name";
+	public static final String SERVICE_DESCRIPTION_TAG      = "service-description";
+	public static final String EPR_DESCRIPTION_TAG          = "epr-description";
+
+	/**  Gateways  */
+    public static final String TARGET_SERVICE_CATEGORY_TAG	= "target-service-category";
+	public static final String TARGET_SERVICE_NAME_TAG	    = "target-service-name";
+	public static final String GATEWAY_CLASS_TAG            = "gatewayClass";
+	
+	/** Listeners */
+	public static final String LISTENER_CLASS_TAG            = "listenerClass";
+    
+	/** ActionProcessingPipeline */
+    public static final String ACTION_ELEMENT_TAG		    = "action";
+    public static final String ACTION_CLASS_TAG			    = "class";
+    public static final String PROCESS_METHOD_TAG		    = "process";
+    public static final String ACTION_PROPERTY_TAG   	    = "property";
+    public static final String NORMAL_COMPLETION_METHOD_TAG = "okMethod";
+    public static final String EXCEPTION_METHOD_TAG		    = "exceptionMethod";
+    public static final String HTTP_ROUTER_ROUTE_URL        = "routeUrl";
+    
+   
+    /** Content Based Routing */
+    /** RuleSet reference (Filename) */
+    public static final String RULE_SET_TAG                 = "ruleSet";
+    public static final String RULE_LANGUAGE_TAG            = "ruleLanguage";
+    public static final String RULE_RELOAD_TAG              = "ruleReload";
+
+    /** Poller tagnames   */
+    public static final String POLL_LATENCY_SECS_TAG		= "pollLatencySeconds";
+    
+    /** File Actions  */
+    public static final String FILE_INPUT_DIR_TAG			= "inputDir";
+    public static final String FILE_INPUT_SFX_TAG			= "inputSuffix";
+    public static final String FILE_WORK_SFX_TAG			= "workSuffix";
+    public static final String FILE_ERROR_DIR_TAG			= "errorDir";
+    public static final String FILE_ERROR_SFX_TAG			= "errorSuffix";
+    public static final String FILE_POST_DIR_TAG			= "postDir";
+    public static final String FILE_POST_SFX_TAG			= "postSuffix";
+    public static final String FILE_POST_DEL_TAG			= "postDelete";
+    
+    /** SQL related  */
+    public static final String SQL_ROW_DATA_TAG				= "sqlRowData";
+
+    public static final String SQL_TABLE_NAME_TAG			= "tableName";
+    public static final String SQL_SELECT_FIELDS_TAG		= "selectFields";
+    public static final String SQL_KEY_FIELDS_TAG			= "keyFields";
+    public static final String SQL_IN_PROCESS_FIELD_TAG		= "inProcessField";
+    public static final String SQL_IN_PROCESS_VALUES_TAG	= "inProcessValues";
+    public static final String SQL_WHERE_CONDITION_TAG		= "whereCondition";
+    public static final String SQL_ORDER_BY_TAG				= "orderBy";
+    public static final String SQL_POST_DEL_TAG				= "postDelete";
+
+    /** Reply Listener */
+    public static final String REPLY_LISTENER_TIMEOUT_TAG   = "replyListenerTimeout";
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/StandAloneBootStrapper.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/State.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,228 +1,228 @@
-/*
- * 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.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.util.Date;
-
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.parameters.ParamRepositoryFactory;
-import org.xml.sax.InputSource;
-/**
- * The controller monitors changes in the jbossesb configuration file call jbossesb.xml. When
- * changes are detected it validates the XML, and when it passes validation it goes on and
- * generates the jbossesb-listener.xml and jbossesb-gateway.xml.
- * 
- * @author kstam
- *
- */
-public class ConfigurationController implements Runnable
-{
-	private static final int SLEEP_MILLIS       = 1000; // default interval between parameter reloads
-	private static final String JBOSSESB_XSD = "/jbossesb-1.0.xsd";
-	private final Logger mLogger = Logger.getLogger(this.getClass());
-	private final String mConfigFileName;
-	private final String mValidationFileName;
-	private final File mConfigDirectory;
-	private long mPreviousFileTimestamp;
-	private volatile boolean mIsEndRequested;
-	private volatile boolean ended;
-	
-	/**
-	 * Start the Controller externally.
-	 * @param args - arg[0] - the parameter file name
-	 */
-	
-	public static void main(String[] args)
-	{
-		ConfigurationController configurationController = new ConfigurationController(args[0],null);
-		configurationController.run();
-	}
-	/**
-	 * Construct a Configuration Manager from the named repository based
-	 * configuration. The default jbossesb-1.0.xsd will be used for validation.
-	 * 
-	 * @param configFileName - Name of the configuration repository.
-	 *   
-	 */
-	public ConfigurationController(String configFileName)
-	{
-		this(configFileName, null);
-	}
-	/**
-	 * Construct a Configuration Manager from the named repository based
-	 * configuration.
-	 * 
-	 * @param configFileName - Name of the configuration repository.
-	 * @param validationFileName - Name of the file name used for validation (xsd or dtd).
-	 *   
-	 */
-	public ConfigurationController(String configFileName, String validationFileName)
-	{
-		mConfigFileName = configFileName;
-		File configFile = new File(configFileName);
-		File parent = configFile.getParentFile();
-		mConfigDirectory = (null!=parent) ? parent : new File("");
-		//Try to obtain a handle to the validation file (xsd)
-		if (validationFileName==null) {
-			mValidationFileName=JBOSSESB_XSD;
-		} else {
-			mValidationFileName = validationFileName;
-		}
-		
-		processConfiguration() ;
-	}
-    /**
-     * Thread that observes the configuration (file). If the configuration is updated it is
-     * validated and new set jbossesb-listener.xml and jbossesb-gateway.xml is created for the
-     * current server.
-     */
-	public void run() 
-	{
-		mLogger.info("Configuration Controller instance started.");
-		try {
-			if (mConfigFileName!=null) {
-				while (!mIsEndRequested) {
-					processConfiguration() ;
-					try {
-						Thread.sleep(SLEEP_MILLIS);
-					} catch (InterruptedException ie) {
-						mLogger.warn("Could not sleep." + ie.getMessage(),ie);
-					}
-				} 
-			} else {
-				mLogger.fatal("The name of the configuran file was null: " + mConfigFileName);
-			}
-		} finally {
-			mLogger.info("Exiting Config Controller...");
-			ended = true;
-		}
-	}
-
-	/**
-	 * Has the controller instance ended.
-	 * @return True if this controller instance has ended, otherwise false..
-	 */
-	public boolean hasEnded() {
-		return ended;
-	}
-	
-	/**
-	 * To request the end of processing.
-	 */
-	public void requestEnd() {
-		mIsEndRequested = true;
-	}
-	
-	/**
-	 * Process the configuration.
-	 */
-	private void processConfiguration()
-	{
-		if (isReloadNeeded()) { 
-			try {
-				StreamSource validationInputSource=null;
-				InputStream validationInputStream = this.getClass().getResourceAsStream(mValidationFileName);
-				//if this fails try using the 
-				if (validationInputStream==null) {
-					File validationFile = new File(mValidationFileName);
-					mLogger.debug("Validation file " + mValidationFileName + " exists?:" + validationFile.exists());
-					try {
-						validationInputStream = new FileInputStream(validationFile);
-					} catch (FileNotFoundException e) {
-						mLogger.error(e.getMessage(),e);
-						throw new IllegalStateException("ESB validation file [" + (new File(mValidationFileName)).getAbsolutePath() + "] not found.", e);
-					}
-				}
-				if (validationInputStream==null) {
-					mLogger.warn("Could not obtain validation file " + mValidationFileName);
-				} else {
-					mLogger.debug("Reading validation info from " + mValidationFileName);
-					validationInputSource = new StreamSource(validationInputStream);
-				}
-				
-				mLogger.warn("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)) {
-					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()));
-					generator.generate(mConfigDirectory);
-					mLogger.info("Parameter reload completed.");
-				} 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");
-					}
-				    System.out.println(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"
-						    + " jbossesb-gateway.xml are kept in place until the error is resolved: "
-						    +  e.getMessage(), e);
-			    System.out.println(e.getMessage());
-			} 
-		}
-	}
-	
-	/**
-	 * Check the file timestamp and return true when it changes. In other
-	 * words this only works for files for now.
-	 * 
-	 * @return true if the file timestamp changed.
-	 */
-	private boolean isReloadNeeded() 
-	{
-		File configFile = new File(mConfigFileName);
-		if (configFile.exists()) {
-			long currentFileTimestamp = configFile.lastModified();
-			if (mPreviousFileTimestamp==0 || currentFileTimestamp > mPreviousFileTimestamp) {
-				if (mLogger.isDebugEnabled()) {
-					mLogger.debug("The previous timestamp on the file was: " + new Date(mPreviousFileTimestamp)
-						+ " the new timestamp on the file is: " + new Date(currentFileTimestamp));
-				}
-				mPreviousFileTimestamp = currentFileTimestamp;
-				return true;
-			}
-		} else {
-			mLogger.error("The configuration file " + configFile + " could not be found.");
-		}
-		return false;
-	}
-}
+/*
+ * 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.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.util.Date;
+
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.parameters.ParamRepositoryFactory;
+import org.xml.sax.InputSource;
+/**
+ * The controller monitors changes in the jbossesb configuration file call jbossesb.xml. When
+ * changes are detected it validates the XML, and when it passes validation it goes on and
+ * generates the jbossesb-listener.xml and jbossesb-gateway.xml.
+ * 
+ * @author kstam
+ *
+ */
+public class ConfigurationController implements Runnable
+{
+	private static final int SLEEP_MILLIS       = 1000; // default interval between parameter reloads
+	private static final String JBOSSESB_XSD = "/jbossesb-1.0.xsd";
+	private final Logger mLogger = Logger.getLogger(this.getClass());
+	private final String mConfigFileName;
+	private final String mValidationFileName;
+	private final File mConfigDirectory;
+	private long mPreviousFileTimestamp;
+	private volatile boolean mIsEndRequested;
+	private volatile boolean ended;
+	
+	/**
+	 * Start the Controller externally.
+	 * @param args - arg[0] - the parameter file name
+	 */
+	
+	public static void main(String[] args)
+	{
+		ConfigurationController configurationController = new ConfigurationController(args[0],null);
+		configurationController.run();
+	}
+	/**
+	 * Construct a Configuration Manager from the named repository based
+	 * configuration. The default jbossesb-1.0.xsd will be used for validation.
+	 * 
+	 * @param configFileName - Name of the configuration repository.
+	 *   
+	 */
+	public ConfigurationController(String configFileName)
+	{
+		this(configFileName, null);
+	}
+	/**
+	 * Construct a Configuration Manager from the named repository based
+	 * configuration.
+	 * 
+	 * @param configFileName - Name of the configuration repository.
+	 * @param validationFileName - Name of the file name used for validation (xsd or dtd).
+	 *   
+	 */
+	public ConfigurationController(String configFileName, String validationFileName)
+	{
+		mConfigFileName = configFileName;
+		File configFile = new File(configFileName);
+		File parent = configFile.getParentFile();
+		mConfigDirectory = (null!=parent) ? parent : new File("");
+		//Try to obtain a handle to the validation file (xsd)
+		if (validationFileName==null) {
+			mValidationFileName=JBOSSESB_XSD;
+		} else {
+			mValidationFileName = validationFileName;
+		}
+		
+		processConfiguration() ;
+	}
+    /**
+     * Thread that observes the configuration (file). If the configuration is updated it is
+     * validated and new set jbossesb-listener.xml and jbossesb-gateway.xml is created for the
+     * current server.
+     */
+	public void run() 
+	{
+		mLogger.info("Configuration Controller instance started.");
+		try {
+			if (mConfigFileName!=null) {
+				while (!mIsEndRequested) {
+					processConfiguration() ;
+					try {
+						Thread.sleep(SLEEP_MILLIS);
+					} catch (InterruptedException ie) {
+						mLogger.warn("Could not sleep." + ie.getMessage(),ie);
+					}
+				} 
+			} else {
+				mLogger.fatal("The name of the configuran file was null: " + mConfigFileName);
+			}
+		} finally {
+			mLogger.info("Exiting Config Controller...");
+			ended = true;
+		}
+	}
+
+	/**
+	 * Has the controller instance ended.
+	 * @return True if this controller instance has ended, otherwise false..
+	 */
+	public boolean hasEnded() {
+		return ended;
+	}
+	
+	/**
+	 * To request the end of processing.
+	 */
+	public void requestEnd() {
+		mIsEndRequested = true;
+	}
+	
+	/**
+	 * Process the configuration.
+	 */
+	private void processConfiguration()
+	{
+		if (isReloadNeeded()) { 
+			try {
+				StreamSource validationInputSource=null;
+				InputStream validationInputStream = this.getClass().getResourceAsStream(mValidationFileName);
+				//if this fails try using the 
+				if (validationInputStream==null) {
+					File validationFile = new File(mValidationFileName);
+					mLogger.debug("Validation file " + mValidationFileName + " exists?:" + validationFile.exists());
+					try {
+						validationInputStream = new FileInputStream(validationFile);
+					} catch (FileNotFoundException e) {
+						mLogger.error(e.getMessage(),e);
+						throw new IllegalStateException("ESB validation file [" + (new File(mValidationFileName)).getAbsolutePath() + "] not found.", e);
+					}
+				}
+				if (validationInputStream==null) {
+					mLogger.warn("Could not obtain validation file " + mValidationFileName);
+				} else {
+					mLogger.debug("Reading validation info from " + mValidationFileName);
+					validationInputSource = new StreamSource(validationInputStream);
+				}
+				
+				mLogger.warn("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)) {
+					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()));
+					generator.generate(mConfigDirectory);
+					mLogger.info("Parameter reload completed.");
+				} 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");
+					}
+				    System.out.println(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"
+						    + " jbossesb-gateway.xml are kept in place until the error is resolved: "
+						    +  e.getMessage(), e);
+			    System.out.println(e.getMessage());
+			} 
+		}
+	}
+	
+	/**
+	 * Check the file timestamp and return true when it changes. In other
+	 * words this only works for files for now.
+	 * 
+	 * @return true if the file timestamp changed.
+	 */
+	private boolean isReloadNeeded() 
+	{
+		File configFile = new File(mConfigFileName);
+		if (configFile.exists()) {
+			long currentFileTimestamp = configFile.lastModified();
+			if (mPreviousFileTimestamp==0 || currentFileTimestamp > mPreviousFileTimestamp) {
+				if (mLogger.isDebugEnabled()) {
+					mLogger.debug("The previous timestamp on the file was: " + new Date(mPreviousFileTimestamp)
+						+ " the new timestamp on the file is: " + new Date(currentFileTimestamp));
+				}
+				mPreviousFileTimestamp = currentFileTimestamp;
+				return true;
+			}
+		} else {
+			mLogger.error("The configuration file " + configFile + " could not be found.");
+		}
+		return false;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerService.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerService.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerService.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,73 +1,73 @@
-/*
- * 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.net.URI;
-
-import org.apache.log4j.Logger;
-import org.jboss.system.ServiceMBeanSupport;
-/**
- * Service to manage the configurationController when deployed to the appserver.
- * 
- * @author Kurt Stam
- *
- */
-public class ConfigurationControllerService extends ServiceMBeanSupport implements ConfigurationControllerServiceMBean
-{
-	private ConfigurationController	configurationController;
-	private Logger logger = Logger.getLogger(this.getClass());
-	private String configurationFile="jbossesb.xml";
-	/**
-	 * Starts the gateways.
-	 */
-	protected void startService() throws Exception 
-	{
-		logger.info("starting message configuration controller with config file " + configurationFile);
-		String confDir = System.getProperty("jboss.server.config.url");
-		URI uri = new URI(confDir);
-		confDir = uri.getPath();
-		String configFile = confDir + configurationFile;
-		configurationController = new ConfigurationController(configFile,null);
-		new Thread(configurationController).start();
-	}
-	/**
-	 * Stops the gateways.
-	 */
-	protected void stopService() throws Exception 
-	{
-		logger.info("shutting down message aware listener...");
-		configurationController.requestEnd();
-	}
-	/**
-	 * Gets the config file. The name of the file can be set in the jboss-service.xml.
-	 */
-	public String getConfigurationFile() {
-		return configurationFile;
-	}
-	/**
-	 * Sets the config file.
-	 */
-	public void setConfigurationFile(String configurationFile) {
-		this.configurationFile = configurationFile;
-	}
-	
-}
+/*
+ * 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.net.URI;
+
+import org.apache.log4j.Logger;
+import org.jboss.system.ServiceMBeanSupport;
+/**
+ * Service to manage the configurationController when deployed to the appserver.
+ * 
+ * @author Kurt Stam
+ *
+ */
+public class ConfigurationControllerService extends ServiceMBeanSupport implements ConfigurationControllerServiceMBean
+{
+	private ConfigurationController	configurationController;
+	private Logger logger = Logger.getLogger(this.getClass());
+	private String configurationFile="jbossesb.xml";
+	/**
+	 * Starts the gateways.
+	 */
+	protected void startService() throws Exception 
+	{
+		logger.info("starting message configuration controller with config file " + configurationFile);
+		String confDir = System.getProperty("jboss.server.config.url");
+		URI uri = new URI(confDir);
+		confDir = uri.getPath();
+		String configFile = confDir + configurationFile;
+		configurationController = new ConfigurationController(configFile,null);
+		new Thread(configurationController).start();
+	}
+	/**
+	 * Stops the gateways.
+	 */
+	protected void stopService() throws Exception 
+	{
+		logger.info("shutting down message aware listener...");
+		configurationController.requestEnd();
+	}
+	/**
+	 * Gets the config file. The name of the file can be set in the jboss-service.xml.
+	 */
+	public String getConfigurationFile() {
+		return configurationFile;
+	}
+	/**
+	 * Sets the config file.
+	 */
+	public void setConfigurationFile(String configurationFile) {
+		this.configurationFile = configurationFile;
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerService.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerServiceMBean.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerServiceMBean.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,35 +1,35 @@
-/*
- * 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 org.jboss.system.ServiceMBean;
-/**
- * 
- * @author Kurt Stam
- *
- */
-public interface ConfigurationControllerServiceMBean extends ServiceMBean
-{
-   // Configure getters and setters for the configFile attribute
-   String getConfigurationFile();
-   void setConfigurationFile(String ConfigurationFile);
-}
+/*
+ * 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 org.jboss.system.ServiceMBean;
+/**
+ * 
+ * @author Kurt Stam
+ *
+ */
+public interface ConfigurationControllerServiceMBean extends ServiceMBean
+{
+   // Configure getters and setters for the configFile attribute
+   String getConfigurationFile();
+   void setConfigurationFile(String ConfigurationFile);
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationControllerServiceMBean.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/MockXmlValidatorImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/MockXmlValidatorImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/MockXmlValidatorImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,33 +1,33 @@
-package org.jboss.soa.esb.listeners.config;
-
-import java.util.Collection;
-
-import javax.xml.transform.stream.StreamSource;
-
-import org.w3c.dom.Document;
-import org.xml.sax.InputSource;
-
-public class MockXmlValidatorImpl implements XmlValidator
-{
-
-	public Collection<String> getValidationResults() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public Document getXMLDocument() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public boolean validate(InputSource xmlInputSource) throws XmlValidatorException {
-		// TODO Auto-generated method stub
-		return true;
-	}
-
-	public boolean validate(InputSource xmlInputSource, StreamSource validationSource) throws XmlValidatorException {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-}
+package org.jboss.soa.esb.listeners.config;
+
+import java.util.Collection;
+
+import javax.xml.transform.stream.StreamSource;
+
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+public class MockXmlValidatorImpl implements XmlValidator
+{
+
+	public Collection<String> getValidationResults() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Document getXMLDocument() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean validate(InputSource xmlInputSource) throws XmlValidatorException {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	public boolean validate(InputSource xmlInputSource, StreamSource validationSource) throws XmlValidatorException {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/MockXmlValidatorImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,68 +1,68 @@
-/*
- * 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.Collection;
-
-import javax.xml.transform.stream.StreamSource;
-
-import org.w3c.dom.Document;
-import org.xml.sax.InputSource;
-/**
- * Interface for validating an xml given it's xsd or dtd.
- * 
- * @author kstam
- * @author ddegroff
- *
- */
-public interface XmlValidator 
-{
-	/**
-	 * Validates an xml for it's wellformedness.
-	 * 
-	 * @param xmlInputSource of the xml that needs to be validated.
-	 * @return boolean, true if  it passed validation, false if it failed.
-	 * @throws XmlValidatorException
-	 */
-	public boolean validate(InputSource xmlInputSource) throws XmlValidatorException;
-	/**
-	 * Validates an xml using the xsd or dtd given in the second argument.
-	 * 
-	 * @param xmlInputSource of the xml that needs to be validated.
-	 * @param validationSource to the xsd or dtd.
-	 * @return boolean, true if  it passed validation, false if it failed.
-	 * @throws XmlValidatorException
-	 */
-	public boolean validate(InputSource xmlInputSource, StreamSource validationSource) throws XmlValidatorException;
-	/**
-	 * If the validation fails, more details can be obtained about the reasons why.
-	 * 
-	 * @return Collection Strings
-	 */
-	public Collection<String> getValidationResults();
-	/**
-	 * After validation the parsed document can be obtained for further processing.
-	 * 
-	 * @return Document, the parsed XML Document.
-	 */
-	public Document getXMLDocument();
-}
+/*
+ * 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.Collection;
+
+import javax.xml.transform.stream.StreamSource;
+
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+/**
+ * Interface for validating an xml given it's xsd or dtd.
+ * 
+ * @author kstam
+ * @author ddegroff
+ *
+ */
+public interface XmlValidator 
+{
+	/**
+	 * Validates an xml for it's wellformedness.
+	 * 
+	 * @param xmlInputSource of the xml that needs to be validated.
+	 * @return boolean, true if  it passed validation, false if it failed.
+	 * @throws XmlValidatorException
+	 */
+	public boolean validate(InputSource xmlInputSource) throws XmlValidatorException;
+	/**
+	 * Validates an xml using the xsd or dtd given in the second argument.
+	 * 
+	 * @param xmlInputSource of the xml that needs to be validated.
+	 * @param validationSource to the xsd or dtd.
+	 * @return boolean, true if  it passed validation, false if it failed.
+	 * @throws XmlValidatorException
+	 */
+	public boolean validate(InputSource xmlInputSource, StreamSource validationSource) throws XmlValidatorException;
+	/**
+	 * If the validation fails, more details can be obtained about the reasons why.
+	 * 
+	 * @return Collection Strings
+	 */
+	public Collection<String> getValidationResults();
+	/**
+	 * After validation the parsed document can be obtained for further processing.
+	 * 
+	 * @return Document, the parsed XML Document.
+	 */
+	public Document getXMLDocument();
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidatorException.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidatorException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidatorException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,42 +1,42 @@
-/*
- * 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;
-
-/**
- * @author Kurt Stam
- *
- */
-public class XmlValidatorException extends Exception {
-    private static final long serialVersionUID = 1L;
-    
-    public XmlValidatorException(){
-        super();
-    }
-    
-    public XmlValidatorException (String msg){
-        super(msg);
-    }
-    
-    public XmlValidatorException (String msg, Throwable cause){
-        super (msg, cause);
-    }
-}
+/*
+ * 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;
+
+/**
+ * @author Kurt Stam
+ *
+ */
+public class XmlValidatorException extends Exception {
+    private static final long serialVersionUID = 1L;
+    
+    public XmlValidatorException(){
+        super();
+    }
+    
+    public XmlValidatorException (String msg){
+        super(msg);
+    }
+    
+    public XmlValidatorException (String msg, Throwable cause){
+        super (msg, cause);
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidatorException.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidatorImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/MapperUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/NotificationMapper.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListener.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerController.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerController.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerController.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,815 +1,815 @@
-/*
- * 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.gateway;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.command.CommandQueue;
-import org.jboss.internal.soa.esb.command.CommandQueueException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.util.EPRManager;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.parameters.ParamRepositoryException;
-import org.jboss.soa.esb.parameters.ParamRepositoryFactory;
-import org.jboss.soa.esb.services.registry.Registry;
-import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.registry.RegistryFactory;
-import org.jboss.soa.esb.util.Util;
-import org.xml.sax.SAXException;
-
-import com.arjuna.common.util.propertyservice.PropertyManager;
-
-public class GatewayListenerController implements Runnable
-{
-	private static Map<String, Long> _paramFileTimeStamps = new ConcurrentHashMap<String, Long>();
-
-	private static String _sRldSecs = null;
-
-	public static void main (String[] args) throws Exception
-	{
-		GatewayListenerController oProc = new GatewayListenerController(args[0]);
-		oProc.run();
-		GatewayListenerController.State oS = oProc.getState();
-
-		if (null != oS.getException())
-		{
-			_logger.error("GatewayListener <" + args[0] + "> FAILED\n", oS
-					.getException());
-		}
-		System.exit(oS.getCompletionCode());
-	} // ________________________________
-
-	public static final String RELOAD_SECONDS_TAG = "parameterReloadSecs";
-
-	public static final String END_TIME_TAG = "endTime";
-
-	// Attribute name that denotes listener class to be instantiated in a child
-	// thread
-	// This attribute is not in the root node but in first level child
-	// ConfigTrees
-	public static final String GATEWAY_CLASS_TAG = "gatewayClass";
-
-	/**
-	 * Obtain a shallow copy of needed atributes in this object's last loaded
-	 * parameter tree <p/>The local bject is cloned so child threads can use it
-	 * as they choose to without interfering with the environment
-	 * <p />
-	 * Listener processes controlled by this object should keep a reference to
-	 * this object at construction time, and not call this method again unless
-	 * they specifically need updated values. Parameter reload could have
-	 * happened since last call
-	 * 
-	 * @return Map - a shallow copy of the attributes Map
-	 */
-	@SuppressWarnings("unchecked")
-	public Map<String, Object> getControllerAttributes ()
-	{
-		return (Map<String, Object>) _attributes.clone();
-	}
-
-	public State getState ()
-	{
-		return _status;
-	}
-
-	public static enum State
-	{
-		Loading_parameters, Running, Shutting_down, Done_OK, Exception_thrown;
-		int m_iCompletionCode = 0;
-
-		Exception m_oException = null;
-
-		public int getCompletionCode ()
-		{
-			return m_iCompletionCode;
-		};
-
-		public Exception getException ()
-		{
-			return m_oException;
-		}
-	};
-
-	/**
-	 * Package private default constructor.
-	 */
-	protected GatewayListenerController ()
-	{
-	}
-
-	/**
-	 * Construct a Listener Manager from the named repository based
-	 * configuration.
-	 * 
-	 * @param p_sParameterName
-	 *            Name of the Repository entry containing the configuration.
-	 * @throws ConfigurationException
-	 *             Unable to load/use the named configuration.
-	 */
-	public GatewayListenerController (String p_sParameterName) throws ConfigurationException, IOException, ParamRepositoryException, SAXException
-	{
-		this(GatewayListenerController.getListenerConfig(p_sParameterName));
-		_sParametersName = p_sParameterName;
-	}
-
-	/**
-	 * Construct a Listener Manager using the specified listener configuration.
-	 * 
-	 * @param config
-	 *            The configuration.
-	 * @throws ConfigurationException
-	 *             Unable to load/use the supplied configuration.
-	 */
-	public GatewayListenerController (ConfigTree config) throws ConfigurationException
-	{
-		_config = config;
-		_status = State.Loading_parameters;
-
-		try
-		{
-			checkParms(_config);
-		}
-		catch (ConfigurationException e)
-		{
-			String configSource = config.getAttribute("configSource");
-			_status = State.Exception_thrown;
-			_status.m_oException = e;
-			_logger
-					.fatal(
-							"Listener configuration and startup error.  Config Source: " + (configSource != null ? configSource : "unknown"),
-							e);
-			throw e;
-		}
-	}
-
-	/**
-	 * Load the named listener configuration from the configured parameter
-	 * repository.
-	 * 
-	 * @param reposParam
-	 *            The name of the repository entry containing the Listener
-	 *            configuration.
-	 * @return Listener Configuration as {@link ConfigTree}.
-	 * @throws IOException
-	 *             Unable to access the repository.
-	 * @throws ParamRepositoryException
-	 *             Unable to access the configuration in the repository.
-	 * @throws SAXException
-	 *             Unable to parse the configuration.
-	 */
-	private static ConfigTree getListenerConfig (String reposParam)
-			throws IOException, ParamRepositoryException, SAXException
-	{
-		String sXml = ParamRepositoryFactory.getInstance().get(reposParam);
-		ConfigTree config = ConfigTree.fromXml(sXml);
-
-		config.setAttribute("configSource", "param-repository:" + reposParam);
-
-		return config;
-	}
-
-	/**
-	 * Check to see if all needed parameters are there, and assign default
-	 * values to some of them
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - Where to look for the mandatory/optional
-	 *            configuration attributes
-	 * @throws ConfigurationException -
-	 *             If attributes are wrong or not enough for a proper runtime
-	 *             configuration
-	 */
-	public void checkParms (ConfigTree p_oP) throws ConfigurationException
-	{
-		// We've just loaded - set to false until next reload requested
-		_reloadRequested = false;
-		if (null != _sParametersName)
-		{
-			File file = new File(_sParametersName);
-			if (file.exists())
-				_paramFileTimeStamps.put(_sParametersName, file.lastModified());
-		}
-
-		try
-		{
-			_commandQueue = createCommandQueue(p_oP);
-	
-			// Open the command queue...
-			if (null != _commandQueue) _commandQueue.open(p_oP);
-	
-			setNextReloadTime(p_oP);
-			// if END_TIME_TAG not set try to run forever
-			// not a good practice if command queue is not set
-			// Expected date format is "yyyyMMdd hh:mm:ss"
-			String sEndT = p_oP.getAttribute(END_TIME_TAG);
-			_endTime = (null == sEndT) ? Long.MAX_VALUE : _dateFormat.parse(sEndT)
-					.getTime();
-	
-			if (null == sEndT)
-			{
-				String sMsg = (null == _commandQueue) ? " - Listener will run until parent container/process terminates." : " - Listener will run until stopped by command sent to queue.";
-				_logger.info("No value specified for: " + END_TIME_TAG + sMsg);
-			}
-		}
-		catch (ParseException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-		catch (CommandQueueException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-	} // ________________________________
-
-	private void setNextReloadTime (ConfigTree tree)
-	{
-		// if RELOAD_SECONDS_TAG not set, and no command queue
-		// then reload every 10 minutes
-		// If there is a command queue, run until command is received
-		_sRldSecs = tree.getAttribute(RELOAD_SECONDS_TAG);
-
-		synchronized (_synchReload)
-		{
-			_nextReload = (null != _sRldSecs) ? System.currentTimeMillis() + 1000 * Long
-					.parseLong(_sRldSecs) : (null == _commandQueue) ? Long.MAX_VALUE : System
-					.currentTimeMillis() + _defaultReloadMillis;
-		}
-
-		if (null == _sRldSecs)
-		{
-			String sMsg = (null == _commandQueue) ? " -  Using default of " + _sRldSecs : " - Listener will run until stopped by command sent to queue";
-			_logger
-					.warn("No value specified for: " + RELOAD_SECONDS_TAG + sMsg);
-		}
-
-	} // ________________________________
-
-	/**
-	 * Factory method for creating the command queue.
-	 * 
-	 * @param config
-	 *            GatewayListener config.
-	 * @return GatewayListener CommandQueue instance.
-	 */
-	private CommandQueue createCommandQueue (ConfigTree config)
-	{
-		String commandQueueClass = config.getAttribute("command-queue-class");
-
-		if (commandQueueClass != null)
-		{
-			try
-			{
-				return (CommandQueue) Class.forName(commandQueueClass)
-						.newInstance();
-			}
-			catch (Exception e)
-			{
-				_logger
-						.error(
-								"Failed to instantiate CommandQueue [" + commandQueueClass + "].  Defaulting to no Command Queue",
-								e);
-			}
-		}
-
-		return _defaultCommandQueue;
-	}
-
-	/**
-	 * Allows a default command queue to be set statically for all
-	 * GatewayListener instances.
-	 * 
-	 * @param defaultCommandQueue
-	 *            The defaultCommandQueue to set.
-	 */
-	public static void setDefaultCommandQueue (CommandQueue defaultCommandQueue)
-	{
-		GatewayListenerController._defaultCommandQueue = defaultCommandQueue;
-	}
-
-	/**
-	 * Main execution loop <p/> Will continue to run until either <p/>a) run
-	 * time is expired <p/>b) quiesce command is received in command queue
-	 * <p/>For every child element that contains a PARM_LISTENER_CLASS
-	 * attribute, this method will try to launch a child thread instantiating an
-	 * object of that class, and will call it's run() method <p/>Once all child
-	 * processes are trigered, the main thread will either <p/>1) wait for a
-	 * message in the command queue (if one was configured) until next reload or
-	 * end of run period expired <p/>or 2) Just sleep if there's no command
-	 * queue to listen on
-	 */
-	public void run ()
-	{
-		boolean relaunch = true;
-		while (endNotRequested())
-		{
-			_status = State.Running;
-
-			if (relaunch) for (ConfigTree oCurr : _config.getAllChildren())
-				tryToLaunchGateway(oCurr);
-
-			waitForCmdOrSleep();
-
-			if (endRequested())
-			{
-				break;
-			}
-
-			relaunch = false;
-			if (isReloadNeeded())
-				try
-				{
-					if (_sParametersName != null)
-					{
-						_status = State.Loading_parameters;
-						_logger
-								.info("Reloading parameters _____________________________________________________");
-						ConfigTree oNew = GatewayListenerController
-								.getListenerConfig(_sParametersName);
-						checkParms(oNew);
-						_config = oNew;
-						relaunch = true;
-					}
-					else
-						checkParms(_config);
-				}
-				catch (Exception e)
-				{
-					_logger
-							.error(
-									"Failed to reload parameters" + " - Continuing with cached version",
-									e);
-				}
-		}
-		// _status = State.Shutting_down;
-
-		_status = State.Done_OK;
-		_status.m_iCompletionCode = 0;
-		_logger
-				.info("Finishing_____________________________________________________");
-
-		// Close the command queue...
-		try
-		{
-			if (null != _commandQueue) _commandQueue.close();
-		}
-		catch (CommandQueueException e)
-		{
-			_logger.error("Error closing Command Queue.", e);
-		}
-	} // ________________________________
-
-	private void tryToLaunchGateway (ConfigTree p_oP)
-	{
-		String sClass = p_oP.getAttribute(GATEWAY_CLASS_TAG);
-		if (Util.isNullString(sClass)) return;
-
-		try
-		{
-			Class oListener = Class.forName(sClass);
-			Constructor oConst = oListener.getConstructor(new Class[] { this
-					.getClass(), ConfigTree.class });
-			Runnable oRun = (Runnable) oConst
-					.newInstance(new Object[] { this, p_oP });
-			new Thread(oRun).start();
-		}
-		catch (Exception e)
-		{
-			_logger.error("Cannot launch <" + sClass + ">\n", e);
-			e.printStackTrace();
-		}
-	} // ________________________________
-
-	long millisToWait ()
-	{
-		synchronized (_synchReload)
-		{
-			return Math.min(_nextReload, _endTime) - System.currentTimeMillis();
-		}
-	} // ________________________________
-
-	private void waitForCmdOrSleep ()
-	{
-
-		long lToGo = millisToWait();
-
-		if (null == _commandQueue)
-		{
-			_logger.debug("About to sleep " + lToGo);
-			// No command queue nor topic - Just sleep until time
-			// exhausted, or thread interrupted
-			try
-			{
-				while ((lToGo = millisToWait()) > 0)
-					Thread.sleep(500);
-			}
-			catch (InterruptedException e)
-			{
-				_endTime = 0; // mark as end requested and return
-			}
-			return;
-		}
-		// Wait for commands until time exhausted or command received
-		// Note that received commands might change time variables (reload/end)
-		// that's why time to go is recalculated on each cycle
-		while ((lToGo = millisToWait()) > 0)
-		{
-			try
-			{
-				_logger
-						.info("Waiting for command ... timeout=" + lToGo + " millis");
-
-				String oM = _commandQueue.receiveCommand(lToGo);
-				if (null == oM)
-				{
-					return;
-				}
-				processCommand(oM);
-				if (endRequested() || isReloadNeeded())
-				{
-					break;
-				}
-			}
-			catch (CommandQueueException eJ)
-			{
-				_logger.info("receive on command queue failed", eJ);
-			}
-		}
-	} // ________________________________
-
-	/**
-	 * Processes the command that has been received in the command queue (or
-	 * topic) <p/>_endRequested, _reloadRequested, and _endTime could be changed
-	 * 
-	 * <p/> <p/><TABLE border="1"> <COLGROUP> <COL width="200"/> <COL
-	 * width="400"/> </COLGROUP>
-	 * <TR>
-	 * <TD align="center">message text</TD>
-	 * <TD align="center">effect</TD>
-	 * </TR>
-	 * <TR>
-	 * <TD>shutdown*</TD>
-	 * <TD>End time will be immediately set to 'now' - quiesce process will
-	 * start - Child threads will be allowed to finish normally</TD>
-	 * </TR>
-	 * <TR>
-	 * <TD>reload param*</TD>
-	 * <TD>Parameters will be immediately reloaded, and listener reconfigured
-	 * with new values</TD>
-	 * </TR>
-	 * <TR>
-	 * <TD>endTime yyyyMMdd hh:mm:ss</TD>
-	 * <TD>End time will be set to new value. If hh:mm:ss is not supplied =>
-	 * end of day assumed (23:59:59)</TD>
-	 * </TR>
-	 * </TABLE> * startsWith() <p/>
-	 * 
-	 * @param p_oMsg
-	 *            Message received from the command queue.
-	 * 
-	 */
-	private void processCommand (String sTxt)
-	{
-		if (null == sTxt) return;
-
-		String sLow = sTxt.trim().toLowerCase();
-		if (sLow.startsWith("shutdown"))
-		{
-			_endRequested = true;
-			_logger.info("Shutdown has been requested");
-			return;
-		}
-		if (sLow.startsWith("reload param"))
-		{
-			_reloadRequested = true;
-			_logger.info("Request for parameter reload has been received");
-			return;
-		}
-		String[] sa = sLow.split("\\s+");
-		if (sa.length > 1 && "endtime".equals(sa[0]))
-		{
-			try
-			{
-				String sDate = sa[1];
-				String sTime = (sa.length < 3 || null == sa[2]) ? "23:59:59" : sa[2];
-				Date oEnd = _dateFormat.parse(sDate + " " + sTime);
-				_logger.info("New end date set to : " + oEnd);
-				_endTime = oEnd.getTime();
-			}
-			catch (Exception eDat)
-			{
-				_logger.info("Problems with endTime command", eDat);
-			}
-		}
-	} // ________________________________
-
-	/**
-	 * Accessor to determine if execution time is expired or shutdown requested
-	 * 
-	 * @return boolean if processing has to stop (all child threads will be
-	 *         allowed to finish)
-	 */
-	public boolean endRequested ()
-	{
-		return _endRequested || System.currentTimeMillis() >= _endTime;
-	}
-
-	public void requestEnd ()
-	{
-		_endRequested = true;
-		_endTime = 0;
-	}
-
-	/**
-	 * Accessor to determine if execution time is not expired, and no shutdown
-	 * request received
-	 * 
-	 * @return boolean - true if run time has not expired and quiesce has not
-	 *         been requested
-	 */
-	public boolean endNotRequested ()
-	{
-		return !endRequested();
-	}
-
-	/**
-	 * Provide a common accessor to determine if parameters have to be reloaded
-	 * <p/> For child threads this means thread execution has to end
-	 * </p>
-	 * Child processes should only call this method when they are idle (as
-	 * opposed to in the middle of executing a unit of work)
-	 * 
-	 * @return boolean - true if it's time to reload parameters
-	 */
-	private boolean isReloadNeeded ()
-	{
-		// command to reload was received - force reload
-		if (_reloadRequested) return refreshNextReload();
-
-		// Still not time to reload
-		if (System.currentTimeMillis() < _nextReload) return false;
-
-		if (null == _sParametersName) return refreshNextReload();
-
-		File paramFile = new File(_sParametersName);
-		if (!paramFile.exists()) return refreshNextReload();
-
-		// check the TS on the file.
-		Long previousTimeStamp = _paramFileTimeStamps.get(_sParametersName);
-		if (null == previousTimeStamp) return refreshNextReload();
-
-		Long currentTimeStamp = paramFile.lastModified();
-		if (!previousTimeStamp.equals(currentTimeStamp))
-			return refreshNextReload();
-
-		setNextReloadTime(_config);
-		return false;
-	}
-
-	private boolean refreshNextReload ()
-	{
-		setNextReloadTime(_config);
-		return true;
-	}
-
-	/**
-	 * Helper accessor for child processes that provides info to determine if
-	 * they can continue with yet another execution cycle
-	 * 
-	 * @return boolean - true if runtime is not expired and not time yet to
-	 *         reload parameters
-	 */
-	public boolean continueLooping ()
-	{
-		return (endNotRequested() && !isReloadNeeded());
-	} // ________________________________
-
-	/**
-	 * Find an attribute in the tree (arg 0) or assign default value (arg 2)
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - look for attributes in this Element only
-	 * @param p_sAtt
-	 *            String - Name of attribute to find
-	 * @param p_sDefault
-	 *            String -default value if requested attribute is not there
-	 * @return String - value of attribute, or default value (if null)
-	 * @throws ConfigurationException -
-	 *             If requested attribute not found and no default value
-	 *             supplied by invoker
-	 */
-	public String obtainAtt (ConfigTree p_oP, String p_sAtt, String p_sDefault)
-			throws ConfigurationException
-	{
-		String sVal = p_oP.getAttribute(p_sAtt);
-		if ((null == sVal) && (null == p_sDefault))
-			throw new ConfigurationException(
-					"Missing or invalid <" + p_sAtt + "> attribute");
-
-		return (null != sVal) ? sVal : p_sDefault;
-	} // ________________________________
-
-	private static EPRManager getEprManager ()
-	{
-		PropertyManager manager = ModulePropertyManager
-				.getPropertyManager(ModulePropertyManager.CORE_MODULE);
-		String sDir = manager.getProperty(Environment.REGISTRY_FILE_HELPER_DIR,
-				".");
-		return EPRManager.getInstance(sDir);
-	}
-
-	public Collection<EPR> getEprs (String category, String name)
-			throws RegistryException
-	{
-		if ("eprManager".equals(category))
-		{
-			Collection<EPR> ret = new ArrayList<EPR>();
-			try
-			{
-				ret.add(getEprManager().loadEPR(name));
-				return ret;
-			}
-			catch (IOException e)
-			{
-				throw new RegistryException(
-						"No EPRs found for <" + category + "><" + name + ">");
-			}
-		}
-
-		Registry reg = RegistryFactory.getRegistry();
-		RegistryException eReg = null;
-		for (int i1 = 0; i1 < 5; i1++)
-		{
-			try
-			{
-				return reg.findEPRs(category, name);
-			}
-			catch (RegistryException e)
-			{
-				if (null == eReg) eReg = e;
-				try
-				{
-					Thread.sleep(500);
-				}
-				catch (InterruptedException eInt)
-				{
-					break;
-				}
-			}
-		}
-		throw eReg;
-	}
-
-	/**
-	 * @deprecated use register (ConfigTree config, EPR address) instead.
-	 * @param name
-	 * @param address
-	 */
-	public void register (String name, EPR address)
-	{
-		try
-		{
-			getEprManager().saveEPR(name, address);
-		}
-		catch (IOException e)
-		{
-			_logger.fatal("Cannot register service", e);
-		}
-	} // ________________________________
-
-	/**
-	 * @deprecated use unRegister (String serviceCategoryName, String
-	 *             serviceName, EPR epr) instead.
-	 * @param name
-	 */
-	public void unRegister (String name)
-	{
-		try
-		{
-			getEprManager().removeEPR(name);
-		}
-		catch (IOException e)
-		{
-			_logger.fatal("Cannot un-register service", e);
-		}
-	} // ________________________________
-
-	/**
-	 * Register an EPR in the registry.
-	 * 
-	 * @param config -
-	 *            a config tree containing the deployment-configuration of the
-	 *            service.
-	 * @param epr -
-	 *            the epr (EndPoint Reference) of the service.
-	 * 
-	 * @throws RegistryException
-	 */
-	public void register (ConfigTree config, EPR epr) throws RegistryException
-	{
-		String serviceCategoryName = config
-				.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
-		String serviceName = config
-				.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
-		if ("eprManager".equalsIgnoreCase(serviceCategoryName))
-		{
-			register(serviceName, epr);
-			return;
-		}
-		String serviceDescription = config
-				.getAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG);
-		String eprDescription = config
-				.getAttribute(ListenerTagNames.EPR_DESCRIPTION_TAG);
-		Registry registry = RegistryFactory.getRegistry();
-		registry.registerEPR(serviceCategoryName, serviceName,
-				serviceDescription, epr, eprDescription);
-	}
-
-	/**
-	 * Unregister the EPR from the registry.
-	 * 
-	 * @param serviceCategoryName -
-	 *            name of the category of the service ('Content Based Routing')
-	 * @param serviceName -
-	 *            name of the service ("
-	 * @param epr
-	 * @throws RegistryException
-	 */
-	public void unRegister (String serviceCategoryName, String serviceName,
-			EPR epr) throws RegistryException
-	{
-		if ("eprManager".equalsIgnoreCase(serviceCategoryName))
-		{
-			unRegister(serviceName);
-			return;
-		}
-		Registry registry = RegistryFactory.getRegistry();
-		registry.unRegisterEPR(serviceCategoryName, serviceName, epr);
-	}
-
-	private CommandQueue _commandQueue;
-
-	private static CommandQueue _defaultCommandQueue = null;
-
-	private static Logger _logger = Logger
-			.getLogger(GatewayListenerController.class);
-
-	private String _sParametersName;
-
-	private ConfigTree _config;
-
-	private boolean _reloadRequested;
-
-	private boolean _endRequested;
-
-	private long _nextReload = Long.MAX_VALUE;
-
-	private long _endTime = Long.MAX_VALUE;
-
-	protected int _defaultReloadMillis = 180000; // default interval between
-
-	// parameter reloads
-
-	public static final SimpleDateFormat _dateFormat = new SimpleDateFormat(
-			"yyyyMMdd hh:mm:ss");
-
-	private State _status = null;
-
-	private Object _synchReload = new Short((short) 0);
-
-	private HashMap<String, Object> _attributes;
-} // ____________________________________________________________________________
+/*
+ * 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.gateway;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.command.CommandQueue;
+import org.jboss.internal.soa.esb.command.CommandQueueException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.util.EPRManager;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.parameters.ParamRepositoryException;
+import org.jboss.soa.esb.parameters.ParamRepositoryFactory;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.registry.RegistryFactory;
+import org.jboss.soa.esb.util.Util;
+import org.xml.sax.SAXException;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+public class GatewayListenerController implements Runnable
+{
+	private static Map<String, Long> _paramFileTimeStamps = new ConcurrentHashMap<String, Long>();
+
+	private static String _sRldSecs = null;
+
+	public static void main (String[] args) throws Exception
+	{
+		GatewayListenerController oProc = new GatewayListenerController(args[0]);
+		oProc.run();
+		GatewayListenerController.State oS = oProc.getState();
+
+		if (null != oS.getException())
+		{
+			_logger.error("GatewayListener <" + args[0] + "> FAILED\n", oS
+					.getException());
+		}
+		System.exit(oS.getCompletionCode());
+	} // ________________________________
+
+	public static final String RELOAD_SECONDS_TAG = "parameterReloadSecs";
+
+	public static final String END_TIME_TAG = "endTime";
+
+	// Attribute name that denotes listener class to be instantiated in a child
+	// thread
+	// This attribute is not in the root node but in first level child
+	// ConfigTrees
+	public static final String GATEWAY_CLASS_TAG = "gatewayClass";
+
+	/**
+	 * Obtain a shallow copy of needed atributes in this object's last loaded
+	 * parameter tree <p/>The local bject is cloned so child threads can use it
+	 * as they choose to without interfering with the environment
+	 * <p />
+	 * Listener processes controlled by this object should keep a reference to
+	 * this object at construction time, and not call this method again unless
+	 * they specifically need updated values. Parameter reload could have
+	 * happened since last call
+	 * 
+	 * @return Map - a shallow copy of the attributes Map
+	 */
+	@SuppressWarnings("unchecked")
+	public Map<String, Object> getControllerAttributes ()
+	{
+		return (Map<String, Object>) _attributes.clone();
+	}
+
+	public State getState ()
+	{
+		return _status;
+	}
+
+	public static enum State
+	{
+		Loading_parameters, Running, Shutting_down, Done_OK, Exception_thrown;
+		int m_iCompletionCode = 0;
+
+		Exception m_oException = null;
+
+		public int getCompletionCode ()
+		{
+			return m_iCompletionCode;
+		};
+
+		public Exception getException ()
+		{
+			return m_oException;
+		}
+	};
+
+	/**
+	 * Package private default constructor.
+	 */
+	protected GatewayListenerController ()
+	{
+	}
+
+	/**
+	 * Construct a Listener Manager from the named repository based
+	 * configuration.
+	 * 
+	 * @param p_sParameterName
+	 *            Name of the Repository entry containing the configuration.
+	 * @throws ConfigurationException
+	 *             Unable to load/use the named configuration.
+	 */
+	public GatewayListenerController (String p_sParameterName) throws ConfigurationException, IOException, ParamRepositoryException, SAXException
+	{
+		this(GatewayListenerController.getListenerConfig(p_sParameterName));
+		_sParametersName = p_sParameterName;
+	}
+
+	/**
+	 * Construct a Listener Manager using the specified listener configuration.
+	 * 
+	 * @param config
+	 *            The configuration.
+	 * @throws ConfigurationException
+	 *             Unable to load/use the supplied configuration.
+	 */
+	public GatewayListenerController (ConfigTree config) throws ConfigurationException
+	{
+		_config = config;
+		_status = State.Loading_parameters;
+
+		try
+		{
+			checkParms(_config);
+		}
+		catch (ConfigurationException e)
+		{
+			String configSource = config.getAttribute("configSource");
+			_status = State.Exception_thrown;
+			_status.m_oException = e;
+			_logger
+					.fatal(
+							"Listener configuration and startup error.  Config Source: " + (configSource != null ? configSource : "unknown"),
+							e);
+			throw e;
+		}
+	}
+
+	/**
+	 * Load the named listener configuration from the configured parameter
+	 * repository.
+	 * 
+	 * @param reposParam
+	 *            The name of the repository entry containing the Listener
+	 *            configuration.
+	 * @return Listener Configuration as {@link ConfigTree}.
+	 * @throws IOException
+	 *             Unable to access the repository.
+	 * @throws ParamRepositoryException
+	 *             Unable to access the configuration in the repository.
+	 * @throws SAXException
+	 *             Unable to parse the configuration.
+	 */
+	private static ConfigTree getListenerConfig (String reposParam)
+			throws IOException, ParamRepositoryException, SAXException
+	{
+		String sXml = ParamRepositoryFactory.getInstance().get(reposParam);
+		ConfigTree config = ConfigTree.fromXml(sXml);
+
+		config.setAttribute("configSource", "param-repository:" + reposParam);
+
+		return config;
+	}
+
+	/**
+	 * Check to see if all needed parameters are there, and assign default
+	 * values to some of them
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - Where to look for the mandatory/optional
+	 *            configuration attributes
+	 * @throws ConfigurationException -
+	 *             If attributes are wrong or not enough for a proper runtime
+	 *             configuration
+	 */
+	public void checkParms (ConfigTree p_oP) throws ConfigurationException
+	{
+		// We've just loaded - set to false until next reload requested
+		_reloadRequested = false;
+		if (null != _sParametersName)
+		{
+			File file = new File(_sParametersName);
+			if (file.exists())
+				_paramFileTimeStamps.put(_sParametersName, file.lastModified());
+		}
+
+		try
+		{
+			_commandQueue = createCommandQueue(p_oP);
+	
+			// Open the command queue...
+			if (null != _commandQueue) _commandQueue.open(p_oP);
+	
+			setNextReloadTime(p_oP);
+			// if END_TIME_TAG not set try to run forever
+			// not a good practice if command queue is not set
+			// Expected date format is "yyyyMMdd hh:mm:ss"
+			String sEndT = p_oP.getAttribute(END_TIME_TAG);
+			_endTime = (null == sEndT) ? Long.MAX_VALUE : _dateFormat.parse(sEndT)
+					.getTime();
+	
+			if (null == sEndT)
+			{
+				String sMsg = (null == _commandQueue) ? " - Listener will run until parent container/process terminates." : " - Listener will run until stopped by command sent to queue.";
+				_logger.info("No value specified for: " + END_TIME_TAG + sMsg);
+			}
+		}
+		catch (ParseException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+		catch (CommandQueueException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+	} // ________________________________
+
+	private void setNextReloadTime (ConfigTree tree)
+	{
+		// if RELOAD_SECONDS_TAG not set, and no command queue
+		// then reload every 10 minutes
+		// If there is a command queue, run until command is received
+		_sRldSecs = tree.getAttribute(RELOAD_SECONDS_TAG);
+
+		synchronized (_synchReload)
+		{
+			_nextReload = (null != _sRldSecs) ? System.currentTimeMillis() + 1000 * Long
+					.parseLong(_sRldSecs) : (null == _commandQueue) ? Long.MAX_VALUE : System
+					.currentTimeMillis() + _defaultReloadMillis;
+		}
+
+		if (null == _sRldSecs)
+		{
+			String sMsg = (null == _commandQueue) ? " -  Using default of " + _sRldSecs : " - Listener will run until stopped by command sent to queue";
+			_logger
+					.warn("No value specified for: " + RELOAD_SECONDS_TAG + sMsg);
+		}
+
+	} // ________________________________
+
+	/**
+	 * Factory method for creating the command queue.
+	 * 
+	 * @param config
+	 *            GatewayListener config.
+	 * @return GatewayListener CommandQueue instance.
+	 */
+	private CommandQueue createCommandQueue (ConfigTree config)
+	{
+		String commandQueueClass = config.getAttribute("command-queue-class");
+
+		if (commandQueueClass != null)
+		{
+			try
+			{
+				return (CommandQueue) Class.forName(commandQueueClass)
+						.newInstance();
+			}
+			catch (Exception e)
+			{
+				_logger
+						.error(
+								"Failed to instantiate CommandQueue [" + commandQueueClass + "].  Defaulting to no Command Queue",
+								e);
+			}
+		}
+
+		return _defaultCommandQueue;
+	}
+
+	/**
+	 * Allows a default command queue to be set statically for all
+	 * GatewayListener instances.
+	 * 
+	 * @param defaultCommandQueue
+	 *            The defaultCommandQueue to set.
+	 */
+	public static void setDefaultCommandQueue (CommandQueue defaultCommandQueue)
+	{
+		GatewayListenerController._defaultCommandQueue = defaultCommandQueue;
+	}
+
+	/**
+	 * Main execution loop <p/> Will continue to run until either <p/>a) run
+	 * time is expired <p/>b) quiesce command is received in command queue
+	 * <p/>For every child element that contains a PARM_LISTENER_CLASS
+	 * attribute, this method will try to launch a child thread instantiating an
+	 * object of that class, and will call it's run() method <p/>Once all child
+	 * processes are trigered, the main thread will either <p/>1) wait for a
+	 * message in the command queue (if one was configured) until next reload or
+	 * end of run period expired <p/>or 2) Just sleep if there's no command
+	 * queue to listen on
+	 */
+	public void run ()
+	{
+		boolean relaunch = true;
+		while (endNotRequested())
+		{
+			_status = State.Running;
+
+			if (relaunch) for (ConfigTree oCurr : _config.getAllChildren())
+				tryToLaunchGateway(oCurr);
+
+			waitForCmdOrSleep();
+
+			if (endRequested())
+			{
+				break;
+			}
+
+			relaunch = false;
+			if (isReloadNeeded())
+				try
+				{
+					if (_sParametersName != null)
+					{
+						_status = State.Loading_parameters;
+						_logger
+								.info("Reloading parameters _____________________________________________________");
+						ConfigTree oNew = GatewayListenerController
+								.getListenerConfig(_sParametersName);
+						checkParms(oNew);
+						_config = oNew;
+						relaunch = true;
+					}
+					else
+						checkParms(_config);
+				}
+				catch (Exception e)
+				{
+					_logger
+							.error(
+									"Failed to reload parameters" + " - Continuing with cached version",
+									e);
+				}
+		}
+		// _status = State.Shutting_down;
+
+		_status = State.Done_OK;
+		_status.m_iCompletionCode = 0;
+		_logger
+				.info("Finishing_____________________________________________________");
+
+		// Close the command queue...
+		try
+		{
+			if (null != _commandQueue) _commandQueue.close();
+		}
+		catch (CommandQueueException e)
+		{
+			_logger.error("Error closing Command Queue.", e);
+		}
+	} // ________________________________
+
+	private void tryToLaunchGateway (ConfigTree p_oP)
+	{
+		String sClass = p_oP.getAttribute(GATEWAY_CLASS_TAG);
+		if (Util.isNullString(sClass)) return;
+
+		try
+		{
+			Class oListener = Class.forName(sClass);
+			Constructor oConst = oListener.getConstructor(new Class[] { this
+					.getClass(), ConfigTree.class });
+			Runnable oRun = (Runnable) oConst
+					.newInstance(new Object[] { this, p_oP });
+			new Thread(oRun).start();
+		}
+		catch (Exception e)
+		{
+			_logger.error("Cannot launch <" + sClass + ">\n", e);
+			e.printStackTrace();
+		}
+	} // ________________________________
+
+	long millisToWait ()
+	{
+		synchronized (_synchReload)
+		{
+			return Math.min(_nextReload, _endTime) - System.currentTimeMillis();
+		}
+	} // ________________________________
+
+	private void waitForCmdOrSleep ()
+	{
+
+		long lToGo = millisToWait();
+
+		if (null == _commandQueue)
+		{
+			_logger.debug("About to sleep " + lToGo);
+			// No command queue nor topic - Just sleep until time
+			// exhausted, or thread interrupted
+			try
+			{
+				while ((lToGo = millisToWait()) > 0)
+					Thread.sleep(500);
+			}
+			catch (InterruptedException e)
+			{
+				_endTime = 0; // mark as end requested and return
+			}
+			return;
+		}
+		// Wait for commands until time exhausted or command received
+		// Note that received commands might change time variables (reload/end)
+		// that's why time to go is recalculated on each cycle
+		while ((lToGo = millisToWait()) > 0)
+		{
+			try
+			{
+				_logger
+						.info("Waiting for command ... timeout=" + lToGo + " millis");
+
+				String oM = _commandQueue.receiveCommand(lToGo);
+				if (null == oM)
+				{
+					return;
+				}
+				processCommand(oM);
+				if (endRequested() || isReloadNeeded())
+				{
+					break;
+				}
+			}
+			catch (CommandQueueException eJ)
+			{
+				_logger.info("receive on command queue failed", eJ);
+			}
+		}
+	} // ________________________________
+
+	/**
+	 * Processes the command that has been received in the command queue (or
+	 * topic) <p/>_endRequested, _reloadRequested, and _endTime could be changed
+	 * 
+	 * <p/> <p/><TABLE border="1"> <COLGROUP> <COL width="200"/> <COL
+	 * width="400"/> </COLGROUP>
+	 * <TR>
+	 * <TD align="center">message text</TD>
+	 * <TD align="center">effect</TD>
+	 * </TR>
+	 * <TR>
+	 * <TD>shutdown*</TD>
+	 * <TD>End time will be immediately set to 'now' - quiesce process will
+	 * start - Child threads will be allowed to finish normally</TD>
+	 * </TR>
+	 * <TR>
+	 * <TD>reload param*</TD>
+	 * <TD>Parameters will be immediately reloaded, and listener reconfigured
+	 * with new values</TD>
+	 * </TR>
+	 * <TR>
+	 * <TD>endTime yyyyMMdd hh:mm:ss</TD>
+	 * <TD>End time will be set to new value. If hh:mm:ss is not supplied =>
+	 * end of day assumed (23:59:59)</TD>
+	 * </TR>
+	 * </TABLE> * startsWith() <p/>
+	 * 
+	 * @param p_oMsg
+	 *            Message received from the command queue.
+	 * 
+	 */
+	private void processCommand (String sTxt)
+	{
+		if (null == sTxt) return;
+
+		String sLow = sTxt.trim().toLowerCase();
+		if (sLow.startsWith("shutdown"))
+		{
+			_endRequested = true;
+			_logger.info("Shutdown has been requested");
+			return;
+		}
+		if (sLow.startsWith("reload param"))
+		{
+			_reloadRequested = true;
+			_logger.info("Request for parameter reload has been received");
+			return;
+		}
+		String[] sa = sLow.split("\\s+");
+		if (sa.length > 1 && "endtime".equals(sa[0]))
+		{
+			try
+			{
+				String sDate = sa[1];
+				String sTime = (sa.length < 3 || null == sa[2]) ? "23:59:59" : sa[2];
+				Date oEnd = _dateFormat.parse(sDate + " " + sTime);
+				_logger.info("New end date set to : " + oEnd);
+				_endTime = oEnd.getTime();
+			}
+			catch (Exception eDat)
+			{
+				_logger.info("Problems with endTime command", eDat);
+			}
+		}
+	} // ________________________________
+
+	/**
+	 * Accessor to determine if execution time is expired or shutdown requested
+	 * 
+	 * @return boolean if processing has to stop (all child threads will be
+	 *         allowed to finish)
+	 */
+	public boolean endRequested ()
+	{
+		return _endRequested || System.currentTimeMillis() >= _endTime;
+	}
+
+	public void requestEnd ()
+	{
+		_endRequested = true;
+		_endTime = 0;
+	}
+
+	/**
+	 * Accessor to determine if execution time is not expired, and no shutdown
+	 * request received
+	 * 
+	 * @return boolean - true if run time has not expired and quiesce has not
+	 *         been requested
+	 */
+	public boolean endNotRequested ()
+	{
+		return !endRequested();
+	}
+
+	/**
+	 * Provide a common accessor to determine if parameters have to be reloaded
+	 * <p/> For child threads this means thread execution has to end
+	 * </p>
+	 * Child processes should only call this method when they are idle (as
+	 * opposed to in the middle of executing a unit of work)
+	 * 
+	 * @return boolean - true if it's time to reload parameters
+	 */
+	private boolean isReloadNeeded ()
+	{
+		// command to reload was received - force reload
+		if (_reloadRequested) return refreshNextReload();
+
+		// Still not time to reload
+		if (System.currentTimeMillis() < _nextReload) return false;
+
+		if (null == _sParametersName) return refreshNextReload();
+
+		File paramFile = new File(_sParametersName);
+		if (!paramFile.exists()) return refreshNextReload();
+
+		// check the TS on the file.
+		Long previousTimeStamp = _paramFileTimeStamps.get(_sParametersName);
+		if (null == previousTimeStamp) return refreshNextReload();
+
+		Long currentTimeStamp = paramFile.lastModified();
+		if (!previousTimeStamp.equals(currentTimeStamp))
+			return refreshNextReload();
+
+		setNextReloadTime(_config);
+		return false;
+	}
+
+	private boolean refreshNextReload ()
+	{
+		setNextReloadTime(_config);
+		return true;
+	}
+
+	/**
+	 * Helper accessor for child processes that provides info to determine if
+	 * they can continue with yet another execution cycle
+	 * 
+	 * @return boolean - true if runtime is not expired and not time yet to
+	 *         reload parameters
+	 */
+	public boolean continueLooping ()
+	{
+		return (endNotRequested() && !isReloadNeeded());
+	} // ________________________________
+
+	/**
+	 * Find an attribute in the tree (arg 0) or assign default value (arg 2)
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - look for attributes in this Element only
+	 * @param p_sAtt
+	 *            String - Name of attribute to find
+	 * @param p_sDefault
+	 *            String -default value if requested attribute is not there
+	 * @return String - value of attribute, or default value (if null)
+	 * @throws ConfigurationException -
+	 *             If requested attribute not found and no default value
+	 *             supplied by invoker
+	 */
+	public String obtainAtt (ConfigTree p_oP, String p_sAtt, String p_sDefault)
+			throws ConfigurationException
+	{
+		String sVal = p_oP.getAttribute(p_sAtt);
+		if ((null == sVal) && (null == p_sDefault))
+			throw new ConfigurationException(
+					"Missing or invalid <" + p_sAtt + "> attribute");
+
+		return (null != sVal) ? sVal : p_sDefault;
+	} // ________________________________
+
+	private static EPRManager getEprManager ()
+	{
+		PropertyManager manager = ModulePropertyManager
+				.getPropertyManager(ModulePropertyManager.CORE_MODULE);
+		String sDir = manager.getProperty(Environment.REGISTRY_FILE_HELPER_DIR,
+				".");
+		return EPRManager.getInstance(sDir);
+	}
+
+	public Collection<EPR> getEprs (String category, String name)
+			throws RegistryException
+	{
+		if ("eprManager".equals(category))
+		{
+			Collection<EPR> ret = new ArrayList<EPR>();
+			try
+			{
+				ret.add(getEprManager().loadEPR(name));
+				return ret;
+			}
+			catch (IOException e)
+			{
+				throw new RegistryException(
+						"No EPRs found for <" + category + "><" + name + ">");
+			}
+		}
+
+		Registry reg = RegistryFactory.getRegistry();
+		RegistryException eReg = null;
+		for (int i1 = 0; i1 < 5; i1++)
+		{
+			try
+			{
+				return reg.findEPRs(category, name);
+			}
+			catch (RegistryException e)
+			{
+				if (null == eReg) eReg = e;
+				try
+				{
+					Thread.sleep(500);
+				}
+				catch (InterruptedException eInt)
+				{
+					break;
+				}
+			}
+		}
+		throw eReg;
+	}
+
+	/**
+	 * @deprecated use register (ConfigTree config, EPR address) instead.
+	 * @param name
+	 * @param address
+	 */
+	public void register (String name, EPR address)
+	{
+		try
+		{
+			getEprManager().saveEPR(name, address);
+		}
+		catch (IOException e)
+		{
+			_logger.fatal("Cannot register service", e);
+		}
+	} // ________________________________
+
+	/**
+	 * @deprecated use unRegister (String serviceCategoryName, String
+	 *             serviceName, EPR epr) instead.
+	 * @param name
+	 */
+	public void unRegister (String name)
+	{
+		try
+		{
+			getEprManager().removeEPR(name);
+		}
+		catch (IOException e)
+		{
+			_logger.fatal("Cannot un-register service", e);
+		}
+	} // ________________________________
+
+	/**
+	 * Register an EPR in the registry.
+	 * 
+	 * @param config -
+	 *            a config tree containing the deployment-configuration of the
+	 *            service.
+	 * @param epr -
+	 *            the epr (EndPoint Reference) of the service.
+	 * 
+	 * @throws RegistryException
+	 */
+	public void register (ConfigTree config, EPR epr) throws RegistryException
+	{
+		String serviceCategoryName = config
+				.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+		String serviceName = config
+				.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+		if ("eprManager".equalsIgnoreCase(serviceCategoryName))
+		{
+			register(serviceName, epr);
+			return;
+		}
+		String serviceDescription = config
+				.getAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG);
+		String eprDescription = config
+				.getAttribute(ListenerTagNames.EPR_DESCRIPTION_TAG);
+		Registry registry = RegistryFactory.getRegistry();
+		registry.registerEPR(serviceCategoryName, serviceName,
+				serviceDescription, epr, eprDescription);
+	}
+
+	/**
+	 * Unregister the EPR from the registry.
+	 * 
+	 * @param serviceCategoryName -
+	 *            name of the category of the service ('Content Based Routing')
+	 * @param serviceName -
+	 *            name of the service ("
+	 * @param epr
+	 * @throws RegistryException
+	 */
+	public void unRegister (String serviceCategoryName, String serviceName,
+			EPR epr) throws RegistryException
+	{
+		if ("eprManager".equalsIgnoreCase(serviceCategoryName))
+		{
+			unRegister(serviceName);
+			return;
+		}
+		Registry registry = RegistryFactory.getRegistry();
+		registry.unRegisterEPR(serviceCategoryName, serviceName, epr);
+	}
+
+	private CommandQueue _commandQueue;
+
+	private static CommandQueue _defaultCommandQueue = null;
+
+	private static Logger _logger = Logger
+			.getLogger(GatewayListenerController.class);
+
+	private String _sParametersName;
+
+	private ConfigTree _config;
+
+	private boolean _reloadRequested;
+
+	private boolean _endRequested;
+
+	private long _nextReload = Long.MAX_VALUE;
+
+	private long _endTime = Long.MAX_VALUE;
+
+	protected int _defaultReloadMillis = 180000; // default interval between
+
+	// parameter reloads
+
+	public static final SimpleDateFormat _dateFormat = new SimpleDateFormat(
+			"yyyyMMdd hh:mm:ss");
+
+	private State _status = null;
+
+	private Object _synchReload = new Short((short) 0);
+
+	private HashMap<String, Object> _attributes;
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerController.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerService.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerService.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerService.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,75 +1,75 @@
-/*
- * 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.gateway;
-
-import java.net.URI;
-
-import org.apache.log4j.Logger;
-import org.jboss.system.ServiceMBeanSupport;
-/**
- * Service to manage the gateways when deployed to the appserver.
- * 
- * @author Kurt Stam
- *
- */
-public class GatewayListenerControllerService extends ServiceMBeanSupport implements GatewayListenerControllerServiceMBean
-{
-	private GatewayListenerController	gatewayListController;
-	private Logger logger = Logger.getLogger(this.getClass());
-	private String gatewayConfigFile="jbossesb-gateway.xml";
-	/**
-	 * Starts the gateways.
-	 */
-	protected void startService() throws Exception 
-	{
-		logger.info("starting message aware listener with config file " + gatewayConfigFile);
-		String confDir = System.getProperty("jboss.server.config.url");
-		URI uri = new URI(confDir);
-		confDir = uri.getPath();
-		String configFile = confDir + gatewayConfigFile;
-		System.setProperty("juddi.propertiesFile", confDir + "juddi.properties");
-		gatewayListController = new GatewayListenerController(configFile);
-		new Thread(gatewayListController).start();
-	}
-	/**
-	 * Stops the gateways.
-	 */
-	protected void stopService() throws Exception 
-	{
-		logger.info("shutting down message aware listener...");
-		gatewayListController.requestEnd();
-	}
-	/**
-	 * Gets the gateway config file. This can be set in the jboss-service.xml.
-	 */
-	public String getGatewayConfigFile() {
-		return gatewayConfigFile;
-	}
-	/**
-	 * Sets the gateway config file.
-	 */
-	public void setGatewayConfigFile(String gatewayConfigFile) {
-		this.gatewayConfigFile = gatewayConfigFile;
-	}
-
-	
-}
+/*
+ * 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.gateway;
+
+import java.net.URI;
+
+import org.apache.log4j.Logger;
+import org.jboss.system.ServiceMBeanSupport;
+/**
+ * Service to manage the gateways when deployed to the appserver.
+ * 
+ * @author Kurt Stam
+ *
+ */
+public class GatewayListenerControllerService extends ServiceMBeanSupport implements GatewayListenerControllerServiceMBean
+{
+	private GatewayListenerController	gatewayListController;
+	private Logger logger = Logger.getLogger(this.getClass());
+	private String gatewayConfigFile="jbossesb-gateway.xml";
+	/**
+	 * Starts the gateways.
+	 */
+	protected void startService() throws Exception 
+	{
+		logger.info("starting message aware listener with config file " + gatewayConfigFile);
+		String confDir = System.getProperty("jboss.server.config.url");
+		URI uri = new URI(confDir);
+		confDir = uri.getPath();
+		String configFile = confDir + gatewayConfigFile;
+		System.setProperty("juddi.propertiesFile", confDir + "juddi.properties");
+		gatewayListController = new GatewayListenerController(configFile);
+		new Thread(gatewayListController).start();
+	}
+	/**
+	 * Stops the gateways.
+	 */
+	protected void stopService() throws Exception 
+	{
+		logger.info("shutting down message aware listener...");
+		gatewayListController.requestEnd();
+	}
+	/**
+	 * Gets the gateway config file. This can be set in the jboss-service.xml.
+	 */
+	public String getGatewayConfigFile() {
+		return gatewayConfigFile;
+	}
+	/**
+	 * Sets the gateway config file.
+	 */
+	public void setGatewayConfigFile(String gatewayConfigFile) {
+		this.gatewayConfigFile = gatewayConfigFile;
+	}
+
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerService.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerServiceMBean.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerServiceMBean.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,35 +1,35 @@
-/*
- * 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.gateway;
-
-import org.jboss.system.ServiceMBean;
-/**
- * 
- * @author Kurt Stam
- *
- */
-public interface GatewayListenerControllerServiceMBean extends ServiceMBean
-{
-   // Configure getters and setters for the configFile attribute
-   String getGatewayConfigFile();
-   void setGatewayConfigFile(String messageAwareConfigFile);
-}
+/*
+ * 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.gateway;
+
+import org.jboss.system.ServiceMBean;
+/**
+ * 
+ * @author Kurt Stam
+ *
+ */
+public interface GatewayListenerControllerServiceMBean extends ServiceMBean
+{
+   // Configure getters and setters for the configFile attribute
+   String getGatewayConfigFile();
+   void setGatewayConfigFile(String messageAwareConfigFile);
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerServiceMBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,500 +1,500 @@
-/*
- * 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.gateway;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.Enumeration;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.couriers.Courier;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierFactory;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.NamingContext;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.services.registry.RegistryException;
-
-public class JmsGatewayListener implements Runnable
-{
-
-	public JmsGatewayListener (GatewayListenerController commandListener,
-			ConfigTree listenerConfig) throws ConfigurationException
-	{
-		_config = listenerConfig;
-		_controller = commandListener;
-		_sleepForRetries = 3000; // milliseconds TODO magic number
-		checkMyParms();
-	} // __________________________________
-
-	public void run ()
-	{
-		_logger
-				.debug("run() method of " + this.getClass().getSimpleName() + " started on thread " + Thread
-						.currentThread().getName());
-		if (null != _serviceName) try
-		{
-			_controller.register(_config, _myEpr);
-		}
-		catch (RegistryException e1)
-		{
-			_logger.warn("unable to register service", e1);
-		}
-
-		while (_controller.continueLooping())
-		{
-			javax.jms.Message msgIn = receiveOne();
-			if (null != msgIn)
-				try
-				{
-					Object obj = _processMethod.invoke(_composer,
-							new Object[] { msgIn });
-					if (null == obj)
-					{
-						_logger.warn("Action class method <" + _processMethod
-								.getName() + "> returned a null object");
-						continue;
-					}
-					// try to deliver the composed message, using the
-					// appropriate courier
-					// to the target service
-					try
-					{
-						boolean bSent = false;
-						for (EPR current : _targetEprs)
-						{
-							_courier = CourierFactory.getCourier(current);
-							if (_courier
-									.deliver((org.jboss.soa.esb.message.Message) obj))
-							{
-								bSent = true;
-								break;
-							}
-						}
-						if (!bSent)
-						{
-							String text = "Target service <" + _targetServiceCategory + "," + _targetServiceName + "> is not registered";
-							throw new Exception(text);
-						}
-					}
-					catch (ClassCastException e)
-					{
-						_logger.error("Action class method <" + _processMethod
-								.getName() + "> returned a non Message object",
-								e);
-						continue;
-					}
-					catch (CourierException e)
-					{
-						String text = (null != _courier) ? "Courier <" + _courier
-								.getClass().getName() + ".deliver(Message) FAILED" : "NULL courier can't deliver Message";
-						_logger.error(text, e);
-						continue;
-					}
-					continue;
-				}
-				catch (InvocationTargetException e)
-				{
-					_logger.error("Problems invoking method <" + _processMethod
-							.getName() + ">", e);
-				}
-				catch (IllegalAccessException e)
-				{
-					_logger.error("Problems invoking method <" + _processMethod
-							.getName() + ">", e);
-				}
-				catch (Exception e)
-				{
-					_logger.error("Unexpected problem", e);
-				}
-		}
-
-		if (null != _serviceName) try
-		{
-			_controller.unRegister(_serviceCategory, _serviceName, _myEpr);
-		}
-		catch (RegistryException e1)
-		{
-			_logger.warn("unable to unRegister service", e1);
-		}
-
-		if (null != _messageReceiver) try
-		{
-			_messageReceiver.close();
-		}
-		catch (Exception e1)
-		{/* Tried my best - Just continue */
-		}
-		if (null != _queueSession) try
-		{
-			_queueSession.close();
-		}
-		catch (Exception e1)
-		{/* Tried my best - Just continue */
-		}
-		if (null != _queueConnection) try
-		{
-			_queueConnection.close();
-		}
-		catch (Exception e2)
-		{/* Tried my best - Just continue */
-		}
-		_logger
-				.debug("run() method of " + this.getClass().getSimpleName() + " finished on thread " + Thread
-						.currentThread().getName());
-	} // ________________________________
-
-	/**
-	 * Check for mandatory and optional attributes in parameter tree
-	 * 
-	 * @throws ConfigurationException -
-	 *             if mandatory atts are not right or actionClass not in
-	 *             classpath
-	 */
-	protected void checkMyParms () throws ConfigurationException
-	{
-		try
-		{
-			// Third arg is null - Exception will be thrown if attribute is not
-			// found
-			_targetServiceCategory = _controller.obtainAtt(_config,
-					ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, null);
-			_targetServiceName = _controller.obtainAtt(_config,
-					ListenerTagNames.TARGET_SERVICE_NAME_TAG, null);
-			_targetEprs = _controller.getEprs(_targetServiceCategory,
-					_targetServiceName);
-			if (null == _targetEprs || _targetEprs.size() < 1)
-				throw new ConfigurationException(
-						"EPR <" + _targetServiceName + "> not found in registry");
-	
-			_queueName = _controller.obtainAtt(_config,
-					JMSEpr.DESTINATION_NAME_TAG, null);
-	
-			resolveComposerClass();
-	
-			// No problem if selector is null - everything in queue will be returned
-			_messageSelector = _config.getAttribute(JMSEpr.MESSAGE_SELECTOR_TAG);
-			_logger
-					.debug("No value specified for: " + JMSEpr.MESSAGE_SELECTOR_TAG + " - All messages in queue will be received by this listener");
-	
-			prepareMessageReceiver();
-		}
-		catch (JMSException ex)
-		{
-			_logger.warn("Received underlying JMS exception from prepareMessageReceiver.", ex);
-			
-			throw new ConfigurationException(ex);
-		}
-		catch (RegistryException ex)
-		{
-			_logger.warn("Problem with registry.", ex);
-			
-			throw new ConfigurationException(ex);
-		}
-	} // ________________________________
-
-	protected void resolveComposerClass () throws ConfigurationException
-	{
-		try
-		{
-			// Look for first "action" element - only first one will be used
-			String tagName = ListenerTagNames.ACTION_ELEMENT_TAG;
-			ConfigTree actionElement = _config.getFirstChild(tagName);
-			String sProcessMethod = null;
-			if (null != actionElement)
-			{ // class attribute
-				_composerName = _controller.obtainAtt(actionElement,
-						ListenerTagNames.ACTION_CLASS_TAG, null);
-				_composerClass = Class.forName(_composerName);
-				Constructor oConst = _composerClass
-						.getConstructor(new Class[] { ConfigTree.class });
-				_composer = oConst.newInstance(_config);
-				tagName = ListenerTagNames.PROCESS_METHOD_TAG;
-				sProcessMethod = _controller.obtainAtt(_config, tagName, tagName);
-			}
-			else
-			{
-				_composerName = PackageJmsMessageContents.class.getName();
-				_composerClass = PackageJmsMessageContents.class;
-				_composer = new PackageJmsMessageContents();
-				sProcessMethod = "process";
-				_logger
-						.warn("No <" + ListenerTagNames.ACTION_ELEMENT_TAG + "> element found in cofiguration" + " -  Using default composer class : " + _composerName);
-			}
-	
-			_processMethod = _composerClass.getMethod(sProcessMethod,
-					new Class[] { Object.class });
-		}
-		catch (Exception ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-	} // ________________________________
-
-	private void prepareMessageReceiver () throws ConfigurationException, JMSException
-	{
-		_queueConnection = null;
-		_queueSession = null;
-		_queue = null;
-
-		String sJndiURL = _controller.obtainAtt(_config, JMSEpr.JNDI_URL_TAG,
-				NamingContext.JBOSS_PROVIDER_URL);
-		if (null == _config.getAttribute(JMSEpr.JNDI_URL_TAG))
-			_logger
-					.debug("No value specified for " + JMSEpr.JNDI_URL_TAG + " attribute" + " -  Using default of: '" + sJndiURL + "'");
-		String sJndiContextFactory = _controller.obtainAtt(_config,
-				JMSEpr.JNDI_CONTEXT_FACTORY_TAG,
-				NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY);
-		if (null == _config.getAttribute(JMSEpr.JNDI_CONTEXT_FACTORY_TAG))
-			_logger
-					.debug("No value specified for " + JMSEpr.JNDI_CONTEXT_FACTORY_TAG + " attribute" + " -  Using default of: '" + sJndiContextFactory + "'");
-		String sJndiPkgPrefix = _controller.obtainAtt(_config,
-				JMSEpr.JNDI_PKG_PREFIX_TAG, NamingContext.JBOSS_PROVIDER_URL);
-		if (null == _config.getAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG))
-			_logger
-					.debug("No value specified for " + JMSEpr.JNDI_PKG_PREFIX_TAG + " attribute" + " -  Using default of: '" + sJndiPkgPrefix + "'");
-		Context oJndiCtx = NamingContext.getServerContext(sJndiURL,
-				sJndiContextFactory, sJndiPkgPrefix);
-		if (null == oJndiCtx)
-			throw new ConfigurationException(
-					"Unable fo obtain jndi context <" + sJndiURL + "," + sJndiContextFactory + "," + sJndiPkgPrefix + ">");
-
-		String sFactClass = _controller.obtainAtt(_config,
-				JMSEpr.CONNECTION_FACTORY_TAG, "ConnectionFactory");
-		if (null == _config.getAttribute(JMSEpr.CONNECTION_FACTORY_TAG))
-			_logger
-					.debug("No value specified for " + JMSEpr.CONNECTION_FACTORY_TAG + " attribute" + " -  Using default of: '" + sFactClass + "'");
-		_serviceCategory = _config
-				.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
-		_serviceName = _config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
-		_myEpr = (null == _serviceName) ? null : new JMSEpr(JMSEpr.QUEUE_TYPE,
-				_queueName, sFactClass, sJndiURL, sJndiContextFactory,
-				sJndiPkgPrefix, _messageSelector);
-		
-		Object tmp = null;
-		
-		try
-		{
-			tmp = oJndiCtx.lookup(sFactClass);
-		}
-		catch (NamingException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-		
-		QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-
-		_queueConnection = qcf.createQueueConnection();
-		_queueSession = _queueConnection.createQueueSession(false,
-				QueueSession.AUTO_ACKNOWLEDGE);
-		try
-		{
-			_queue = (Queue) oJndiCtx.lookup(_queueName);
-		}
-		catch (NamingException ne)
-		{
-			_queue = _queueSession.createQueue(_queueName);
-		}
-		_queueConnection.start();
-
-		_messageReceiver = _queueSession.createReceiver(_queue,
-				_messageSelector);
-
-	} // ________________________________
-
-	/**
-	 * Receive one message and retry if connection
-	 * 
-	 * @return javax.jms.Message - One input message, or null
-	 */
-	protected javax.jms.Message receiveOne ()
-	{
-		while (_controller.continueLooping())
-			try
-			{
-				long lWait = _controller.millisToWait();
-				if (lWait < 1) return null;
-				javax.jms.Message ret = _messageReceiver.receive(Math.min(
-						lWait, 100));
-				if (null != ret) return ret;
-				try
-				{
-					Thread.sleep(100);
-				}
-				catch (InterruptedException e)
-				{
-					break;
-				}
-			}
-			catch (JMSException oJ)
-			{
-				_logger
-						.error(
-								"JMS error on receive.  Attempting JMS Destination reconnect.",
-								oJ);
-				try
-				{
-					prepareMessageReceiver();
-				}
-				// try to reconnect to the queue
-				catch (Exception e)
-				{
-					_logger.error("Reconnecting to Queue", e);
-					try
-					{
-						Thread.sleep(_sleepForRetries);
-					}
-					catch (InterruptedException e1)
-					{ // Just return
-						_logger.error("Unexpected thread interupt exception.",
-								e);
-						return null;
-					}
-				}
-			}
-		return null;
-	} // ________________________________
-
-	/**
-	 * Default gateway action for plain jms messages <p/>It will just drop the
-	 * jms message contents into a esb Message
-	 * 
-	 * @author <a
-	 *         href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
-	 * @since Version 4.0
-	 * 
-	 */
-	private static class PackageJmsMessageContents
-	{
-		@SuppressWarnings("unchecked")
-		public Message process (Object obj) throws JMSException, IOException
-		{
-			if (!(obj instanceof javax.jms.Message))
-				throw new IllegalArgumentException(
-						"Object must be instance of javax.jms.Message");
-			byte[] bytes = getMessageContent((javax.jms.Message) obj);
-			if (null == bytes) return null;
-
-			javax.jms.Message jmsMsg = (javax.jms.Message) obj;
-			Message message = MessageFactory.getInstance().getMessage();
-			message.getBody().setContents(getMessageContent(jmsMsg));
-			Enumeration<String> EE = jmsMsg.getPropertyNames();
-			if (null != EE)
-			{
-				while (EE.hasMoreElements())
-				{
-					String name = EE.nextElement();
-					Object value = jmsMsg.getObjectProperty(name);
-					if (null != value)
-						message.getProperties().setProperty(name, value);
-				}
-			}
-			return message;
-		}
-
-		private byte[] getMessageContent (javax.jms.Message jMess) throws JMSException, IOException
-		{
-			if (jMess instanceof TextMessage)
-				return ((TextMessage) jMess).getText().getBytes();
-
-			if (jMess instanceof BytesMessage)
-			{
-				BytesMessage jBytes = (BytesMessage) jMess;
-				ByteArrayOutputStream out = new ByteArrayOutputStream();
-				byte[] ba = new byte[1000];
-				int iQread;
-				while (-1 != (iQread = jBytes.readBytes(ba)))
-					if (iQread > 0) out.write(ba, 0, iQread);
-				out.close();
-				return out.toByteArray();
-			}
-
-			if (jMess instanceof ObjectMessage)
-				return ((ObjectMessage) jMess).getObject().toString()
-						.getBytes();
-			_logger
-					.warn("Message type " + jMess.getClass().getSimpleName() + " not supported - Message is ignored");
-			return null;
-		}
-	} // ____________________________________________________
-
-	protected final static Logger _logger = Logger
-			.getLogger(JmsGatewayListener.class);
-
-	protected String _queueName;
-
-	protected QueueConnection _queueConnection;
-
-	protected QueueSession _queueSession;
-
-	protected Queue _queue;
-
-	protected MessageConsumer _messageReceiver;
-
-	protected String _messageSelector;
-
-	protected ConfigTree _config;
-
-	protected GatewayListenerController _controller;
-
-	protected final long _sleepForRetries; // milliseconds
-
-	protected String _serviceCategory, _serviceName;
-
-	protected String _targetServiceCategory, _targetServiceName;
-
-	protected EPR _myEpr;
-
-	protected Collection<EPR> _targetEprs;
-
-	protected String _composerName;
-
-	protected Class _composerClass;
-
-	protected Object _composer;
-
-	protected Method _processMethod;
-
-	protected Courier _courier;
-}
+/*
+ * 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.gateway;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.Enumeration;
+
+import javax.jms.BytesMessage;
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.couriers.Courier;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierFactory;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.registry.RegistryException;
+
+public class JmsGatewayListener implements Runnable
+{
+
+	public JmsGatewayListener (GatewayListenerController commandListener,
+			ConfigTree listenerConfig) throws ConfigurationException
+	{
+		_config = listenerConfig;
+		_controller = commandListener;
+		_sleepForRetries = 3000; // milliseconds TODO magic number
+		checkMyParms();
+	} // __________________________________
+
+	public void run ()
+	{
+		_logger
+				.debug("run() method of " + this.getClass().getSimpleName() + " started on thread " + Thread
+						.currentThread().getName());
+		if (null != _serviceName) try
+		{
+			_controller.register(_config, _myEpr);
+		}
+		catch (RegistryException e1)
+		{
+			_logger.warn("unable to register service", e1);
+		}
+
+		while (_controller.continueLooping())
+		{
+			javax.jms.Message msgIn = receiveOne();
+			if (null != msgIn)
+				try
+				{
+					Object obj = _processMethod.invoke(_composer,
+							new Object[] { msgIn });
+					if (null == obj)
+					{
+						_logger.warn("Action class method <" + _processMethod
+								.getName() + "> returned a null object");
+						continue;
+					}
+					// try to deliver the composed message, using the
+					// appropriate courier
+					// to the target service
+					try
+					{
+						boolean bSent = false;
+						for (EPR current : _targetEprs)
+						{
+							_courier = CourierFactory.getCourier(current);
+							if (_courier
+									.deliver((org.jboss.soa.esb.message.Message) obj))
+							{
+								bSent = true;
+								break;
+							}
+						}
+						if (!bSent)
+						{
+							String text = "Target service <" + _targetServiceCategory + "," + _targetServiceName + "> is not registered";
+							throw new Exception(text);
+						}
+					}
+					catch (ClassCastException e)
+					{
+						_logger.error("Action class method <" + _processMethod
+								.getName() + "> returned a non Message object",
+								e);
+						continue;
+					}
+					catch (CourierException e)
+					{
+						String text = (null != _courier) ? "Courier <" + _courier
+								.getClass().getName() + ".deliver(Message) FAILED" : "NULL courier can't deliver Message";
+						_logger.error(text, e);
+						continue;
+					}
+					continue;
+				}
+				catch (InvocationTargetException e)
+				{
+					_logger.error("Problems invoking method <" + _processMethod
+							.getName() + ">", e);
+				}
+				catch (IllegalAccessException e)
+				{
+					_logger.error("Problems invoking method <" + _processMethod
+							.getName() + ">", e);
+				}
+				catch (Exception e)
+				{
+					_logger.error("Unexpected problem", e);
+				}
+		}
+
+		if (null != _serviceName) try
+		{
+			_controller.unRegister(_serviceCategory, _serviceName, _myEpr);
+		}
+		catch (RegistryException e1)
+		{
+			_logger.warn("unable to unRegister service", e1);
+		}
+
+		if (null != _messageReceiver) try
+		{
+			_messageReceiver.close();
+		}
+		catch (Exception e1)
+		{/* Tried my best - Just continue */
+		}
+		if (null != _queueSession) try
+		{
+			_queueSession.close();
+		}
+		catch (Exception e1)
+		{/* Tried my best - Just continue */
+		}
+		if (null != _queueConnection) try
+		{
+			_queueConnection.close();
+		}
+		catch (Exception e2)
+		{/* Tried my best - Just continue */
+		}
+		_logger
+				.debug("run() method of " + this.getClass().getSimpleName() + " finished on thread " + Thread
+						.currentThread().getName());
+	} // ________________________________
+
+	/**
+	 * Check for mandatory and optional attributes in parameter tree
+	 * 
+	 * @throws ConfigurationException -
+	 *             if mandatory atts are not right or actionClass not in
+	 *             classpath
+	 */
+	protected void checkMyParms () throws ConfigurationException
+	{
+		try
+		{
+			// Third arg is null - Exception will be thrown if attribute is not
+			// found
+			_targetServiceCategory = _controller.obtainAtt(_config,
+					ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, null);
+			_targetServiceName = _controller.obtainAtt(_config,
+					ListenerTagNames.TARGET_SERVICE_NAME_TAG, null);
+			_targetEprs = _controller.getEprs(_targetServiceCategory,
+					_targetServiceName);
+			if (null == _targetEprs || _targetEprs.size() < 1)
+				throw new ConfigurationException(
+						"EPR <" + _targetServiceName + "> not found in registry");
+	
+			_queueName = _controller.obtainAtt(_config,
+					JMSEpr.DESTINATION_NAME_TAG, null);
+	
+			resolveComposerClass();
+	
+			// No problem if selector is null - everything in queue will be returned
+			_messageSelector = _config.getAttribute(JMSEpr.MESSAGE_SELECTOR_TAG);
+			_logger
+					.debug("No value specified for: " + JMSEpr.MESSAGE_SELECTOR_TAG + " - All messages in queue will be received by this listener");
+	
+			prepareMessageReceiver();
+		}
+		catch (JMSException ex)
+		{
+			_logger.warn("Received underlying JMS exception from prepareMessageReceiver.", ex);
+			
+			throw new ConfigurationException(ex);
+		}
+		catch (RegistryException ex)
+		{
+			_logger.warn("Problem with registry.", ex);
+			
+			throw new ConfigurationException(ex);
+		}
+	} // ________________________________
+
+	protected void resolveComposerClass () throws ConfigurationException
+	{
+		try
+		{
+			// Look for first "action" element - only first one will be used
+			String tagName = ListenerTagNames.ACTION_ELEMENT_TAG;
+			ConfigTree actionElement = _config.getFirstChild(tagName);
+			String sProcessMethod = null;
+			if (null != actionElement)
+			{ // class attribute
+				_composerName = _controller.obtainAtt(actionElement,
+						ListenerTagNames.ACTION_CLASS_TAG, null);
+				_composerClass = Class.forName(_composerName);
+				Constructor oConst = _composerClass
+						.getConstructor(new Class[] { ConfigTree.class });
+				_composer = oConst.newInstance(_config);
+				tagName = ListenerTagNames.PROCESS_METHOD_TAG;
+				sProcessMethod = _controller.obtainAtt(_config, tagName, tagName);
+			}
+			else
+			{
+				_composerName = PackageJmsMessageContents.class.getName();
+				_composerClass = PackageJmsMessageContents.class;
+				_composer = new PackageJmsMessageContents();
+				sProcessMethod = "process";
+				_logger
+						.warn("No <" + ListenerTagNames.ACTION_ELEMENT_TAG + "> element found in cofiguration" + " -  Using default composer class : " + _composerName);
+			}
+	
+			_processMethod = _composerClass.getMethod(sProcessMethod,
+					new Class[] { Object.class });
+		}
+		catch (Exception ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+	} // ________________________________
+
+	private void prepareMessageReceiver () throws ConfigurationException, JMSException
+	{
+		_queueConnection = null;
+		_queueSession = null;
+		_queue = null;
+
+		String sJndiURL = _controller.obtainAtt(_config, JMSEpr.JNDI_URL_TAG,
+				NamingContext.JBOSS_PROVIDER_URL);
+		if (null == _config.getAttribute(JMSEpr.JNDI_URL_TAG))
+			_logger
+					.debug("No value specified for " + JMSEpr.JNDI_URL_TAG + " attribute" + " -  Using default of: '" + sJndiURL + "'");
+		String sJndiContextFactory = _controller.obtainAtt(_config,
+				JMSEpr.JNDI_CONTEXT_FACTORY_TAG,
+				NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY);
+		if (null == _config.getAttribute(JMSEpr.JNDI_CONTEXT_FACTORY_TAG))
+			_logger
+					.debug("No value specified for " + JMSEpr.JNDI_CONTEXT_FACTORY_TAG + " attribute" + " -  Using default of: '" + sJndiContextFactory + "'");
+		String sJndiPkgPrefix = _controller.obtainAtt(_config,
+				JMSEpr.JNDI_PKG_PREFIX_TAG, NamingContext.JBOSS_PROVIDER_URL);
+		if (null == _config.getAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG))
+			_logger
+					.debug("No value specified for " + JMSEpr.JNDI_PKG_PREFIX_TAG + " attribute" + " -  Using default of: '" + sJndiPkgPrefix + "'");
+		Context oJndiCtx = NamingContext.getServerContext(sJndiURL,
+				sJndiContextFactory, sJndiPkgPrefix);
+		if (null == oJndiCtx)
+			throw new ConfigurationException(
+					"Unable fo obtain jndi context <" + sJndiURL + "," + sJndiContextFactory + "," + sJndiPkgPrefix + ">");
+
+		String sFactClass = _controller.obtainAtt(_config,
+				JMSEpr.CONNECTION_FACTORY_TAG, "ConnectionFactory");
+		if (null == _config.getAttribute(JMSEpr.CONNECTION_FACTORY_TAG))
+			_logger
+					.debug("No value specified for " + JMSEpr.CONNECTION_FACTORY_TAG + " attribute" + " -  Using default of: '" + sFactClass + "'");
+		_serviceCategory = _config
+				.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+		_serviceName = _config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+		_myEpr = (null == _serviceName) ? null : new JMSEpr(JMSEpr.QUEUE_TYPE,
+				_queueName, sFactClass, sJndiURL, sJndiContextFactory,
+				sJndiPkgPrefix, _messageSelector);
+		
+		Object tmp = null;
+		
+		try
+		{
+			tmp = oJndiCtx.lookup(sFactClass);
+		}
+		catch (NamingException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+		
+		QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+
+		_queueConnection = qcf.createQueueConnection();
+		_queueSession = _queueConnection.createQueueSession(false,
+				QueueSession.AUTO_ACKNOWLEDGE);
+		try
+		{
+			_queue = (Queue) oJndiCtx.lookup(_queueName);
+		}
+		catch (NamingException ne)
+		{
+			_queue = _queueSession.createQueue(_queueName);
+		}
+		_queueConnection.start();
+
+		_messageReceiver = _queueSession.createReceiver(_queue,
+				_messageSelector);
+
+	} // ________________________________
+
+	/**
+	 * Receive one message and retry if connection
+	 * 
+	 * @return javax.jms.Message - One input message, or null
+	 */
+	protected javax.jms.Message receiveOne ()
+	{
+		while (_controller.continueLooping())
+			try
+			{
+				long lWait = _controller.millisToWait();
+				if (lWait < 1) return null;
+				javax.jms.Message ret = _messageReceiver.receive(Math.min(
+						lWait, 100));
+				if (null != ret) return ret;
+				try
+				{
+					Thread.sleep(100);
+				}
+				catch (InterruptedException e)
+				{
+					break;
+				}
+			}
+			catch (JMSException oJ)
+			{
+				_logger
+						.error(
+								"JMS error on receive.  Attempting JMS Destination reconnect.",
+								oJ);
+				try
+				{
+					prepareMessageReceiver();
+				}
+				// try to reconnect to the queue
+				catch (Exception e)
+				{
+					_logger.error("Reconnecting to Queue", e);
+					try
+					{
+						Thread.sleep(_sleepForRetries);
+					}
+					catch (InterruptedException e1)
+					{ // Just return
+						_logger.error("Unexpected thread interupt exception.",
+								e);
+						return null;
+					}
+				}
+			}
+		return null;
+	} // ________________________________
+
+	/**
+	 * Default gateway action for plain jms messages <p/>It will just drop the
+	 * jms message contents into a esb Message
+	 * 
+	 * @author <a
+	 *         href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+	 * @since Version 4.0
+	 * 
+	 */
+	private static class PackageJmsMessageContents
+	{
+		@SuppressWarnings("unchecked")
+		public Message process (Object obj) throws JMSException, IOException
+		{
+			if (!(obj instanceof javax.jms.Message))
+				throw new IllegalArgumentException(
+						"Object must be instance of javax.jms.Message");
+			byte[] bytes = getMessageContent((javax.jms.Message) obj);
+			if (null == bytes) return null;
+
+			javax.jms.Message jmsMsg = (javax.jms.Message) obj;
+			Message message = MessageFactory.getInstance().getMessage();
+			message.getBody().setContents(getMessageContent(jmsMsg));
+			Enumeration<String> EE = jmsMsg.getPropertyNames();
+			if (null != EE)
+			{
+				while (EE.hasMoreElements())
+				{
+					String name = EE.nextElement();
+					Object value = jmsMsg.getObjectProperty(name);
+					if (null != value)
+						message.getProperties().setProperty(name, value);
+				}
+			}
+			return message;
+		}
+
+		private byte[] getMessageContent (javax.jms.Message jMess) throws JMSException, IOException
+		{
+			if (jMess instanceof TextMessage)
+				return ((TextMessage) jMess).getText().getBytes();
+
+			if (jMess instanceof BytesMessage)
+			{
+				BytesMessage jBytes = (BytesMessage) jMess;
+				ByteArrayOutputStream out = new ByteArrayOutputStream();
+				byte[] ba = new byte[1000];
+				int iQread;
+				while (-1 != (iQread = jBytes.readBytes(ba)))
+					if (iQread > 0) out.write(ba, 0, iQread);
+				out.close();
+				return out.toByteArray();
+			}
+
+			if (jMess instanceof ObjectMessage)
+				return ((ObjectMessage) jMess).getObject().toString()
+						.getBytes();
+			_logger
+					.warn("Message type " + jMess.getClass().getSimpleName() + " not supported - Message is ignored");
+			return null;
+		}
+	} // ____________________________________________________
+
+	protected final static Logger _logger = Logger
+			.getLogger(JmsGatewayListener.class);
+
+	protected String _queueName;
+
+	protected QueueConnection _queueConnection;
+
+	protected QueueSession _queueSession;
+
+	protected Queue _queue;
+
+	protected MessageConsumer _messageReceiver;
+
+	protected String _messageSelector;
+
+	protected ConfigTree _config;
+
+	protected GatewayListenerController _controller;
+
+	protected final long _sleepForRetries; // milliseconds
+
+	protected String _serviceCategory, _serviceName;
+
+	protected String _targetServiceCategory, _targetServiceName;
+
+	protected EPR _myEpr;
+
+	protected Collection<EPR> _targetEprs;
+
+	protected String _composerName;
+
+	protected Class _composerClass;
+
+	protected Object _composer;
+
+	protected Method _processMethod;
+
+	protected Courier _courier;
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,841 +1,841 @@
-/*
- * 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.gateway;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.sql.DataSource;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.couriers.Courier;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierFactory;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.persist.JdbcCleanConn;
-import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.util.Util;
-
-/**
- * 
- * Polls an SQL table for rows that satisfy conditions defined in the xml
- * runtime configuration
- * 
- * <p/>When a row that matches conditions is retrieved, it's contents are packed
- * into an ESB Message and
- * 
- * <p/> The following fields are mandatory (see checkMyParms()): <br/> <br/>SQL
- * table name <br/>list of fields to retrieve <br/>list of key fields to use in
- * the update statement <br/>a field that will be used to mark a row as
- * 'pending(p)', 'in process(w)', 'done(d)' or 'in error(e)'
- * 
- * @author <a
- *         href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @since Version 4.0
- * 
- */
-public class SqlTableGatewayListener implements Runnable
-{
-
-	public SqlTableGatewayListener (GatewayListenerController commandListener,
-			ConfigTree config) throws ConfigurationException
-	{
-		_config = config;
-		_controller = commandListener;
-		_sleepBetweenPolls = 10000; // milliseconds TODO magic number
-		checkMyParms();
-	} // __________________________________
-
-	public void run ()
-	{
-		_logger
-				.debug("run() method of " + this.getClass().getSimpleName() + " started on thread " + Thread
-						.currentThread().getName());
-
-		if (null != _serviceName)
-		{
-			try
-			{
-				_controller.register(_config, _myEpr);
-			}
-			catch (RegistryException e1)
-			{
-				_logger.warn("unable to register service", e1);
-			}
-		}
-
-		boolean bSleep = false;
-
-		while (_controller.continueLooping())
-		{
-			// only sleep in between - not the first time
-			if (bSleep)
-			{
-				long lUntil = System.currentTimeMillis() + _sleepBetweenPolls;
-				while (System.currentTimeMillis() < lUntil)
-				{
-					try
-					{
-						// TODO magic number
-
-						Thread.sleep(1000);
-					}
-					catch (InterruptedException e)
-					{
-						lUntil = 0;
-					}
-					if (!_controller.continueLooping()) break;
-				}
-			}
-			else
-				bSleep = true;
-
-			if (!_controller.continueLooping()) break;
-
-			for (Map<String, Object> row : pollForCandidates())
-			{
-				_currentRow = row;
-				// Try to mark as 'in process' - if unsuccessful, somebody else
-				// got it first
-				if (!changeStatusToWorking()) continue;
-
-				Throwable thrown = null;
-				String text = null;
-				try
-				{
-					Object obj = _processMethod.invoke(_composer,
-							new Object[] { _currentRow });
-					if (null == obj)
-					{
-						_logger.warn("Action class method <" + _processMethod
-								.getName() + "> returned a null object");
-						continue;
-					}
-					Message message = (Message) obj;
-
-					// if(_composerClass.equals(PackageRowContents.class))
-					// {
-					// Properties props = message.getProperties();
-					// props.setProperty(JDBCEpr.DRIVER_TAG ,_driver);
-					// props.setProperty(JDBCEpr.URL_TAG ,_url);
-					// props.setProperty(JDBCEpr.USERNAME_TAG ,_user);
-					// props.setProperty(JDBCEpr.PASSWORD_TAG , _password);
-					//	        			
-					// }
-					boolean bSent = false;
-					for (EPR current : _targetEprs)
-					{
-						_courier = CourierFactory.getCourier(current);
-						if (_courier.deliver(message))
-						{
-							bSent = true;
-							break;
-						}
-					}
-					if (!bSent)
-					{
-						text = "Target service <" + _targetServiceCategory + "," + _targetServiceName + "> is not registered";
-						thrown = new Exception(text);
-					}
-				}
-				catch (InvocationTargetException e)
-				{
-					thrown = e;
-					text = "Problems invoking method <" + _processMethod
-							.getName() + ">";
-				}
-				catch (IllegalAccessException e)
-				{
-					thrown = e;
-					text = "Problems invoking method <" + _processMethod
-							.getName() + ">";
-				}
-				catch (ClassCastException e)
-				{
-					thrown = e;
-					text = "Action class method <" + _processMethod.getName() + "> returned a non Message object";
-				}
-				catch (CourierException e)
-				{
-					thrown = e;
-					text = "Courier <" + _courier.getClass().getName() + ".deliver(Message) FAILED";
-				}
-				catch (MalformedEPRException ex)
-				{
-					thrown = ex;
-					text = "Courier <" + _courier.getClass().getName() + ".deliver(Message) FAILED with malformed EPR.";
-				}
-
-				if (null == thrown)
-				{
-					if (_deleteAfterOK) deleteCurrentRow();
-					else
-						changeStatusToDone();
-				}
-				else
-				{
-					thrown.printStackTrace();
-					_logger.error(text, thrown);
-					changeStatusToError();
-				}
-			}
-		}
-
-		if (null != _serviceName)
-		{
-			try
-			{
-				_controller.unRegister(_serviceCategory, _serviceName, _myEpr);
-			}
-			catch (RegistryException e1)
-			{
-				_logger.warn("unable to unRegister service", e1);
-			}
-		}
-
-		if (null != _dbConn) _dbConn.release();
-		_logger
-				.debug("run() method of " + this.getClass().getSimpleName() + " finished on thread " + Thread
-						.currentThread().getName());
-	} // ________________________________
-
-	/**
-	 * Check for mandatory and optional attributes in parameter tree
-	 * 
-	 * @throws ConfigurationException -
-	 *             if mandatory atts are not right or actionClass not in
-	 *             classpath
-	 */
-	protected void checkMyParms () throws ConfigurationException
-	{
-		try
-		{
-			// Third arg is null - Exception will be thrown if attribute is not
-			// found
-			_targetServiceCategory = _controller.obtainAtt(_config,
-					ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, null);
-			_targetServiceName = _controller.obtainAtt(_config,
-					ListenerTagNames.TARGET_SERVICE_NAME_TAG, null);
-			_targetEprs = _controller.getEprs(_targetServiceCategory,
-					_targetServiceName);
-			if (null == _targetEprs || _targetEprs.size() < 1)
-				throw new ConfigurationException(
-						"EPR <" + _targetServiceName + "> not found in registry");
-	
-			// Polling interval
-			String sAux = _config
-					.getAttribute(ListenerTagNames.POLL_LATENCY_SECS_TAG);
-	
-			if (!Util.isNullString(sAux))
-			{
-				try
-				{
-					_sleepBetweenPolls = 1000 * Long.parseLong(sAux);
-				}
-				catch (NumberFormatException e)
-				{
-					_logger
-							.warn("Invalid poll latency - keeping default of " + (_sleepBetweenPolls / 1000));
-				}
-			}
-			else
-			{
-				_logger
-						.warn("No value specified for: " + ListenerTagNames.POLL_LATENCY_SECS_TAG + " -  Using default of " + (_sleepBetweenPolls / 1000));
-			}
-	
-			resolveComposerClass();
-	
-			_driver = _controller.obtainAtt(_config, JDBCEpr.DRIVER_TAG, null);
-			_url = _controller.obtainAtt(_config, JDBCEpr.URL_TAG, null);
-			_user = _controller.obtainAtt(_config, JDBCEpr.USERNAME_TAG, null);
-			_password = _controller.obtainAtt(_config, JDBCEpr.PASSWORD_TAG, "");
-	
-			_tableName = _config.getAttribute(ListenerTagNames.SQL_TABLE_NAME_TAG);
-			if (null == _tableName)
-				_tableName = _config.getAttribute(JDBCEpr.TABLE_NAME_TAG, null);
-			if (Util.isNullString(_tableName))
-				throw new ConfigurationException("Empty or invalid table name");
-	
-			_selectFields = _controller.obtainAtt(_config,
-					ListenerTagNames.SQL_SELECT_FIELDS_TAG, "*");
-			if (Util.isNullString(_selectFields))
-				throw new ConfigurationException(
-						"Empty or invalid list of select fields");
-			_keyFields = _config.getAttribute(ListenerTagNames.SQL_KEY_FIELDS_TAG);
-			if (null == _keyFields)
-				_keyFields = _config.getAttribute(JDBCEpr.MESSAGE_ID_COLUMN_TAG,
-						null);
-			if (Util.isNullString(_keyFields))
-				throw new ConfigurationException(
-						"Empty or invalid list of key fields");
-			_inProcessField = _config
-					.getAttribute(ListenerTagNames.SQL_IN_PROCESS_FIELD_TAG);
-			if (null == _inProcessField)
-				_inProcessField = _config.getAttribute(JDBCEpr.STATUS_COLUMN_TAG);
-			if (Util.isNullString(_inProcessField))
-				throw new ConfigurationException(
-						"A valid inProcessField attribute must be specified");
-	
-			_where = _controller.obtainAtt(_config,
-					ListenerTagNames.SQL_WHERE_CONDITION_TAG, "");
-			if (_where.trim().length() < 1)
-				_logger
-						.debug("No value specified for: " + ListenerTagNames.SQL_WHERE_CONDITION_TAG);
-			_orderBy = _controller.obtainAtt(_config,
-					ListenerTagNames.SQL_ORDER_BY_TAG, "");
-			if (_orderBy.trim().length() < 1)
-				_logger
-						.debug("No value specified for: " + ListenerTagNames.SQL_ORDER_BY_TAG);
-			_inProcessVals = _controller.obtainAtt(_config,
-					ListenerTagNames.SQL_IN_PROCESS_VALUES_TAG,
-					DEFAULT_IN_PROCESS_STATES);
-	
-			_deleteAfterOK = Boolean.parseBoolean(_controller.obtainAtt(_config,
-					ListenerTagNames.SQL_POST_DEL_TAG, "false"));
-			if (null == _config.getAttribute(ListenerTagNames.SQL_POST_DEL_TAG))
-				_logger
-						.debug("No value specified for: " + ListenerTagNames.SQL_POST_DEL_TAG + " - trigger row will not be deleted - 'in process field' will be used to show processing status");
-	
-			if (_inProcessVals.length() < 4)
-				throw new ConfigurationException(
-						"Parameter <" + ListenerTagNames.SQL_IN_PROCESS_VALUES_TAG + "> must be at least 4 characters long (PWED)");
-	
-			_columns = _selectFields.split(",");
-			if (_columns.length < 1)
-				throw new ConfigurationException("Empty list of select fields");
-	
-			_keys = _keyFields.split(",");
-			if (!"*".equals(_selectFields))
-			{
-				Set<String> colSet = new HashSet<String>(Arrays.asList(_columns));
-				if (_keys.length < 1)
-					throw new ConfigurationException("Empty list of keyFields");
-				for (String currKey : _keys)
-				{
-					if (colSet.contains(currKey)) continue;
-					else
-					{
-						StringBuilder sb = new StringBuilder().append(
-								"All key field names in the <").append(
-								ListenerTagNames.SQL_KEY_FIELDS_TAG).append(
-								"> attribute must be in the ").append(
-								ListenerTagNames.SQL_SELECT_FIELDS_TAG).append(
-								"list - '").append(currKey)
-								.append("' is not there");
-						;
-						throw new ConfigurationException(sb.toString());
-					}
-				}
-			}
-			prepareStatements();
-		}
-		catch (RegistryException ex)
-		{
-			_logger.error("Could not contact Registry during configuration.", ex);
-			
-			throw new ConfigurationException(ex);
-		}
-	} // ________________________________
-
-	protected void prepareStatements () throws ConfigurationException
-	{
-		try
-		{
-			_PSscan = getDbConn().prepareStatement(scanStatement());
-			_PSsel4U = getDbConn().prepareStatement(selectForUpdStatement());
-			_PSupdate = getDbConn().prepareStatement(updateStatement());
-			_PSdeleteRow = getDbConn().prepareStatement(deleteStatement());
-			return;
-		}
-		catch (Exception e)
-		{
-			throw new ConfigurationException(e);
-		}
-	} // ________________________________
-
-	/*
-	 * Throw ConfigurationException for anything to do with setup. Ultimately
-	 * could do with finer grained error handling. Probably need different types
-	 * of setup exceptions.
-	 */
-	
-	protected void resolveComposerClass () throws ConfigurationException
-	{
-		try
-		{
-			// Look for first "action" element - only first one will be used
-			String tagName = ListenerTagNames.ACTION_ELEMENT_TAG;
-			ConfigTree actionElement = _config.getFirstChild(tagName);
-			String sProcessMethod = null;
-			if (null != actionElement)
-			{ // class attribute
-				_composerName = _controller.obtainAtt(actionElement,
-						ListenerTagNames.ACTION_CLASS_TAG, null);
-				_composerClass = Class.forName(_composerName);
-				Constructor oConst = _composerClass
-						.getConstructor(new Class[] { ConfigTree.class });
-				_composer = oConst.newInstance(_config);
-				tagName = ListenerTagNames.PROCESS_METHOD_TAG;
-				sProcessMethod = _controller.obtainAtt(_config, tagName, tagName);
-			}
-			else
-			{
-				_composerName = PackageRowContents.class.getName();
-				_composerClass = PackageRowContents.class;
-				_composer = new PackageRowContents();
-				sProcessMethod = "process";
-				_logger
-						.warn("No <" + ListenerTagNames.ACTION_ELEMENT_TAG + "> element found in cofiguration" + " -  Using default composer class : " + _composerName);
-			}
-	
-			_processMethod = _composerClass.getMethod(sProcessMethod,
-					new Class[] { Object.class });
-		}
-		catch (InvocationTargetException ex)
-		{
-			_logger.error(ex);
-			
-			throw new ConfigurationException(ex);
-		}
-		catch (IllegalAccessException ex)
-		{
-			_logger.error(ex);
-			
-			throw new ConfigurationException(ex);
-		}
-		catch (InstantiationException ex)
-		{
-			_logger.error(ex);
-			
-			throw new ConfigurationException(ex);
-		}
-		catch (ClassNotFoundException ex)
-		{
-			_logger.error(ex);
-			
-			throw new ConfigurationException(ex);
-		}
-		catch (NoSuchMethodException ex)
-		{
-			_logger.error(ex);
-			
-			throw new ConfigurationException(ex);
-		}
-	} // ________________________________
-
-	protected List<Map<String, Object>> pollForCandidates ()
-	{
-		JdbcCleanConn oConn = null;
-		List<Map<String, Object>> oResults = new ArrayList<Map<String, Object>>();
-		try
-		{
-			oConn = getDbConn();
-			String sScan = scanStatement();
-
-			PreparedStatement PS = oConn.prepareStatement(sScan);
-			ResultSet RS = oConn.execQueryWait(PS, 1);
-			ResultSetMetaData meta = RS.getMetaData();
-			while (RS.next())
-			{
-				Map<String, Object> row = new HashMap<String, Object>();
-				for (int iCurr = 1; iCurr <= meta.getColumnCount(); iCurr++)
-				{
-					String sCol = meta.getColumnName(iCurr);
-					if (!_inProcessField.equals(sCol))
-						row.put(sCol, RS.getObject(iCurr));
-				}
-
-				oResults.add(row);
-			}
-		}
-		catch (Exception e)
-		{
-			_logger.warn("Some triggers might not have been returned", e);
-		}
-		_logger.debug("Returning " + oResults.size() + " rows.\n");
-		return oResults;
-	} // ________________________________
-
-	/**
-	 * Obtain a new database connection with parameter info
-	 * 
-	 * @return A new connection
-	 * @throws ConfigurationException -
-	 *             if problems are encountered
-	 */
-	protected JdbcCleanConn getDbConn () throws ConfigurationException
-	{
-		try
-		{
-			if (null == _dbConn)
-			{
-				DataSource oDS = new SimpleDataSource(_driver, _url, _user,
-						_password);
-				_dbConn = new JdbcCleanConn(oDS);
-			}
-			return _dbConn;
-		}
-		catch (IllegalArgumentException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-	} // ________________________________
-
-	/**
-	 * Assemble the SQL statement to scan (poll) the table
-	 * 
-	 * @return - The resulting SQL statement
-	 */
-	protected String scanStatement ()
-	{
-		StringBuilder sb = new StringBuilder().append("select ").append(
-				_selectFields).append(" from ").append(_tableName);
-
-		boolean bWhere = !Util.isNullString(_where);
-		if (bWhere) sb.append(" where ").append(_where);
-		sb.append((bWhere) ? " and " : " where ");
-
-		String sLike = _inProcessVals.substring(0, 1).toUpperCase();
-		sb.append(" upper(").append(_inProcessField).append(") like '").append(
-				sLike).append("%'");
-
-		if (!Util.isNullString(_orderBy))
-			sb.append(" order by ").append(_orderBy);
-		return sb.toString();
-	} // ________________________________
-
-	/**
-	 * Assemble the SQL statement to update the field in the "inProcessField"
-	 * parameter
-	 * 
-	 * in the table row uniquely identified by the list of fields in the
-	 * "keyFields" parameter
-	 * 
-	 * @return - The resulting SQL statement
-	 */
-	protected String updateStatement ()
-	{
-		StringBuilder sb = new StringBuilder().append("update ").append(
-				_tableName).append(" set ").append(_inProcessField).append(
-				" = ? where ");
-		int iCurr = 0;
-		for (String sCurr : _keys)
-		{
-			if (iCurr++ > 0) sb.append(" and ");
-			sb.append(sCurr).append(" = ?");
-		}
-		return sb.toString();
-	} // ________________________________
-
-	/**
-	 * Assemble the SQL "select for update" statement for the "inProcessField"
-	 * parameter
-	 * 
-	 * in the table row uniquely identified by the list of fields in the
-	 * "keyFields" parameter
-	 * 
-	 * @return - The resulting SQL statement
-	 */
-	protected String selectForUpdStatement ()
-	{
-		StringBuilder sb = new StringBuilder().append("select ").append(
-				_inProcessField).append(" from ").append(_tableName).append(
-				" where ");
-		int iCurr = 0;
-		for (String sCurr : _keys)
-		{
-			if (iCurr++ > 0) sb.append(" and ");
-			sb.append(sCurr).append(" = ?");
-		}
-		return sb.append(" for update").toString();
-	} // ________________________________
-
-	/**
-	 * Assemble the SQL statement to delete the current row in the table row
-	 * uniquely identified by the list of fields in the "keyFields" parameter
-	 * 
-	 * @return - The resulting SQL statement
-	 */
-	protected String deleteStatement ()
-	{
-		StringBuilder sb = new StringBuilder().append("delete from ").append(
-				_tableName).append(" where ");
-		int iCurr = 0;
-		for (String sCurr : _keys)
-		{
-			if (iCurr++ > 0) sb.append(" and ");
-			sb.append(sCurr).append(" = ?");
-		}
-		return sb.toString();
-	} // ________________________________
-
-	/**
-	 * Try to delete 'current row' from polled table
-	 * 
-	 * @return true if row deletion was successful - false otherwise
-	 */
-	protected boolean deleteCurrentRow ()
-	{
-		try
-		{
-			getDbConn().rollback();
-		}
-		catch (Exception e)
-		{
-			_logger.error("Unable to get DB connection.", e);
-			throw new IllegalStateException("Unable to get DB connection.", e);
-		}
-
-		try
-		{
-			int iParm = 1;
-			for (String sColName : _keys)
-				_PSdeleteRow.setObject(iParm++, _currentRow.get(sColName));
-
-			try
-			{
-				getDbConn().execUpdWait(_PSdeleteRow, 5);
-				getDbConn().commit();
-				return true;
-			}
-			catch (Exception e)
-			{
-				_logger.error("Delete row has failed.  Rolling back!!", e);
-			}
-
-			try
-			{
-				getDbConn().rollback();
-			}
-			catch (Exception e)
-			{
-				_logger.error("Unable to rollback delete row", e);
-			}
-		}
-		catch (Exception e)
-		{
-			_logger.error("Unexpected exception.", e);
-		}
-		return false;
-	} // ________________________________
-
-	protected String getStatus (ROW_STATE p_oState)
-	{
-		int iPos = p_oState.ordinal();
-		return _inProcessVals.substring(iPos, ++iPos);
-	} // ________________________________
-
-	protected boolean changeStatusToWorking ()
-	{
-		return changeStatus(ROW_STATE.Pending, ROW_STATE.Working);
-	} // ________________________________
-
-	protected boolean changeStatusToDone ()
-	{
-		return changeStatus(ROW_STATE.Working, ROW_STATE.Done);
-	} // ________________________________
-
-	protected boolean changeStatusToError ()
-	{
-		return changeStatus(ROW_STATE.Working, ROW_STATE.Error);
-	} // ________________________________
-
-	protected boolean changeStatus (ROW_STATE fromState, ROW_STATE toState)
-	{
-		try
-		{
-			getDbConn();
-		}
-		catch (Exception e)
-		{
-			_logger.error("Unable to get DB connection.", e);
-			throw new IllegalStateException("Unable to get DB connection.", e);
-		}
-
-		try
-		{
-			int iParm = 1;
-			for (String sColName : _keys)
-			{
-				Object oVal = _currentRow.get(sColName);
-				_PSsel4U.setObject(iParm, oVal);
-				// parameters are +1 in update statement
-				_PSupdate.setObject(++iParm, oVal);
-			}
-
-			try
-			{
-				ResultSet resultSet = getDbConn().execQueryWait(_PSsel4U, 5);
-
-				if (resultSet.next())
-				{
-					String sOldStatus = resultSet.getString(1).substring(0, 1);
-
-					if (sOldStatus.equalsIgnoreCase(getStatus(fromState)))
-					{
-						_PSupdate.setString(1, getStatus(toState));
-						getDbConn().execUpdWait(_PSupdate, 5);
-						getDbConn().commit();
-
-						if (_logger.isDebugEnabled())
-							_logger
-									.debug("Successfully changed row state from " + fromState + " to " + toState + ".");
-
-						return true;
-					}
-					else
-					{
-						_logger
-								.warn("Cannot change row state from " + fromState + " to " + toState + ".  Row not in state " + fromState);
-						return false;
-					}
-				}
-				_logger
-						.error("Row status change to " + toState + " has failed.  Rolling back!!");
-			}
-			catch (Exception e)
-			{
-				_logger
-						.error(
-								"Row status change to " + toState + " has failed.  Rolling back!!",
-								e);
-			}
-
-			try
-			{
-				getDbConn().rollback();
-			}
-			catch (Exception e)
-			{
-				_logger.error(
-						"Unable to rollback row status change to " + fromState
-								.name(), e);
-			}
-		}
-		catch (Exception e)
-		{
-			_logger.error("Unexpected exception.", e);
-		}
-
-		return false;
-	} // ________________________________
-
-	/**
-	 * Default gateway action for SQL table rows <p/>It will just drop the
-	 * result set contents into a Message
-	 * 
-	 * @author <a
-	 *         href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
-	 * @since Version 4.0
-	 * 
-	 */
-	public static class PackageRowContents
-	{
-		public Message process (Object obj)
-		{
-			if (!(obj instanceof Map))
-				throw new IllegalArgumentException("Object must be instance of Map");
-
-			Message message = MessageFactory.getInstance().getMessage();
-			org.jboss.soa.esb.message.Properties props = message
-					.getProperties();
-
-			props.setProperty(ListenerTagNames.SQL_ROW_DATA_TAG, obj);
-
-			return message;
-		}
-	} // ____________________________________________________
-
-	protected final static Logger _logger = Logger
-			.getLogger(SqlTableGatewayListener.class);
-
-	protected ConfigTree _config;
-
-	protected GatewayListenerController _controller;
-
-	protected long _sleepBetweenPolls; // milliseconds
-
-	protected String _serviceCategory, _serviceName;
-
-	protected String _targetServiceCategory, _targetServiceName;
-
-	protected EPR _myEpr;
-
-	protected Collection<EPR> _targetEprs;
-
-	protected String _composerName;
-
-	protected Class _composerClass;
-
-	protected Object _composer;
-
-	protected Method _processMethod;
-
-	protected Courier _courier;
-
-	protected String _driver, _url, _user, _password;
-
-	protected String _tableName, _selectFields, _keyFields;
-
-	protected String _where, _orderBy;
-
-	protected String _inProcessField, _inProcessVals;
-
-	protected boolean _deleteAfterOK;
-
-	protected String[] _columns, _keys;
-
-	protected PreparedStatement _PSscan, _PSsel4U, _PSupdate, _PSdeleteRow;
-
-	protected JdbcCleanConn _dbConn;
-
-	protected Map<String, Object> _currentRow;
-
-	public static enum ROW_STATE
-	{
-		Pending, Working, Error, Done
-	};
-
-	public static final String DEFAULT_IN_PROCESS_STATES = "PWED";
-} // ____________________________________________________________________________
+/*
+ * 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.gateway;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.sql.DataSource;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+import org.jboss.soa.esb.couriers.Courier;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierFactory;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.persist.JdbcCleanConn;
+import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.util.Util;
+
+/**
+ * 
+ * Polls an SQL table for rows that satisfy conditions defined in the xml
+ * runtime configuration
+ * 
+ * <p/>When a row that matches conditions is retrieved, it's contents are packed
+ * into an ESB Message and
+ * 
+ * <p/> The following fields are mandatory (see checkMyParms()): <br/> <br/>SQL
+ * table name <br/>list of fields to retrieve <br/>list of key fields to use in
+ * the update statement <br/>a field that will be used to mark a row as
+ * 'pending(p)', 'in process(w)', 'done(d)' or 'in error(e)'
+ * 
+ * @author <a
+ *         href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @since Version 4.0
+ * 
+ */
+public class SqlTableGatewayListener implements Runnable
+{
+
+	public SqlTableGatewayListener (GatewayListenerController commandListener,
+			ConfigTree config) throws ConfigurationException
+	{
+		_config = config;
+		_controller = commandListener;
+		_sleepBetweenPolls = 10000; // milliseconds TODO magic number
+		checkMyParms();
+	} // __________________________________
+
+	public void run ()
+	{
+		_logger
+				.debug("run() method of " + this.getClass().getSimpleName() + " started on thread " + Thread
+						.currentThread().getName());
+
+		if (null != _serviceName)
+		{
+			try
+			{
+				_controller.register(_config, _myEpr);
+			}
+			catch (RegistryException e1)
+			{
+				_logger.warn("unable to register service", e1);
+			}
+		}
+
+		boolean bSleep = false;
+
+		while (_controller.continueLooping())
+		{
+			// only sleep in between - not the first time
+			if (bSleep)
+			{
+				long lUntil = System.currentTimeMillis() + _sleepBetweenPolls;
+				while (System.currentTimeMillis() < lUntil)
+				{
+					try
+					{
+						// TODO magic number
+
+						Thread.sleep(1000);
+					}
+					catch (InterruptedException e)
+					{
+						lUntil = 0;
+					}
+					if (!_controller.continueLooping()) break;
+				}
+			}
+			else
+				bSleep = true;
+
+			if (!_controller.continueLooping()) break;
+
+			for (Map<String, Object> row : pollForCandidates())
+			{
+				_currentRow = row;
+				// Try to mark as 'in process' - if unsuccessful, somebody else
+				// got it first
+				if (!changeStatusToWorking()) continue;
+
+				Throwable thrown = null;
+				String text = null;
+				try
+				{
+					Object obj = _processMethod.invoke(_composer,
+							new Object[] { _currentRow });
+					if (null == obj)
+					{
+						_logger.warn("Action class method <" + _processMethod
+								.getName() + "> returned a null object");
+						continue;
+					}
+					Message message = (Message) obj;
+
+					// if(_composerClass.equals(PackageRowContents.class))
+					// {
+					// Properties props = message.getProperties();
+					// props.setProperty(JDBCEpr.DRIVER_TAG ,_driver);
+					// props.setProperty(JDBCEpr.URL_TAG ,_url);
+					// props.setProperty(JDBCEpr.USERNAME_TAG ,_user);
+					// props.setProperty(JDBCEpr.PASSWORD_TAG , _password);
+					//	        			
+					// }
+					boolean bSent = false;
+					for (EPR current : _targetEprs)
+					{
+						_courier = CourierFactory.getCourier(current);
+						if (_courier.deliver(message))
+						{
+							bSent = true;
+							break;
+						}
+					}
+					if (!bSent)
+					{
+						text = "Target service <" + _targetServiceCategory + "," + _targetServiceName + "> is not registered";
+						thrown = new Exception(text);
+					}
+				}
+				catch (InvocationTargetException e)
+				{
+					thrown = e;
+					text = "Problems invoking method <" + _processMethod
+							.getName() + ">";
+				}
+				catch (IllegalAccessException e)
+				{
+					thrown = e;
+					text = "Problems invoking method <" + _processMethod
+							.getName() + ">";
+				}
+				catch (ClassCastException e)
+				{
+					thrown = e;
+					text = "Action class method <" + _processMethod.getName() + "> returned a non Message object";
+				}
+				catch (CourierException e)
+				{
+					thrown = e;
+					text = "Courier <" + _courier.getClass().getName() + ".deliver(Message) FAILED";
+				}
+				catch (MalformedEPRException ex)
+				{
+					thrown = ex;
+					text = "Courier <" + _courier.getClass().getName() + ".deliver(Message) FAILED with malformed EPR.";
+				}
+
+				if (null == thrown)
+				{
+					if (_deleteAfterOK) deleteCurrentRow();
+					else
+						changeStatusToDone();
+				}
+				else
+				{
+					thrown.printStackTrace();
+					_logger.error(text, thrown);
+					changeStatusToError();
+				}
+			}
+		}
+
+		if (null != _serviceName)
+		{
+			try
+			{
+				_controller.unRegister(_serviceCategory, _serviceName, _myEpr);
+			}
+			catch (RegistryException e1)
+			{
+				_logger.warn("unable to unRegister service", e1);
+			}
+		}
+
+		if (null != _dbConn) _dbConn.release();
+		_logger
+				.debug("run() method of " + this.getClass().getSimpleName() + " finished on thread " + Thread
+						.currentThread().getName());
+	} // ________________________________
+
+	/**
+	 * Check for mandatory and optional attributes in parameter tree
+	 * 
+	 * @throws ConfigurationException -
+	 *             if mandatory atts are not right or actionClass not in
+	 *             classpath
+	 */
+	protected void checkMyParms () throws ConfigurationException
+	{
+		try
+		{
+			// Third arg is null - Exception will be thrown if attribute is not
+			// found
+			_targetServiceCategory = _controller.obtainAtt(_config,
+					ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, null);
+			_targetServiceName = _controller.obtainAtt(_config,
+					ListenerTagNames.TARGET_SERVICE_NAME_TAG, null);
+			_targetEprs = _controller.getEprs(_targetServiceCategory,
+					_targetServiceName);
+			if (null == _targetEprs || _targetEprs.size() < 1)
+				throw new ConfigurationException(
+						"EPR <" + _targetServiceName + "> not found in registry");
+	
+			// Polling interval
+			String sAux = _config
+					.getAttribute(ListenerTagNames.POLL_LATENCY_SECS_TAG);
+	
+			if (!Util.isNullString(sAux))
+			{
+				try
+				{
+					_sleepBetweenPolls = 1000 * Long.parseLong(sAux);
+				}
+				catch (NumberFormatException e)
+				{
+					_logger
+							.warn("Invalid poll latency - keeping default of " + (_sleepBetweenPolls / 1000));
+				}
+			}
+			else
+			{
+				_logger
+						.warn("No value specified for: " + ListenerTagNames.POLL_LATENCY_SECS_TAG + " -  Using default of " + (_sleepBetweenPolls / 1000));
+			}
+	
+			resolveComposerClass();
+	
+			_driver = _controller.obtainAtt(_config, JDBCEpr.DRIVER_TAG, null);
+			_url = _controller.obtainAtt(_config, JDBCEpr.URL_TAG, null);
+			_user = _controller.obtainAtt(_config, JDBCEpr.USERNAME_TAG, null);
+			_password = _controller.obtainAtt(_config, JDBCEpr.PASSWORD_TAG, "");
+	
+			_tableName = _config.getAttribute(ListenerTagNames.SQL_TABLE_NAME_TAG);
+			if (null == _tableName)
+				_tableName = _config.getAttribute(JDBCEpr.TABLE_NAME_TAG, null);
+			if (Util.isNullString(_tableName))
+				throw new ConfigurationException("Empty or invalid table name");
+	
+			_selectFields = _controller.obtainAtt(_config,
+					ListenerTagNames.SQL_SELECT_FIELDS_TAG, "*");
+			if (Util.isNullString(_selectFields))
+				throw new ConfigurationException(
+						"Empty or invalid list of select fields");
+			_keyFields = _config.getAttribute(ListenerTagNames.SQL_KEY_FIELDS_TAG);
+			if (null == _keyFields)
+				_keyFields = _config.getAttribute(JDBCEpr.MESSAGE_ID_COLUMN_TAG,
+						null);
+			if (Util.isNullString(_keyFields))
+				throw new ConfigurationException(
+						"Empty or invalid list of key fields");
+			_inProcessField = _config
+					.getAttribute(ListenerTagNames.SQL_IN_PROCESS_FIELD_TAG);
+			if (null == _inProcessField)
+				_inProcessField = _config.getAttribute(JDBCEpr.STATUS_COLUMN_TAG);
+			if (Util.isNullString(_inProcessField))
+				throw new ConfigurationException(
+						"A valid inProcessField attribute must be specified");
+	
+			_where = _controller.obtainAtt(_config,
+					ListenerTagNames.SQL_WHERE_CONDITION_TAG, "");
+			if (_where.trim().length() < 1)
+				_logger
+						.debug("No value specified for: " + ListenerTagNames.SQL_WHERE_CONDITION_TAG);
+			_orderBy = _controller.obtainAtt(_config,
+					ListenerTagNames.SQL_ORDER_BY_TAG, "");
+			if (_orderBy.trim().length() < 1)
+				_logger
+						.debug("No value specified for: " + ListenerTagNames.SQL_ORDER_BY_TAG);
+			_inProcessVals = _controller.obtainAtt(_config,
+					ListenerTagNames.SQL_IN_PROCESS_VALUES_TAG,
+					DEFAULT_IN_PROCESS_STATES);
+	
+			_deleteAfterOK = Boolean.parseBoolean(_controller.obtainAtt(_config,
+					ListenerTagNames.SQL_POST_DEL_TAG, "false"));
+			if (null == _config.getAttribute(ListenerTagNames.SQL_POST_DEL_TAG))
+				_logger
+						.debug("No value specified for: " + ListenerTagNames.SQL_POST_DEL_TAG + " - trigger row will not be deleted - 'in process field' will be used to show processing status");
+	
+			if (_inProcessVals.length() < 4)
+				throw new ConfigurationException(
+						"Parameter <" + ListenerTagNames.SQL_IN_PROCESS_VALUES_TAG + "> must be at least 4 characters long (PWED)");
+	
+			_columns = _selectFields.split(",");
+			if (_columns.length < 1)
+				throw new ConfigurationException("Empty list of select fields");
+	
+			_keys = _keyFields.split(",");
+			if (!"*".equals(_selectFields))
+			{
+				Set<String> colSet = new HashSet<String>(Arrays.asList(_columns));
+				if (_keys.length < 1)
+					throw new ConfigurationException("Empty list of keyFields");
+				for (String currKey : _keys)
+				{
+					if (colSet.contains(currKey)) continue;
+					else
+					{
+						StringBuilder sb = new StringBuilder().append(
+								"All key field names in the <").append(
+								ListenerTagNames.SQL_KEY_FIELDS_TAG).append(
+								"> attribute must be in the ").append(
+								ListenerTagNames.SQL_SELECT_FIELDS_TAG).append(
+								"list - '").append(currKey)
+								.append("' is not there");
+						;
+						throw new ConfigurationException(sb.toString());
+					}
+				}
+			}
+			prepareStatements();
+		}
+		catch (RegistryException ex)
+		{
+			_logger.error("Could not contact Registry during configuration.", ex);
+			
+			throw new ConfigurationException(ex);
+		}
+	} // ________________________________
+
+	protected void prepareStatements () throws ConfigurationException
+	{
+		try
+		{
+			_PSscan = getDbConn().prepareStatement(scanStatement());
+			_PSsel4U = getDbConn().prepareStatement(selectForUpdStatement());
+			_PSupdate = getDbConn().prepareStatement(updateStatement());
+			_PSdeleteRow = getDbConn().prepareStatement(deleteStatement());
+			return;
+		}
+		catch (Exception e)
+		{
+			throw new ConfigurationException(e);
+		}
+	} // ________________________________
+
+	/*
+	 * Throw ConfigurationException for anything to do with setup. Ultimately
+	 * could do with finer grained error handling. Probably need different types
+	 * of setup exceptions.
+	 */
+	
+	protected void resolveComposerClass () throws ConfigurationException
+	{
+		try
+		{
+			// Look for first "action" element - only first one will be used
+			String tagName = ListenerTagNames.ACTION_ELEMENT_TAG;
+			ConfigTree actionElement = _config.getFirstChild(tagName);
+			String sProcessMethod = null;
+			if (null != actionElement)
+			{ // class attribute
+				_composerName = _controller.obtainAtt(actionElement,
+						ListenerTagNames.ACTION_CLASS_TAG, null);
+				_composerClass = Class.forName(_composerName);
+				Constructor oConst = _composerClass
+						.getConstructor(new Class[] { ConfigTree.class });
+				_composer = oConst.newInstance(_config);
+				tagName = ListenerTagNames.PROCESS_METHOD_TAG;
+				sProcessMethod = _controller.obtainAtt(_config, tagName, tagName);
+			}
+			else
+			{
+				_composerName = PackageRowContents.class.getName();
+				_composerClass = PackageRowContents.class;
+				_composer = new PackageRowContents();
+				sProcessMethod = "process";
+				_logger
+						.warn("No <" + ListenerTagNames.ACTION_ELEMENT_TAG + "> element found in cofiguration" + " -  Using default composer class : " + _composerName);
+			}
+	
+			_processMethod = _composerClass.getMethod(sProcessMethod,
+					new Class[] { Object.class });
+		}
+		catch (InvocationTargetException ex)
+		{
+			_logger.error(ex);
+			
+			throw new ConfigurationException(ex);
+		}
+		catch (IllegalAccessException ex)
+		{
+			_logger.error(ex);
+			
+			throw new ConfigurationException(ex);
+		}
+		catch (InstantiationException ex)
+		{
+			_logger.error(ex);
+			
+			throw new ConfigurationException(ex);
+		}
+		catch (ClassNotFoundException ex)
+		{
+			_logger.error(ex);
+			
+			throw new ConfigurationException(ex);
+		}
+		catch (NoSuchMethodException ex)
+		{
+			_logger.error(ex);
+			
+			throw new ConfigurationException(ex);
+		}
+	} // ________________________________
+
+	protected List<Map<String, Object>> pollForCandidates ()
+	{
+		JdbcCleanConn oConn = null;
+		List<Map<String, Object>> oResults = new ArrayList<Map<String, Object>>();
+		try
+		{
+			oConn = getDbConn();
+			String sScan = scanStatement();
+
+			PreparedStatement PS = oConn.prepareStatement(sScan);
+			ResultSet RS = oConn.execQueryWait(PS, 1);
+			ResultSetMetaData meta = RS.getMetaData();
+			while (RS.next())
+			{
+				Map<String, Object> row = new HashMap<String, Object>();
+				for (int iCurr = 1; iCurr <= meta.getColumnCount(); iCurr++)
+				{
+					String sCol = meta.getColumnName(iCurr);
+					if (!_inProcessField.equals(sCol))
+						row.put(sCol, RS.getObject(iCurr));
+				}
+
+				oResults.add(row);
+			}
+		}
+		catch (Exception e)
+		{
+			_logger.warn("Some triggers might not have been returned", e);
+		}
+		_logger.debug("Returning " + oResults.size() + " rows.\n");
+		return oResults;
+	} // ________________________________
+
+	/**
+	 * Obtain a new database connection with parameter info
+	 * 
+	 * @return A new connection
+	 * @throws ConfigurationException -
+	 *             if problems are encountered
+	 */
+	protected JdbcCleanConn getDbConn () throws ConfigurationException
+	{
+		try
+		{
+			if (null == _dbConn)
+			{
+				DataSource oDS = new SimpleDataSource(_driver, _url, _user,
+						_password);
+				_dbConn = new JdbcCleanConn(oDS);
+			}
+			return _dbConn;
+		}
+		catch (IllegalArgumentException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+	} // ________________________________
+
+	/**
+	 * Assemble the SQL statement to scan (poll) the table
+	 * 
+	 * @return - The resulting SQL statement
+	 */
+	protected String scanStatement ()
+	{
+		StringBuilder sb = new StringBuilder().append("select ").append(
+				_selectFields).append(" from ").append(_tableName);
+
+		boolean bWhere = !Util.isNullString(_where);
+		if (bWhere) sb.append(" where ").append(_where);
+		sb.append((bWhere) ? " and " : " where ");
+
+		String sLike = _inProcessVals.substring(0, 1).toUpperCase();
+		sb.append(" upper(").append(_inProcessField).append(") like '").append(
+				sLike).append("%'");
+
+		if (!Util.isNullString(_orderBy))
+			sb.append(" order by ").append(_orderBy);
+		return sb.toString();
+	} // ________________________________
+
+	/**
+	 * Assemble the SQL statement to update the field in the "inProcessField"
+	 * parameter
+	 * 
+	 * in the table row uniquely identified by the list of fields in the
+	 * "keyFields" parameter
+	 * 
+	 * @return - The resulting SQL statement
+	 */
+	protected String updateStatement ()
+	{
+		StringBuilder sb = new StringBuilder().append("update ").append(
+				_tableName).append(" set ").append(_inProcessField).append(
+				" = ? where ");
+		int iCurr = 0;
+		for (String sCurr : _keys)
+		{
+			if (iCurr++ > 0) sb.append(" and ");
+			sb.append(sCurr).append(" = ?");
+		}
+		return sb.toString();
+	} // ________________________________
+
+	/**
+	 * Assemble the SQL "select for update" statement for the "inProcessField"
+	 * parameter
+	 * 
+	 * in the table row uniquely identified by the list of fields in the
+	 * "keyFields" parameter
+	 * 
+	 * @return - The resulting SQL statement
+	 */
+	protected String selectForUpdStatement ()
+	{
+		StringBuilder sb = new StringBuilder().append("select ").append(
+				_inProcessField).append(" from ").append(_tableName).append(
+				" where ");
+		int iCurr = 0;
+		for (String sCurr : _keys)
+		{
+			if (iCurr++ > 0) sb.append(" and ");
+			sb.append(sCurr).append(" = ?");
+		}
+		return sb.append(" for update").toString();
+	} // ________________________________
+
+	/**
+	 * Assemble the SQL statement to delete the current row in the table row
+	 * uniquely identified by the list of fields in the "keyFields" parameter
+	 * 
+	 * @return - The resulting SQL statement
+	 */
+	protected String deleteStatement ()
+	{
+		StringBuilder sb = new StringBuilder().append("delete from ").append(
+				_tableName).append(" where ");
+		int iCurr = 0;
+		for (String sCurr : _keys)
+		{
+			if (iCurr++ > 0) sb.append(" and ");
+			sb.append(sCurr).append(" = ?");
+		}
+		return sb.toString();
+	} // ________________________________
+
+	/**
+	 * Try to delete 'current row' from polled table
+	 * 
+	 * @return true if row deletion was successful - false otherwise
+	 */
+	protected boolean deleteCurrentRow ()
+	{
+		try
+		{
+			getDbConn().rollback();
+		}
+		catch (Exception e)
+		{
+			_logger.error("Unable to get DB connection.", e);
+			throw new IllegalStateException("Unable to get DB connection.", e);
+		}
+
+		try
+		{
+			int iParm = 1;
+			for (String sColName : _keys)
+				_PSdeleteRow.setObject(iParm++, _currentRow.get(sColName));
+
+			try
+			{
+				getDbConn().execUpdWait(_PSdeleteRow, 5);
+				getDbConn().commit();
+				return true;
+			}
+			catch (Exception e)
+			{
+				_logger.error("Delete row has failed.  Rolling back!!", e);
+			}
+
+			try
+			{
+				getDbConn().rollback();
+			}
+			catch (Exception e)
+			{
+				_logger.error("Unable to rollback delete row", e);
+			}
+		}
+		catch (Exception e)
+		{
+			_logger.error("Unexpected exception.", e);
+		}
+		return false;
+	} // ________________________________
+
+	protected String getStatus (ROW_STATE p_oState)
+	{
+		int iPos = p_oState.ordinal();
+		return _inProcessVals.substring(iPos, ++iPos);
+	} // ________________________________
+
+	protected boolean changeStatusToWorking ()
+	{
+		return changeStatus(ROW_STATE.Pending, ROW_STATE.Working);
+	} // ________________________________
+
+	protected boolean changeStatusToDone ()
+	{
+		return changeStatus(ROW_STATE.Working, ROW_STATE.Done);
+	} // ________________________________
+
+	protected boolean changeStatusToError ()
+	{
+		return changeStatus(ROW_STATE.Working, ROW_STATE.Error);
+	} // ________________________________
+
+	protected boolean changeStatus (ROW_STATE fromState, ROW_STATE toState)
+	{
+		try
+		{
+			getDbConn();
+		}
+		catch (Exception e)
+		{
+			_logger.error("Unable to get DB connection.", e);
+			throw new IllegalStateException("Unable to get DB connection.", e);
+		}
+
+		try
+		{
+			int iParm = 1;
+			for (String sColName : _keys)
+			{
+				Object oVal = _currentRow.get(sColName);
+				_PSsel4U.setObject(iParm, oVal);
+				// parameters are +1 in update statement
+				_PSupdate.setObject(++iParm, oVal);
+			}
+
+			try
+			{
+				ResultSet resultSet = getDbConn().execQueryWait(_PSsel4U, 5);
+
+				if (resultSet.next())
+				{
+					String sOldStatus = resultSet.getString(1).substring(0, 1);
+
+					if (sOldStatus.equalsIgnoreCase(getStatus(fromState)))
+					{
+						_PSupdate.setString(1, getStatus(toState));
+						getDbConn().execUpdWait(_PSupdate, 5);
+						getDbConn().commit();
+
+						if (_logger.isDebugEnabled())
+							_logger
+									.debug("Successfully changed row state from " + fromState + " to " + toState + ".");
+
+						return true;
+					}
+					else
+					{
+						_logger
+								.warn("Cannot change row state from " + fromState + " to " + toState + ".  Row not in state " + fromState);
+						return false;
+					}
+				}
+				_logger
+						.error("Row status change to " + toState + " has failed.  Rolling back!!");
+			}
+			catch (Exception e)
+			{
+				_logger
+						.error(
+								"Row status change to " + toState + " has failed.  Rolling back!!",
+								e);
+			}
+
+			try
+			{
+				getDbConn().rollback();
+			}
+			catch (Exception e)
+			{
+				_logger.error(
+						"Unable to rollback row status change to " + fromState
+								.name(), e);
+			}
+		}
+		catch (Exception e)
+		{
+			_logger.error("Unexpected exception.", e);
+		}
+
+		return false;
+	} // ________________________________
+
+	/**
+	 * Default gateway action for SQL table rows <p/>It will just drop the
+	 * result set contents into a Message
+	 * 
+	 * @author <a
+	 *         href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+	 * @since Version 4.0
+	 * 
+	 */
+	public static class PackageRowContents
+	{
+		public Message process (Object obj)
+		{
+			if (!(obj instanceof Map))
+				throw new IllegalArgumentException("Object must be instance of Map");
+
+			Message message = MessageFactory.getInstance().getMessage();
+			org.jboss.soa.esb.message.Properties props = message
+					.getProperties();
+
+			props.setProperty(ListenerTagNames.SQL_ROW_DATA_TAG, obj);
+
+			return message;
+		}
+	} // ____________________________________________________
+
+	protected final static Logger _logger = Logger
+			.getLogger(SqlTableGatewayListener.class);
+
+	protected ConfigTree _config;
+
+	protected GatewayListenerController _controller;
+
+	protected long _sleepBetweenPolls; // milliseconds
+
+	protected String _serviceCategory, _serviceName;
+
+	protected String _targetServiceCategory, _targetServiceName;
+
+	protected EPR _myEpr;
+
+	protected Collection<EPR> _targetEprs;
+
+	protected String _composerName;
+
+	protected Class _composerClass;
+
+	protected Object _composer;
+
+	protected Method _processMethod;
+
+	protected Courier _courier;
+
+	protected String _driver, _url, _user, _password;
+
+	protected String _tableName, _selectFields, _keyFields;
+
+	protected String _where, _orderBy;
+
+	protected String _inProcessField, _inProcessVals;
+
+	protected boolean _deleteAfterOK;
+
+	protected String[] _columns, _keys;
+
+	protected PreparedStatement _PSscan, _PSsel4U, _PSupdate, _PSdeleteRow;
+
+	protected JdbcCleanConn _dbConn;
+
+	protected Map<String, Object> _currentRow;
+
+	public static enum ROW_STATE
+	{
+		Pending, Working, Error, Done
+	};
+
+	public static final String DEFAULT_IN_PROCESS_STATES = "PWED";
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,232 +1,232 @@
-package org.jboss.soa.esb.listeners.message;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Observable;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.message.Message;
-
-
-/**
- * Action Processing Pipeline.
- * <p/>
- * Runs a list of action classes on a message
- * 
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @since Version 4.0
- */
-public class ActionProcessingPipeline extends Observable implements Runnable 
-{    
-	private boolean processingComplete = false;
-         
-    /**
-     * public constructor
-     * @param message Message - The initial message to be run through the whole action 
-     * class chain
-     */
-    public ActionProcessingPipeline(Message message, ConfigTree config)
-    	throws ConfigurationException
-    {
-    	if (null==message)
-    		throw new IllegalArgumentException("Message must be not null");
-        _message	= message;
-        _config		= config;
-    	if (null==_config)
-    		throw new IllegalArgumentException("Configuration needed for action classes");
-    	_actionList = _config.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
-    	if (null==_actionList || _actionList.length<1)
-    		throw new ConfigurationException("No actions in list");
-    }
-    
-    /**
-     * 
-     * @return Message - current Message of this action chain processor
-     */
-    public Message getMessage()     { return _message; }
-
-    /**
-     * Implement Runnable Interface
-     * <p/>Uses reflection to instantiate action classes that must have a public constructor
-     * that takes a single ConfigTree as argument
-     * <p/>Requires each action class to have a public method that takes a Message and returns a Message
-     * <br/>Default name for it is 'process'  but can optionally be defined in the 'process' attribute
-     * of the corresponding &lt;action&gt; element of the ConfigTree
-     * <p/>Each &lt;action&gt; element can optionally define a method (taking a Message argument) to be 
-     * called upon successful completion of the action class (that step of the chain)
-     * <br/>Default name for it is 'process'  but can optionally be defined in the 'process' attribute
-     * <p/>See actionClassException and actionClassFinishedOk
-     * */
-    public void run()
-    {
-        try
-        {
-            // Run the message through each ActionProcessor...
-        	_currentIndex = -1;
-            for(ConfigTree oCurr : _actionList) 
-            {
-            	_currentIndex++;
-            	String attrName = ListenerTagNames.ACTION_CLASS_TAG;
-            	_currentAction = oCurr.getAttribute(attrName);
-            	_currentClass = Class.forName(_currentAction);
-            	Constructor oConst = _currentClass.getConstructor(new Class[] {ConfigTree.class});
-            	_currentProcessor = oConst.newInstance(oCurr);
-
-            	attrName	= ListenerTagNames.PROCESS_METHOD_TAG;
-            	String[] saMethodList = obtainAttribute(oCurr,attrName,attrName).split(",");
-
-            	for (String currMethod : saMethodList)
-            	{
-//                	_logger.debug("Attempting to invoke "+_currentClass.getName()+" method "+currMethod);
-	            	Method method = _currentClass.getMethod(currMethod,new Class[] {Message.class});
-	            	
-	            	// The processing result of each action feeds into the processing of the next action...
-	                try 
-	                {
-	                	Message next = (Message)method.invoke(_currentProcessor,new Object[] {_message} );
-	                    if(next==null)
-	                    {
-	                    	_logger.warn(prematureTermination("returned <null> - Cannot continue"));
-	                    	return;
-	                    }
-	                    _message = next;
-	                }
-	                catch (ClassCastException eCast)
-	                {
-	                	// If action class returns non Message, log and abort chain
-	                	_logger.error(prematureTermination("returned a non Message Object)"));
-	                	return;
-	                }
-	                catch (InvocationTargetException e)
-	                {
-	                	// If action class threw exception, log and abort chain
-	                	_logger.error("Process method threw Exception",e);
-	                    actionClassException(oCurr,_message,e.getCause());
-	                    return;
-	                }
-            	}            	
-                actionClassFinishedOk(oCurr,_message);
-            }
-            // notification of action chain end can be done with a no-operation action class
-            // with a proper ListenerPropertyNames.ACTION_NORMAL_COMPLETION_CALLBACK method
-            // Same idea when some interaction needed with the 'esb unaware' world
-        } 
-        catch(ClassNotFoundException e)
-    	{	_logger.error(prematureTermination("action class is not in path"),e); } 
-        catch(NoSuchMethodException e)
-    	{	_logger.error(prematureTermination("method not found"),e); }
-        catch(InstantiationException e)
-    	{	_logger.error(prematureTermination("cannot instantiate action class"),e); } 
-        catch(InvocationTargetException e)
-    	{	_logger.error(prematureTermination("method not found"),e); } 
-        catch(IllegalAccessException e)
-    	{	_logger.error(prematureTermination("unable to access method"),e); } 
-        catch (IllegalArgumentException e) {
-        	_logger.error(prematureTermination(e.getMessage()),e);
-        } 
-        finally 
-        {
-        	processingComplete = true;
-        	setChanged();
-        	notifyObservers(new Integer(-1));
-        }
-    }
-    
-    protected String prematureTermination(String s)
-    {
-    	return new StringBuilder("Premature termination of action processing pipeline ")
-		.append(getActionNames())
-		.append("].  ActionProcessor [").append(_currentAction)
-		.append("] ").append(s)
-		.toString()
-		;
-    }
-    
-    /**
-     * If 'current' action step was configured with a 'exceptionMethod' attribute
-     * that method will be called with a single argument of type Exception 
-     * @param tree ConfigTree - where to look for the exceptionMetod attribute
-     * @param thrown Exception - to be used in invocation to method (if found)
-     */
-    protected void actionClassException(ConfigTree tree, Message msg,  Throwable thrown)
-    {
-//    	thrown.printStackTrace();
-    	String sMethod = obtainAttribute(tree,ListenerTagNames.EXCEPTION_METHOD_TAG,null);
-    	if (null!=sMethod)
-	    	try
-	    	{
-	    		Method method = _currentClass.getMethod(sMethod,new Class[] {Message.class, Throwable.class});
-	    		method.invoke(_currentProcessor,new Object[] {msg, thrown} );
-	    	}
-	    	catch (NoSuchMethodException e) 	{_logger.error(e); }
-	    	catch (InvocationTargetException e) {_logger.error(e); }
-	    	catch (IllegalAccessException e) 	{_logger.error(e); }
-    }
-
-    /**
-     * If 'current' action step was configured with an 'okMethod' attribute
-     * that method will be called with no arguments 
-     * @param tree ConfigTree - where to look for the okMetod attribute
-     */
-    protected void actionClassFinishedOk(ConfigTree tree,Message msg)
-    {
-    	String sMethod = obtainAttribute(tree,ListenerTagNames.NORMAL_COMPLETION_METHOD_TAG,null);
-    	if (null!=sMethod)
-	    	try
-	    	{
-	    		Method method = _currentClass.getMethod(sMethod,new Class[] {Message.class});
-	    		method.invoke(_currentProcessor,new Object[] {msg} );
-	    	}
-	    	catch (NoSuchMethodException e) 	{_logger.error(e); }
-	    	catch (InvocationTargetException e) {_logger.error(e); }
-	    	catch (IllegalAccessException e) 	{_logger.error(e); }
-    }
-
-    protected String[] getActionNames()
-    {
-    	String[] sa = new String[_actionList.length];
-    	int i1=0;
-    	for (ConfigTree oCurr : _actionList)
-    		sa[i1++]=obtainAttribute(oCurr,ListenerTagNames.ACTION_CLASS_TAG,"NO_CLASSNAME");
-    	return sa;
-    }
-    
-    private static String obtainAttribute(ConfigTree tree,String p_sAtt, String p_sDefault)
-	{
-		String sVal = tree.getAttribute(p_sAtt);
-		return (null != sVal) ? sVal : p_sDefault;
-	} // ________________________________
-	
-    protected ConfigTree[]	_actionList;
-    protected int			_currentIndex;
-    protected String		_currentAction;
-    protected Class 		_currentClass;
-    protected Object		_currentProcessor;
-	protected Message		_message;
-	protected ConfigTree	_config;
-	protected Logger		_logger = Logger.getLogger(this.getClass());
-
-	/**
-	 * @return Returns the processingComplete.
-	 */
-	public boolean isProcessingComplete() {
-		return processingComplete;
-	}
-	
-	/**
-	 * Wait until processing is complete.
-	 */
-	public void waitUntilComplete() {
-		while(!processingComplete) {
-			try {
-				Thread.sleep(50);
-			} catch (InterruptedException e) {
-				_logger.error("Thread Interrupted.", e);
-			}
-		}
-	}
-}
+package org.jboss.soa.esb.listeners.message;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Observable;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.message.Message;
+
+
+/**
+ * Action Processing Pipeline.
+ * <p/>
+ * Runs a list of action classes on a message
+ * 
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @since Version 4.0
+ */
+public class ActionProcessingPipeline extends Observable implements Runnable 
+{    
+	private boolean processingComplete = false;
+         
+    /**
+     * public constructor
+     * @param message Message - The initial message to be run through the whole action 
+     * class chain
+     */
+    public ActionProcessingPipeline(Message message, ConfigTree config)
+    	throws ConfigurationException
+    {
+    	if (null==message)
+    		throw new IllegalArgumentException("Message must be not null");
+        _message	= message;
+        _config		= config;
+    	if (null==_config)
+    		throw new IllegalArgumentException("Configuration needed for action classes");
+    	_actionList = _config.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
+    	if (null==_actionList || _actionList.length<1)
+    		throw new ConfigurationException("No actions in list");
+    }
+    
+    /**
+     * 
+     * @return Message - current Message of this action chain processor
+     */
+    public Message getMessage()     { return _message; }
+
+    /**
+     * Implement Runnable Interface
+     * <p/>Uses reflection to instantiate action classes that must have a public constructor
+     * that takes a single ConfigTree as argument
+     * <p/>Requires each action class to have a public method that takes a Message and returns a Message
+     * <br/>Default name for it is 'process'  but can optionally be defined in the 'process' attribute
+     * of the corresponding &lt;action&gt; element of the ConfigTree
+     * <p/>Each &lt;action&gt; element can optionally define a method (taking a Message argument) to be 
+     * called upon successful completion of the action class (that step of the chain)
+     * <br/>Default name for it is 'process'  but can optionally be defined in the 'process' attribute
+     * <p/>See actionClassException and actionClassFinishedOk
+     * */
+    public void run()
+    {
+        try
+        {
+            // Run the message through each ActionProcessor...
+        	_currentIndex = -1;
+            for(ConfigTree oCurr : _actionList) 
+            {
+            	_currentIndex++;
+            	String attrName = ListenerTagNames.ACTION_CLASS_TAG;
+            	_currentAction = oCurr.getAttribute(attrName);
+            	_currentClass = Class.forName(_currentAction);
+            	Constructor oConst = _currentClass.getConstructor(new Class[] {ConfigTree.class});
+            	_currentProcessor = oConst.newInstance(oCurr);
+
+            	attrName	= ListenerTagNames.PROCESS_METHOD_TAG;
+            	String[] saMethodList = obtainAttribute(oCurr,attrName,attrName).split(",");
+
+            	for (String currMethod : saMethodList)
+            	{
+//                	_logger.debug("Attempting to invoke "+_currentClass.getName()+" method "+currMethod);
+	            	Method method = _currentClass.getMethod(currMethod,new Class[] {Message.class});
+	            	
+	            	// The processing result of each action feeds into the processing of the next action...
+	                try 
+	                {
+	                	Message next = (Message)method.invoke(_currentProcessor,new Object[] {_message} );
+	                    if(next==null)
+	                    {
+	                    	_logger.warn(prematureTermination("returned <null> - Cannot continue"));
+	                    	return;
+	                    }
+	                    _message = next;
+	                }
+	                catch (ClassCastException eCast)
+	                {
+	                	// If action class returns non Message, log and abort chain
+	                	_logger.error(prematureTermination("returned a non Message Object)"));
+	                	return;
+	                }
+	                catch (InvocationTargetException e)
+	                {
+	                	// If action class threw exception, log and abort chain
+	                	_logger.error("Process method threw Exception",e);
+	                    actionClassException(oCurr,_message,e.getCause());
+	                    return;
+	                }
+            	}            	
+                actionClassFinishedOk(oCurr,_message);
+            }
+            // notification of action chain end can be done with a no-operation action class
+            // with a proper ListenerPropertyNames.ACTION_NORMAL_COMPLETION_CALLBACK method
+            // Same idea when some interaction needed with the 'esb unaware' world
+        } 
+        catch(ClassNotFoundException e)
+    	{	_logger.error(prematureTermination("action class is not in path"),e); } 
+        catch(NoSuchMethodException e)
+    	{	_logger.error(prematureTermination("method not found"),e); }
+        catch(InstantiationException e)
+    	{	_logger.error(prematureTermination("cannot instantiate action class"),e); } 
+        catch(InvocationTargetException e)
+    	{	_logger.error(prematureTermination("method not found"),e); } 
+        catch(IllegalAccessException e)
+    	{	_logger.error(prematureTermination("unable to access method"),e); } 
+        catch (IllegalArgumentException e) {
+        	_logger.error(prematureTermination(e.getMessage()),e);
+        } 
+        finally 
+        {
+        	processingComplete = true;
+        	setChanged();
+        	notifyObservers(new Integer(-1));
+        }
+    }
+    
+    protected String prematureTermination(String s)
+    {
+    	return new StringBuilder("Premature termination of action processing pipeline ")
+		.append(getActionNames())
+		.append("].  ActionProcessor [").append(_currentAction)
+		.append("] ").append(s)
+		.toString()
+		;
+    }
+    
+    /**
+     * If 'current' action step was configured with a 'exceptionMethod' attribute
+     * that method will be called with a single argument of type Exception 
+     * @param tree ConfigTree - where to look for the exceptionMetod attribute
+     * @param thrown Exception - to be used in invocation to method (if found)
+     */
+    protected void actionClassException(ConfigTree tree, Message msg,  Throwable thrown)
+    {
+//    	thrown.printStackTrace();
+    	String sMethod = obtainAttribute(tree,ListenerTagNames.EXCEPTION_METHOD_TAG,null);
+    	if (null!=sMethod)
+	    	try
+	    	{
+	    		Method method = _currentClass.getMethod(sMethod,new Class[] {Message.class, Throwable.class});
+	    		method.invoke(_currentProcessor,new Object[] {msg, thrown} );
+	    	}
+	    	catch (NoSuchMethodException e) 	{_logger.error(e); }
+	    	catch (InvocationTargetException e) {_logger.error(e); }
+	    	catch (IllegalAccessException e) 	{_logger.error(e); }
+    }
+
+    /**
+     * If 'current' action step was configured with an 'okMethod' attribute
+     * that method will be called with no arguments 
+     * @param tree ConfigTree - where to look for the okMetod attribute
+     */
+    protected void actionClassFinishedOk(ConfigTree tree,Message msg)
+    {
+    	String sMethod = obtainAttribute(tree,ListenerTagNames.NORMAL_COMPLETION_METHOD_TAG,null);
+    	if (null!=sMethod)
+	    	try
+	    	{
+	    		Method method = _currentClass.getMethod(sMethod,new Class[] {Message.class});
+	    		method.invoke(_currentProcessor,new Object[] {msg} );
+	    	}
+	    	catch (NoSuchMethodException e) 	{_logger.error(e); }
+	    	catch (InvocationTargetException e) {_logger.error(e); }
+	    	catch (IllegalAccessException e) 	{_logger.error(e); }
+    }
+
+    protected String[] getActionNames()
+    {
+    	String[] sa = new String[_actionList.length];
+    	int i1=0;
+    	for (ConfigTree oCurr : _actionList)
+    		sa[i1++]=obtainAttribute(oCurr,ListenerTagNames.ACTION_CLASS_TAG,"NO_CLASSNAME");
+    	return sa;
+    }
+    
+    private static String obtainAttribute(ConfigTree tree,String p_sAtt, String p_sDefault)
+	{
+		String sVal = tree.getAttribute(p_sAtt);
+		return (null != sVal) ? sVal : p_sDefault;
+	} // ________________________________
+	
+    protected ConfigTree[]	_actionList;
+    protected int			_currentIndex;
+    protected String		_currentAction;
+    protected Class 		_currentClass;
+    protected Object		_currentProcessor;
+	protected Message		_message;
+	protected ConfigTree	_config;
+	protected Logger		_logger = Logger.getLogger(this.getClass());
+
+	/**
+	 * @return Returns the processingComplete.
+	 */
+	public boolean isProcessingComplete() {
+		return processingComplete;
+	}
+	
+	/**
+	 * Wait until processing is complete.
+	 */
+	public void waitUntilComplete() {
+		while(!processingComplete) {
+			try {
+				Thread.sleep(50);
+			} catch (InterruptedException e) {
+				_logger.error("Thread Interrupted.", e);
+			}
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/CbrListener.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/HttpListener.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/HttpListener.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/HttpListener.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,285 +1,285 @@
-/*
- * 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.message;
-
-import javax.management.MBeanServer;
-
-import org.apache.log4j.Logger;
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.ServerInvocationHandler;
-import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-import org.jboss.remoting.transport.Connector;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.AbstractManagedListener;
-import org.jboss.soa.esb.listeners.ListenerInitializationException;
-import org.jboss.soa.esb.listeners.ListenerManager;
-import org.jboss.soa.esb.listeners.State;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * Http listener implementation using the JBoss Remoting channel.
- * 
- * The listener will listen to messages on the configured listenHttpUrl. If this
- * is not set, the default http://localhost:5400 will be used.
- * 
- * This listener expects an Object message whose type is org.jboss.soa.esb.message.Message
- * 
- * Sample listener Configuration:
- * 
- * <HttpListener listenerClass="org.jboss.soa.esb.listeners.message.HttpListener"/>
- * 
- * <pre>
- *  &lt;HttpListener listenerClass=&quot;org.jboss.soa.esb.listeners.message.HttpListener&quot;&gt; 
- *   	&lt;action class=&amp;quotorg.jboss.soa.esb.actions.routing.EchoRouter&quot;/&gt;     
- *  &lt;/HttpListener&gt;
- * </pre>
- * 
- * @author <a href="mailto:johan.kumps at telenet.be">Johan Kumps</a>
- * 
- */
-public class HttpListener extends AbstractManagedListener implements ServerInvocationHandler {
-
-	/* The logger for this class */
-	protected Logger logger = Logger.getLogger(HttpListener.class);
-
-	/* Boolean indicating whether the info logging level is enabled */
-	protected boolean info = this.logger.isInfoEnabled();
-
-	/* The url this listener will listen on */
-	private static final String LISTEN_HTTP_URL = "listenHttpUrl";
-
-	/* The url to listen on */
-	public String listenHttpUrl = null;
-
-	/* The default transport this listener will listen on */
-	private static final String transport = "http";
-
-	/* The default hostname this listener will listen on */
-	private static final String host = "localhost";
-
-	/* The default port this listener will listen on */
-	private static final int port = 5400;
-
-	/**
-	 * Constructor initialising this HttpListener
-	 * 
-	 * @param commandListener
-	 * @param listenerConfig
-	 * @param actionDefinitionFactory
-	 * @throws ConfigurationException
-	 * @throws ListenerInitializationException
-	 */
-	public HttpListener(ListenerManager esbListenerController,
-			ConfigTree configuration) throws ConfigurationException,
-			ListenerInitializationException {
-		super(esbListenerController, configuration);
-
-		this.checkParams();
-		this.initServer();
-
-	}
-
-	/*
-	 * Method being invoked when a request comes in.
-	 * 
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.remoting.ServerInvocationHandler#invoke(org.jboss.remoting.InvocationRequest)
-	 */
-	@SuppressWarnings("unchecked")
-	public Object invoke(InvocationRequest invocationRequest) throws Throwable {
-		// Retrieving the real payload of this invocationRequest
-		Object payload = invocationRequest.getParameter();
-
-		if (this.logger.isInfoEnabled()) {
-			this.logger
-					.info("HttpInvocationListener is invoked...The given payload is : "
-							+ payload);
-		}
-		if (payload instanceof Message){
-		// Start the action processing pipeline
-		ActionProcessingPipeline pipelineRunner = new ActionProcessingPipeline(
-						(Message)payload, this._config);
-		//this.pipelineExecutorPool.submit(pipelineRunner);
-		//The above does not invoke the process action, using the following instead.
-		new Thread(pipelineRunner).start();
-		} else {
-			this.logger.error("Unsupported HttpListener message type: " + payload.getClass().getName());
-		}
-		
-		return payload;
-	}
-	/**
-	 * Adds a callback handler that will listen for callbacks from the server
-	 * invoker handler.
-	 * 
-	 * @param callbackHandler
-	 */
-	public void addListener(InvokerCallbackHandler callbackHandler) {
-		// NO OP as do not handling callback listeners in this example
-	}
-
-	/**
-	 * Removes the callback handler that was listening for callbacks from the
-	 * server invoker handler.
-	 * 
-	 * @param callbackHandler
-	 */
-	public void removeListener(InvokerCallbackHandler callbackHandler) {
-		// NO OP as do not handling callback listeners in this example
-	}
-
-	/**
-	 * set the mbean server that the handler can reference
-	 * 
-	 * @param server
-	 */
-	public void setMBeanServer(MBeanServer server) {
-		// NO OP as do not need reference to MBeanServer for this handler
-	}
-
-	/**
-	 * set the invoker that owns this handler
-	 * 
-	 * @param invoker
-	 */
-	public void setInvoker(ServerInvoker invoker) {
-		// NO OP as do not need reference back to the server invoker
-	}
-
-	/**
-	 * Method getting the url this HttpListener instance is listening on
-	 * 
-	 * @return the current listenHttpUrl
-	 */
-	public String getListenHttpUrl() {
-		return listenHttpUrl;
-	}
-
-	/**
-	 * Method setting the listenHttpUrl property to listen on
-	 * 
-	 * @param listenHttpUrl
-	 *            the listenHttpUrl to be used by this HttpListener instance
-	 */
-	public void setListenHttpUrl(String listenHttpUrl) {
-		this.listenHttpUrl = listenHttpUrl;
-	}
-
-	/**
-	 * Check for mandatory and optional attributes in parameter tree
-	 */
-	private void checkParams() throws ConfigurationException {
-		// listener url
-		this.listenHttpUrl = this._config.getAttribute(LISTEN_HTTP_URL);
-		if (this.listenHttpUrl == null) {
-			this.listenHttpUrl = this.getDefaultListenHttpUrl();
-			if (this.logger.isInfoEnabled()){
-				this.logger
-						.info("Attribute listenHttpUrl has not been set on the HttpListener. Using default "
-								+ this.getDefaultListenHttpUrl());
-			}
-		}
-	}
-
-	/**
-	 * Method returning the default listenHttpUrl for this HttpListener instance
-	 * 
-	 * @return the default listen url
-	 */
-	private String getDefaultListenHttpUrl() {
-		return HttpListener.transport + "://" + HttpListener.host + ":"
-				+ HttpListener.port;
-	}
-
-	/**
-	 * Method initialising the remoting deamon
-	 * 
-	 * @throws ListenerInitialisationException
-	 * 
-	 * @throws ListenerInitializationException
-	 *             when something goes wrong during remoting deamon startup
-	 */
-	private void initServer() throws ListenerInitializationException {
-		try {
-			InvokerLocator locator = new InvokerLocator(this.listenHttpUrl);
-			if (this.logger.isInfoEnabled()) {
-				this.logger
-						.info("Starting remoting server with locator uri of: "
-								+ this.listenHttpUrl);
-			}
-			Connector connector = new Connector(locator);
-			connector.create();
-
-			connector.addInvocationHandler("HttpInvocationHandler", this);
-
-			// Starting the server deamon
-			connector.start();
-
-			if (this.logger.isInfoEnabled()) {
-				this.logger.info("HttpListener deamon started successfully!");
-			}
-		} catch (Throwable thrown) {
-			State newState = State.Exception_thrown;
-			newState.setThrowable(thrown);
-			throw new ListenerInitializationException(thrown.getMessage(), thrown);
-		}
-	}
-
-	@Override
-	public void waitForEventAndProcess(long maxWaitMillis) {
-		// Not using this method in this AbstractManagedListener.
-		try {
-			Thread.sleep(maxWaitMillis);
-		} catch (InterruptedException e) {
-			logger.error("Unexpected interrupt exception.", e);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.jboss.soa.esb.listeners.AbstractManagedListener#isMessageAware()
-	 */
-	@Override
-	public boolean isMessageAware() {
-		return true;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.jboss.soa.esb.listeners.AbstractManagedListener#initializeRun()
-	 */
-	@Override
-	public boolean initializeRun() {
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.jboss.soa.esb.listeners.AbstractManagedListener#finalizeRun()
-	 */
-	@Override
-	public boolean finalizeRun() {
-		return false;
-	}
-	
-}
+/*
+ * 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.message;
+
+import javax.management.MBeanServer;
+
+import org.apache.log4j.Logger;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.Connector;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.AbstractManagedListener;
+import org.jboss.soa.esb.listeners.ListenerInitializationException;
+import org.jboss.soa.esb.listeners.ListenerManager;
+import org.jboss.soa.esb.listeners.State;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * Http listener implementation using the JBoss Remoting channel.
+ * 
+ * The listener will listen to messages on the configured listenHttpUrl. If this
+ * is not set, the default http://localhost:5400 will be used.
+ * 
+ * This listener expects an Object message whose type is org.jboss.soa.esb.message.Message
+ * 
+ * Sample listener Configuration:
+ * 
+ * <HttpListener listenerClass="org.jboss.soa.esb.listeners.message.HttpListener"/>
+ * 
+ * <pre>
+ *  &lt;HttpListener listenerClass=&quot;org.jboss.soa.esb.listeners.message.HttpListener&quot;&gt; 
+ *   	&lt;action class=&amp;quotorg.jboss.soa.esb.actions.routing.EchoRouter&quot;/&gt;     
+ *  &lt;/HttpListener&gt;
+ * </pre>
+ * 
+ * @author <a href="mailto:johan.kumps at telenet.be">Johan Kumps</a>
+ * 
+ */
+public class HttpListener extends AbstractManagedListener implements ServerInvocationHandler {
+
+	/* The logger for this class */
+	protected Logger logger = Logger.getLogger(HttpListener.class);
+
+	/* Boolean indicating whether the info logging level is enabled */
+	protected boolean info = this.logger.isInfoEnabled();
+
+	/* The url this listener will listen on */
+	private static final String LISTEN_HTTP_URL = "listenHttpUrl";
+
+	/* The url to listen on */
+	public String listenHttpUrl = null;
+
+	/* The default transport this listener will listen on */
+	private static final String transport = "http";
+
+	/* The default hostname this listener will listen on */
+	private static final String host = "localhost";
+
+	/* The default port this listener will listen on */
+	private static final int port = 5400;
+
+	/**
+	 * Constructor initialising this HttpListener
+	 * 
+	 * @param commandListener
+	 * @param listenerConfig
+	 * @param actionDefinitionFactory
+	 * @throws ConfigurationException
+	 * @throws ListenerInitializationException
+	 */
+	public HttpListener(ListenerManager esbListenerController,
+			ConfigTree configuration) throws ConfigurationException,
+			ListenerInitializationException {
+		super(esbListenerController, configuration);
+
+		this.checkParams();
+		this.initServer();
+
+	}
+
+	/*
+	 * Method being invoked when a request comes in.
+	 * 
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.remoting.ServerInvocationHandler#invoke(org.jboss.remoting.InvocationRequest)
+	 */
+	@SuppressWarnings("unchecked")
+	public Object invoke(InvocationRequest invocationRequest) throws Throwable {
+		// Retrieving the real payload of this invocationRequest
+		Object payload = invocationRequest.getParameter();
+
+		if (this.logger.isInfoEnabled()) {
+			this.logger
+					.info("HttpInvocationListener is invoked...The given payload is : "
+							+ payload);
+		}
+		if (payload instanceof Message){
+		// Start the action processing pipeline
+		ActionProcessingPipeline pipelineRunner = new ActionProcessingPipeline(
+						(Message)payload, this._config);
+		//this.pipelineExecutorPool.submit(pipelineRunner);
+		//The above does not invoke the process action, using the following instead.
+		new Thread(pipelineRunner).start();
+		} else {
+			this.logger.error("Unsupported HttpListener message type: " + payload.getClass().getName());
+		}
+		
+		return payload;
+	}
+	/**
+	 * Adds a callback handler that will listen for callbacks from the server
+	 * invoker handler.
+	 * 
+	 * @param callbackHandler
+	 */
+	public void addListener(InvokerCallbackHandler callbackHandler) {
+		// NO OP as do not handling callback listeners in this example
+	}
+
+	/**
+	 * Removes the callback handler that was listening for callbacks from the
+	 * server invoker handler.
+	 * 
+	 * @param callbackHandler
+	 */
+	public void removeListener(InvokerCallbackHandler callbackHandler) {
+		// NO OP as do not handling callback listeners in this example
+	}
+
+	/**
+	 * set the mbean server that the handler can reference
+	 * 
+	 * @param server
+	 */
+	public void setMBeanServer(MBeanServer server) {
+		// NO OP as do not need reference to MBeanServer for this handler
+	}
+
+	/**
+	 * set the invoker that owns this handler
+	 * 
+	 * @param invoker
+	 */
+	public void setInvoker(ServerInvoker invoker) {
+		// NO OP as do not need reference back to the server invoker
+	}
+
+	/**
+	 * Method getting the url this HttpListener instance is listening on
+	 * 
+	 * @return the current listenHttpUrl
+	 */
+	public String getListenHttpUrl() {
+		return listenHttpUrl;
+	}
+
+	/**
+	 * Method setting the listenHttpUrl property to listen on
+	 * 
+	 * @param listenHttpUrl
+	 *            the listenHttpUrl to be used by this HttpListener instance
+	 */
+	public void setListenHttpUrl(String listenHttpUrl) {
+		this.listenHttpUrl = listenHttpUrl;
+	}
+
+	/**
+	 * Check for mandatory and optional attributes in parameter tree
+	 */
+	private void checkParams() throws ConfigurationException {
+		// listener url
+		this.listenHttpUrl = this._config.getAttribute(LISTEN_HTTP_URL);
+		if (this.listenHttpUrl == null) {
+			this.listenHttpUrl = this.getDefaultListenHttpUrl();
+			if (this.logger.isInfoEnabled()){
+				this.logger
+						.info("Attribute listenHttpUrl has not been set on the HttpListener. Using default "
+								+ this.getDefaultListenHttpUrl());
+			}
+		}
+	}
+
+	/**
+	 * Method returning the default listenHttpUrl for this HttpListener instance
+	 * 
+	 * @return the default listen url
+	 */
+	private String getDefaultListenHttpUrl() {
+		return HttpListener.transport + "://" + HttpListener.host + ":"
+				+ HttpListener.port;
+	}
+
+	/**
+	 * Method initialising the remoting deamon
+	 * 
+	 * @throws ListenerInitialisationException
+	 * 
+	 * @throws ListenerInitializationException
+	 *             when something goes wrong during remoting deamon startup
+	 */
+	private void initServer() throws ListenerInitializationException {
+		try {
+			InvokerLocator locator = new InvokerLocator(this.listenHttpUrl);
+			if (this.logger.isInfoEnabled()) {
+				this.logger
+						.info("Starting remoting server with locator uri of: "
+								+ this.listenHttpUrl);
+			}
+			Connector connector = new Connector(locator);
+			connector.create();
+
+			connector.addInvocationHandler("HttpInvocationHandler", this);
+
+			// Starting the server deamon
+			connector.start();
+
+			if (this.logger.isInfoEnabled()) {
+				this.logger.info("HttpListener deamon started successfully!");
+			}
+		} catch (Throwable thrown) {
+			State newState = State.Exception_thrown;
+			newState.setThrowable(thrown);
+			throw new ListenerInitializationException(thrown.getMessage(), thrown);
+		}
+	}
+
+	@Override
+	public void waitForEventAndProcess(long maxWaitMillis) {
+		// Not using this method in this AbstractManagedListener.
+		try {
+			Thread.sleep(maxWaitMillis);
+		} catch (InterruptedException e) {
+			logger.error("Unexpected interrupt exception.", e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.soa.esb.listeners.AbstractManagedListener#isMessageAware()
+	 */
+	@Override
+	public boolean isMessageAware() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.soa.esb.listeners.AbstractManagedListener#initializeRun()
+	 */
+	@Override
+	public boolean initializeRun() {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.soa.esb.listeners.AbstractManagedListener#finalizeRun()
+	 */
+	@Override
+	public boolean finalizeRun() {
+		return false;
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/HttpListener.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,139 +1,139 @@
-<?xml version="1.0"?>
-<project name="build.listeners.tests" default="org.jboss.esb.listeners.tests.compile" basedir=".">
-
-    <property name="org.jboss.esb.module.src.dir" location="../src"/>
-    <property name="org.jboss.esb.module.classes.root.dir" location="${org.jboss.esb.internal.dest}/classes"/>
-    <property name="org.jboss.esb.module.classes.dir" location="${org.jboss.esb.internal.dest}/classes/listeners"/>
-    <property name="org.jboss.esb.module.tests.src.dir" location="src"/>
-    <property name="org.jboss.esb.tests.classes.dir" location="${org.jboss.esb.internal.dest}/tests"/>
-    <property name="org.jboss.esb.tests.report.dir" location="${org.jboss.esb.internal.dest}/tests/junit"/>
-    <property name="org.jboss.esb.root.dir" location="../.."/>
-	<property name="gendir" location="${org.jboss.esb.internal.dest}/schema-model" />
-    <property name="org.jboss.esb.module.tests.conf.dir" location="${org.jboss.esb.root.dir}/listeners/tests/resources/conf"/>
-
-    <property environment="env"/>
-
-    <property name="org.jboss.esb.test.ftp.hostname" value="ftp.ncl.ac.uk"/>
-    <property name="org.jboss.esb.test.ftp.user" value="anonymous"/>
-    <property name="org.jboss.esb.test.ftp.pwd" value=""/>
-    <property name="org.jboss.esb.test.ftp.dir" value="/pub/DNS"/>
+<?xml version="1.0"?>
+<project name="build.listeners.tests" default="org.jboss.esb.listeners.tests.compile" basedir=".">
 
-    <property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
-
-    <condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/client">
-        <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
-    </condition>
-
-    <path id="org.jboss.esb.tests.base.classpath">
-    	<fileset dir="${org.jboss.esb.ext.lib.dir}"
-    		excludes="*.jar" includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
-        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
-        <pathelement location="${org.jboss.esb.module.classes.root.dir}/rosetta"/>
-        <pathelement location="${org.jboss.esb.module.classes.root.dir}/services"/>
-    	<pathelement location="${gendir}/classes"/>
-        <pathelement location="${org.jboss.esb.module.classes.dir}"/>
-        <pathelement location="${org.jboss.esb.module.tests.conf.dir}"/>
-        <!--
-        <fileset dir="${org.jboss.esb.ext.lib.dir}"
-                 includes="activation.jar jbossall-client.jar log4j.jar mail.jar junit.jar emma.jar emma_ant.jar"/>
-        <pathelement location="${org.jboss.esb.module.classes.dir}"/>
-        -->
-    </path>
-
-    <target name="org.jboss.esb.tests.init">
-        <tstamp>
-            <format property="TODAY" pattern="dd-MM-yy"/>
-        </tstamp>
-
-        <mkdir dir="${org.jboss.esb.tests.classes.dir}"/>
-        <mkdir dir="${org.jboss.esb.tests.report.dir}"/>
-    </target>
-
-    <target name="clean">
-        <delete dir="${org.jboss.esb.tests.classes.dir}"/>
-        <delete file="TESTS-TestSuites.xml"/>
-    </target>
-
-    <target name="org.jboss.esb.listeners.tests.compile" if="org.jboss.esb.buildtests" depends="org.jboss.esb.tests.init">
-
-        <javac
-                destdir="${org.jboss.esb.tests.classes.dir}"
-                classpathref="org.jboss.esb.tests.base.classpath"
-                debug="${org.jboss.esb.debug}"
-                optimize="${org.jboss.esb.optimize}"
-                >
-            <src path="${org.jboss.esb.module.tests.src.dir}"/>
-        </javac>
-
-    </target>
-
-    <!-- ====================================================================== -->
-    <!--                             T E S T                                    -->
-    <!-- ====================================================================== -->
-    <target name="org.jboss.esb.listeners.internal.test">
-	    <property name="org.jboss.esb.module.tests.coverage.dir" location="${org.jboss.esb.internal.dest}/tests/coverage/listeners"/>
-        <property name="org.jboss.esb.module.classes.instr.dir" location="${org.jboss.esb.module.tests.coverage.dir}/instr" />
-
-		<!-- Instrument the code for code coverage - using emma... -->
-    	<delete dir="${org.jboss.esb.module.tests.coverage.dir}" />
-	    <mkdir dir="${org.jboss.esb.module.tests.coverage.dir}" />
-        <emma>
-			<instr 	instrpath="${org.jboss.esb.module.classes.dir}" 
-					destdir="${org.jboss.esb.module.classes.instr.dir}" 
-					metadatafile="${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
-	    </emma>        
-    	<!-- Run the tests -->
-        <antcall target="org.jboss.esb.services.internal.test.exec"/>        
-
-    	<!-- Generate the coverage report -->
-        <emma>
-			<report sourcepath="${org.jboss.esb.module.src.dir}" sort="+block,+name,+method,+class" metrics="method:70,block:80,line:80,class:100">
-		        <fileset dir="${org.jboss.esb.module.tests.coverage.dir}" >
-					<include name="*.emma" />
-		        </fileset>
-		        <html outfile="${org.jboss.esb.module.tests.coverage.dir}/index.html" depth="method" columns="name,line,class,method,block"/>
-			</report>
-	    </emma>
-    </target>
-
-    <!-- ====================================================================== -->
-    <!--         U N I T   A N D   F U N C T I O N A L   T E S T S              -->
-    <!-- ====================================================================== -->
-    <target name="org.jboss.esb.services.internal.test.exec">
-        <echo message="Running tests for module, excluding integration"/>
-        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
-            <formatter type="plain" usefile="false"/>
-            <formatter type="xml"/>
-            <batchtest todir="${org.jboss.esb.tests.report.dir}">
-                <fileset dir="${org.jboss.esb.module.tests.src.dir}">
-                    <include name="**/**UnitTest.java"/>
-                    <include name="**/**FuncTest.java"/>
-                </fileset>
-            </batchtest>
-            <classpath>
-        		<!-- using instrumented code for code coverage -->
-                <pathelement location="${org.jboss.esb.module.classes.instr.dir}"/>
-                <pathelement location="${org.jboss.esb.tests.classes.dir}"/>
-            	<!-- Need the tests src folder because there may be non-compiled test resources -->
-                <pathelement location="${org.jboss.esb.module.tests.src.dir}"/>
-                <path refid="org.jboss.esb.tests.base.classpath"/>
-            </classpath>
-       	    <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
-            <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
-            <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
-            <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
-			<!-- emma jvm args -->
-			<jvmarg value="-Demma.coverage.out.file=${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
-			<jvmarg value="-Demma.coverage.out.merge=true" />
-        </junit>
-        <junitreport>
-            <fileset dir="${org.jboss.esb.tests.report.dir}">
-                <include name="*.xml"/>
-            </fileset>
-            <report format="frames" todir="${org.jboss.esb.tests.report.dir}"/>
-            <report format="noframes" todir="${org.jboss.esb.tests.report.dir}"/>
-        </junitreport>
+    <property name="org.jboss.esb.module.src.dir" location="../src"/>
+    <property name="org.jboss.esb.module.classes.root.dir" location="${org.jboss.esb.internal.dest}/classes"/>
+    <property name="org.jboss.esb.module.classes.dir" location="${org.jboss.esb.internal.dest}/classes/listeners"/>
+    <property name="org.jboss.esb.module.tests.src.dir" location="src"/>
+    <property name="org.jboss.esb.tests.classes.dir" location="${org.jboss.esb.internal.dest}/tests"/>
+    <property name="org.jboss.esb.tests.report.dir" location="${org.jboss.esb.internal.dest}/tests/junit"/>
+    <property name="org.jboss.esb.root.dir" location="../.."/>
+	<property name="gendir" location="${org.jboss.esb.internal.dest}/schema-model" />
+    <property name="org.jboss.esb.module.tests.conf.dir" location="${org.jboss.esb.root.dir}/listeners/tests/resources/conf"/>
+
+    <property environment="env"/>
+
+    <property name="org.jboss.esb.test.ftp.hostname" value="ftp.ncl.ac.uk"/>
+    <property name="org.jboss.esb.test.ftp.user" value="anonymous"/>
+    <property name="org.jboss.esb.test.ftp.pwd" value=""/>
+    <property name="org.jboss.esb.test.ftp.dir" value="/pub/DNS"/>
+
+    <property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
+
+    <condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/client">
+        <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+    </condition>
+
+    <path id="org.jboss.esb.tests.base.classpath">
+    	<fileset dir="${org.jboss.esb.ext.lib.dir}"
+    		excludes="*.jar" includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
+        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
+        <pathelement location="${org.jboss.esb.module.classes.root.dir}/rosetta"/>
+        <pathelement location="${org.jboss.esb.module.classes.root.dir}/services"/>
+    	<pathelement location="${gendir}/classes"/>
+        <pathelement location="${org.jboss.esb.module.classes.dir}"/>
+        <pathelement location="${org.jboss.esb.module.tests.conf.dir}"/>
+        <!--
+        <fileset dir="${org.jboss.esb.ext.lib.dir}"
+                 includes="activation.jar jbossall-client.jar log4j.jar mail.jar junit.jar emma.jar emma_ant.jar"/>
+        <pathelement location="${org.jboss.esb.module.classes.dir}"/>
+        -->
+    </path>
+
+    <target name="org.jboss.esb.tests.init">
+        <tstamp>
+            <format property="TODAY" pattern="dd-MM-yy"/>
+        </tstamp>
+
+        <mkdir dir="${org.jboss.esb.tests.classes.dir}"/>
+        <mkdir dir="${org.jboss.esb.tests.report.dir}"/>
     </target>
+
+    <target name="clean">
+        <delete dir="${org.jboss.esb.tests.classes.dir}"/>
+        <delete file="TESTS-TestSuites.xml"/>
+    </target>
+
+    <target name="org.jboss.esb.listeners.tests.compile" if="org.jboss.esb.buildtests" depends="org.jboss.esb.tests.init">
+
+        <javac
+                destdir="${org.jboss.esb.tests.classes.dir}"
+                classpathref="org.jboss.esb.tests.base.classpath"
+                debug="${org.jboss.esb.debug}"
+                optimize="${org.jboss.esb.optimize}"
+                >
+            <src path="${org.jboss.esb.module.tests.src.dir}"/>
+        </javac>
+
+    </target>
+
+    <!-- ====================================================================== -->
+    <!--                             T E S T                                    -->
+    <!-- ====================================================================== -->
+    <target name="org.jboss.esb.listeners.internal.test">
+	    <property name="org.jboss.esb.module.tests.coverage.dir" location="${org.jboss.esb.internal.dest}/tests/coverage/listeners"/>
+        <property name="org.jboss.esb.module.classes.instr.dir" location="${org.jboss.esb.module.tests.coverage.dir}/instr" />
+
+		<!-- Instrument the code for code coverage - using emma... -->
+    	<delete dir="${org.jboss.esb.module.tests.coverage.dir}" />
+	    <mkdir dir="${org.jboss.esb.module.tests.coverage.dir}" />
+        <emma>
+			<instr 	instrpath="${org.jboss.esb.module.classes.dir}" 
+					destdir="${org.jboss.esb.module.classes.instr.dir}" 
+					metadatafile="${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
+	    </emma>        
+    	<!-- Run the tests -->
+        <antcall target="org.jboss.esb.services.internal.test.exec"/>        
+
+    	<!-- Generate the coverage report -->
+        <emma>
+			<report sourcepath="${org.jboss.esb.module.src.dir}" sort="+block,+name,+method,+class" metrics="method:70,block:80,line:80,class:100">
+		        <fileset dir="${org.jboss.esb.module.tests.coverage.dir}" >
+					<include name="*.emma" />
+		        </fileset>
+		        <html outfile="${org.jboss.esb.module.tests.coverage.dir}/index.html" depth="method" columns="name,line,class,method,block"/>
+			</report>
+	    </emma>
+    </target>
+
+    <!-- ====================================================================== -->
+    <!--         U N I T   A N D   F U N C T I O N A L   T E S T S              -->
+    <!-- ====================================================================== -->
+    <target name="org.jboss.esb.services.internal.test.exec">
+        <echo message="Running tests for module, excluding integration"/>
+        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
+            <formatter type="plain" usefile="false"/>
+            <formatter type="xml"/>
+            <batchtest todir="${org.jboss.esb.tests.report.dir}">
+                <fileset dir="${org.jboss.esb.module.tests.src.dir}">
+                    <include name="**/**UnitTest.java"/>
+                    <include name="**/**FuncTest.java"/>
+                </fileset>
+            </batchtest>
+            <classpath>
+        		<!-- using instrumented code for code coverage -->
+                <pathelement location="${org.jboss.esb.module.classes.instr.dir}"/>
+                <pathelement location="${org.jboss.esb.tests.classes.dir}"/>
+            	<!-- Need the tests src folder because there may be non-compiled test resources -->
+                <pathelement location="${org.jboss.esb.module.tests.src.dir}"/>
+                <path refid="org.jboss.esb.tests.base.classpath"/>
+            </classpath>
+       	    <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
+            <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
+            <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
+            <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
+			<!-- emma jvm args -->
+			<jvmarg value="-Demma.coverage.out.file=${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
+			<jvmarg value="-Demma.coverage.out.merge=true" />
+        </junit>
+        <junitreport>
+            <fileset dir="${org.jboss.esb.tests.report.dir}">
+                <include name="*.xml"/>
+            </fileset>
+            <report format="frames" todir="${org.jboss.esb.tests.report.dir}"/>
+            <report format="noframes" todir="${org.jboss.esb.tests.report.dir}"/>
+        </junitreport>
+    </target>
 	
 	<!-- ====================================================================== -->
     <!--                             INTEGRATION T E S TS                       -->
@@ -187,10 +187,10 @@
 	                <pathelement location="${org.jboss.esb.module.tests.src.dir}"/>
 	                <path refid="org.jboss.esb.tests.base.classpath"/>
 	            </classpath>
-       	            <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
-                    <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
-                    <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
-                    <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
+       	            <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
+                    <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
+                    <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
+                    <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
 				<!-- emma jvm args -->
 				<jvmarg value="-Demma.coverage.out.file=${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
 				<jvmarg value="-Demma.coverage.out.merge=true" />
@@ -203,5 +203,5 @@
 	            <report format="noframes" todir="${org.jboss.esb.tests.report.dir}"/>
 	        </junitreport>
 	    </target>
-	
-</project>
+	
+</project>


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/resources/conf/log4j.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/device-profile.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/BaseTestActionProcessor.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/TestBean.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/ToNowhereRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/ByteArrayToStringUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/LongToDateConverter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/ObjectToCSVStringUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/ObjectToXStreamUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/SmooksTransformerUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/StringToLongConverter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerBaseTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerFTPIntegrationTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerFileUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJMSXntegrationTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,116 +1,116 @@
-/*
-* 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 static org.junit.Assert.assertTrue;
-
-import java.io.File;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
-import org.junit.Test;
-
-/**
- * Testing configuration controller.
- * 
- * @author kurt.stam at redhat.com
- *
- */
-public class ConfigurationControlerUnitTest 
-{
-	private static Logger logger = Logger.getLogger(ConfigurationControlerUnitTest.class);
-	
-	/**
-	 * Testing the Content Based Router.
-	 */
-	@Test
-	public void readAndGenerateConfig() throws Exception
-	{
-		String configFileName = TestEnvironmentUtil.getUserDir("product") 
-			+ "core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml";
-		//Make sure this file exists
-		File configFile = new File(configFileName);
-		if (!configFile.exists()){
-			assertTrue(false);
-		}
-		//Remove the listener and gateway configuration files if the 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.0.xsd";
-//		Make sure this file exists
-		File validationFile = new File(validationFileName);
-		if (!validationFile.exists()){
-			assertTrue(false);
-		}
-		ConfigurationController configurationController = new ConfigurationController(configFileName, validationFileName);
-		Thread controller = new Thread(configurationController);
-		controller.start();
-		int deciSeconds=0;
-		//wait till the file files are there, or timeout after 8 seconds
-		while (!configurationController.hasEnded()) {
-			if (listenerFile.exists() && (gatewayFile.exists())){
-				break;
-			} else {
-				if (deciSeconds++>8) {
-					break;
-				} else {
-					Thread.sleep(1000);
-				}
-			}	
-		}
-		configurationController.requestEnd();
-		for (int i=0; i<currentDir.listFiles().length;i++){
-			logger.info(currentDir.listFiles()[i].getName());
-		}
-		if (listenerFile.exists()) {
-			listenerFile.delete();
-		} else {
-			//Listener file should exist if all was successful
-			System.out.println("file=" + listenerFile.getAbsolutePath() + " does not exist, while it should have.");
-			assertTrue(false);
-		}
-		if (gatewayFile.exists()) {
-			gatewayFile.delete();
-		} else {
-			//Gateway file should exist if all was successful
-			System.out.println("file=" + gatewayFile.getAbsolutePath() + " does not exist, while it should have.");
-			assertTrue(false);
-		}
-	}
-	
-	public static junit.framework.Test suite() {
-		return new JUnit4TestAdapter(ConfigurationControlerUnitTest.class);
-	}
-
-}
+/*
+* 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 static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
+import org.junit.Test;
+
+/**
+ * Testing configuration controller.
+ * 
+ * @author kurt.stam at redhat.com
+ *
+ */
+public class ConfigurationControlerUnitTest 
+{
+	private static Logger logger = Logger.getLogger(ConfigurationControlerUnitTest.class);
+	
+	/**
+	 * Testing the Content Based Router.
+	 */
+	@Test
+	public void readAndGenerateConfig() throws Exception
+	{
+		String configFileName = TestEnvironmentUtil.getUserDir("product") 
+			+ "core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml";
+		//Make sure this file exists
+		File configFile = new File(configFileName);
+		if (!configFile.exists()){
+			assertTrue(false);
+		}
+		//Remove the listener and gateway configuration files if the 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.0.xsd";
+//		Make sure this file exists
+		File validationFile = new File(validationFileName);
+		if (!validationFile.exists()){
+			assertTrue(false);
+		}
+		ConfigurationController configurationController = new ConfigurationController(configFileName, validationFileName);
+		Thread controller = new Thread(configurationController);
+		controller.start();
+		int deciSeconds=0;
+		//wait till the file files are there, or timeout after 8 seconds
+		while (!configurationController.hasEnded()) {
+			if (listenerFile.exists() && (gatewayFile.exists())){
+				break;
+			} else {
+				if (deciSeconds++>8) {
+					break;
+				} else {
+					Thread.sleep(1000);
+				}
+			}	
+		}
+		configurationController.requestEnd();
+		for (int i=0; i<currentDir.listFiles().length;i++){
+			logger.info(currentDir.listFiles()[i].getName());
+		}
+		if (listenerFile.exists()) {
+			listenerFile.delete();
+		} else {
+			//Listener file should exist if all was successful
+			System.out.println("file=" + listenerFile.getAbsolutePath() + " does not exist, while it should have.");
+			assertTrue(false);
+		}
+		if (gatewayFile.exists()) {
+			gatewayFile.delete();
+		} else {
+			//Gateway file should exist if all was successful
+			System.out.println("file=" + gatewayFile.getAbsolutePath() + " does not exist, while it should have.");
+			assertTrue(false);
+		}
+	}
+	
+	public static junit.framework.Test suite() {
+		return new JUnit4TestAdapter(ConfigurationControlerUnitTest.class);
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/XmlValidatorUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,107 +1,107 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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">
-			<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"/>
-			</sql-bus>
-		</sql-provider>
-
-		<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>
-		</provider>
-
-	</providers>
-	<services>    
-		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service" is-gateway="true" target-service-category="Bank" target-service-name="Reconciliation">
-		
-			<listeners>    	    
-				<jms-listener name="Bank-JMS-Gateway"
-							busidref="server1-jms"
-							maxThreads="1"/>
-			</listeners>    	
-			
-		</service> 
-		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service" is-gateway="false">
-		
-			<listeners>    	    
-				<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" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction">
-					<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" is-gateway="false">
-		
-			<listeners>    	    
-				<ftp-listener name="test-ftp-listener"
-							busidref="Ftp-ServerTest"
-							maxThreads="1"/>
-			</listeners>
-			<actions>    	    
-				<action name="TestFtpRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction"/>
-			</actions> 	
-			
-		</service>
-		<service category="Test3" name="SQLTest" description="SQL server Test" is-gateway="false">
-		
-			<listeners>    	    
-				<sql-listener name="test-sql-listener"
-							busidref="SQL-Test"
-							maxThreads="1"/>
-			</listeners>
-			<actions>    	    
-				<action name="TestSqlRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction"/>
-			</actions> 	
-			
-		</service>
-	</services>
-	
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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">
+			<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"/>
+			</sql-bus>
+		</sql-provider>
+
+		<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>
+		</provider>
+
+	</providers>
+	<services>    
+		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service" is-gateway="true" target-service-category="Bank" target-service-name="Reconciliation">
+		
+			<listeners>    	    
+				<jms-listener name="Bank-JMS-Gateway"
+							busidref="server1-jms"
+							maxThreads="1"/>
+			</listeners>    	
+			
+		</service> 
+		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service" is-gateway="false">
+		
+			<listeners>    	    
+				<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" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction">
+					<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" is-gateway="false">
+		
+			<listeners>    	    
+				<ftp-listener name="test-ftp-listener"
+							busidref="Ftp-ServerTest"
+							maxThreads="1"/>
+			</listeners>
+			<actions>    	    
+				<action name="TestFtpRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction"/>
+			</actions> 	
+			
+		</service>
+		<service category="Test3" name="SQLTest" description="SQL server Test" is-gateway="false">
+		
+			<listeners>    	    
+				<sql-listener name="test-sql-listener"
+							busidref="SQL-Test"
+							maxThreads="1"/>
+			</listeners>
+			<actions>    	    
+				<action name="TestSqlRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction"/>
+			</actions> 	
+			
+		</service>
+	</services>
+	
 </jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,41 +1,41 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-	NOTE: DO NOT MODIFY
-	This file was auto-generated.
--->
-<jbossesb-listeners parameterReloadSecs="180">
-<Bank-Listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation">
-<EPR connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" protocol="jms"/>
-<action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.CbrProxyAction" process="route" propName="propValue">
-						This is some complex..
-						<!-- property -->
-						value.
-						<xxxx>
-							boooo
-							<yyyy/>
-						</xxxx>
-						 Some CDATA data...
-					</action>
-</Bank-Listener>
-<Bank-Listener-Generic listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" my-generic-listener="my-generic-listener#someattribvalue" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation">
-<EPR my-generic-bus="my-generic-bus#someattribvalue" my-generic-provider="my-generic-provider#someattribvalue"/>
-<action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.CbrProxyAction" process="route" propName="propValue">
-						This is some complex..
-						<!-- property -->
-						value.
-						<xxxx>
-							boooo
-							<yyyy/>
-						</xxxx>
-						 Some CDATA data...
-					</action>
-</Bank-Listener-Generic>
-<test-ftp-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" pollLatencySeconds="10" service-category="Test2" service-description="FTP server Test" service-name="FTPTest">
-<EPR URL="ftp://joe:secret@localhost:/Temp" errorDelete="true" inputSuffix=".txt" passive="false" postDelete="true" workSuffix=".esbInProcess"/>
-<action action="TestFtpRouteAction" class="org.jboss.soa.esb.actions.CbrProxyAction" process="route"/>
-</test-ftp-listener>
-<test-sql-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" pollLatencySeconds="10" service-category="Test3" service-description="SQL server Test" service-name="SQLTest">
-<EPR URL="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" errorDelete="true" insert_timestamp_column="insert_timestamp" message_column="message" message_id_column="message_id" password="secret" postDelete="true" status_column="status" tablename="testtable" username="joe"/>
-<action action="TestSqlRouteAction" class="org.jboss.soa.esb.actions.CbrProxyAction" process="route"/>
-</test-sql-listener>
-</jbossesb-listeners>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	NOTE: DO NOT MODIFY
+	This file was auto-generated.
+-->
+<jbossesb-listeners parameterReloadSecs="180">
+<Bank-Listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation">
+<EPR connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" protocol="jms"/>
+<action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.CbrProxyAction" process="route" propName="propValue">
+						This is some complex..
+						<!-- property -->
+						value.
+						<xxxx>
+							boooo
+							<yyyy/>
+						</xxxx>
+						 Some CDATA data...
+					</action>
+</Bank-Listener>
+<Bank-Listener-Generic listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" my-generic-listener="my-generic-listener#someattribvalue" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation">
+<EPR my-generic-bus="my-generic-bus#someattribvalue" my-generic-provider="my-generic-provider#someattribvalue"/>
+<action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.CbrProxyAction" process="route" propName="propValue">
+						This is some complex..
+						<!-- property -->
+						value.
+						<xxxx>
+							boooo
+							<yyyy/>
+						</xxxx>
+						 Some CDATA data...
+					</action>
+</Bank-Listener-Generic>
+<test-ftp-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" pollLatencySeconds="10" service-category="Test2" service-description="FTP server Test" service-name="FTPTest">
+<EPR URL="ftp://joe:secret@localhost:/Temp" errorDelete="true" inputSuffix=".txt" passive="false" postDelete="true" workSuffix=".esbInProcess"/>
+<action action="TestFtpRouteAction" class="org.jboss.soa.esb.actions.CbrProxyAction" process="route"/>
+</test-ftp-listener>
+<test-sql-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" pollLatencySeconds="10" service-category="Test3" service-description="SQL server Test" service-name="SQLTest">
+<EPR URL="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" errorDelete="true" insert_timestamp_column="insert_timestamp" message_column="message" message_id_column="message_id" password="secret" postDelete="true" status_column="status" tablename="testtable" username="joe"/>
+<action action="TestSqlRouteAction" class="org.jboss.soa.esb.actions.CbrProxyAction" process="route"/>
+</test-sql-listener>
+</jbossesb-listeners>


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-	NOTE: DO NOT MODIFY
-	This file was auto-generated.
--->
-<jbossesb-gateways parameterReloadSecs="180">
-<Bank-JMS-Gateway connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation" target-service-category="Bank" target-service-name="Reconciliation"/>
-</jbossesb-gateways>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	NOTE: DO NOT MODIFY
+	This file was auto-generated.
+-->
+<jbossesb-gateways parameterReloadSecs="180">
+<Bank-JMS-Gateway connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation" target-service-category="Bank" target-service-name="Reconciliation"/>
+</jbossesb-gateways>


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd">
-
-	<providers>
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd">
+
+	<providers>
 		<provider name="JBossMQ">
 			<property name="connection-factory" value="ConnectionFactory" />
 			<property name="jndi-URL" value="jnp://localhost:1099" />
@@ -13,39 +13,39 @@
 				<property name="message-selector" value="service='Reconciliation'" />
 			</bus>
 		</provider>
-		
-		<provider name="JBossMessaging">
+		
+		<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" />
 
-			<bus busid="server1-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'" />
-			</bus>
-		</provider>
-		
-		<provider name="FTP">
+			</bus>
+		</provider>
+		
+		<provider name="FTP">
 			<property name="URL" value="ftp://joe:secret@localhost:/Temp" />
 
-			<bus busid="Ftp-ServerTest">
+			<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>
-		</provider>
-		
-		<provider name="HSQLDB">
+			</bus>
+		</provider>
+		
+		<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">
+			<bus busid="SQL-Test">
 				<property name="tablename" value="testtable" />
 
 				<property name="tablename" value="testtable" />
@@ -55,89 +55,89 @@
 				<property name="errorDelete" value="true" />
 				<property name="insert_timestamp_column" value="insert_timestamp" />
 				<property name="postDelete" value="true" />
-			</bus>
-		</provider>
-
-		<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>
-		</provider>
-
-	</providers>
-	<services>    
-		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service" is-gateway="true" target-service-category="Bank" target-service-name="Reconciliation">
-		
-			<listeners>    	    
-				<listener name="Bank-JMS-Gateway"
-							busidref="server1-jms"
-							maxThreads="1">
+			</bus>
+		</provider>
+
+		<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>
+		</provider>
+
+	</providers>
+	<services>    
+		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service" is-gateway="true" target-service-category="Bank" target-service-name="Reconciliation">
+		
+			<listeners>    	    
+				<listener name="Bank-JMS-Gateway"
+							busidref="server1-jms"
+							maxThreads="1">
 					<property name="gatewayClass" value="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" />
 				</listener>
-			</listeners>    	
-			
-		</service> 
-		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service" is-gateway="false">
-		
-			<listeners>    	    
-				<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" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction">
-					<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" is-gateway="false">
-		
-			<listeners>    	    
-				<listener name="test-ftp-listener"
-							busidref="Ftp-ServerTest"
-							maxThreads="1">
-							<property name="pollLatencySeconds" value="10" />
-				</listener>
-			</listeners>
-			<actions>    	    
-				<action name="TestFtpRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction"/>
-			</actions> 	
-			
-		</service>
-		<service category="Test3" name="SQLTest" description="SQL server Test" is-gateway="false">
-		
-			<listeners>    	    
-				<listener name="test-sql-listener"
-							busidref="SQL-Test"
-							maxThreads="1">
-							<property name="pollLatencySeconds" value="10" />
-				</listener>
-			</listeners>
-			<actions>    	    
-				<action name="TestSqlRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction"/>
-			</actions> 	
-			
-		</service>
-	</services>
-	
+			</listeners>    	
+			
+		</service> 
+		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service" is-gateway="false">
+		
+			<listeners>    	    
+				<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" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction">
+					<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" is-gateway="false">
+		
+			<listeners>    	    
+				<listener name="test-ftp-listener"
+							busidref="Ftp-ServerTest"
+							maxThreads="1">
+							<property name="pollLatencySeconds" value="10" />
+				</listener>
+			</listeners>
+			<actions>    	    
+				<action name="TestFtpRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction"/>
+			</actions> 	
+			
+		</service>
+		<service category="Test3" name="SQLTest" description="SQL server Test" is-gateway="false">
+		
+			<listeners>    	    
+				<listener name="test-sql-listener"
+							busidref="SQL-Test"
+							maxThreads="1">
+							<property name="pollLatencySeconds" value="10" />
+				</listener>
+			</listeners>
+			<actions>    	    
+				<action name="TestSqlRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction"/>
+			</actions> 	
+			
+		</service>
+	</services>
+	
 </jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,43 +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.0.xsd" >
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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" is-gateway="false">
-            <listeners>
-                <listener name="JMS-ESBListener"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />                
-            </listeners>
-            <actions>
-               <action name="displayAction" 
-               		class="quickstart.helloworld_action.MyJMSListenerAction" 
-               		process="displayMessage">
-               		<property name="exceptionMethod" value="exceptionHandler"/>
-               </action>
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>
+
+    <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" is-gateway="false">
+            <listeners>
+                <listener name="JMS-ESBListener"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />                
+            </listeners>
+            <actions>
+               <action name="displayAction" 
+               		class="quickstart.helloworld_action.MyJMSListenerAction" 
+               		process="displayMessage">
+               		<property name="exceptionMethod" value="exceptionHandler"/>
+               </action>
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_03.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/GatewayListenerControllerBaseTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/juddi-unittest.properties
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/juddi-unittest.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/juddi-unittest.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=org.hsqldb.jdbcDriver
-juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/juddi
-juddi.jdbcUsername=sa
-juddi.jdbcPassword=
-# jUDDI DataSource to use
-juddi.dataSource=java:comp/env/jdbc/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=org.hsqldb.jdbcDriver
+juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/juddi
+juddi.jdbcUsername=sa
+juddi.jdbcPassword=
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/juddi-unittest.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/juddi-unittest.properties
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/juddi-unittest.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/juddi-unittest.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=org.hsqldb.jdbcDriver
-juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/juddi
-juddi.jdbcUsername=sa
-juddi.jdbcPassword=
-# jUDDI DataSource to use
-juddi.dataSource=java:comp/env/jdbc/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=org.hsqldb.jdbcDriver
+juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/juddi
+juddi.jdbcUsername=sa
+juddi.jdbcPassword=
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/juddi-unittest.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/listenerFile.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/listenerFtp.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/listenerJdbc.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/listenerJms.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/util/MockNotificationTarget.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,85 +1,85 @@
-<?xml version="1.0"?>
-<project name="BuildJbossEsbRosetta" default="org.jboss.esb.rosetta.compile" basedir=".">
-
-	<property name="org.jboss.esb.rosetta.jar.name" value="jbossesb-rosetta"/>
-	<property name="org.jboss.esb.rosetta.distrib.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
-	<property name="org.jboss.esb.rosetta.classes.dir" location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
-    <property name="org.jboss.esb.rosetta.src.dir" location="src"/>
-	<property name="org.jboss.esb.root.dir" location="../.."/>
-    <property environment="env"/>
-
-	<property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
-	<condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/client">
-		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
-	</condition>
-	
-	<path id="org.jboss.esb.rosetta.base.classpath">
-        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
-	</path>
-
-    <target name="org.jboss.esb.rosetta.init">
-        <tstamp>
-            <format property="TODAY" pattern="dd-MM-yy"/>
-        </tstamp>
-    </target>
-
-    <target name="org.jboss.esb.rosetta.prepare" depends="org.jboss.esb.rosetta.init">
-        <mkdir dir="${org.jboss.esb.rosetta.classes.dir}"/>
-        <mkdir dir="${org.jboss.esb.rosetta.distrib.dir}"/>
-    	<mkdir dir="${org.jboss.esb.rosetta.distrib.dir}/lib"/>
-    </target>
-
-    <target name="clean" description="Remove classes directory">
-        <ant dir="tests" target="clean"/>
-    	<delete dir="${org.jboss.esb.rosetta.classes.dir}"/>
-    </target>
-
-    <target name="org.jboss.esb.rosetta.compile">
-        <!-- Compile common -->
-        <antcall target="org.jboss.esb.rosetta.internal.compile"/>
-        <!-- Compile common tests -->
-        <ant inheritAll="true" dir="tests" target="org.jboss.esb.rosetta.tests.compile"/>
-    </target>
-
-    <target name="org.jboss.esb.rosetta.internal.compile" depends="org.jboss.esb.rosetta.prepare"
-        description="Compile all classes">
-
-        <javac
-            destdir="${org.jboss.esb.rosetta.classes.dir}"
-            classpathref="org.jboss.esb.rosetta.base.classpath"
-            debug="${org.jboss.esb.debug}"
-            optimize="${org.jboss.esb.optimize}"
-            >
-            <src path="${org.jboss.esb.rosetta.src.dir}"/>
-        </javac>
-
-    </target>
-
-	<target name="recompile" depends="clean,org.jboss.esb.rosetta.compile"
-        description="Clean and compile"/>
-
-    <target name="jar" depends="org.jboss.esb.rosetta.compile" description="Assemble jar files">
-    	<delete file="${org.jboss.esb.rosetta.distrib.dir}/lib/${org.jboss.esb.rosetta.jar.name}.jar" />
-        <jar    destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/${org.jboss.esb.rosetta.jar.name}.jar" 
-                basedir="${org.jboss.esb.rosetta.classes.dir}" 
-                includes="**/*.class"
-		excludes="test/**"
-                />
-    	<jar    destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/test-util.jar" 
-    	                basedir="${org.jboss.esb.internal.dest}/tests/" 
-    	                includes="org/jboss/soa/esb/testutils/**/*.class"/>
-    </target>
-
-    <target name="org.jboss.esb.rosetta.test" description="Run tests for this module">
-        <!-- Compile rosetta tests -->
-        <ant dir="tests" target="org.jboss.esb.rosetta.internal.test"/>
+<?xml version="1.0"?>
+<project name="BuildJbossEsbRosetta" default="org.jboss.esb.rosetta.compile" basedir=".">
+
+	<property name="org.jboss.esb.rosetta.jar.name" value="jbossesb-rosetta"/>
+	<property name="org.jboss.esb.rosetta.distrib.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
+	<property name="org.jboss.esb.rosetta.classes.dir" location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
+    <property name="org.jboss.esb.rosetta.src.dir" location="src"/>
+	<property name="org.jboss.esb.root.dir" location="../.."/>
+    <property environment="env"/>
+
+	<property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
+	<condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/client">
+		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+	</condition>
+	
+	<path id="org.jboss.esb.rosetta.base.classpath">
+        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
+	</path>
+
+    <target name="org.jboss.esb.rosetta.init">
+        <tstamp>
+            <format property="TODAY" pattern="dd-MM-yy"/>
+        </tstamp>
     </target>
+
+    <target name="org.jboss.esb.rosetta.prepare" depends="org.jboss.esb.rosetta.init">
+        <mkdir dir="${org.jboss.esb.rosetta.classes.dir}"/>
+        <mkdir dir="${org.jboss.esb.rosetta.distrib.dir}"/>
+    	<mkdir dir="${org.jboss.esb.rosetta.distrib.dir}/lib"/>
+    </target>
+
+    <target name="clean" description="Remove classes directory">
+        <ant dir="tests" target="clean"/>
+    	<delete dir="${org.jboss.esb.rosetta.classes.dir}"/>
+    </target>
+
+    <target name="org.jboss.esb.rosetta.compile">
+        <!-- Compile common -->
+        <antcall target="org.jboss.esb.rosetta.internal.compile"/>
+        <!-- Compile common tests -->
+        <ant inheritAll="true" dir="tests" target="org.jboss.esb.rosetta.tests.compile"/>
+    </target>
+
+    <target name="org.jboss.esb.rosetta.internal.compile" depends="org.jboss.esb.rosetta.prepare"
+        description="Compile all classes">
+
+        <javac
+            destdir="${org.jboss.esb.rosetta.classes.dir}"
+            classpathref="org.jboss.esb.rosetta.base.classpath"
+            debug="${org.jboss.esb.debug}"
+            optimize="${org.jboss.esb.optimize}"
+            >
+            <src path="${org.jboss.esb.rosetta.src.dir}"/>
+        </javac>
+
+    </target>
+
+	<target name="recompile" depends="clean,org.jboss.esb.rosetta.compile"
+        description="Clean and compile"/>
+
+    <target name="jar" depends="org.jboss.esb.rosetta.compile" description="Assemble jar files">
+    	<delete file="${org.jboss.esb.rosetta.distrib.dir}/lib/${org.jboss.esb.rosetta.jar.name}.jar" />
+        <jar    destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/${org.jboss.esb.rosetta.jar.name}.jar" 
+                basedir="${org.jboss.esb.rosetta.classes.dir}" 
+                includes="**/*.class"
+		excludes="test/**"
+                />
+    	<jar    destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/test-util.jar" 
+    	                basedir="${org.jboss.esb.internal.dest}/tests/" 
+    	                includes="org/jboss/soa/esb/testutils/**/*.class"/>
+    </target>
+
+    <target name="org.jboss.esb.rosetta.test" description="Run tests for this module">
+        <!-- Compile rosetta tests -->
+        <ant dir="tests" target="org.jboss.esb.rosetta.internal.test"/>
+    </target>
 	
 	<target name="org.jboss.esb.rosetta.integration.test" description="Run integration tests for this module">
 	        <!-- Compile rosetta integration tests -->
 	        <ant dir="tests" target="org.jboss.esb.rosetta.internal.integration.test"/>
-	    </target>
-
-    <target name="all" depends="recompile,jar" />
-
-</project>
+	    </target>
+
+    <target name="all" depends="recompile,jar" />
+
+</project>


Property changes on: labs/jbossesb/trunk/product/core/rosetta/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,160 +1,160 @@
-package org.jboss.internal.soa.esb.addressing.helpers;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.jboss.internal.soa.esb.assertion.AssertArgument;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public abstract class CallHelper
-{
-
-	public static Element toXML (Call call, Document doc, Element header) throws MarshalException
-	{
-		AssertArgument.isNotNull(call, "call");
-		AssertArgument.isNotNull(doc, "doc");
-		AssertArgument.isNotNull(header, "header");
-		
-		if (call.getTo() != null)
-		{
-			Element toElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.TO_TAG);
-			EPRHelper.toXML(call.getTo(), doc, header, toElement, true);
-			header.appendChild(toElement);
-		}
-		
-		if (call.getFrom() != null)
-		{
-			Element fromElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.FROM_TAG);
-			EPRHelper.toXML(call.getFrom(), doc, header, fromElement, false);
-			header.appendChild(fromElement);
-		}
-		
-		if (call.getReplyTo() != null)
-		{
-			Element replyToElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.REPLY_TO_TAG);
-			EPRHelper.toXML(call.getReplyTo(), doc, header, replyToElement, false);
-			header.appendChild(replyToElement);
-		}
-		
-		if (call.getRelatesTo() != null)
-		{
-			Element relatesToElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.RELATES_TO_TAG);
-			relatesToElement.setNodeValue(call.getRelatesTo().toString());
-			header.appendChild(relatesToElement);
-		}
-		
-		if (call.getFaultTo() != null)
-		{
-			Element faultToElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.FAULT_TO_TAG);
-			EPRHelper.toXML(call.getFaultTo(), doc, header, faultToElement, false);
-			header.appendChild(faultToElement);
-		}
-		
-		if (call.getAction() != null)
-		{
-			Element actionElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.ACTION_TAG);
-			actionElement.setTextContent(call.getAction().toString());
-			header.appendChild(actionElement);
-		}
-		
-		if (call.getMessageID() != null)
-		{
-			Element messageIDElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.MESSAGE_IDENTIFIER_TAG);
-			messageIDElement.setTextContent(call.getMessageID().toString());
-			header.appendChild(messageIDElement);
-		}
-			
-		return header;
-	}
-	
-	public static Call fromXML (Element header) throws UnmarshalException
-	{
-		AssertArgument.isNotNull(header, "header");
-		
-		Call call = new Call();
-		NodeList nl = header.getChildNodes();
-		
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			Node n = nl.item(i);
-			
-			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.TO_TAG))
-			{
-				call.setTo(EPRHelper.fromXML((Element) header, true));
-			}
-			
-			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.FROM_TAG))
-			{
-				call.setFrom(EPRHelper.fromXML((Element) n, false));
-			}
-			
-			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.REPLY_TO_TAG))
-			{
-				call.setReplyTo(EPRHelper.fromXML((Element) n, false));
-			}
-
-			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.RELATES_TO_TAG))
-			{
-				try {
-					call.setRelatesTo(new URI(n.getNodeValue()));
-				} catch (URISyntaxException e) {
-					throw new UnmarshalException("'" + XMLUtil.RELATES_TO_TAG + "' must be a valid URI", e);
-				}
-			}
-
-			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.FAULT_TO_TAG))
-			{
-				call.setFaultTo(EPRHelper.fromXML((Element) n, false));
-			}
-
-			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.ACTION_TAG))
-			{			
-				try {
-					call.setAction(new URI(n.getTextContent()));
-				} catch (URISyntaxException e) {
-					throw new UnmarshalException("'" + XMLUtil.ACTION_TAG + "' must be a valid URI", e);
-				}
-			}
-			
-			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.MESSAGE_IDENTIFIER_TAG))
-			{
-				try {
-					call.setMessageID(new URI(n.getTextContent()));
-				} catch (URISyntaxException e) {
-					throw new UnmarshalException("'" + XMLUtil.MESSAGE_IDENTIFIER_TAG + "' must be a valid URI", e);
-				}
-			}
-		}
-		
-		return call;
-	}
-	
+package org.jboss.internal.soa.esb.addressing.helpers;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public abstract class CallHelper
+{
+
+	public static Element toXML (Call call, Document doc, Element header) throws MarshalException
+	{
+		AssertArgument.isNotNull(call, "call");
+		AssertArgument.isNotNull(doc, "doc");
+		AssertArgument.isNotNull(header, "header");
+		
+		if (call.getTo() != null)
+		{
+			Element toElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.TO_TAG);
+			EPRHelper.toXML(call.getTo(), doc, header, toElement, true);
+			header.appendChild(toElement);
+		}
+		
+		if (call.getFrom() != null)
+		{
+			Element fromElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.FROM_TAG);
+			EPRHelper.toXML(call.getFrom(), doc, header, fromElement, false);
+			header.appendChild(fromElement);
+		}
+		
+		if (call.getReplyTo() != null)
+		{
+			Element replyToElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.REPLY_TO_TAG);
+			EPRHelper.toXML(call.getReplyTo(), doc, header, replyToElement, false);
+			header.appendChild(replyToElement);
+		}
+		
+		if (call.getRelatesTo() != null)
+		{
+			Element relatesToElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.RELATES_TO_TAG);
+			relatesToElement.setNodeValue(call.getRelatesTo().toString());
+			header.appendChild(relatesToElement);
+		}
+		
+		if (call.getFaultTo() != null)
+		{
+			Element faultToElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.FAULT_TO_TAG);
+			EPRHelper.toXML(call.getFaultTo(), doc, header, faultToElement, false);
+			header.appendChild(faultToElement);
+		}
+		
+		if (call.getAction() != null)
+		{
+			Element actionElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.ACTION_TAG);
+			actionElement.setTextContent(call.getAction().toString());
+			header.appendChild(actionElement);
+		}
+		
+		if (call.getMessageID() != null)
+		{
+			Element messageIDElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.MESSAGE_IDENTIFIER_TAG);
+			messageIDElement.setTextContent(call.getMessageID().toString());
+			header.appendChild(messageIDElement);
+		}
+			
+		return header;
+	}
+	
+	public static Call fromXML (Element header) throws UnmarshalException
+	{
+		AssertArgument.isNotNull(header, "header");
+		
+		Call call = new Call();
+		NodeList nl = header.getChildNodes();
+		
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			Node n = nl.item(i);
+			
+			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.TO_TAG))
+			{
+				call.setTo(EPRHelper.fromXML((Element) header, true));
+			}
+			
+			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.FROM_TAG))
+			{
+				call.setFrom(EPRHelper.fromXML((Element) n, false));
+			}
+			
+			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.REPLY_TO_TAG))
+			{
+				call.setReplyTo(EPRHelper.fromXML((Element) n, false));
+			}
+
+			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.RELATES_TO_TAG))
+			{
+				try {
+					call.setRelatesTo(new URI(n.getNodeValue()));
+				} catch (URISyntaxException e) {
+					throw new UnmarshalException("'" + XMLUtil.RELATES_TO_TAG + "' must be a valid URI", e);
+				}
+			}
+
+			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.FAULT_TO_TAG))
+			{
+				call.setFaultTo(EPRHelper.fromXML((Element) n, false));
+			}
+
+			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.ACTION_TAG))
+			{			
+				try {
+					call.setAction(new URI(n.getTextContent()));
+				} catch (URISyntaxException e) {
+					throw new UnmarshalException("'" + XMLUtil.ACTION_TAG + "' must be a valid URI", e);
+				}
+			}
+			
+			if (n.getNodeName().equals(XMLUtil.WSA_PREFIX+":"+XMLUtil.MESSAGE_IDENTIFIER_TAG))
+			{
+				try {
+					call.setMessageID(new URI(n.getTextContent()));
+				} catch (URISyntaxException e) {
+					throw new UnmarshalException("'" + XMLUtil.MESSAGE_IDENTIFIER_TAG + "' must be a valid URI", e);
+				}
+			}
+		}
+		
+		return call;
+	}
+	
 } 
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,384 +1,384 @@
-package org.jboss.internal.soa.esb.addressing.helpers;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.StringWriter;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jboss.internal.soa.esb.assertion.AssertArgument;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
-
-public class EPRHelper
-{
-	public static final String EPR_TYPE = "type";
-
-	/**
-	 * Serialize the EPR to an XML representation.
-	 * 
-	 * @param epr
-	 * @param doc
-	 * @param header
-	 * @return
-	 */
-
-	public static final Element toXML(EPR epr, Document doc, Element header,
-			Element packElement) throws MarshalException
-	{
-		return toXML(epr, doc, header, packElement, false);
-	}
-
-	/**
-	 * Serialize the EPR to an XML representation. Specify whether this is a To
-	 * node in the Call.
-	 * 
-	 * @param epr
-	 * @param doc
-	 * @param header
-	 * @return
-	 */
-
-	public static final Element toXML(EPR epr, Document doc, Element header,
-			Element packElement, boolean to) throws MarshalException
-	{
-		AssertArgument.isNotNull(epr, "epr");
-
-		// TODO
-		// The EPR type really should be doing this itself.
-
-		setSpecificEPR(epr);
-		PortReferenceHelper.toXML(header, doc, packElement, epr.getAddr(), to);
-
-		return header;
-	}
-
-	/**
-	 * Deserialize the EPR from an XML representation.
-	 * 
-	 * @param header
-	 * @return
-	 */
-
-	public static final EPR fromXML(Element header) throws UnmarshalException
-	{
-		return fromXML(header, false);
-	}
-
-	/**
-	 * Deserialize the EPR from an XML representation. Specify whether this is a
-	 * To node in the Call.
-	 * 
-	 * @param header
-	 * @return
-	 */
-
-	public static final EPR fromXML(Element header, boolean to)
-			throws UnmarshalException
-	{
-		AssertArgument.isNotNull(header, "header");
-
-		if (to)
-		{
-			NodeList children = header.getChildNodes();
-
-			for (int i = 0; i < children.getLength(); i++)
-			{
-				Node n = children.item(i);
-
-				if (n instanceof Element)
-				{
-					Element el = (Element) n;
-
-					if (el.getNodeName().equals(
-							XMLUtil.WSA_PREFIX + ":" + XMLUtil.TO_TAG))
-						return getSpecificEPR(new EPR(PortReferenceHelper
-								.fromXML(el, true)), header);
-				}
-			}
-		}
-
-		return getSpecificEPR(new EPR(PortReferenceHelper.fromXML(header, to)));
-	}
-
-	/**
-	 * Create a string version of the XML representation for this EPR. If the
-	 * EPR is a specific type (e.g., JMSEpr) then that type information will
-	 * also be encoded.
-	 * 
-	 * @param epr
-	 * @return
-	 * @throws MarshalException 
-	 */
-
-	public static final String toXMLString(EPR epr) throws MarshalException
-	{
-		return toXMLString(epr, false, XMLUtil.FROM_TAG);
-	}
-
-	/**
-	 * Create a string version of the XML representation for this EPR. If the
-	 * EPR is a specific type (e.g., JMSEpr) then that type information will
-	 * also be encoded. Specify whether this is a To node in the Call.
-	 * 
-	 * @param epr
-	 * @return
-	 * @throws MarshalException 
-	 */
-
-	public static final String toXMLString(EPR epr, boolean to, String tag) throws MarshalException
-	{
-		AssertArgument.isNotNull(epr, "epr");
-		AssertArgument.isNotNull(tag, "tag");
-
-		try
-		{
-			DocumentBuilderFactory factory = DocumentBuilderFactory
-					.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.newDocument();
-			Element portReferenceElement = doc.createElementNS(
-					XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX + ":" + tag);
-
-			setSpecificEPR(epr);
-
-			if (to)
-			{
-				Element header = doc.createElement("header");
-				doc.appendChild(header);
-				toXML(epr, doc, header, portReferenceElement, to);
-				header.appendChild(portReferenceElement);
-			}
-			else
-			{
-				doc.appendChild(portReferenceElement);
-				toXML(epr, doc, portReferenceElement, portReferenceElement, to);
-			}
-
-			StringWriter sWriter = new StringWriter();
-			OutputFormat format = new OutputFormat();
-			format.setIndenting(true);
-
-			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
-
-			xmlS.asDOMSerializer();
-			xmlS.serialize(doc);
-
-			return sWriter.toString();
-		}
-		catch (ParserConfigurationException ex)
-		{
-			throw new MarshalException("Failed to construct DOM Document Builder.", ex);
-		}
-		catch (IOException ex)
-		{
-			throw new MarshalException("Error during DOM to String serialisation.", ex);
-		}
-	}
-
-	/**
-	 * Get the EPR from the string representation. If the EPR was a specific
-	 * type (e.g., JMSEpr) then it will be returned as an instance of the
-	 * appropriate class.
-	 * 
-	 * @param xml
-	 * @return
-	 * @throws UnmarshalException 
-	 */
-
-	public static final EPR fromXMLString(String xml) throws UnmarshalException
-	{
-		return fromXMLString(xml, false);
-	}
-
-	/**
-	 * Get the EPR from the string representation. If the EPR was a specific
-	 * type (e.g., JMSEpr) then it will be returned as an instance of the
-	 * appropriate class. Specify whether this is a To node in the Call.
-	 * 
-	 * @param xml
-	 * @return
-	 * @throws UnmarshalException 
-	 */
-
-	public static final EPR fromXMLString(String xml, boolean to) throws UnmarshalException
-	{
-		AssertArgument.isNotNull(xml, "xml");
-
-		try
-		{
-			DocumentBuilderFactory factory = DocumentBuilderFactory
-					.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.parse(new ByteArrayInputStream(xml
-					.getBytes()));
-			Element rootElement = (Element) doc.getDocumentElement();
-
-			return fromXML(rootElement, to);
-		}
-		catch (SAXException ex)
-		{
-			throw new UnmarshalException("Unable to parse EPR XML.", ex);
-		}
-		catch (IOException ex)
-		{
-			throw new UnmarshalException("Unable to read EPR XML stream.", ex);
-		}
-		catch (ParserConfigurationException ex)
-		{
-			throw new UnmarshalException("Failed to construct DOM Document Builder.", ex);
-		}
-	}
-
-	private final static void setSpecificEPR(EPR epr)
-	{
-		String eprType = null;
-
-		/*
-		 * Do not re-order.
-		 */
-
-		if (epr instanceof EmailEpr)
-			eprType = EmailEpr.type().toString();
-		else if (epr instanceof SFTPEpr)
-			eprType = SFTPEpr.type().toString();
-		else if (epr instanceof HTTPEpr)
-			eprType = HTTPEpr.type().toString();
-		else if (epr instanceof JDBCEpr)
-			eprType = JDBCEpr.type().toString();
-		else if (epr instanceof JMSEpr)
-			eprType = JMSEpr.type().toString();
-		else if (epr instanceof FTPEpr)
-			eprType = FTPEpr.type().toString();
-		else if (epr instanceof FileEpr)
-			eprType = FileEpr.type().toString();
-
-		if (eprType != null)
-		{
-			if (epr.getAddr().getExtensionValue(EPR_TYPE) == null) {
-				epr.getAddr().addExtension(EPR_TYPE, eprType);
-			}
-		}
-	}
-
-	private final static EPR getSpecificEPR(EPR epr)
-	{
-		String eprType = epr.getAddr().getExtensionValue(EPR_TYPE);
-
-		if (eprType != null)
-		{
-			/*
-			 * Do not re-order.
-			 */
-
-			if (eprType.equals(EmailEpr.type().toString()))
-				return new EmailEpr(epr);
-			else if (eprType.equals(SFTPEpr.type().toString()))
-				return new SFTPEpr(epr);
-			else if (eprType.equals(HTTPEpr.type().toString()))
-				return new HTTPEpr(epr);
-			else if (eprType.equals(JDBCEpr.type().toString()))
-				return new JDBCEpr(epr);
-			else if (eprType.equals(JMSEpr.type().toString()))
-				return new JMSEpr(epr);
-			else if (eprType.equals(FTPEpr.type().toString()))
-				return new FTPEpr(epr);
-			else if (eprType.equals(FileEpr.type().toString()))
-				return new FileEpr(epr);
-			else
-				return epr;
-		} else {
-			return epr;
-		}
-	}
-
-	/**
-	 * Because of WS-A rules, if this was a To node then all of the elements
-	 * within the EPR are now at top-level in the header and not easily
-	 * obtained. We need to ask each EPR type to reconstitute itself.
-	 * 
-	 * @param epr
-	 * @param header
-	 * @return
-	 */
-
-	private final static EPR getSpecificEPR(EPR epr, Element header)
-	{
-		NodeList children = header.getChildNodes();
-		String eprType = null;
-
-		for (int i = 0; i < children.getLength(); i++)
-		{
-			if (children.item(i).getNodeName().equals(
-					XMLUtil.JBOSSESB_PREFIX + ":" + EPR_TYPE))
-				eprType = children.item(i).getTextContent();
-		}
-
-		if (eprType != null)
-		{
-			/*
-			 * Do not re-order.
-			 */
-
-			if (eprType.equals(EmailEpr.type().toString()))
-				return new EmailEpr(epr, header);
-			else if (eprType.equals(SFTPEpr.type().toString()))
-				return new SFTPEpr(epr, header);
-			else if (eprType.equals(HTTPEpr.type().toString()))
-				return new HTTPEpr(epr, header);
-			else if (eprType.equals(JDBCEpr.type().toString()))
-				return new JDBCEpr(epr, header);
-			else if (eprType.equals(JMSEpr.type().toString()))
-				return new JMSEpr(epr, header);
-			else if (eprType.equals(FTPEpr.type().toString()))
-				return new FTPEpr(epr, header);
-			else if (eprType.equals(FileEpr.type().toString()))
-				return new FileEpr(epr, header);
-			else
-				return epr;
-		} else {
-			return epr;
-		}
-	}
-
+package org.jboss.internal.soa.esb.addressing.helpers;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.StringWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.jboss.soa.esb.addressing.eprs.EmailEpr;
+import org.jboss.soa.esb.addressing.eprs.FTPEpr;
+import org.jboss.soa.esb.addressing.eprs.FileEpr;
+import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
+import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+public class EPRHelper
+{
+	public static final String EPR_TYPE = "type";
+
+	/**
+	 * Serialize the EPR to an XML representation.
+	 * 
+	 * @param epr
+	 * @param doc
+	 * @param header
+	 * @return
+	 */
+
+	public static final Element toXML(EPR epr, Document doc, Element header,
+			Element packElement) throws MarshalException
+	{
+		return toXML(epr, doc, header, packElement, false);
+	}
+
+	/**
+	 * Serialize the EPR to an XML representation. Specify whether this is a To
+	 * node in the Call.
+	 * 
+	 * @param epr
+	 * @param doc
+	 * @param header
+	 * @return
+	 */
+
+	public static final Element toXML(EPR epr, Document doc, Element header,
+			Element packElement, boolean to) throws MarshalException
+	{
+		AssertArgument.isNotNull(epr, "epr");
+
+		// TODO
+		// The EPR type really should be doing this itself.
+
+		setSpecificEPR(epr);
+		PortReferenceHelper.toXML(header, doc, packElement, epr.getAddr(), to);
+
+		return header;
+	}
+
+	/**
+	 * Deserialize the EPR from an XML representation.
+	 * 
+	 * @param header
+	 * @return
+	 */
+
+	public static final EPR fromXML(Element header) throws UnmarshalException
+	{
+		return fromXML(header, false);
+	}
+
+	/**
+	 * Deserialize the EPR from an XML representation. Specify whether this is a
+	 * To node in the Call.
+	 * 
+	 * @param header
+	 * @return
+	 */
+
+	public static final EPR fromXML(Element header, boolean to)
+			throws UnmarshalException
+	{
+		AssertArgument.isNotNull(header, "header");
+
+		if (to)
+		{
+			NodeList children = header.getChildNodes();
+
+			for (int i = 0; i < children.getLength(); i++)
+			{
+				Node n = children.item(i);
+
+				if (n instanceof Element)
+				{
+					Element el = (Element) n;
+
+					if (el.getNodeName().equals(
+							XMLUtil.WSA_PREFIX + ":" + XMLUtil.TO_TAG))
+						return getSpecificEPR(new EPR(PortReferenceHelper
+								.fromXML(el, true)), header);
+				}
+			}
+		}
+
+		return getSpecificEPR(new EPR(PortReferenceHelper.fromXML(header, to)));
+	}
+
+	/**
+	 * Create a string version of the XML representation for this EPR. If the
+	 * EPR is a specific type (e.g., JMSEpr) then that type information will
+	 * also be encoded.
+	 * 
+	 * @param epr
+	 * @return
+	 * @throws MarshalException 
+	 */
+
+	public static final String toXMLString(EPR epr) throws MarshalException
+	{
+		return toXMLString(epr, false, XMLUtil.FROM_TAG);
+	}
+
+	/**
+	 * Create a string version of the XML representation for this EPR. If the
+	 * EPR is a specific type (e.g., JMSEpr) then that type information will
+	 * also be encoded. Specify whether this is a To node in the Call.
+	 * 
+	 * @param epr
+	 * @return
+	 * @throws MarshalException 
+	 */
+
+	public static final String toXMLString(EPR epr, boolean to, String tag) throws MarshalException
+	{
+		AssertArgument.isNotNull(epr, "epr");
+		AssertArgument.isNotNull(tag, "tag");
+
+		try
+		{
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.newDocument();
+			Element portReferenceElement = doc.createElementNS(
+					XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX + ":" + tag);
+
+			setSpecificEPR(epr);
+
+			if (to)
+			{
+				Element header = doc.createElement("header");
+				doc.appendChild(header);
+				toXML(epr, doc, header, portReferenceElement, to);
+				header.appendChild(portReferenceElement);
+			}
+			else
+			{
+				doc.appendChild(portReferenceElement);
+				toXML(epr, doc, portReferenceElement, portReferenceElement, to);
+			}
+
+			StringWriter sWriter = new StringWriter();
+			OutputFormat format = new OutputFormat();
+			format.setIndenting(true);
+
+			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
+
+			xmlS.asDOMSerializer();
+			xmlS.serialize(doc);
+
+			return sWriter.toString();
+		}
+		catch (ParserConfigurationException ex)
+		{
+			throw new MarshalException("Failed to construct DOM Document Builder.", ex);
+		}
+		catch (IOException ex)
+		{
+			throw new MarshalException("Error during DOM to String serialisation.", ex);
+		}
+	}
+
+	/**
+	 * Get the EPR from the string representation. If the EPR was a specific
+	 * type (e.g., JMSEpr) then it will be returned as an instance of the
+	 * appropriate class.
+	 * 
+	 * @param xml
+	 * @return
+	 * @throws UnmarshalException 
+	 */
+
+	public static final EPR fromXMLString(String xml) throws UnmarshalException
+	{
+		return fromXMLString(xml, false);
+	}
+
+	/**
+	 * Get the EPR from the string representation. If the EPR was a specific
+	 * type (e.g., JMSEpr) then it will be returned as an instance of the
+	 * appropriate class. Specify whether this is a To node in the Call.
+	 * 
+	 * @param xml
+	 * @return
+	 * @throws UnmarshalException 
+	 */
+
+	public static final EPR fromXMLString(String xml, boolean to) throws UnmarshalException
+	{
+		AssertArgument.isNotNull(xml, "xml");
+
+		try
+		{
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.parse(new ByteArrayInputStream(xml
+					.getBytes()));
+			Element rootElement = (Element) doc.getDocumentElement();
+
+			return fromXML(rootElement, to);
+		}
+		catch (SAXException ex)
+		{
+			throw new UnmarshalException("Unable to parse EPR XML.", ex);
+		}
+		catch (IOException ex)
+		{
+			throw new UnmarshalException("Unable to read EPR XML stream.", ex);
+		}
+		catch (ParserConfigurationException ex)
+		{
+			throw new UnmarshalException("Failed to construct DOM Document Builder.", ex);
+		}
+	}
+
+	private final static void setSpecificEPR(EPR epr)
+	{
+		String eprType = null;
+
+		/*
+		 * Do not re-order.
+		 */
+
+		if (epr instanceof EmailEpr)
+			eprType = EmailEpr.type().toString();
+		else if (epr instanceof SFTPEpr)
+			eprType = SFTPEpr.type().toString();
+		else if (epr instanceof HTTPEpr)
+			eprType = HTTPEpr.type().toString();
+		else if (epr instanceof JDBCEpr)
+			eprType = JDBCEpr.type().toString();
+		else if (epr instanceof JMSEpr)
+			eprType = JMSEpr.type().toString();
+		else if (epr instanceof FTPEpr)
+			eprType = FTPEpr.type().toString();
+		else if (epr instanceof FileEpr)
+			eprType = FileEpr.type().toString();
+
+		if (eprType != null)
+		{
+			if (epr.getAddr().getExtensionValue(EPR_TYPE) == null) {
+				epr.getAddr().addExtension(EPR_TYPE, eprType);
+			}
+		}
+	}
+
+	private final static EPR getSpecificEPR(EPR epr)
+	{
+		String eprType = epr.getAddr().getExtensionValue(EPR_TYPE);
+
+		if (eprType != null)
+		{
+			/*
+			 * Do not re-order.
+			 */
+
+			if (eprType.equals(EmailEpr.type().toString()))
+				return new EmailEpr(epr);
+			else if (eprType.equals(SFTPEpr.type().toString()))
+				return new SFTPEpr(epr);
+			else if (eprType.equals(HTTPEpr.type().toString()))
+				return new HTTPEpr(epr);
+			else if (eprType.equals(JDBCEpr.type().toString()))
+				return new JDBCEpr(epr);
+			else if (eprType.equals(JMSEpr.type().toString()))
+				return new JMSEpr(epr);
+			else if (eprType.equals(FTPEpr.type().toString()))
+				return new FTPEpr(epr);
+			else if (eprType.equals(FileEpr.type().toString()))
+				return new FileEpr(epr);
+			else
+				return epr;
+		} else {
+			return epr;
+		}
+	}
+
+	/**
+	 * Because of WS-A rules, if this was a To node then all of the elements
+	 * within the EPR are now at top-level in the header and not easily
+	 * obtained. We need to ask each EPR type to reconstitute itself.
+	 * 
+	 * @param epr
+	 * @param header
+	 * @return
+	 */
+
+	private final static EPR getSpecificEPR(EPR epr, Element header)
+	{
+		NodeList children = header.getChildNodes();
+		String eprType = null;
+
+		for (int i = 0; i < children.getLength(); i++)
+		{
+			if (children.item(i).getNodeName().equals(
+					XMLUtil.JBOSSESB_PREFIX + ":" + EPR_TYPE))
+				eprType = children.item(i).getTextContent();
+		}
+
+		if (eprType != null)
+		{
+			/*
+			 * Do not re-order.
+			 */
+
+			if (eprType.equals(EmailEpr.type().toString()))
+				return new EmailEpr(epr, header);
+			else if (eprType.equals(SFTPEpr.type().toString()))
+				return new SFTPEpr(epr, header);
+			else if (eprType.equals(HTTPEpr.type().toString()))
+				return new HTTPEpr(epr, header);
+			else if (eprType.equals(JDBCEpr.type().toString()))
+				return new JDBCEpr(epr, header);
+			else if (eprType.equals(JMSEpr.type().toString()))
+				return new JMSEpr(epr, header);
+			else if (eprType.equals(FTPEpr.type().toString()))
+				return new FTPEpr(epr, header);
+			else if (eprType.equals(FileEpr.type().toString()))
+				return new FileEpr(epr, header);
+			else
+				return epr;
+		} else {
+			return epr;
+		}
+	}
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,433 +1,433 @@
-/*
- * 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 mark.little at jboss.com
- */
-
-/*
- * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
- *
- * PortReferenceHelper.java
- */
-
-package org.jboss.internal.soa.esb.addressing.helpers;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.addressing.PortReference;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/*
- * This should pack the PortReference into an ERP.
- * 
- * It would be better if PortReference had a packToXML and unpackFromXML.
- * 
- * This needs rewriting after the interoperability workshop!
- */
-
-public class PortReferenceHelper
-{
-	/**
-	 * WS-Addressing is broken in that the To field is a URI, even if the From
-	 * field was an EPR! You have to use the EPR bits separately. So, the
-	 * toField is used to indicate whether we are packing this address as a To
-	 * field (when we need to treat it differently) or as an EPR.
-	 */
-
-	/** ************************************************** */
-	public static void toXML(org.w3c.dom.Element header,
-			org.w3c.dom.Document document,
-			org.w3c.dom.Element portReferenceElement,
-			PortReference portReference, boolean toField)
-			throws MarshalException
-	{
-		try
-		{
-			if (!toField)
-			{
-				Element addressElement = document.createElementNS(
-						XMLUtil.WSA_NAMESPACE_URI, XMLUtil.ADDRESS_TAG);
-				addressElement.setPrefix(XMLUtil.WSA_PREFIX);
-				addressElement.appendChild(document
-						.createTextNode(portReference.getAddress()));
-				portReferenceElement.appendChild(addressElement);
-			}
-			else
-			{
-				portReferenceElement.appendChild(document
-						.createTextNode(portReference.getAddress()));
-			}
-
-			Iterator extensions = portReference.getExtensions();
-			Element referenceProperties = null;
-
-			while (extensions.hasNext())
-			{
-				PortReference.Extension extension = (PortReference.Extension) extensions
-						.next();
-
-				/*
-				 * WS-Addressing is broken in that the To field is a URI, even
-				 * if the From field was an EPR! You have to use the EPR bits
-				 * separately. Doh!
-				 */
-
-				if (!toField)
-				{
-					if (referenceProperties == null)
-					{
-						referenceProperties = document.createElementNS(
-								XMLUtil.WSA_NAMESPACE_URI,
-								XMLUtil.REFERENCE_PROPERTIES_TAG);
-						referenceProperties.setPrefix(XMLUtil.WSA_PREFIX);
-						portReferenceElement.appendChild(referenceProperties);
-					}
-				}
-				else
-					referenceProperties = header;
-
-				extensionToXML(referenceProperties, document, extension);
-			}
-		}
-		catch (Exception exception)
-		{
-			exception.printStackTrace();
-			throw new MarshalException("Marshal failure: " + exception);
-		}
-	}
-
-	/** **************************** */
-	public static PortReference fromXML(
-			org.w3c.dom.Element portReferenceElement, boolean toField)
-			throws UnmarshalException
-	{
-		PortReference portReference = new PortReference();
-
-		if (toField)
-		{
-			portReference.setAddress(portReferenceElement.getTextContent());
-		}
-		
-		org.w3c.dom.NodeList elements = portReferenceElement.getChildNodes();
-		
-		for (int i = 0; i < elements.getLength(); i++)
-		{
-			final Object extensionObject = elements.item(i);
-			
-			if (extensionObject instanceof Element)
-			{
-				int parentNodeType = PortReference.Extension.NEITHER;
-				Element extensionElement = (Element) extensionObject;
-				NodeList children = extensionElement.getChildNodes();
-				String parentName = extensionElement.getNodeName();
-				boolean haveChildren = false;
-
-				if (parentName.equals(XMLUtil.REFERENCE_PROPERTIES_TAG))
-					parentNodeType = PortReference.Extension.REFERENCE_PROPERTIES;
-				else
-				{
-					if (parentName.equals(XMLUtil.REFERENCE_PARAMETERS_TAG))
-						parentNodeType = PortReference.Extension.REFERENCE_PARAMETERS;
-					else
-					{
-						if (!toField
-								&& parentName.equals(XMLUtil.WSA_PREFIX + ":"
-										+ XMLUtil.ADDRESS_TAG))
-						{
-							portReference.setAddress(extensionElement
-									.getTextContent());
-						}
-					}
-				}
-
-				final int numChildren = children.getLength();
-				
-				for (int count = 0; count < numChildren; count++)
-				{
-					final Object childObject = children.item(count);
-
-					if (childObject instanceof Element)
-					{
-						Element childElement = (Element) childObject;
-
-						portReference
-								.addExtension(childrenFromXML(childElement));
-						haveChildren = true;
-					}
-				}
-
-				if (!haveChildren && !parentName.equals(XMLUtil.WSA_PREFIX + ":"+ XMLUtil.ADDRESS_TAG))
-				{
-					PortReference.Extension ext = new PortReference.Extension(
-							extensionElement.getNodeName(), null, null,
-							extensionElement.getNodeValue(), parentNodeType);
-
-					portReference.addExtension(ext);
-
-					final NamedNodeMap attrs = extensionElement.getAttributes();
-					final int numAttrs = attrs.getLength();
-					if (numAttrs > 0)
-					{
-						final HashMap<ArjunaName, String> p = new HashMap<ArjunaName, String>();
-						for (int count = 0; count < numAttrs; count++)
-						{
-							final Attr attr = (Attr) attrs.item(count);
-							if (!"http://www.w3.org/2000/xmlns/".equals(attr
-									.getNamespaceURI()))
-							{
-								final ArjunaName name = generateName(attr);
-								p.put(name, attr.getValue());
-							}
-						}
-
-						ext.addAttributes(p);
-					}
-				}
-			}
-		}
-
-		return portReference;
-	}
-
-	private final static PortReference.Extension childrenFromXML(
-			Element childRoot)
-	{
-		final NodeList children = childRoot.getChildNodes();
-		final int numChildNodes = children.getLength();
-
-		final PortReference.Extension extension;
-		if (numChildNodes > 0)
-		{
-			Object childObject = children.item(0);
-			if (childObject instanceof Element)
-			{
-				extension = new PortReference.Extension(
-						childRoot.getNodeName(), childRoot.getPrefix(),
-						childRoot.getNamespaceURI());
-				
-				for (int count = 1; count < numChildNodes; count++)
-				{
-					extension.addChild(childrenFromXML((Element) childObject));
-					childObject = children.item(count);
-				}
-			}
-			else
-			{
-				extension = new PortReference.Extension(
-						childRoot.getNodeName(), childRoot.getPrefix(),
-						childRoot.getNamespaceURI(), ((Node) childObject)
-								.getNodeValue());
-			}
-		}
-		else
-		{
-			extension = new PortReference.Extension(childRoot.getNodeName(),
-					childRoot.getPrefix(), childRoot.getNamespaceURI(),
-					childRoot.getNodeValue());
-		}
-
-		final NamedNodeMap attrs = childRoot.getAttributes();
-		final int numAttrs = attrs.getLength();
-		if (numAttrs > 0)
-		{
-			final HashMap<ArjunaName, String> p = new HashMap<ArjunaName, String>();
-			for (int count = 0; count < numAttrs; count++)
-			{
-				final Attr attr = (Attr) attrs.item(count);
-				if (!"http://www.w3.org/2000/xmlns/".equals(attr
-						.getNamespaceURI()))
-				{
-					final ArjunaName name = generateName(attr);
-					p.put(name, attr.getValue());
-				}
-			}
-
-			extension.addAttributes(p);
-		}
-		return extension;
-	}
-
-	private final static Element extensionToXML(Element packInto,
-			org.w3c.dom.Document document, PortReference.Extension toPack)
-			throws MarshalException
-	{
-		final String uri = toPack.getURI();
-		final Element element;
-		if (uri == null)
-		{
-			element = document.createElement(toPack.getTag());
-		}
-		else
-		{
-			final String prefix = toPack.getPrefix();
-			element = document.createElementNS(uri, toPack.getTag());
-			element.setPrefix(prefix);
-			element.setAttributeNS(XMLUtil.XMLNS_URI, XMLUtil.XMLNS_PREFIX
-					+ toPack.getPrefix(), uri);
-		}
-		packInto.appendChild(element);
-
-		if (toPack.getValue() != null)
-		{
-			final Text text = document.createTextNode(toPack.getValue());
-			element.appendChild(text);
-		}
-
-		LinkedList extensions = toPack.getChildren();
-
-		if (extensions != null)
-		{
-			for (int i = 0; i < extensions.size(); i++)
-			{
-				PortReference.Extension ext = (PortReference.Extension) extensions
-						.get(i);
-
-				extensionToXML(element, document, ext);
-			}
-		}
-
-		HashMap attrs = toPack.getAttributes();
-
-		if (attrs != null)
-		{
-			Iterator names = attrs.entrySet().iterator();
-
-			while (names.hasNext())
-			{
-				Map.Entry entry = (Map.Entry) names.next();
-				ArjunaName name = (ArjunaName) entry.getKey();
-				final String value = (String) entry.getValue();
-				final String attrURI = name.getURI();
-				if (attrURI != null)
-				{
-					element.setAttributeNS(attrURI, name.getQualifiedName(),
-							value);
-				}
-				else
-				{
-					element.setAttribute(name.getQualifiedName(), value);
-				}
-			}
-		}
-
-		return element;
-	}
-
-	/**
-	 * Generate a name based on the attribute.
-	 * 
-	 * @param attr
-	 *            The current attribute.
-	 * @return The name
-	 */
-	private static ArjunaName generateName(final Attr attr)
-	{
-		final String localName = attr.getNodeName();
-		final String uri = attr.getNamespaceURI();
-		final String prefix = attr.getPrefix();
-
-		return new ArjunaName(uri, prefix, localName);
-	}
-
-	private static class ArjunaName
-	{
-		/**
-		 * The uri.
-		 */
-		private final String uri;
-
-		/**
-		 * The prefix.
-		 */
-		private final String prefix;
-
-		/**
-		 * The local name.
-		 */
-		private final String localName;
-
-		/**
-		 * Construct the name.
-		 * 
-		 * @param uri
-		 *            The uri.
-		 * @param prefix
-		 *            The prefix.
-		 * @param localName
-		 *            The local name.
-		 */
-		public ArjunaName(final String uri, final String prefix,
-				final String localName)
-		{
-			this.uri = uri;
-			this.prefix = prefix;
-			this.localName = localName;
-		}
-
-		/**
-		 * Get the uri.
-		 * 
-		 * @return the uri.
-		 */
-		public String getURI()
-		{
-			return uri;
-		}
-
-		/**
-		 * Get the prefix.
-		 * 
-		 * @return the prefix.
-		 */
-		public String getPrefix()
-		{
-			return prefix;
-		}
-
-		/**
-		 * Get the local name.
-		 * 
-		 * @return the local name.
-		 */
-		public String getLocalName()
-		{
-			return localName;
-		}
-
-		/**
-		 * Get the qualified name.
-		 * 
-		 * @return the qualified name.
-		 */
-		public String getQualifiedName()
-		{
-			return (prefix == null ? localName : prefix + ":" + localName);
-		}
-	}
-}
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * PortReferenceHelper.java
+ */
+
+package org.jboss.internal.soa.esb.addressing.helpers;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+/*
+ * This should pack the PortReference into an ERP.
+ * 
+ * It would be better if PortReference had a packToXML and unpackFromXML.
+ * 
+ * This needs rewriting after the interoperability workshop!
+ */
+
+public class PortReferenceHelper
+{
+	/**
+	 * WS-Addressing is broken in that the To field is a URI, even if the From
+	 * field was an EPR! You have to use the EPR bits separately. So, the
+	 * toField is used to indicate whether we are packing this address as a To
+	 * field (when we need to treat it differently) or as an EPR.
+	 */
+
+	/** ************************************************** */
+	public static void toXML(org.w3c.dom.Element header,
+			org.w3c.dom.Document document,
+			org.w3c.dom.Element portReferenceElement,
+			PortReference portReference, boolean toField)
+			throws MarshalException
+	{
+		try
+		{
+			if (!toField)
+			{
+				Element addressElement = document.createElementNS(
+						XMLUtil.WSA_NAMESPACE_URI, XMLUtil.ADDRESS_TAG);
+				addressElement.setPrefix(XMLUtil.WSA_PREFIX);
+				addressElement.appendChild(document
+						.createTextNode(portReference.getAddress()));
+				portReferenceElement.appendChild(addressElement);
+			}
+			else
+			{
+				portReferenceElement.appendChild(document
+						.createTextNode(portReference.getAddress()));
+			}
+
+			Iterator extensions = portReference.getExtensions();
+			Element referenceProperties = null;
+
+			while (extensions.hasNext())
+			{
+				PortReference.Extension extension = (PortReference.Extension) extensions
+						.next();
+
+				/*
+				 * WS-Addressing is broken in that the To field is a URI, even
+				 * if the From field was an EPR! You have to use the EPR bits
+				 * separately. Doh!
+				 */
+
+				if (!toField)
+				{
+					if (referenceProperties == null)
+					{
+						referenceProperties = document.createElementNS(
+								XMLUtil.WSA_NAMESPACE_URI,
+								XMLUtil.REFERENCE_PROPERTIES_TAG);
+						referenceProperties.setPrefix(XMLUtil.WSA_PREFIX);
+						portReferenceElement.appendChild(referenceProperties);
+					}
+				}
+				else
+					referenceProperties = header;
+
+				extensionToXML(referenceProperties, document, extension);
+			}
+		}
+		catch (Exception exception)
+		{
+			exception.printStackTrace();
+			throw new MarshalException("Marshal failure: " + exception);
+		}
+	}
+
+	/** **************************** */
+	public static PortReference fromXML(
+			org.w3c.dom.Element portReferenceElement, boolean toField)
+			throws UnmarshalException
+	{
+		PortReference portReference = new PortReference();
+
+		if (toField)
+		{
+			portReference.setAddress(portReferenceElement.getTextContent());
+		}
+		
+		org.w3c.dom.NodeList elements = portReferenceElement.getChildNodes();
+		
+		for (int i = 0; i < elements.getLength(); i++)
+		{
+			final Object extensionObject = elements.item(i);
+			
+			if (extensionObject instanceof Element)
+			{
+				int parentNodeType = PortReference.Extension.NEITHER;
+				Element extensionElement = (Element) extensionObject;
+				NodeList children = extensionElement.getChildNodes();
+				String parentName = extensionElement.getNodeName();
+				boolean haveChildren = false;
+
+				if (parentName.equals(XMLUtil.REFERENCE_PROPERTIES_TAG))
+					parentNodeType = PortReference.Extension.REFERENCE_PROPERTIES;
+				else
+				{
+					if (parentName.equals(XMLUtil.REFERENCE_PARAMETERS_TAG))
+						parentNodeType = PortReference.Extension.REFERENCE_PARAMETERS;
+					else
+					{
+						if (!toField
+								&& parentName.equals(XMLUtil.WSA_PREFIX + ":"
+										+ XMLUtil.ADDRESS_TAG))
+						{
+							portReference.setAddress(extensionElement
+									.getTextContent());
+						}
+					}
+				}
+
+				final int numChildren = children.getLength();
+				
+				for (int count = 0; count < numChildren; count++)
+				{
+					final Object childObject = children.item(count);
+
+					if (childObject instanceof Element)
+					{
+						Element childElement = (Element) childObject;
+
+						portReference
+								.addExtension(childrenFromXML(childElement));
+						haveChildren = true;
+					}
+				}
+
+				if (!haveChildren && !parentName.equals(XMLUtil.WSA_PREFIX + ":"+ XMLUtil.ADDRESS_TAG))
+				{
+					PortReference.Extension ext = new PortReference.Extension(
+							extensionElement.getNodeName(), null, null,
+							extensionElement.getNodeValue(), parentNodeType);
+
+					portReference.addExtension(ext);
+
+					final NamedNodeMap attrs = extensionElement.getAttributes();
+					final int numAttrs = attrs.getLength();
+					if (numAttrs > 0)
+					{
+						final HashMap<ArjunaName, String> p = new HashMap<ArjunaName, String>();
+						for (int count = 0; count < numAttrs; count++)
+						{
+							final Attr attr = (Attr) attrs.item(count);
+							if (!"http://www.w3.org/2000/xmlns/".equals(attr
+									.getNamespaceURI()))
+							{
+								final ArjunaName name = generateName(attr);
+								p.put(name, attr.getValue());
+							}
+						}
+
+						ext.addAttributes(p);
+					}
+				}
+			}
+		}
+
+		return portReference;
+	}
+
+	private final static PortReference.Extension childrenFromXML(
+			Element childRoot)
+	{
+		final NodeList children = childRoot.getChildNodes();
+		final int numChildNodes = children.getLength();
+
+		final PortReference.Extension extension;
+		if (numChildNodes > 0)
+		{
+			Object childObject = children.item(0);
+			if (childObject instanceof Element)
+			{
+				extension = new PortReference.Extension(
+						childRoot.getNodeName(), childRoot.getPrefix(),
+						childRoot.getNamespaceURI());
+				
+				for (int count = 1; count < numChildNodes; count++)
+				{
+					extension.addChild(childrenFromXML((Element) childObject));
+					childObject = children.item(count);
+				}
+			}
+			else
+			{
+				extension = new PortReference.Extension(
+						childRoot.getNodeName(), childRoot.getPrefix(),
+						childRoot.getNamespaceURI(), ((Node) childObject)
+								.getNodeValue());
+			}
+		}
+		else
+		{
+			extension = new PortReference.Extension(childRoot.getNodeName(),
+					childRoot.getPrefix(), childRoot.getNamespaceURI(),
+					childRoot.getNodeValue());
+		}
+
+		final NamedNodeMap attrs = childRoot.getAttributes();
+		final int numAttrs = attrs.getLength();
+		if (numAttrs > 0)
+		{
+			final HashMap<ArjunaName, String> p = new HashMap<ArjunaName, String>();
+			for (int count = 0; count < numAttrs; count++)
+			{
+				final Attr attr = (Attr) attrs.item(count);
+				if (!"http://www.w3.org/2000/xmlns/".equals(attr
+						.getNamespaceURI()))
+				{
+					final ArjunaName name = generateName(attr);
+					p.put(name, attr.getValue());
+				}
+			}
+
+			extension.addAttributes(p);
+		}
+		return extension;
+	}
+
+	private final static Element extensionToXML(Element packInto,
+			org.w3c.dom.Document document, PortReference.Extension toPack)
+			throws MarshalException
+	{
+		final String uri = toPack.getURI();
+		final Element element;
+		if (uri == null)
+		{
+			element = document.createElement(toPack.getTag());
+		}
+		else
+		{
+			final String prefix = toPack.getPrefix();
+			element = document.createElementNS(uri, toPack.getTag());
+			element.setPrefix(prefix);
+			element.setAttributeNS(XMLUtil.XMLNS_URI, XMLUtil.XMLNS_PREFIX
+					+ toPack.getPrefix(), uri);
+		}
+		packInto.appendChild(element);
+
+		if (toPack.getValue() != null)
+		{
+			final Text text = document.createTextNode(toPack.getValue());
+			element.appendChild(text);
+		}
+
+		LinkedList extensions = toPack.getChildren();
+
+		if (extensions != null)
+		{
+			for (int i = 0; i < extensions.size(); i++)
+			{
+				PortReference.Extension ext = (PortReference.Extension) extensions
+						.get(i);
+
+				extensionToXML(element, document, ext);
+			}
+		}
+
+		HashMap attrs = toPack.getAttributes();
+
+		if (attrs != null)
+		{
+			Iterator names = attrs.entrySet().iterator();
+
+			while (names.hasNext())
+			{
+				Map.Entry entry = (Map.Entry) names.next();
+				ArjunaName name = (ArjunaName) entry.getKey();
+				final String value = (String) entry.getValue();
+				final String attrURI = name.getURI();
+				if (attrURI != null)
+				{
+					element.setAttributeNS(attrURI, name.getQualifiedName(),
+							value);
+				}
+				else
+				{
+					element.setAttribute(name.getQualifiedName(), value);
+				}
+			}
+		}
+
+		return element;
+	}
+
+	/**
+	 * Generate a name based on the attribute.
+	 * 
+	 * @param attr
+	 *            The current attribute.
+	 * @return The name
+	 */
+	private static ArjunaName generateName(final Attr attr)
+	{
+		final String localName = attr.getNodeName();
+		final String uri = attr.getNamespaceURI();
+		final String prefix = attr.getPrefix();
+
+		return new ArjunaName(uri, prefix, localName);
+	}
+
+	private static class ArjunaName
+	{
+		/**
+		 * The uri.
+		 */
+		private final String uri;
+
+		/**
+		 * The prefix.
+		 */
+		private final String prefix;
+
+		/**
+		 * The local name.
+		 */
+		private final String localName;
+
+		/**
+		 * Construct the name.
+		 * 
+		 * @param uri
+		 *            The uri.
+		 * @param prefix
+		 *            The prefix.
+		 * @param localName
+		 *            The local name.
+		 */
+		public ArjunaName(final String uri, final String prefix,
+				final String localName)
+		{
+			this.uri = uri;
+			this.prefix = prefix;
+			this.localName = localName;
+		}
+
+		/**
+		 * Get the uri.
+		 * 
+		 * @return the uri.
+		 */
+		public String getURI()
+		{
+			return uri;
+		}
+
+		/**
+		 * Get the prefix.
+		 * 
+		 * @return the prefix.
+		 */
+		public String getPrefix()
+		{
+			return prefix;
+		}
+
+		/**
+		 * Get the local name.
+		 * 
+		 * @return the local name.
+		 */
+		public String getLocalName()
+		{
+			return localName;
+		}
+
+		/**
+		 * Get the qualified name.
+		 * 
+		 * @return the qualified name.
+		 */
+		public String getQualifiedName()
+		{
+			return (prefix == null ? localName : prefix + ":" + localName);
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/PortReferenceHelper.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,70 +1,70 @@
-/*
- * 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.internal.soa.esb.assertion;
-
-/**
- * Argument assertion utilities.
- * <p/>
- * <b>Copied from <a href="http://www.milyn.org">milyn.org</a></b>.
- *  
- * @author tfennelly
- */
-public abstract class AssertArgument {
-
-	/**
-	 * Assert that the argument is not null.
-	 * @param arg Argument.
-	 * @param argName Argument name.
-	 * @throws IllegalArgumentException Argument is null.
-	 */
-	public static void isNotNull(Object arg, String argName) throws IllegalArgumentException {
-		if (arg == null) {
-			throw new IllegalArgumentException("null '" + argName
-					+ "' arg in method call.");
-		}
-	}
-
-	/**
-	 * Assert that the argument is not empty.
-	 * @param arg Argument.
-	 * @param argName Argument name.
-	 * @throws IllegalArgumentException Argument is not null, but is empty.
-	 */
-	public static void isNotEmpty(String arg, String argName) throws IllegalArgumentException {
-		if (arg != null && arg.trim().equals("")) {
-			throw new IllegalArgumentException("Not null, but empty '"
-					+ argName + "' arg in method call.");
-		}
-	}
-
-	/**
-	 * Assert that the argument is neither null nor empty.
-	 * @param arg Argument.
-	 * @param argName Argument name.
-	 * @throws IllegalArgumentException Argument is null or empty.
-	 */
-	public static void isNotNullAndNotEmpty(String arg, String argName) throws IllegalArgumentException {
-		if (arg == null || arg.trim().equals("")) {
-			throw new IllegalArgumentException("null or empty '" + argName
-					+ "' arg in method call.");
-		}
-	}
-}
+/*
+ * 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.internal.soa.esb.assertion;
+
+/**
+ * Argument assertion utilities.
+ * <p/>
+ * <b>Copied from <a href="http://www.milyn.org">milyn.org</a></b>.
+ *  
+ * @author tfennelly
+ */
+public abstract class AssertArgument {
+
+	/**
+	 * Assert that the argument is not null.
+	 * @param arg Argument.
+	 * @param argName Argument name.
+	 * @throws IllegalArgumentException Argument is null.
+	 */
+	public static void isNotNull(Object arg, String argName) throws IllegalArgumentException {
+		if (arg == null) {
+			throw new IllegalArgumentException("null '" + argName
+					+ "' arg in method call.");
+		}
+	}
+
+	/**
+	 * Assert that the argument is not empty.
+	 * @param arg Argument.
+	 * @param argName Argument name.
+	 * @throws IllegalArgumentException Argument is not null, but is empty.
+	 */
+	public static void isNotEmpty(String arg, String argName) throws IllegalArgumentException {
+		if (arg != null && arg.trim().equals("")) {
+			throw new IllegalArgumentException("Not null, but empty '"
+					+ argName + "' arg in method call.");
+		}
+	}
+
+	/**
+	 * Assert that the argument is neither null nor empty.
+	 * @param arg Argument.
+	 * @param argName Argument name.
+	 * @throws IllegalArgumentException Argument is null or empty.
+	 */
+	public static void isNotNullAndNotEmpty(String arg, String argName) throws IllegalArgumentException {
+		if (arg == null || arg.trim().equals("")) {
+			throw new IllegalArgumentException("null or empty '" + argName
+					+ "' arg in method call.");
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/command/CommandQueue.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/command/CommandQueueException.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/command/InMemoryCommandQueue.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/command/JmsCommandQueue.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/DeliverOnlyCourier.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/DeliverOnlyCourier.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/DeliverOnlyCourier.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,32 +1,32 @@
-/*
- * 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.internal.soa.esb.couriers;
-
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.message.Message;
-
-public interface DeliverOnlyCourier 
-{
-	public boolean	deliver(Message message) throws CourierException, MalformedEPRException;
-}
+/*
+ * 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.internal.soa.esb.couriers;
+
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.message.Message;
+
+public interface DeliverOnlyCourier 
+{
+	public boolean	deliver(Message message) throws CourierException, MalformedEPRException;
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/DeliverOnlyCourier.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/FileCourier.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,512 +1,512 @@
-/*
- * 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.internal.soa.esb.couriers;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.URISyntaxException;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.helpers.NamingContext;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.util.Util;
-import org.xml.sax.SAXException;
-
-public class JmsCourier implements PickUpOnlyCourier, DeliverOnlyCourier
-{
-	/**
-	 * disable default constructor
-	 */
-	private JmsCourier ()
-	{
-	}
-
-	/**
-	 * package protected constructor - Objects of Courier should only be
-	 * instantiated by the Factory
-	 * 
-	 * @param epr
-	 */
-	JmsCourier (JMSEpr epr) throws CourierException
-	{
-		this(epr, false);
-	}
-
-	/**
-	 * package protected constructor - Objects of Courier should only be
-	 * instantiated by the Factory
-	 * 
-	 * @param epr
-	 */
-	JmsCourier (JMSEpr epr, boolean isReceiver) throws CourierException
-	{
-		_isReceiver = isReceiver;
-		_epr = epr;
-		_sleepForRetries = 3000;
-
-		if (!_isReceiver)
-			try
-			{
-				_messageProperties = Util.propertiesFromSelector(_epr
-						.getMessageSelector());
-			}
-			catch (Exception e)
-			{
-				throw new CourierException(e);
-			}
-
-	} // ________________________________
-
-	void cleanup ()
-	{
-		if (null != _messageProducer) try
-		{
-			_messageProducer.close();
-		}
-		catch (JMSException e)
-		{/* OK do nothing */
-		}
-
-		if (null != _messageConsumer) try
-		{
-			_messageConsumer.close();
-		}
-		catch (JMSException e)
-		{/* OK do nothing */
-		}
-
-		if (null != _jmsSession) try
-		{
-			_jmsSession.close();
-		}
-		catch (JMSException e)
-		{/* OK do nothing */
-		}
-
-		if (null != _jmsConnection) try
-		{
-			_jmsConnection.close();
-		}
-		catch (JMSException e)
-		{/* OK do nothing */
-		}
-
-		_messageProducer = null;
-		_messageConsumer = null;
-		_jmsSession = null;
-		_jmsConnection = null;
-	} // ________________________________
-
-	/**
-	 * package the ESB message in a javax.jms.ObjectMessage, and send it
-	 * 
-	 * @param message
-	 *            Message - the message to deliver
-	 * @return boolean - the result of the delivery
-	 * @throws CourierException -
-	 *             if problems were encountered
-	 */
-	public boolean deliver (Message message) throws CourierException
-	{
-		if (_isReceiver)
-			throw new CourierException("This is a read-only Courier");
-
-		if (null == message) return false;
-		if (null == _messageProducer) try
-		{
-			createMessageProducer();
-		}
-		catch (Exception e)
-		{
-			throw new CourierException(e);
-		}
-
-		while (null != _messageProducer)
-		{
-			try
-			{
-				// obtain Serializable version of arg0 and package it in a jms
-				// ObjectMessage
-				ObjectMessage msg = _jmsSession.createObjectMessage(Util
-						.serialize(message));
-				for (KeyValuePair kvp : _messageProperties)
-					msg.setStringProperty(kvp.getKey(), kvp.getValue());
-				sendMessage(msg);
-				return true;
-			}
-			catch (JMSException e)
-			{
-				jmsConnectRetry(e);
-			}
-			catch (Exception e)
-			{
-				throw new CourierException(e);
-			}
-		}
-		return false;
-	} // ________________________________
-
-	/**
-	 * send/publish a javax.jms.ObjectMessage (that will contain the serialized
-	 * ESB Message)
-	 * 
-	 * @param jmsMessage
-	 */
-	private void sendMessage (javax.jms.Message jmsMessage) throws JMSException
-	{
-		if (_messageProducer instanceof TopicPublisher) ((TopicPublisher) _messageProducer)
-				.publish(jmsMessage);
-		else
-			_messageProducer.send(jmsMessage);
-	} // ________________________________
-
-	private void jmsConnectRetry (Exception exc)
-	{
-		_logger.error("JMS error.  Attempting JMS reconnect.", exc);
-		_jmsConnection = null;
-		_jmsSession = null;
-		_messageProducer = null;
-		_messageConsumer = null;
-
-		for (int i1 = 0; i1 < 5; i1++)
-		{
-			// try to reconnect to the queue
-			try
-			{
-				if (_isReceiver) createMessageConsumer();
-				else
-					createMessageProducer();
-			}
-			catch (Exception e)
-			{
-				_logger.error("Reconnecting to JMS", e);
-				try
-				{
-					Thread.sleep(_sleepForRetries);
-				}
-				catch (InterruptedException e1)
-				{ // Just return after logging
-					_logger.error("Unexpected thread interupt exception.", e);
-					break;
-				}
-			}
-		}
-	} // ________________________________
-
-	private void createMessageProducer () throws CourierException,
-			MalformedEPRException
-	{
-		try
-		{
-			String sJndiConnectionFactory = _epr.getJndiContextFactory();
-			if (Util.isNullString(sJndiConnectionFactory))
-				sJndiConnectionFactory = NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY;
-			String sJndiURL = _epr.getJndiURL();
-			if (Util.isNullString(sJndiURL))
-				sJndiURL = NamingContext.JBOSS_PROVIDER_URL;
-			String sJndiPkgPrefix = _epr.getJndiPkgPrefix();
-			if (Util.isNullString(sJndiPkgPrefix))
-				sJndiPkgPrefix = NamingContext.JBOSS_URL_PKG_PREFIX;
-			Context oJndiCtx = NamingContext.getServerContext(sJndiURL,
-					sJndiConnectionFactory, sJndiPkgPrefix);
-
-			String sFactoryClass = _epr.getConnectionFactory();
-			if (Util.isNullString(sFactoryClass))
-				sFactoryClass = "ConnectionFactory";
-
-			Object tmp = oJndiCtx.lookup(sFactoryClass);
-
-			String sType = _epr.getDestinationType();
-			if (JMSEpr.QUEUE_TYPE.equals(sType))
-			{
-				QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-				QueueConnection qConn = qcf.createQueueConnection();
-				QueueSession qSess = qConn.createQueueSession(false,
-						QueueSession.AUTO_ACKNOWLEDGE);
-				javax.jms.Queue queue = null;
-				try
-				{
-					queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
-							.getDestinationName());
-				}
-				catch (NamingException ne)
-				{
-					queue = qSess.createQueue(_epr.getDestinationName());
-				}
-				_jmsConnection = qConn;
-				_jmsSession = qSess;
-				_messageProducer = qSess.createSender(queue);
-			}
-			else
-				if (JMSEpr.TOPIC_TYPE.equals(sType))
-				{
-					TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
-					TopicConnection tConn = tcf.createTopicConnection();
-					TopicSession tSess = tConn.createTopicSession(false,
-							TopicSession.AUTO_ACKNOWLEDGE);
-					Topic topic = null;
-					try
-					{
-						topic = (Topic) oJndiCtx.lookup(_epr
-								.getDestinationName());
-					}
-					catch (NamingException ne)
-					{
-						topic = tSess.createTopic(_epr.getDestinationName());
-					}
-					_jmsConnection = tConn;
-					_jmsSession = tSess;
-					_messageProducer = tSess.createPublisher(topic);
-				}
-				else
-					throw new CourierException("Unknown destination type");
-		}
-		catch (JMSException ex)
-		{
-			_logger.error("Error from JMS system.", ex);
-			
-			throw new CourierException(ex);
-		}
-		catch (NamingException ex)
-		{
-			_logger.error("JMX lookup error.", ex);
-			
-			throw new CourierException(ex);
-		}
-		catch (URISyntaxException ex)
-		{
-			throw new MalformedEPRException(ex);
-		}
-
-	} // ________________________________
-
-	public Message pickup (long millis) throws CourierException
-	{
-		if (!_isReceiver)
-			throw new CourierException("This is an outgoing-only Courier");
-		if (millis < 1)
-			throw new IllegalArgumentException("Timeout millis must be > 0");
-		if (null == _messageConsumer) try
-		{
-			createMessageConsumer();
-		}
-		catch (Exception e)
-		{
-			try
-			{
-				Thread.sleep(1000); // TODO magic number
-			}
-			catch (InterruptedException eI)
-			{/* OK do nothing */
-			}
-			throw new CourierException("Unable to create Message Consumer", e);
-		}
-
-		javax.jms.Message jmsMessage = null;
-		while (null != _messageConsumer)
-		{
-			try
-			{
-				jmsMessage = _messageConsumer.receive(millis);
-				break;
-			}
-			catch (JMSException e)
-			{
-				jmsConnectRetry(e);
-			}
-			catch (Exception e)
-			{
-				throw new CourierException(e);
-			}
-		}
-		if (null == jmsMessage) return null;
-
-		if (!(jmsMessage instanceof ObjectMessage))
-		{
-			_logger.error("Unsupported JMS message type: " + jmsMessage
-					.getClass().getName());
-			return null;
-		}
-		try
-		{
-			Serializable obj = (Serializable) ((ObjectMessage) jmsMessage)
-					.getObject();
-			return Util.deserialize(obj);
-		}
-		catch (JMSException e1)
-		{
-			_logger.error("Failed to read Serialized Object from JMS message.",
-					e1);
-			return null;
-		}
-		catch (ClassCastException e2)
-		{
-			_logger
-					.error(
-							"Object in JMS message is not a org.jboss.soa.esb.message.Message",
-							e2);
-		}
-		catch (IOException e3)
-		{
-			_logger.error("Object in JMS message is not a Serializeable", e3);
-		}
-		catch (ParserConfigurationException e4)
-		{
-			_logger.error("Object in JMS message has invalid XML", e4);
-		}
-		catch (SAXException e5)
-		{
-			_logger.error("Object in JMS message has invalid XML", e5);
-		}
-		return null;
-	} // ________________________________
-
-	private void createMessageConsumer () throws CourierException, ConfigurationException, MalformedEPRException
-	{
-		try
-		{
-			String sJndiConnectionFactory = _epr.getJndiContextFactory();
-			if (Util.isNullString(sJndiConnectionFactory))
-				sJndiConnectionFactory = NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY;
-			String sJndiURL = _epr.getJndiURL();
-			if (Util.isNullString(sJndiURL))
-				sJndiURL = NamingContext.JBOSS_PROVIDER_URL;
-			String sJndiPkgPrefix = _epr.getJndiPkgPrefix();
-			if (Util.isNullString(sJndiPkgPrefix))
-				sJndiPkgPrefix = NamingContext.JBOSS_URL_PKG_PREFIX;
-			Context oJndiCtx = NamingContext.getServerContext(sJndiURL,
-					sJndiConnectionFactory, sJndiPkgPrefix);
-			if (null == oJndiCtx)
-				throw new ConfigurationException(
-						"Unable fo obtain jndi context <" + sJndiURL + "," + sJndiConnectionFactory + "," + sJndiPkgPrefix + ">");
-	
-			String sFactoryClass = _epr.getConnectionFactory();
-			if (Util.isNullString(sFactoryClass))
-				sFactoryClass = "ConnectionFactory";
-	
-			Object tmp = oJndiCtx.lookup(sFactoryClass);
-	
-			String sType = _epr.getDestinationType();
-			if (JMSEpr.QUEUE_TYPE.equals(sType))
-			{
-				QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-				QueueConnection qConn = qcf.createQueueConnection();
-				QueueSession qSess = qConn.createQueueSession(false,
-						QueueSession.AUTO_ACKNOWLEDGE);
-				javax.jms.Queue queue = null;
-				try
-				{
-					queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
-							.getDestinationName());
-				}
-				catch (NamingException ne)
-				{
-					queue = qSess.createQueue(_epr.getDestinationName());
-				}
-				_jmsConnection = qConn;
-				_jmsSession = qSess;
-				_messageConsumer = qSess.createReceiver(queue, _epr
-						.getMessageSelector());
-				qConn.start();
-			}
-			else
-			{
-				if (JMSEpr.TOPIC_TYPE.equals(sType))
-				{
-					TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
-					TopicConnection tConn = tcf.createTopicConnection();
-					TopicSession tSess = tConn.createTopicSession(false,
-							TopicSession.AUTO_ACKNOWLEDGE);
-					Topic topic = tSess.createTopic(_epr.getDestinationName());
-					_jmsConnection = tConn;
-					_jmsSession = tSess;
-					_messageConsumer = tSess.createConsumer(topic, _epr
-							.getMessageSelector());
-					tConn.start();
-				}
-				else
-					throw new CourierException("Unknown destination type");
-			}
-		}
-		catch (JMSException ex)
-		{
-			_logger.error("Error from JMS system.", ex);
-			
-			throw new CourierException(ex);
-		}
-		catch (NamingException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-		catch (URISyntaxException ex)
-		{
-			throw new MalformedEPRException(ex);
-		}
-
-	} // ________________________________
-
-	long _sleepForRetries = 3000; // milliseconds
-
-	protected boolean _isReceiver;
-
-	protected JMSEpr _epr;
-
-	protected Logger _logger = Logger.getLogger(JmsCourier.class);
-
-	protected String _messageSelector;
-
-	protected Connection _jmsConnection;
-
-	protected Session _jmsSession;
-
-	protected MessageProducer _messageProducer;
-
-	protected MessageConsumer _messageConsumer;
-
-	protected List<KeyValuePair> _messageProperties;
-
-}
+/*
+ * 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.internal.soa.esb.couriers;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URISyntaxException;
+import java.util.List;
+
+import javax.jms.Connection;
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.Topic;
+import javax.jms.TopicConnection;
+import javax.jms.TopicConnectionFactory;
+import javax.jms.TopicPublisher;
+import javax.jms.TopicSession;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.helpers.KeyValuePair;
+import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.util.Util;
+import org.xml.sax.SAXException;
+
+public class JmsCourier implements PickUpOnlyCourier, DeliverOnlyCourier
+{
+	/**
+	 * disable default constructor
+	 */
+	private JmsCourier ()
+	{
+	}
+
+	/**
+	 * package protected constructor - Objects of Courier should only be
+	 * instantiated by the Factory
+	 * 
+	 * @param epr
+	 */
+	JmsCourier (JMSEpr epr) throws CourierException
+	{
+		this(epr, false);
+	}
+
+	/**
+	 * package protected constructor - Objects of Courier should only be
+	 * instantiated by the Factory
+	 * 
+	 * @param epr
+	 */
+	JmsCourier (JMSEpr epr, boolean isReceiver) throws CourierException
+	{
+		_isReceiver = isReceiver;
+		_epr = epr;
+		_sleepForRetries = 3000;
+
+		if (!_isReceiver)
+			try
+			{
+				_messageProperties = Util.propertiesFromSelector(_epr
+						.getMessageSelector());
+			}
+			catch (Exception e)
+			{
+				throw new CourierException(e);
+			}
+
+	} // ________________________________
+
+	void cleanup ()
+	{
+		if (null != _messageProducer) try
+		{
+			_messageProducer.close();
+		}
+		catch (JMSException e)
+		{/* OK do nothing */
+		}
+
+		if (null != _messageConsumer) try
+		{
+			_messageConsumer.close();
+		}
+		catch (JMSException e)
+		{/* OK do nothing */
+		}
+
+		if (null != _jmsSession) try
+		{
+			_jmsSession.close();
+		}
+		catch (JMSException e)
+		{/* OK do nothing */
+		}
+
+		if (null != _jmsConnection) try
+		{
+			_jmsConnection.close();
+		}
+		catch (JMSException e)
+		{/* OK do nothing */
+		}
+
+		_messageProducer = null;
+		_messageConsumer = null;
+		_jmsSession = null;
+		_jmsConnection = null;
+	} // ________________________________
+
+	/**
+	 * package the ESB message in a javax.jms.ObjectMessage, and send it
+	 * 
+	 * @param message
+	 *            Message - the message to deliver
+	 * @return boolean - the result of the delivery
+	 * @throws CourierException -
+	 *             if problems were encountered
+	 */
+	public boolean deliver (Message message) throws CourierException
+	{
+		if (_isReceiver)
+			throw new CourierException("This is a read-only Courier");
+
+		if (null == message) return false;
+		if (null == _messageProducer) try
+		{
+			createMessageProducer();
+		}
+		catch (Exception e)
+		{
+			throw new CourierException(e);
+		}
+
+		while (null != _messageProducer)
+		{
+			try
+			{
+				// obtain Serializable version of arg0 and package it in a jms
+				// ObjectMessage
+				ObjectMessage msg = _jmsSession.createObjectMessage(Util
+						.serialize(message));
+				for (KeyValuePair kvp : _messageProperties)
+					msg.setStringProperty(kvp.getKey(), kvp.getValue());
+				sendMessage(msg);
+				return true;
+			}
+			catch (JMSException e)
+			{
+				jmsConnectRetry(e);
+			}
+			catch (Exception e)
+			{
+				throw new CourierException(e);
+			}
+		}
+		return false;
+	} // ________________________________
+
+	/**
+	 * send/publish a javax.jms.ObjectMessage (that will contain the serialized
+	 * ESB Message)
+	 * 
+	 * @param jmsMessage
+	 */
+	private void sendMessage (javax.jms.Message jmsMessage) throws JMSException
+	{
+		if (_messageProducer instanceof TopicPublisher) ((TopicPublisher) _messageProducer)
+				.publish(jmsMessage);
+		else
+			_messageProducer.send(jmsMessage);
+	} // ________________________________
+
+	private void jmsConnectRetry (Exception exc)
+	{
+		_logger.error("JMS error.  Attempting JMS reconnect.", exc);
+		_jmsConnection = null;
+		_jmsSession = null;
+		_messageProducer = null;
+		_messageConsumer = null;
+
+		for (int i1 = 0; i1 < 5; i1++)
+		{
+			// try to reconnect to the queue
+			try
+			{
+				if (_isReceiver) createMessageConsumer();
+				else
+					createMessageProducer();
+			}
+			catch (Exception e)
+			{
+				_logger.error("Reconnecting to JMS", e);
+				try
+				{
+					Thread.sleep(_sleepForRetries);
+				}
+				catch (InterruptedException e1)
+				{ // Just return after logging
+					_logger.error("Unexpected thread interupt exception.", e);
+					break;
+				}
+			}
+		}
+	} // ________________________________
+
+	private void createMessageProducer () throws CourierException,
+			MalformedEPRException
+	{
+		try
+		{
+			String sJndiConnectionFactory = _epr.getJndiContextFactory();
+			if (Util.isNullString(sJndiConnectionFactory))
+				sJndiConnectionFactory = NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY;
+			String sJndiURL = _epr.getJndiURL();
+			if (Util.isNullString(sJndiURL))
+				sJndiURL = NamingContext.JBOSS_PROVIDER_URL;
+			String sJndiPkgPrefix = _epr.getJndiPkgPrefix();
+			if (Util.isNullString(sJndiPkgPrefix))
+				sJndiPkgPrefix = NamingContext.JBOSS_URL_PKG_PREFIX;
+			Context oJndiCtx = NamingContext.getServerContext(sJndiURL,
+					sJndiConnectionFactory, sJndiPkgPrefix);
+
+			String sFactoryClass = _epr.getConnectionFactory();
+			if (Util.isNullString(sFactoryClass))
+				sFactoryClass = "ConnectionFactory";
+
+			Object tmp = oJndiCtx.lookup(sFactoryClass);
+
+			String sType = _epr.getDestinationType();
+			if (JMSEpr.QUEUE_TYPE.equals(sType))
+			{
+				QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+				QueueConnection qConn = qcf.createQueueConnection();
+				QueueSession qSess = qConn.createQueueSession(false,
+						QueueSession.AUTO_ACKNOWLEDGE);
+				javax.jms.Queue queue = null;
+				try
+				{
+					queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
+							.getDestinationName());
+				}
+				catch (NamingException ne)
+				{
+					queue = qSess.createQueue(_epr.getDestinationName());
+				}
+				_jmsConnection = qConn;
+				_jmsSession = qSess;
+				_messageProducer = qSess.createSender(queue);
+			}
+			else
+				if (JMSEpr.TOPIC_TYPE.equals(sType))
+				{
+					TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
+					TopicConnection tConn = tcf.createTopicConnection();
+					TopicSession tSess = tConn.createTopicSession(false,
+							TopicSession.AUTO_ACKNOWLEDGE);
+					Topic topic = null;
+					try
+					{
+						topic = (Topic) oJndiCtx.lookup(_epr
+								.getDestinationName());
+					}
+					catch (NamingException ne)
+					{
+						topic = tSess.createTopic(_epr.getDestinationName());
+					}
+					_jmsConnection = tConn;
+					_jmsSession = tSess;
+					_messageProducer = tSess.createPublisher(topic);
+				}
+				else
+					throw new CourierException("Unknown destination type");
+		}
+		catch (JMSException ex)
+		{
+			_logger.error("Error from JMS system.", ex);
+			
+			throw new CourierException(ex);
+		}
+		catch (NamingException ex)
+		{
+			_logger.error("JMX lookup error.", ex);
+			
+			throw new CourierException(ex);
+		}
+		catch (URISyntaxException ex)
+		{
+			throw new MalformedEPRException(ex);
+		}
+
+	} // ________________________________
+
+	public Message pickup (long millis) throws CourierException
+	{
+		if (!_isReceiver)
+			throw new CourierException("This is an outgoing-only Courier");
+		if (millis < 1)
+			throw new IllegalArgumentException("Timeout millis must be > 0");
+		if (null == _messageConsumer) try
+		{
+			createMessageConsumer();
+		}
+		catch (Exception e)
+		{
+			try
+			{
+				Thread.sleep(1000); // TODO magic number
+			}
+			catch (InterruptedException eI)
+			{/* OK do nothing */
+			}
+			throw new CourierException("Unable to create Message Consumer", e);
+		}
+
+		javax.jms.Message jmsMessage = null;
+		while (null != _messageConsumer)
+		{
+			try
+			{
+				jmsMessage = _messageConsumer.receive(millis);
+				break;
+			}
+			catch (JMSException e)
+			{
+				jmsConnectRetry(e);
+			}
+			catch (Exception e)
+			{
+				throw new CourierException(e);
+			}
+		}
+		if (null == jmsMessage) return null;
+
+		if (!(jmsMessage instanceof ObjectMessage))
+		{
+			_logger.error("Unsupported JMS message type: " + jmsMessage
+					.getClass().getName());
+			return null;
+		}
+		try
+		{
+			Serializable obj = (Serializable) ((ObjectMessage) jmsMessage)
+					.getObject();
+			return Util.deserialize(obj);
+		}
+		catch (JMSException e1)
+		{
+			_logger.error("Failed to read Serialized Object from JMS message.",
+					e1);
+			return null;
+		}
+		catch (ClassCastException e2)
+		{
+			_logger
+					.error(
+							"Object in JMS message is not a org.jboss.soa.esb.message.Message",
+							e2);
+		}
+		catch (IOException e3)
+		{
+			_logger.error("Object in JMS message is not a Serializeable", e3);
+		}
+		catch (ParserConfigurationException e4)
+		{
+			_logger.error("Object in JMS message has invalid XML", e4);
+		}
+		catch (SAXException e5)
+		{
+			_logger.error("Object in JMS message has invalid XML", e5);
+		}
+		return null;
+	} // ________________________________
+
+	private void createMessageConsumer () throws CourierException, ConfigurationException, MalformedEPRException
+	{
+		try
+		{
+			String sJndiConnectionFactory = _epr.getJndiContextFactory();
+			if (Util.isNullString(sJndiConnectionFactory))
+				sJndiConnectionFactory = NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY;
+			String sJndiURL = _epr.getJndiURL();
+			if (Util.isNullString(sJndiURL))
+				sJndiURL = NamingContext.JBOSS_PROVIDER_URL;
+			String sJndiPkgPrefix = _epr.getJndiPkgPrefix();
+			if (Util.isNullString(sJndiPkgPrefix))
+				sJndiPkgPrefix = NamingContext.JBOSS_URL_PKG_PREFIX;
+			Context oJndiCtx = NamingContext.getServerContext(sJndiURL,
+					sJndiConnectionFactory, sJndiPkgPrefix);
+			if (null == oJndiCtx)
+				throw new ConfigurationException(
+						"Unable fo obtain jndi context <" + sJndiURL + "," + sJndiConnectionFactory + "," + sJndiPkgPrefix + ">");
+	
+			String sFactoryClass = _epr.getConnectionFactory();
+			if (Util.isNullString(sFactoryClass))
+				sFactoryClass = "ConnectionFactory";
+	
+			Object tmp = oJndiCtx.lookup(sFactoryClass);
+	
+			String sType = _epr.getDestinationType();
+			if (JMSEpr.QUEUE_TYPE.equals(sType))
+			{
+				QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+				QueueConnection qConn = qcf.createQueueConnection();
+				QueueSession qSess = qConn.createQueueSession(false,
+						QueueSession.AUTO_ACKNOWLEDGE);
+				javax.jms.Queue queue = null;
+				try
+				{
+					queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
+							.getDestinationName());
+				}
+				catch (NamingException ne)
+				{
+					queue = qSess.createQueue(_epr.getDestinationName());
+				}
+				_jmsConnection = qConn;
+				_jmsSession = qSess;
+				_messageConsumer = qSess.createReceiver(queue, _epr
+						.getMessageSelector());
+				qConn.start();
+			}
+			else
+			{
+				if (JMSEpr.TOPIC_TYPE.equals(sType))
+				{
+					TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
+					TopicConnection tConn = tcf.createTopicConnection();
+					TopicSession tSess = tConn.createTopicSession(false,
+							TopicSession.AUTO_ACKNOWLEDGE);
+					Topic topic = tSess.createTopic(_epr.getDestinationName());
+					_jmsConnection = tConn;
+					_jmsSession = tSess;
+					_messageConsumer = tSess.createConsumer(topic, _epr
+							.getMessageSelector());
+					tConn.start();
+				}
+				else
+					throw new CourierException("Unknown destination type");
+			}
+		}
+		catch (JMSException ex)
+		{
+			_logger.error("Error from JMS system.", ex);
+			
+			throw new CourierException(ex);
+		}
+		catch (NamingException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+		catch (URISyntaxException ex)
+		{
+			throw new MalformedEPRException(ex);
+		}
+
+	} // ________________________________
+
+	long _sleepForRetries = 3000; // milliseconds
+
+	protected boolean _isReceiver;
+
+	protected JMSEpr _epr;
+
+	protected Logger _logger = Logger.getLogger(JmsCourier.class);
+
+	protected String _messageSelector;
+
+	protected Connection _jmsConnection;
+
+	protected Session _jmsSession;
+
+	protected MessageProducer _messageProducer;
+
+	protected MessageConsumer _messageConsumer;
+
+	protected List<KeyValuePair> _messageProperties;
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/PickUpOnlyCourier.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/PickUpOnlyCourier.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/PickUpOnlyCourier.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,36 +1,36 @@
-/*
- * 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.internal.soa.esb.couriers;
-
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierTimeoutException;
-import org.jboss.soa.esb.message.Message;
-/**
- * 
- * @author kstam
- *
- */
-public interface PickUpOnlyCourier 
-{
-	public Message	pickup(long millis) throws CourierException, CourierTimeoutException;
-}
+/*
+ * 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.internal.soa.esb.couriers;
+
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierTimeoutException;
+import org.jboss.soa.esb.message.Message;
+/**
+ * 
+ * @author kstam
+ *
+ */
+public interface PickUpOnlyCourier 
+{
+	public Message	pickup(long millis) throws CourierException, CourierTimeoutException;
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/PickUpOnlyCourier.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourierImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourierImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourierImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,218 +1,218 @@
-/*
- * 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.internal.soa.esb.couriers;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierTimeoutException;
-import org.jboss.soa.esb.couriers.TwoWayCourier;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * A two-way-courier can perform message deliveries and pickups.
- * 
- * @author esteban
- * @author kstam at redhat.com
- */
-public class TwoWayCourierImpl implements TwoWayCourier
-{
-	private DeliverOnlyCourier _deliverCourier;
-
-	private PickUpOnlyCourier _pickupCourier;
-
-	/**
-	 * Constructor.
-	 * 
-	 * @param toEpr -
-	 *            to address
-	 * @param replyToEpr -
-	 *            reply to address
-	 * @throws CourierException
-	 */
-	public TwoWayCourierImpl(EPR toEpr, EPR replyToEpr)
-			throws CourierException, MalformedEPRException
-	{
-		setToEpr(toEpr);
-		setReplyToEpr(replyToEpr);
-	}
-
-	/**
-	 * @see org.jboss.soa.esb.couriers.TwoWayCourier#setToEpr(toEPR).
-	 */
-	public void setToEpr(EPR toEPR) throws CourierException,
-			MalformedEPRException
-	{
-		DeliverOnlyCourier old = _deliverCourier;
-		_deliverCourier = getDeliverCourier(toEPR);
-
-		tryToCleanup(old);
-	}
-
-	/**
-	 * @see org.jboss.soa.esb.couriers.TwoWayCourier#setReplyEpr(toReplyEPR).
-	 */
-	public void setReplyToEpr(EPR replyToEPR) throws CourierException,
-			MalformedEPRException
-	{
-		PickUpOnlyCourier old = _pickupCourier;
-		_pickupCourier = getPickupCourier(replyToEPR);
-
-		tryToCleanup(old);
-	}
-
-	private DeliverOnlyCourier getDeliverCourier(EPR toEPR)
-			throws CourierException, MalformedEPRException
-	{
-		return (null == toEPR) ? null : (DeliverOnlyCourier) courierFromEpr(
-				toEPR, false);
-	}
-
-	private PickUpOnlyCourier getPickupCourier(EPR replyToEPR)
-			throws CourierException, MalformedEPRException
-	{
-		return (null == replyToEPR) ? null
-				: (PickUpOnlyCourier) courierFromEpr(replyToEPR, true);
-	}
-
-	private Object courierFromEpr(EPR epr, boolean pickUpOnly)
-			throws CourierException, MalformedEPRException
-	{
-		if (null == epr)
-			return null;
-		if (epr instanceof JMSEpr)
-			return new JmsCourier((JMSEpr) epr, pickUpOnly);
-		if (epr instanceof FileEpr)
-			return new FileCourier((FileEpr) epr, pickUpOnly);
-		if (epr instanceof JDBCEpr)
-			return new SqlTableCourier((JDBCEpr) epr, pickUpOnly);
-
-		// TODO the following is necessary because EPR
-		// serialization/deserialization loses type
-
-		return courierFromGenericEPR(epr, pickUpOnly);
-	}
-
-	private Object courierFromGenericEPR(EPR epr, boolean pickUpOnly)
-			throws CourierException, MalformedEPRException
-	{
-		String addr = null;
-
-		addr = epr.getAddr().getAddress();
-		if (addr.startsWith(JMSEpr.JMS_PROTOCOL))
-			return new JmsCourier(new JMSEpr(epr), pickUpOnly);
-		if (addr.startsWith(JDBCEpr.JDBC_PROTOCOL))
-			return new SqlTableCourier(new JDBCEpr(epr), pickUpOnly);
-		// TODO magic strings
-		if (addr.startsWith("file://") || addr.startsWith("ftp://")
-				|| addr.startsWith("sftp://") || addr.startsWith("ftps://"))
-			return new FileCourier(new FileEpr(epr), pickUpOnly);
-
-		throw new CourierException("Courier for "
-				+ epr.getClass().getSimpleName() + " not supported yet");
-	}
-
-	/**
-	 * @see org.jboss.soa.esb.couriers.Courier#deliver(Message message).
-	 */
-	public boolean deliver(Message message) throws CourierException,
-			MalformedEPRException
-	{
-		boolean bRet = false;
-		try
-		{
-			if (null == _deliverCourier)
-				throw new CourierException("No deliver courier");
-			bRet = _deliverCourier.deliver(message);
-		}
-		finally
-		{
-			tryToCleanup(_deliverCourier);
-		}
-		return bRet;
-	}
-
-	/**
-	 * @see org.jboss.soa.esb.couriers.TwoWayCourier#pickup(long waitTime).
-	 */
-	public Message pickup(long waitTime) throws CourierException,
-			CourierTimeoutException
-	{
-		return pickup(waitTime, _pickupCourier);
-	}
-
-	/**
-	 * @see org.jboss.soa.esb.couriers.TwoWayCourier#pickup(long waitTime, EPR
-	 *      epr).
-	 */
-	public Message pickup(long waitTime, EPR epr) throws CourierException,
-			CourierTimeoutException, MalformedEPRException
-	{
-		return pickup(waitTime, getPickupCourier(epr));
-	}
-
-	private Message pickup(long waitTime, PickUpOnlyCourier courier)
-			throws CourierException, CourierTimeoutException
-	{
-		Message replyMessage = null;
-		try
-		{
-			if (null == courier)
-				throw new CourierException("No courier defined for pick ups");
-			replyMessage = courier.pickup(waitTime);
-		}
-		finally
-		{
-			tryToCleanup(courier);
-		}
-		return replyMessage;
-	}
-
-	private void tryToCleanup(Object obj)
-	{
-		if (null == obj)
-			return;
-		try
-		{
-			Method mth = obj.getClass().getMethod("cleanup", new Class[]
-			{});
-			mth.invoke(obj, new Object[]
-			{});
-		}
-		catch (NoSuchMethodException e)
-		{ /* OK - nothing to call */
-		}
-		catch (IllegalAccessException e)
-		{ /* tried to cleanup - just return */
-		}
-		catch (InvocationTargetException e)
-		{ /* tried to cleanup - just return */
-		}
-	}
-}
+/*
+ * 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.internal.soa.esb.couriers;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.addressing.eprs.FileEpr;
+import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierTimeoutException;
+import org.jboss.soa.esb.couriers.TwoWayCourier;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * A two-way-courier can perform message deliveries and pickups.
+ * 
+ * @author esteban
+ * @author kstam at redhat.com
+ */
+public class TwoWayCourierImpl implements TwoWayCourier
+{
+	private DeliverOnlyCourier _deliverCourier;
+
+	private PickUpOnlyCourier _pickupCourier;
+
+	/**
+	 * Constructor.
+	 * 
+	 * @param toEpr -
+	 *            to address
+	 * @param replyToEpr -
+	 *            reply to address
+	 * @throws CourierException
+	 */
+	public TwoWayCourierImpl(EPR toEpr, EPR replyToEpr)
+			throws CourierException, MalformedEPRException
+	{
+		setToEpr(toEpr);
+		setReplyToEpr(replyToEpr);
+	}
+
+	/**
+	 * @see org.jboss.soa.esb.couriers.TwoWayCourier#setToEpr(toEPR).
+	 */
+	public void setToEpr(EPR toEPR) throws CourierException,
+			MalformedEPRException
+	{
+		DeliverOnlyCourier old = _deliverCourier;
+		_deliverCourier = getDeliverCourier(toEPR);
+
+		tryToCleanup(old);
+	}
+
+	/**
+	 * @see org.jboss.soa.esb.couriers.TwoWayCourier#setReplyEpr(toReplyEPR).
+	 */
+	public void setReplyToEpr(EPR replyToEPR) throws CourierException,
+			MalformedEPRException
+	{
+		PickUpOnlyCourier old = _pickupCourier;
+		_pickupCourier = getPickupCourier(replyToEPR);
+
+		tryToCleanup(old);
+	}
+
+	private DeliverOnlyCourier getDeliverCourier(EPR toEPR)
+			throws CourierException, MalformedEPRException
+	{
+		return (null == toEPR) ? null : (DeliverOnlyCourier) courierFromEpr(
+				toEPR, false);
+	}
+
+	private PickUpOnlyCourier getPickupCourier(EPR replyToEPR)
+			throws CourierException, MalformedEPRException
+	{
+		return (null == replyToEPR) ? null
+				: (PickUpOnlyCourier) courierFromEpr(replyToEPR, true);
+	}
+
+	private Object courierFromEpr(EPR epr, boolean pickUpOnly)
+			throws CourierException, MalformedEPRException
+	{
+		if (null == epr)
+			return null;
+		if (epr instanceof JMSEpr)
+			return new JmsCourier((JMSEpr) epr, pickUpOnly);
+		if (epr instanceof FileEpr)
+			return new FileCourier((FileEpr) epr, pickUpOnly);
+		if (epr instanceof JDBCEpr)
+			return new SqlTableCourier((JDBCEpr) epr, pickUpOnly);
+
+		// TODO the following is necessary because EPR
+		// serialization/deserialization loses type
+
+		return courierFromGenericEPR(epr, pickUpOnly);
+	}
+
+	private Object courierFromGenericEPR(EPR epr, boolean pickUpOnly)
+			throws CourierException, MalformedEPRException
+	{
+		String addr = null;
+
+		addr = epr.getAddr().getAddress();
+		if (addr.startsWith(JMSEpr.JMS_PROTOCOL))
+			return new JmsCourier(new JMSEpr(epr), pickUpOnly);
+		if (addr.startsWith(JDBCEpr.JDBC_PROTOCOL))
+			return new SqlTableCourier(new JDBCEpr(epr), pickUpOnly);
+		// TODO magic strings
+		if (addr.startsWith("file://") || addr.startsWith("ftp://")
+				|| addr.startsWith("sftp://") || addr.startsWith("ftps://"))
+			return new FileCourier(new FileEpr(epr), pickUpOnly);
+
+		throw new CourierException("Courier for "
+				+ epr.getClass().getSimpleName() + " not supported yet");
+	}
+
+	/**
+	 * @see org.jboss.soa.esb.couriers.Courier#deliver(Message message).
+	 */
+	public boolean deliver(Message message) throws CourierException,
+			MalformedEPRException
+	{
+		boolean bRet = false;
+		try
+		{
+			if (null == _deliverCourier)
+				throw new CourierException("No deliver courier");
+			bRet = _deliverCourier.deliver(message);
+		}
+		finally
+		{
+			tryToCleanup(_deliverCourier);
+		}
+		return bRet;
+	}
+
+	/**
+	 * @see org.jboss.soa.esb.couriers.TwoWayCourier#pickup(long waitTime).
+	 */
+	public Message pickup(long waitTime) throws CourierException,
+			CourierTimeoutException
+	{
+		return pickup(waitTime, _pickupCourier);
+	}
+
+	/**
+	 * @see org.jboss.soa.esb.couriers.TwoWayCourier#pickup(long waitTime, EPR
+	 *      epr).
+	 */
+	public Message pickup(long waitTime, EPR epr) throws CourierException,
+			CourierTimeoutException, MalformedEPRException
+	{
+		return pickup(waitTime, getPickupCourier(epr));
+	}
+
+	private Message pickup(long waitTime, PickUpOnlyCourier courier)
+			throws CourierException, CourierTimeoutException
+	{
+		Message replyMessage = null;
+		try
+		{
+			if (null == courier)
+				throw new CourierException("No courier defined for pick ups");
+			replyMessage = courier.pickup(waitTime);
+		}
+		finally
+		{
+			tryToCleanup(courier);
+		}
+		return replyMessage;
+	}
+
+	private void tryToCleanup(Object obj)
+	{
+		if (null == obj)
+			return;
+		try
+		{
+			Method mth = obj.getClass().getMethod("cleanup", new Class[]
+			{});
+			mth.invoke(obj, new Object[]
+			{});
+		}
+		catch (NoSuchMethodException e)
+		{ /* OK - nothing to call */
+		}
+		catch (IllegalAccessException e)
+		{ /* tried to cleanup - just return */
+		}
+		catch (InvocationTargetException e)
+		{ /* tried to cleanup - just return */
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourierImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/FileHandler.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/FileHandlerFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/FtpFileHandler.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/helpers/LocalFileHandler.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/MessageFactoryImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/MessageFactoryImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/MessageFactoryImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,136 +1,136 @@
-package org.jboss.internal.soa.esb.message.format;
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Properties;
-
-import org.jboss.internal.soa.esb.message.format.serialized.SerializedMessagePlugin;
-import org.jboss.internal.soa.esb.message.format.xml.XMLMessagePlugin;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessagePlugin;
-import org.jboss.soa.esb.message.format.MessageType;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Messages may contain attachments that do not appear in the main payload body.
- * For example, binary document formats, zip files etc.
- * 
- * @author Mark Little
- */
-
-public class MessageFactoryImpl extends MessageFactory
-{
-
-	public MessageFactoryImpl ()
-	{
-		reset();
-	}
-
-	public void reset ()
-	{
-		messageFormats.clear();
-		
-		/*
-		 * Go through the properties loaded from the property file. Anything
-		 * starting with MessagePlugin.MESSAGE_PLUGIN is assumed to be a plugin
-		 * that we load and add to the list.
-		 */
-		
-		Properties properties = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperties();
-		
-		if (properties != null)
-		{
-			Enumeration names = properties.propertyNames();
-
-			while (names.hasMoreElements())
-			{
-				String attrName = (String) names.nextElement();
-				
-				if (attrName.startsWith(MessagePlugin.MESSAGE_PLUGIN))
-				{
-					try
-					{
-						String pluginName = properties.getProperty(attrName);
-						Class c = Class.forName(pluginName);
-						MessagePlugin thePlugin = (MessagePlugin) c.newInstance();
-
-						messageFormats.put(thePlugin.getType(), thePlugin);
-					}
-					catch (ClassNotFoundException ex)
-					{
-						ex.printStackTrace();
-					}
-					catch (IllegalAccessException ex)
-					{
-						ex.printStackTrace();
-					}
-					catch (InstantiationException ex)
-					{
-						ex.printStackTrace();
-					}
-				}
-			}
-		}
-	         
-		/*
-		 * Now add the default(s).
-		 */
-		
-		messageFormats.put(MessageType.JBOSS_XML, new XMLMessagePlugin());
-		messageFormats.put(MessageType.JAVA_SERIALIZED, new SerializedMessagePlugin());
-	}
-	
-	public Message getMessage() // returns some default implementation.
-	{
-		return ((MessagePlugin) messageFormats.get(MessageType.DEFAULT_TYPE)).getMessage();
-	}
-
-	public Message getMessage(URI type) // returns a message of a specific type.
-	{
-		if (type == null)
-			throw new IllegalArgumentException();
-
-		MessagePlugin plugin = messageFormats.get(type);
-
-		if (plugin != null)
-			return plugin.getMessage();
-		else
-			return null;
-	}
-
-	public Message getMessage(Message msg, URI type) // convert a message
-	// from one form to
-	// another.
-	{
-		if ((msg == null) || (type == null))
-			throw new IllegalArgumentException();
-
-		return null;
-	}
-
-	private final Hashtable<URI, MessagePlugin> messageFormats = new Hashtable<URI, MessagePlugin>();
-
-}
+package org.jboss.internal.soa.esb.message.format;
+
+import java.net.URI;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.jboss.internal.soa.esb.message.format.serialized.SerializedMessagePlugin;
+import org.jboss.internal.soa.esb.message.format.xml.XMLMessagePlugin;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessagePlugin;
+import org.jboss.soa.esb.message.format.MessageType;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Messages may contain attachments that do not appear in the main payload body.
+ * For example, binary document formats, zip files etc.
+ * 
+ * @author Mark Little
+ */
+
+public class MessageFactoryImpl extends MessageFactory
+{
+
+	public MessageFactoryImpl ()
+	{
+		reset();
+	}
+
+	public void reset ()
+	{
+		messageFormats.clear();
+		
+		/*
+		 * Go through the properties loaded from the property file. Anything
+		 * starting with MessagePlugin.MESSAGE_PLUGIN is assumed to be a plugin
+		 * that we load and add to the list.
+		 */
+		
+		Properties properties = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperties();
+		
+		if (properties != null)
+		{
+			Enumeration names = properties.propertyNames();
+
+			while (names.hasMoreElements())
+			{
+				String attrName = (String) names.nextElement();
+				
+				if (attrName.startsWith(MessagePlugin.MESSAGE_PLUGIN))
+				{
+					try
+					{
+						String pluginName = properties.getProperty(attrName);
+						Class c = Class.forName(pluginName);
+						MessagePlugin thePlugin = (MessagePlugin) c.newInstance();
+
+						messageFormats.put(thePlugin.getType(), thePlugin);
+					}
+					catch (ClassNotFoundException ex)
+					{
+						ex.printStackTrace();
+					}
+					catch (IllegalAccessException ex)
+					{
+						ex.printStackTrace();
+					}
+					catch (InstantiationException ex)
+					{
+						ex.printStackTrace();
+					}
+				}
+			}
+		}
+	         
+		/*
+		 * Now add the default(s).
+		 */
+		
+		messageFormats.put(MessageType.JBOSS_XML, new XMLMessagePlugin());
+		messageFormats.put(MessageType.JAVA_SERIALIZED, new SerializedMessagePlugin());
+	}
+	
+	public Message getMessage() // returns some default implementation.
+	{
+		return ((MessagePlugin) messageFormats.get(MessageType.DEFAULT_TYPE)).getMessage();
+	}
+
+	public Message getMessage(URI type) // returns a message of a specific type.
+	{
+		if (type == null)
+			throw new IllegalArgumentException();
+
+		MessagePlugin plugin = messageFormats.get(type);
+
+		if (plugin != null)
+			return plugin.getMessage();
+		else
+			return null;
+	}
+
+	public Message getMessage(Message msg, URI type) // convert a message
+	// from one form to
+	// another.
+	{
+		if ((msg == null) || (type == null))
+			throw new IllegalArgumentException();
+
+		return null;
+	}
+
+	private final Hashtable<URI, MessagePlugin> messageFormats = new Hashtable<URI, MessagePlugin>();
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/MessageFactoryImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/AttachmentImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/AttachmentImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/AttachmentImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,152 +1,152 @@
-/*
- * 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 mark.little at jboss.com
- */
-
-package org.jboss.internal.soa.esb.message.format.serialized;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.jboss.soa.esb.message.Attachment;
-
-/**
- * Messages may contain attachments that do not appear in the main payload body.
- * For example, binary document formats, zip files etc.
- * 
- * @author Mark Little
- */
-
-public class AttachmentImpl implements Attachment, java.io.Serializable
-{
-	private static final long serialVersionUID = 0x0;
-
-	public Object get(String name)
-	{
-		return _table.get(name);
-	}
-
-	public Object put(String name, Object value) 
-	{
-		if (value instanceof Serializable)
-			return _table.put(name,(Serializable)value);
-		throw new IllegalArgumentException("value must be Serializable");
-	}
-
-	public Object remove(String name) 
-	{
-		return _table.remove(name);
-	}
-
-	public String[] getNames() 
-	{
-		return _table.keySet().toArray(new String[_table.size()]);
-	}
-
-	public Object itemAt(int index) throws IndexOutOfBoundsException 
-	{
-		return _list.get(index);
-	}
-
-	public Object removeItemAt(int index) throws IndexOutOfBoundsException 
-	{
-		return _list.remove(index);
-	}
-
-	public Object replaceItemAt(int index, Object value) throws IndexOutOfBoundsException 
-	{
-		if (value instanceof Serializable)
-			return _list.set(index,(Serializable)value);
-		throw new IllegalArgumentException("value must be Serializable");
-	}
-
-	public void addItem(Object value) 
-	{
-		if (value instanceof Serializable)
-			_list.add((Serializable)value);
-		else
-			throw new IllegalArgumentException("value must be Serializable");
-	}
-
-	public void addItemAt(int index, Object value) throws IndexOutOfBoundsException 
-	{
-		if (value instanceof Serializable)
-			_list.add(index,(Serializable)value);
-		else
-			throw new IllegalArgumentException("value must be Serializable");
-	}
-
-	public int getNamedCount() 
-	{
-		return _table.size();
-	}
-	public int getUnnamedCount() 
-	{
-		return _list.size();
-	}
-	public String toString() 
-	{ return new StringBuilder()
-		.append("Attachment - Named:").append(_table.toString())
-		.append(" Unnamed:").append(_list.toString())
-		.toString();
-	}
-	
-	@Override
-	public boolean equals(Object arg)
-	{
-		if (! (arg instanceof Attachment))
-			return false;
-		Attachment other = (Attachment)arg;
-
-		if (other.getNamedCount() != _table.size())
-			return false;
-		for(Map.Entry<String,Serializable>oCurr : _table.entrySet())
-		{	
-			Object val = other.get(oCurr.getKey());
-			if (null==oCurr.getValue())
-				if (null==val)
-					continue;
-				else
-					return false;
-			if (!oCurr.getValue().equals(val))
-				return false;
-		}
-
-		if (other.getUnnamedCount() != _list.size())
-			return false;
-		int index = 0;
-		for (Serializable oCurr : _list)
-		{
-			Object val = other.itemAt(index++);
-			if (null==oCurr)
-				if (null==val)
-					continue;
-				else
-					return false;
-			if (!oCurr.equals(val))
-				return false;
-		}
-		return true;		
-	}
-
-	ArrayList<Serializable> _list = new ArrayList<Serializable>();
-	Hashtable<String,Serializable> _table = new Hashtable<String,Serializable>();
-}
+/*
+ * 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 mark.little at jboss.com
+ */
+
+package org.jboss.internal.soa.esb.message.format.serialized;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.jboss.soa.esb.message.Attachment;
+
+/**
+ * Messages may contain attachments that do not appear in the main payload body.
+ * For example, binary document formats, zip files etc.
+ * 
+ * @author Mark Little
+ */
+
+public class AttachmentImpl implements Attachment, java.io.Serializable
+{
+	private static final long serialVersionUID = 0x0;
+
+	public Object get(String name)
+	{
+		return _table.get(name);
+	}
+
+	public Object put(String name, Object value) 
+	{
+		if (value instanceof Serializable)
+			return _table.put(name,(Serializable)value);
+		throw new IllegalArgumentException("value must be Serializable");
+	}
+
+	public Object remove(String name) 
+	{
+		return _table.remove(name);
+	}
+
+	public String[] getNames() 
+	{
+		return _table.keySet().toArray(new String[_table.size()]);
+	}
+
+	public Object itemAt(int index) throws IndexOutOfBoundsException 
+	{
+		return _list.get(index);
+	}
+
+	public Object removeItemAt(int index) throws IndexOutOfBoundsException 
+	{
+		return _list.remove(index);
+	}
+
+	public Object replaceItemAt(int index, Object value) throws IndexOutOfBoundsException 
+	{
+		if (value instanceof Serializable)
+			return _list.set(index,(Serializable)value);
+		throw new IllegalArgumentException("value must be Serializable");
+	}
+
+	public void addItem(Object value) 
+	{
+		if (value instanceof Serializable)
+			_list.add((Serializable)value);
+		else
+			throw new IllegalArgumentException("value must be Serializable");
+	}
+
+	public void addItemAt(int index, Object value) throws IndexOutOfBoundsException 
+	{
+		if (value instanceof Serializable)
+			_list.add(index,(Serializable)value);
+		else
+			throw new IllegalArgumentException("value must be Serializable");
+	}
+
+	public int getNamedCount() 
+	{
+		return _table.size();
+	}
+	public int getUnnamedCount() 
+	{
+		return _list.size();
+	}
+	public String toString() 
+	{ return new StringBuilder()
+		.append("Attachment - Named:").append(_table.toString())
+		.append(" Unnamed:").append(_list.toString())
+		.toString();
+	}
+	
+	@Override
+	public boolean equals(Object arg)
+	{
+		if (! (arg instanceof Attachment))
+			return false;
+		Attachment other = (Attachment)arg;
+
+		if (other.getNamedCount() != _table.size())
+			return false;
+		for(Map.Entry<String,Serializable>oCurr : _table.entrySet())
+		{	
+			Object val = other.get(oCurr.getKey());
+			if (null==oCurr.getValue())
+				if (null==val)
+					continue;
+				else
+					return false;
+			if (!oCurr.getValue().equals(val))
+				return false;
+		}
+
+		if (other.getUnnamedCount() != _list.size())
+			return false;
+		int index = 0;
+		for (Serializable oCurr : _list)
+		{
+			Object val = other.itemAt(index++);
+			if (null==oCurr)
+				if (null==val)
+					continue;
+				else
+					return false;
+			if (!oCurr.equals(val))
+				return false;
+		}
+		return true;		
+	}
+
+	ArrayList<Serializable> _list = new ArrayList<Serializable>();
+	Hashtable<String,Serializable> _table = new Hashtable<String,Serializable>();
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/AttachmentImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/BodyImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/BodyImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/BodyImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,139 +1,139 @@
-package org.jboss.internal.soa.esb.message.format.serialized;
-
-import java.io.Serializable;
-import java.util.Hashtable;
-import java.util.Set;
-
-import org.jboss.soa.esb.message.Body;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/*
- * This implementation requires that all contents are serializable.
- */
-
-public class BodyImpl implements Body, java.io.Serializable
-{
-	private static final long serialVersionUID = 0x0;
-	
-	public BodyImpl ()
-	{
-		_content = null;
-		_objects = new Hashtable<String, Serializable>();
-	}
-	
-	public void setContents (byte[] content)
-	{
-		_content = content;
-	}
-
-	public byte[] getContents ()
-	{
-		return _content;
-	}
-	
-	public void add (String name, Object value)
-	{
-		if ((name == null) || (value == null))
-			throw new IllegalArgumentException();
-		
-		if (value instanceof Serializable)
-		{
-			synchronized (_objects)
-			{
-				_objects.put(name, (Serializable) value);
-			}
-		}
-		else
-			throw new IllegalArgumentException("Object must be Serializable.");
-	}
-	
-	public Object get (String name)
-	{
-		synchronized (_objects)
-		{
-			return _objects.get(name);
-		}
-	}
-	
-	public String[] getNames ()
-	{
-		Set<String> keys = _objects.keySet();
-		
-		if (keys != null)
-		{
-			String[] toReturn = new String[keys.size()];
-		
-			return keys.toArray(toReturn);
-		}
-		else
-			return null;
-	}
-	
-	public Object remove (String name)
-	{
-		synchronized (_objects)
-		{
-			return _objects.remove(name);
-		}
-	}
-	
-	public void replace (Body b)
-	{
-		if (b == null)
-			throw new IllegalArgumentException();
-		
-		setContents(b.getContents());
-		
-		_objects = ((BodyImpl) b)._objects;
-	}
-	
-	public void merge (Body b)
-	{
-		if (b == null)
-			throw new IllegalArgumentException();
-		
-		byte[] toAdd = b.getContents();
-		
-		if ((toAdd != null) && (toAdd.length > 0))
-		{
-			if ((_content == null) || (_content.length == 0))
-			{
-				_content = toAdd;
-			}
-			else
-			{
-				int newSize = _content.length + toAdd.length;
-				byte[] buffer = new byte[newSize];
-				
-				System.arraycopy(_content, 0, buffer, 0, _content.length);
-				System.arraycopy(toAdd, 0, buffer, _content.length, toAdd.length);
-				
-				_content = buffer;
-			}
-		}
-	}
-	
-	private byte[] _content;
-	private Hashtable<String, Serializable> _objects;
-	
+package org.jboss.internal.soa.esb.message.format.serialized;
+
+import java.io.Serializable;
+import java.util.Hashtable;
+import java.util.Set;
+
+import org.jboss.soa.esb.message.Body;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/*
+ * This implementation requires that all contents are serializable.
+ */
+
+public class BodyImpl implements Body, java.io.Serializable
+{
+	private static final long serialVersionUID = 0x0;
+	
+	public BodyImpl ()
+	{
+		_content = null;
+		_objects = new Hashtable<String, Serializable>();
+	}
+	
+	public void setContents (byte[] content)
+	{
+		_content = content;
+	}
+
+	public byte[] getContents ()
+	{
+		return _content;
+	}
+	
+	public void add (String name, Object value)
+	{
+		if ((name == null) || (value == null))
+			throw new IllegalArgumentException();
+		
+		if (value instanceof Serializable)
+		{
+			synchronized (_objects)
+			{
+				_objects.put(name, (Serializable) value);
+			}
+		}
+		else
+			throw new IllegalArgumentException("Object must be Serializable.");
+	}
+	
+	public Object get (String name)
+	{
+		synchronized (_objects)
+		{
+			return _objects.get(name);
+		}
+	}
+	
+	public String[] getNames ()
+	{
+		Set<String> keys = _objects.keySet();
+		
+		if (keys != null)
+		{
+			String[] toReturn = new String[keys.size()];
+		
+			return keys.toArray(toReturn);
+		}
+		else
+			return null;
+	}
+	
+	public Object remove (String name)
+	{
+		synchronized (_objects)
+		{
+			return _objects.remove(name);
+		}
+	}
+	
+	public void replace (Body b)
+	{
+		if (b == null)
+			throw new IllegalArgumentException();
+		
+		setContents(b.getContents());
+		
+		_objects = ((BodyImpl) b)._objects;
+	}
+	
+	public void merge (Body b)
+	{
+		if (b == null)
+			throw new IllegalArgumentException();
+		
+		byte[] toAdd = b.getContents();
+		
+		if ((toAdd != null) && (toAdd.length > 0))
+		{
+			if ((_content == null) || (_content.length == 0))
+			{
+				_content = toAdd;
+			}
+			else
+			{
+				int newSize = _content.length + toAdd.length;
+				byte[] buffer = new byte[newSize];
+				
+				System.arraycopy(_content, 0, buffer, 0, _content.length);
+				System.arraycopy(toAdd, 0, buffer, _content.length, toAdd.length);
+				
+				_content = buffer;
+			}
+		}
+	}
+	
+	private byte[] _content;
+	private Hashtable<String, Serializable> _objects;
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/BodyImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,29 +1,29 @@
-package org.jboss.internal.soa.esb.message.format.serialized;
-
-import org.jboss.soa.esb.message.Context;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-public class ContextImpl implements Context, java.io.Serializable
-{
-	private static final long serialVersionUID = 0x0;
+package org.jboss.internal.soa.esb.message.format.serialized;
+
+import org.jboss.soa.esb.message.Context;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+public class ContextImpl implements Context, java.io.Serializable
+{
+	private static final long serialVersionUID = 0x0;
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/ContextImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/FaultImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/FaultImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/FaultImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,55 +1,55 @@
-package org.jboss.internal.soa.esb.message.format.serialized;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.message.Fault;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-public class FaultImpl implements Fault, java.io.Serializable
-{
-	private static final long serialVersionUID = 0x0;
-	
-	public URI getCode ()
-	{
-		return _code;
-	}
-	
-	public void setCode (URI code)
-	{
-		_code = code;
-	}
-	
-	public String getReason ()
-	{
-		return _reason;
-	}
-	
-	public void setReason (String reason)
-	{
-		_reason = reason;
-	}
-	
-	private URI _code = null;
-	private String _reason = null;
-	
+package org.jboss.internal.soa.esb.message.format.serialized;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.message.Fault;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+public class FaultImpl implements Fault, java.io.Serializable
+{
+	private static final long serialVersionUID = 0x0;
+	
+	public URI getCode ()
+	{
+		return _code;
+	}
+	
+	public void setCode (URI code)
+	{
+		_code = code;
+	}
+	
+	public String getReason ()
+	{
+		return _reason;
+	}
+	
+	public void setReason (String reason)
+	{
+		_reason = reason;
+	}
+	
+	private URI _code = null;
+	private String _reason = null;
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/FaultImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/HeaderImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/HeaderImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/HeaderImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,153 +1,153 @@
-package org.jboss.internal.soa.esb.message.format.serialized;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.io.StringWriter;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jboss.internal.soa.esb.addressing.helpers.CallHelper;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.message.Header;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
-
-/**
- * The message header. Contains such things as routing information.
- */
-
-public class HeaderImpl implements Header, Serializable
-{
-	private static final long serialVersionUID = 0x0;
-	
-	public static final String HEADER_TAG = "Header";
-	
-	public HeaderImpl ()
-	{
-		_call = new Call();
-	}
-	
-	// TODO add other setters/getters for artibitrary attributes
-	
-	public Call getCall ()
-	{
-		return _call;
-	}
-	
-	public void setCall (Call call)
-	{
-		if (call == null)
-			throw new IllegalArgumentException();
-		
-		_call = call;
-	}
-
-	/*
-	 * Call and PortReference aren't Serializable so we have to do some
-	 * magic.
-	 */
-	
-	private void writeObject(java.io.ObjectOutputStream out) throws IOException
-	{
-		if (_call != null)
-		{
-			try
-			{
-				Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
-				Element header = doc.createElement(HEADER_TAG);	
-				
-				doc.appendChild(header);
-				
-				header = CallHelper.toXML(_call, doc, header);
-				
-				StringWriter sWriter = new StringWriter();
-				OutputFormat format = new OutputFormat();
-				format.setIndenting(true);
-				XMLSerializer xmlS = new XMLSerializer(sWriter, format);
-				xmlS.asDOMSerializer();
-				xmlS.serialize(doc);
-
-				out.writeObject(sWriter.toString());
-			}
-			catch (MarshalException ex)
-			{
-				ex.printStackTrace();
-				
-				throw new IOException(ex.toString());
-			}
-			catch (ParserConfigurationException ex)
-			{
-				ex.printStackTrace();
-				
-				throw new IOException(ex.toString());
-			}
-		}	
-	}
-	
-	private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException
-	{
-		try
-		{
-			String header = (String) in.readObject();
-			InputStream inStream = new ByteArrayInputStream(header.getBytes());
-			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();				
-			Document doc = builder.parse(inStream);						 
-	
-			Element headerElement = doc.getDocumentElement();
-			
-			_call = CallHelper.fromXML(headerElement);
-		}
-		catch (UnmarshalException ex)
-		{
-			ex.printStackTrace();
-			
-			throw new IOException(ex.toString());
-		}
-		catch (ParserConfigurationException ex)
-		{
-			ex.printStackTrace();
-			
-			throw new IOException(ex.toString());
-		}
-		catch (SAXException ex)
-		{
-			ex.printStackTrace();
-			
-			throw new IOException(ex.toString());
-		}
-	}
-	
-	private Call _call;
+package org.jboss.internal.soa.esb.message.format.serialized;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.io.StringWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jboss.internal.soa.esb.addressing.helpers.CallHelper;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.message.Header;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+/**
+ * The message header. Contains such things as routing information.
+ */
+
+public class HeaderImpl implements Header, Serializable
+{
+	private static final long serialVersionUID = 0x0;
+	
+	public static final String HEADER_TAG = "Header";
+	
+	public HeaderImpl ()
+	{
+		_call = new Call();
+	}
+	
+	// TODO add other setters/getters for artibitrary attributes
+	
+	public Call getCall ()
+	{
+		return _call;
+	}
+	
+	public void setCall (Call call)
+	{
+		if (call == null)
+			throw new IllegalArgumentException();
+		
+		_call = call;
+	}
+
+	/*
+	 * Call and PortReference aren't Serializable so we have to do some
+	 * magic.
+	 */
+	
+	private void writeObject(java.io.ObjectOutputStream out) throws IOException
+	{
+		if (_call != null)
+		{
+			try
+			{
+				Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+				Element header = doc.createElement(HEADER_TAG);	
+				
+				doc.appendChild(header);
+				
+				header = CallHelper.toXML(_call, doc, header);
+				
+				StringWriter sWriter = new StringWriter();
+				OutputFormat format = new OutputFormat();
+				format.setIndenting(true);
+				XMLSerializer xmlS = new XMLSerializer(sWriter, format);
+				xmlS.asDOMSerializer();
+				xmlS.serialize(doc);
+
+				out.writeObject(sWriter.toString());
+			}
+			catch (MarshalException ex)
+			{
+				ex.printStackTrace();
+				
+				throw new IOException(ex.toString());
+			}
+			catch (ParserConfigurationException ex)
+			{
+				ex.printStackTrace();
+				
+				throw new IOException(ex.toString());
+			}
+		}	
+	}
+	
+	private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException
+	{
+		try
+		{
+			String header = (String) in.readObject();
+			InputStream inStream = new ByteArrayInputStream(header.getBytes());
+			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();				
+			Document doc = builder.parse(inStream);						 
+	
+			Element headerElement = doc.getDocumentElement();
+			
+			_call = CallHelper.fromXML(headerElement);
+		}
+		catch (UnmarshalException ex)
+		{
+			ex.printStackTrace();
+			
+			throw new IOException(ex.toString());
+		}
+		catch (ParserConfigurationException ex)
+		{
+			ex.printStackTrace();
+			
+			throw new IOException(ex.toString());
+		}
+		catch (SAXException ex)
+		{
+			ex.printStackTrace();
+			
+			throw new IOException(ex.toString());
+		}
+	}
+	
+	private Call _call;
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/HeaderImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/MessageImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/MessageImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/MessageImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,129 +1,129 @@
-/*
- * 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 mark.little at jboss.com
- */
-package org.jboss.internal.soa.esb.message.format.serialized;
-
-import java.io.Serializable;
-import java.net.URI;
-
-import org.jboss.soa.esb.message.Attachment;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.message.Context;
-import org.jboss.soa.esb.message.Fault;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Properties;
-import org.jboss.soa.esb.message.format.MessageType;
-
-
-/**
- * This is the basic internal core message abstraction. A message consists of the following
- * components:
- * 
- * Header: the header information contains information such as the destination EPR, the
- * sender EPR, where the reply goes etc, i.e., general message-level functional information.
- * Context: additional information to contextualise the message; for example, transaction or
- * security data, the identity of the ultimate receiver, or HTTP-cookie like information.
- * Body: the actual payload of the message.
- * Fault: any fault information associated with the message.
- * Attachment: any attachments associated with the message.
- * 
- * Each message, once created, has a corresponding element for these 5 components. That element
- * may be empty (<b>NOT NULL</b>). The object representing the element can then be used to act
- * on the corresponding data item in the message.
- * 
- * @author Mark Little
- *
- */
-
-public class MessageImpl implements Message, Serializable
-{
-	private static final long serialVersionUID = 0x0;
-	
-	/**
-	 * @return get the header component of the message.
-	 */
-	
-	public Header getHeader ()
-	{
-		return _theHeader;
-	}
-	
-	/**
-	 * @return get the context component of the message.
-	 */
-	
-	public Context getContext ()
-	{
-		return _theContext;
-	}
-	
-	/**
-	 * @return get the body component of the message.
-	 */
-	
-	public Body getBody ()
-	{
-		return _theBody;
-	}
-	
-	/**
-	 * @return get any faults associated with the message. These should not
-	 * be application level faults, but comms level.
-	 */
-	
-	public Fault getFault ()
-	{
-		return _theFault;
-	}
-	
-	/**
-	 * @return get any message attachments.
-	 */
-	
-	public Attachment getAttachment ()
-	{
-		return _theAttachment;
-	}
-	
-	/**
-	 * @return the type of this message format.
-	 */
-	
-	public URI getType ()
-	{
-		return MessageType.JAVA_SERIALIZED;
-	}
-
-	/**
-	 * @return Map&lt;String,Object&gt; - any message properties.
-	 */
-	public Properties getProperties() 
-	{
-		return _properties;
-	}
-
-	private HeaderImpl _theHeader = new HeaderImpl();
-	private ContextImpl _theContext = new ContextImpl();
-	private BodyImpl _theBody = new BodyImpl();
-	private FaultImpl _theFault = new FaultImpl();
-	private AttachmentImpl _theAttachment = new AttachmentImpl();
-	private Properties _properties = new PropertiesImpl();
-}
+/*
+ * 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 mark.little at jboss.com
+ */
+package org.jboss.internal.soa.esb.message.format.serialized;
+
+import java.io.Serializable;
+import java.net.URI;
+
+import org.jboss.soa.esb.message.Attachment;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Context;
+import org.jboss.soa.esb.message.Fault;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Properties;
+import org.jboss.soa.esb.message.format.MessageType;
+
+
+/**
+ * This is the basic internal core message abstraction. A message consists of the following
+ * components:
+ * 
+ * Header: the header information contains information such as the destination EPR, the
+ * sender EPR, where the reply goes etc, i.e., general message-level functional information.
+ * Context: additional information to contextualise the message; for example, transaction or
+ * security data, the identity of the ultimate receiver, or HTTP-cookie like information.
+ * Body: the actual payload of the message.
+ * Fault: any fault information associated with the message.
+ * Attachment: any attachments associated with the message.
+ * 
+ * Each message, once created, has a corresponding element for these 5 components. That element
+ * may be empty (<b>NOT NULL</b>). The object representing the element can then be used to act
+ * on the corresponding data item in the message.
+ * 
+ * @author Mark Little
+ *
+ */
+
+public class MessageImpl implements Message, Serializable
+{
+	private static final long serialVersionUID = 0x0;
+	
+	/**
+	 * @return get the header component of the message.
+	 */
+	
+	public Header getHeader ()
+	{
+		return _theHeader;
+	}
+	
+	/**
+	 * @return get the context component of the message.
+	 */
+	
+	public Context getContext ()
+	{
+		return _theContext;
+	}
+	
+	/**
+	 * @return get the body component of the message.
+	 */
+	
+	public Body getBody ()
+	{
+		return _theBody;
+	}
+	
+	/**
+	 * @return get any faults associated with the message. These should not
+	 * be application level faults, but comms level.
+	 */
+	
+	public Fault getFault ()
+	{
+		return _theFault;
+	}
+	
+	/**
+	 * @return get any message attachments.
+	 */
+	
+	public Attachment getAttachment ()
+	{
+		return _theAttachment;
+	}
+	
+	/**
+	 * @return the type of this message format.
+	 */
+	
+	public URI getType ()
+	{
+		return MessageType.JAVA_SERIALIZED;
+	}
+
+	/**
+	 * @return Map&lt;String,Object&gt; - any message properties.
+	 */
+	public Properties getProperties() 
+	{
+		return _properties;
+	}
+
+	private HeaderImpl _theHeader = new HeaderImpl();
+	private ContextImpl _theContext = new ContextImpl();
+	private BodyImpl _theBody = new BodyImpl();
+	private FaultImpl _theFault = new FaultImpl();
+	private AttachmentImpl _theAttachment = new AttachmentImpl();
+	private Properties _properties = new PropertiesImpl();
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/MessageImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/PropertiesImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/PropertiesImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/PropertiesImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,92 +1,92 @@
-/*
- * 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 schifest at heuristica.com.ar
- */
-package org.jboss.internal.soa.esb.message.format.serialized;
-
-import java.io.Serializable;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.jboss.soa.esb.message.Properties;
-
-public class PropertiesImpl implements Properties, Serializable
-{
-	private static final long serialVersionUID = 0x0;
-
-	public Object getProperty(String name)
-	{
-		return _table.get(name);
-	}
-
-	public Object getProperty(String name, Object defaultVal)
-	{
-		Object oRet = getProperty(name);
-		return (null == oRet) ? defaultVal : oRet;
-	}
-
-	public Object setProperty(String name, Object value)
-	{
-		if (value instanceof Serializable)
-			return _table.put(name, (Serializable) value);
-		else
-			throw new IllegalArgumentException("Value must be serializable");
-	}
-
-	public Object remove(String name)
-	{
-		return _table.remove(name);
-	}
-	
-	public int size() {return _table.size(); } 
-
-	public String[] getNames()
-	{
-		return _table.keySet().toArray(new String[_table.size()]);
-	}
-
-	public String toString()
-	{
-		return _table.toString();
-	}
-
-	@Override
-	public boolean equals(Object arg)
-	{
-		if (! (arg instanceof Properties))
-			return false;
-		Properties other = (Properties)arg;
-		if (other.size() != _table.size())
-			return false;
-		for(Map.Entry<String,Serializable>oCurr : _table.entrySet())
-		{	
-			Object val = other.getProperty(oCurr.getKey());
-			if (null==oCurr.getValue())
-				if (null==val)
-					continue;
-				else
-					return false;
-			if (!oCurr.getValue().equals(val))
-				return false;
-		}
-		return true;
-	}
-
-	Hashtable<String, Serializable> _table = new Hashtable<String, Serializable>();
-}
+/*
+ * 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 schifest at heuristica.com.ar
+ */
+package org.jboss.internal.soa.esb.message.format.serialized;
+
+import java.io.Serializable;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.jboss.soa.esb.message.Properties;
+
+public class PropertiesImpl implements Properties, Serializable
+{
+	private static final long serialVersionUID = 0x0;
+
+	public Object getProperty(String name)
+	{
+		return _table.get(name);
+	}
+
+	public Object getProperty(String name, Object defaultVal)
+	{
+		Object oRet = getProperty(name);
+		return (null == oRet) ? defaultVal : oRet;
+	}
+
+	public Object setProperty(String name, Object value)
+	{
+		if (value instanceof Serializable)
+			return _table.put(name, (Serializable) value);
+		else
+			throw new IllegalArgumentException("Value must be serializable");
+	}
+
+	public Object remove(String name)
+	{
+		return _table.remove(name);
+	}
+	
+	public int size() {return _table.size(); } 
+
+	public String[] getNames()
+	{
+		return _table.keySet().toArray(new String[_table.size()]);
+	}
+
+	public String toString()
+	{
+		return _table.toString();
+	}
+
+	@Override
+	public boolean equals(Object arg)
+	{
+		if (! (arg instanceof Properties))
+			return false;
+		Properties other = (Properties)arg;
+		if (other.size() != _table.size())
+			return false;
+		for(Map.Entry<String,Serializable>oCurr : _table.entrySet())
+		{	
+			Object val = other.getProperty(oCurr.getKey());
+			if (null==oCurr.getValue())
+				if (null==val)
+					continue;
+				else
+					return false;
+			if (!oCurr.getValue().equals(val))
+				return false;
+		}
+		return true;
+	}
+
+	Hashtable<String, Serializable> _table = new Hashtable<String, Serializable>();
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/PropertiesImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/SerializedMessagePlugin.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/SerializedMessagePlugin.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/SerializedMessagePlugin.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,48 +1,48 @@
-package org.jboss.internal.soa.esb.message.format.serialized;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessagePlugin;
-import org.jboss.soa.esb.message.format.MessageType;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Used to plug in new message formats dynamically.
- *  
- * @author Mark Little
- *
- */
-
-public class SerializedMessagePlugin implements MessagePlugin
-{
-	public Message getMessage ()
-	{
-		return new MessageImpl();
-	}
-	
-	public URI getType ()
-	{
-		return MessageType.JAVA_SERIALIZED;
-	}
-}
+package org.jboss.internal.soa.esb.message.format.serialized;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessagePlugin;
+import org.jboss.soa.esb.message.format.MessageType;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Used to plug in new message formats dynamically.
+ *  
+ * @author Mark Little
+ *
+ */
+
+public class SerializedMessagePlugin implements MessagePlugin
+{
+	public Message getMessage ()
+	{
+		return new MessageImpl();
+	}
+	
+	public URI getType ()
+	{
+		return MessageType.JAVA_SERIALIZED;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/serialized/SerializedMessagePlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/AttachmentImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/AttachmentImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/AttachmentImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,272 +1,272 @@
-/*
- * 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 mark.little at jboss.com
- */
-
-package org.jboss.internal.soa.esb.message.format.xml;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.jboss.internal.soa.esb.thirdparty.Base64;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.message.Attachment;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Messages may contain attachments that do not appear in the main payload body.
- * For example, binary document formats, zip files etc.
- * 
- * @author Mark Little
- */
-
-public class AttachmentImpl implements Attachment, java.io.Serializable
-{
-	public static final String ATTACHMENT_TAG = "Attachment";
-	public static final String NAME_ATTR = "name";
-    public static final String NAMED_TAG = "Named";
-    public static final String UNNAMED_TAG = "UnNamed";
-
-	private static final long serialVersionUID = 0x0;
-
-	public Object get(String name)
-	{
-		return _table.get(name);
-	}
-
-	public Object put(String name, Object value)
-	{
-		if (value instanceof Serializable)
-			return _table.put(name, (Serializable) value);
-		throw new IllegalArgumentException("value must be Serializable");
-	}
-
-	public Object remove(String name)
-	{
-		return _table.remove(name);
-	}
-
-	public String[] getNames()
-	{
-		return _table.keySet().toArray(new String[_table.size()]);
-	}
-
-	public Object itemAt(int index) throws IndexOutOfBoundsException
-	{
-		return _list.get(index);
-	}
-
-	public Object removeItemAt(int index) throws IndexOutOfBoundsException
-	{
-		return _list.remove(index);
-	}
-
-	public Object replaceItemAt(int index, Object value)
-			throws IndexOutOfBoundsException
-	{
-		if (value instanceof Serializable)
-			return _list.set(index, (Serializable) value);
-		throw new IllegalArgumentException("value must be Serializable");
-	}
-
-	public void addItem(Object value)
-	{
-		if (value instanceof Serializable)
-			_list.add((Serializable) value);
-		else
-			throw new IllegalArgumentException("value must be Serializable");
-	}
-
-	public void addItemAt(int index, Object value)
-			throws IndexOutOfBoundsException
-	{
-		if (value instanceof Serializable)
-			_list.add(index, (Serializable) value);
-		else
-			throw new IllegalArgumentException("value must be Serializable");
-	}
-
-	public int getNamedCount()
-	{
-		return _table.size();
-	}
-
-	public int getUnnamedCount()
-	{
-		return _list.size();
-	}
-
-	public String toString()
-	{
-		return new StringBuilder().append("Attachment - Named:").append(
-				_table.toString()).append(" Unnamed:").append(_list.toString())
-				.toString();
-	}
-
-	/**
-	 * toXML(elem) - Will build a child element with appropriate values and
-	 * append it to arg0
-	 * 
-	 * @param elem
-	 *            Element - where to add 'this' as a child node
-	 * @return Element - 'this' as the added Element, or &lt;null&gt; if no
-	 *         properties in table and nothing was appended to arg0
-	 * @see XMLUtil.ATTACHMENT_TAG
-	 */
-	public Element toXML(Element elem) throws MarshalException
-	{
-		if (_table.size() < 1 && _list.size() < 1)
-			return null;
-
-		Document doc = elem.getOwnerDocument();
-		Element thisElement = doc.createElement(ATTACHMENT_TAG);
-
-		listToXml(doc, thisElement);
-		tableToXml(doc, thisElement);
-
-		elem.appendChild(thisElement);
-		return thisElement;
-	}
-
-	private void tableToXml(Document doc, Element elem)
-	{
-		for (Map.Entry<String, Serializable> oCurr : _table.entrySet())
-		{
-			Element named = doc.createElement(NAMED_TAG);
-			named.setAttribute(NAME_ATTR, oCurr.getKey());
-			named.appendChild(doc.createCDATASection(Base64.encodeObject(oCurr
-					.getValue())));
-			elem.appendChild(named);
-		}
-	}
-
-	private void listToXml(Document doc, Element elem)
-	{
-		for (Serializable oCurr : _list)
-		{
-			Element anonymous = doc.createElement(UNNAMED_TAG);
-			anonymous.appendChild(doc.createCDATASection(Base64
-					.encodeObject(oCurr)));
-			elem.appendChild(anonymous);
-		}
-	}
-
-	/**
-	 * fromXml(elem) - Populate properties found in appropriate child element
-	 * 
-	 * @see XMLUtil.ATTACHMENT_TAG
-	 * @param elem -
-	 *            Element where to look for child nodes
-	 */
-	public void fromXML(Element elem) throws UnmarshalException
-	{
-		_table.clear();
-		_list.clear();
-
-		NodeList NL = elem.getElementsByTagName(ATTACHMENT_TAG);
-		for (int i1 = 0; i1 < NL.getLength(); i1++)
-		{
-			Node oCurr = NL.item(i1);
-			if ((oCurr instanceof Element))
-			{
-				listFromXml((Element) oCurr);
-				tableFromXml((Element) oCurr);
-			}
-		}
-	}
-
-	private void listFromXml(Element elem)
-	{
-		NodeList anonymous = elem.getElementsByTagName(UNNAMED_TAG);
-		for (int i1 = 0; i1 < anonymous.getLength(); i1++)
-		{
-			Node oCurr = anonymous.item(i1);
-			if (oCurr instanceof Element)
-			{
-				CDATASection cdata = (CDATASection) oCurr.getFirstChild();
-				Object value = Base64.decodeToObject(cdata.getWholeText());
-				_list.add((Serializable) value);
-			}
-		}
-	}
-
-	private void tableFromXml(Element elem)
-	{
-		NodeList named = elem.getElementsByTagName(NAMED_TAG);
-		for (int i1 = 0; i1 < named.getLength(); i1++)
-		{
-			Node oCurr = named.item(i1);
-			if (oCurr instanceof Element)
-			{
-				CDATASection cdata = (CDATASection) oCurr.getFirstChild();
-				String name = ((Element) oCurr).getAttribute(NAME_ATTR);
-				Object value = Base64.decodeToObject(cdata.getWholeText());
-				_table.put(name, (Serializable) value);
-			}
-		}
-	}
-
-	@Override
-	public boolean equals(Object arg)
-	{
-		if (! (arg instanceof Attachment))
-			return false;
-		Attachment other = (Attachment)arg;
-
-		if (other.getNamedCount() != _table.size())
-			return false;
-		for(Map.Entry<String,Serializable>oCurr : _table.entrySet())
-		{	
-			Object val = other.get(oCurr.getKey());
-			if (null==oCurr.getValue())
-				if (null==val)
-					continue;
-				else
-					return false;
-			if (!oCurr.getValue().equals(val))
-				return false;
-		}
-
-		if (other.getUnnamedCount() != _list.size())
-			return false;
-		int index = 0;
-		for (Serializable oCurr : _list)
-		{
-			Object val = other.itemAt(index++);
-			if (null==oCurr)
-				if (null==val)
-					continue;
-				else
-					return false;
-			if (!oCurr.equals(val))
-				return false;
-		}
-		return true;		
-	}
-
-	ArrayList<Serializable> _list = new ArrayList<Serializable>();
-	Hashtable<String, Serializable> _table = new Hashtable<String, Serializable>();
-}
+/*
+ * 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 mark.little at jboss.com
+ */
+
+package org.jboss.internal.soa.esb.message.format.xml;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.jboss.internal.soa.esb.thirdparty.Base64;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.message.Attachment;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Messages may contain attachments that do not appear in the main payload body.
+ * For example, binary document formats, zip files etc.
+ * 
+ * @author Mark Little
+ */
+
+public class AttachmentImpl implements Attachment, java.io.Serializable
+{
+	public static final String ATTACHMENT_TAG = "Attachment";
+	public static final String NAME_ATTR = "name";
+    public static final String NAMED_TAG = "Named";
+    public static final String UNNAMED_TAG = "UnNamed";
+
+	private static final long serialVersionUID = 0x0;
+
+	public Object get(String name)
+	{
+		return _table.get(name);
+	}
+
+	public Object put(String name, Object value)
+	{
+		if (value instanceof Serializable)
+			return _table.put(name, (Serializable) value);
+		throw new IllegalArgumentException("value must be Serializable");
+	}
+
+	public Object remove(String name)
+	{
+		return _table.remove(name);
+	}
+
+	public String[] getNames()
+	{
+		return _table.keySet().toArray(new String[_table.size()]);
+	}
+
+	public Object itemAt(int index) throws IndexOutOfBoundsException
+	{
+		return _list.get(index);
+	}
+
+	public Object removeItemAt(int index) throws IndexOutOfBoundsException
+	{
+		return _list.remove(index);
+	}
+
+	public Object replaceItemAt(int index, Object value)
+			throws IndexOutOfBoundsException
+	{
+		if (value instanceof Serializable)
+			return _list.set(index, (Serializable) value);
+		throw new IllegalArgumentException("value must be Serializable");
+	}
+
+	public void addItem(Object value)
+	{
+		if (value instanceof Serializable)
+			_list.add((Serializable) value);
+		else
+			throw new IllegalArgumentException("value must be Serializable");
+	}
+
+	public void addItemAt(int index, Object value)
+			throws IndexOutOfBoundsException
+	{
+		if (value instanceof Serializable)
+			_list.add(index, (Serializable) value);
+		else
+			throw new IllegalArgumentException("value must be Serializable");
+	}
+
+	public int getNamedCount()
+	{
+		return _table.size();
+	}
+
+	public int getUnnamedCount()
+	{
+		return _list.size();
+	}
+
+	public String toString()
+	{
+		return new StringBuilder().append("Attachment - Named:").append(
+				_table.toString()).append(" Unnamed:").append(_list.toString())
+				.toString();
+	}
+
+	/**
+	 * toXML(elem) - Will build a child element with appropriate values and
+	 * append it to arg0
+	 * 
+	 * @param elem
+	 *            Element - where to add 'this' as a child node
+	 * @return Element - 'this' as the added Element, or &lt;null&gt; if no
+	 *         properties in table and nothing was appended to arg0
+	 * @see XMLUtil.ATTACHMENT_TAG
+	 */
+	public Element toXML(Element elem) throws MarshalException
+	{
+		if (_table.size() < 1 && _list.size() < 1)
+			return null;
+
+		Document doc = elem.getOwnerDocument();
+		Element thisElement = doc.createElement(ATTACHMENT_TAG);
+
+		listToXml(doc, thisElement);
+		tableToXml(doc, thisElement);
+
+		elem.appendChild(thisElement);
+		return thisElement;
+	}
+
+	private void tableToXml(Document doc, Element elem)
+	{
+		for (Map.Entry<String, Serializable> oCurr : _table.entrySet())
+		{
+			Element named = doc.createElement(NAMED_TAG);
+			named.setAttribute(NAME_ATTR, oCurr.getKey());
+			named.appendChild(doc.createCDATASection(Base64.encodeObject(oCurr
+					.getValue())));
+			elem.appendChild(named);
+		}
+	}
+
+	private void listToXml(Document doc, Element elem)
+	{
+		for (Serializable oCurr : _list)
+		{
+			Element anonymous = doc.createElement(UNNAMED_TAG);
+			anonymous.appendChild(doc.createCDATASection(Base64
+					.encodeObject(oCurr)));
+			elem.appendChild(anonymous);
+		}
+	}
+
+	/**
+	 * fromXml(elem) - Populate properties found in appropriate child element
+	 * 
+	 * @see XMLUtil.ATTACHMENT_TAG
+	 * @param elem -
+	 *            Element where to look for child nodes
+	 */
+	public void fromXML(Element elem) throws UnmarshalException
+	{
+		_table.clear();
+		_list.clear();
+
+		NodeList NL = elem.getElementsByTagName(ATTACHMENT_TAG);
+		for (int i1 = 0; i1 < NL.getLength(); i1++)
+		{
+			Node oCurr = NL.item(i1);
+			if ((oCurr instanceof Element))
+			{
+				listFromXml((Element) oCurr);
+				tableFromXml((Element) oCurr);
+			}
+		}
+	}
+
+	private void listFromXml(Element elem)
+	{
+		NodeList anonymous = elem.getElementsByTagName(UNNAMED_TAG);
+		for (int i1 = 0; i1 < anonymous.getLength(); i1++)
+		{
+			Node oCurr = anonymous.item(i1);
+			if (oCurr instanceof Element)
+			{
+				CDATASection cdata = (CDATASection) oCurr.getFirstChild();
+				Object value = Base64.decodeToObject(cdata.getWholeText());
+				_list.add((Serializable) value);
+			}
+		}
+	}
+
+	private void tableFromXml(Element elem)
+	{
+		NodeList named = elem.getElementsByTagName(NAMED_TAG);
+		for (int i1 = 0; i1 < named.getLength(); i1++)
+		{
+			Node oCurr = named.item(i1);
+			if (oCurr instanceof Element)
+			{
+				CDATASection cdata = (CDATASection) oCurr.getFirstChild();
+				String name = ((Element) oCurr).getAttribute(NAME_ATTR);
+				Object value = Base64.decodeToObject(cdata.getWholeText());
+				_table.put(name, (Serializable) value);
+			}
+		}
+	}
+
+	@Override
+	public boolean equals(Object arg)
+	{
+		if (! (arg instanceof Attachment))
+			return false;
+		Attachment other = (Attachment)arg;
+
+		if (other.getNamedCount() != _table.size())
+			return false;
+		for(Map.Entry<String,Serializable>oCurr : _table.entrySet())
+		{	
+			Object val = other.get(oCurr.getKey());
+			if (null==oCurr.getValue())
+				if (null==val)
+					continue;
+				else
+					return false;
+			if (!oCurr.getValue().equals(val))
+				return false;
+		}
+
+		if (other.getUnnamedCount() != _list.size())
+			return false;
+		int index = 0;
+		for (Serializable oCurr : _list)
+		{
+			Object val = other.itemAt(index++);
+			if (null==oCurr)
+				if (null==val)
+					continue;
+				else
+					return false;
+			if (!oCurr.equals(val))
+				return false;
+		}
+		return true;		
+	}
+
+	ArrayList<Serializable> _list = new ArrayList<Serializable>();
+	Hashtable<String, Serializable> _table = new Hashtable<String, Serializable>();
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/AttachmentImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/BodyImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/BodyImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/BodyImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,243 +1,243 @@
-package org.jboss.internal.soa.esb.message.format.xml;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Set;
-
-import org.jboss.internal.soa.esb.message.format.xml.marshal.MarshalUnmarshalManager;
-import org.jboss.internal.soa.esb.thirdparty.Base64;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.message.Body;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/*
- * A Body implementation that serializes to XML.
- */
-
-public class BodyImpl implements Body
-{
-	public static final String BODY_TAG = "Body";
-
-	public static final String BYTES_TAG = "Bytes";
-
-	public BodyImpl()
-	{
-		_content = null;
-		_objects = new Hashtable<String, Object>();
-	}
-
-	public void add(String name, Object value)
-	{
-		if ((name == null) || (value == null))
-			throw new IllegalArgumentException();
-
-		synchronized (_objects)
-		{
-			_objects.put(name, value);
-		}
-	}
-
-	public Object get(String name)
-	{
-		synchronized (_objects)
-		{
-			return _objects.get(name);
-		}
-	}
-	
-	public String[] getNames ()
-	{
-		Set<String> keys = _objects.keySet();
-		
-		if (keys != null)
-		{
-			String[] toReturn = new String[keys.size()];
-		
-			return keys.toArray(toReturn);
-		}
-		else
-			return null;
-	}
-
-	public Object remove(String name)
-	{
-		synchronized (_objects)
-		{
-			return _objects.remove(name);
-		}
-	}
-
-	public Element toXML(Element envelope) throws MarshalException
-	{
-		Document doc = envelope.getOwnerDocument();
-		Element bodyElement = doc.createElement(BODY_TAG);
-
-		envelope.appendChild(bodyElement);
-
-		if (_content != null)
-		{
-			Element byteElement = doc.createElement(BYTES_TAG);
-
-			byteElement.appendChild(doc.createCDATASection(Base64
-					.encodeBytes(_content)));
-
-			bodyElement.appendChild(byteElement);
-		}
-
-		/*
-		 * This would normally be handled by an external adapter.
-		 */
-
-		Enumeration<String> keys = _objects.keys();
-
-		while (keys.hasMoreElements())
-		{
-			String key = keys.nextElement();
-			Object value = _objects.get(key);
-
-			Element objElement = doc.createElement(key);
-
-			if (MarshalUnmarshalManager.getInstance().marshal(objElement, value))
-				bodyElement.appendChild(objElement);
-			else
-				throw new MarshalException("Cannot pack object "+key);
-		}
-
-		return bodyElement;
-	}
-
-	public void fromXML(Element envelope) throws UnmarshalException
-	{
-		NodeList nl = envelope.getChildNodes();
-
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			/*
-			 * TODO
-			 * 
-			 * In the past, bugs in certain Dom implementations mean that
-			 * getElementsByName did not always work. Still the case? Plus this
-			 * way is quicker.
-			 */
-
-			if (nl.item(i).getNodeName().equals(BODY_TAG))
-			{
-				NodeList children = nl.item(i).getChildNodes();
-
-				for (int j = 0; j < children.getLength(); j++)
-				{
-					Object xxx = children.item(j);
-					if (!(xxx instanceof Element))
-						continue;
-					Element child = (Element) xxx;
-					if (child.getNodeName().equals(BYTES_TAG))
-					{
-						CDATASection cdata = (CDATASection) child.getFirstChild();
-						
-						// support empty byte (null files etc.)
-						
-						if (cdata != null)
-							_content = Base64.decode(cdata.getWholeText());
-						else
-							_content = new byte[0] ;
-					}
-					else
-					{
-						Node node = child.getFirstChild();
-						while(!(node instanceof Element))
-						{
-							node = node.getNextSibling() ;
-						}
-						if (node instanceof Element) {
-							final Object value = MarshalUnmarshalManager.getInstance().unmarshal((Element)node);
-							if (value == null)
-								throw new UnmarshalException("Cannot unpack object "+child.getNodeName());
-							else
-								_objects.put(child.getNodeName(), value);
-						}
-					}
-				}
-			}
-		}
-	}
-
-	public void setContents(byte[] content)
-	{
-		_content = content;
-	}
-
-	public byte[] getContents()
-	{
-		return _content;
-	}
-
-	public void replace(Body b)
-	{
-		if (b == null)
-			throw new IllegalArgumentException();
-
-		setContents(b.getContents());
-
-		_objects = ((BodyImpl) b)._objects;
-	}
-
-	public void merge(Body b)
-	{
-		if (b == null)
-			throw new IllegalArgumentException();
-
-		byte[] toAdd = b.getContents();
-
-		if ((toAdd != null) && (toAdd.length > 0))
-		{
-			if ((_content == null) || (_content.length == 0))
-			{
-				_content = toAdd;
-			}
-			else
-			{
-				int newSize = _content.length + toAdd.length;
-				byte[] buffer = new byte[newSize];
-
-				System.arraycopy(_content, 0, buffer, 0, _content.length);
-				System.arraycopy(toAdd, 0, buffer, _content.length,
-						toAdd.length);
-
-				_content = buffer;
-			}
-		}
-
-		_objects.putAll(((BodyImpl) b)._objects);
-	}
-
-	private byte[] _content;
-
-	private Hashtable<String, Object> _objects;
-
+package org.jboss.internal.soa.esb.message.format.xml;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Set;
+
+import org.jboss.internal.soa.esb.message.format.xml.marshal.MarshalUnmarshalManager;
+import org.jboss.internal.soa.esb.thirdparty.Base64;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.message.Body;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/*
+ * A Body implementation that serializes to XML.
+ */
+
+public class BodyImpl implements Body
+{
+	public static final String BODY_TAG = "Body";
+
+	public static final String BYTES_TAG = "Bytes";
+
+	public BodyImpl()
+	{
+		_content = null;
+		_objects = new Hashtable<String, Object>();
+	}
+
+	public void add(String name, Object value)
+	{
+		if ((name == null) || (value == null))
+			throw new IllegalArgumentException();
+
+		synchronized (_objects)
+		{
+			_objects.put(name, value);
+		}
+	}
+
+	public Object get(String name)
+	{
+		synchronized (_objects)
+		{
+			return _objects.get(name);
+		}
+	}
+	
+	public String[] getNames ()
+	{
+		Set<String> keys = _objects.keySet();
+		
+		if (keys != null)
+		{
+			String[] toReturn = new String[keys.size()];
+		
+			return keys.toArray(toReturn);
+		}
+		else
+			return null;
+	}
+
+	public Object remove(String name)
+	{
+		synchronized (_objects)
+		{
+			return _objects.remove(name);
+		}
+	}
+
+	public Element toXML(Element envelope) throws MarshalException
+	{
+		Document doc = envelope.getOwnerDocument();
+		Element bodyElement = doc.createElement(BODY_TAG);
+
+		envelope.appendChild(bodyElement);
+
+		if (_content != null)
+		{
+			Element byteElement = doc.createElement(BYTES_TAG);
+
+			byteElement.appendChild(doc.createCDATASection(Base64
+					.encodeBytes(_content)));
+
+			bodyElement.appendChild(byteElement);
+		}
+
+		/*
+		 * This would normally be handled by an external adapter.
+		 */
+
+		Enumeration<String> keys = _objects.keys();
+
+		while (keys.hasMoreElements())
+		{
+			String key = keys.nextElement();
+			Object value = _objects.get(key);
+
+			Element objElement = doc.createElement(key);
+
+			if (MarshalUnmarshalManager.getInstance().marshal(objElement, value))
+				bodyElement.appendChild(objElement);
+			else
+				throw new MarshalException("Cannot pack object "+key);
+		}
+
+		return bodyElement;
+	}
+
+	public void fromXML(Element envelope) throws UnmarshalException
+	{
+		NodeList nl = envelope.getChildNodes();
+
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			/*
+			 * TODO
+			 * 
+			 * In the past, bugs in certain Dom implementations mean that
+			 * getElementsByName did not always work. Still the case? Plus this
+			 * way is quicker.
+			 */
+
+			if (nl.item(i).getNodeName().equals(BODY_TAG))
+			{
+				NodeList children = nl.item(i).getChildNodes();
+
+				for (int j = 0; j < children.getLength(); j++)
+				{
+					Object xxx = children.item(j);
+					if (!(xxx instanceof Element))
+						continue;
+					Element child = (Element) xxx;
+					if (child.getNodeName().equals(BYTES_TAG))
+					{
+						CDATASection cdata = (CDATASection) child.getFirstChild();
+						
+						// support empty byte (null files etc.)
+						
+						if (cdata != null)
+							_content = Base64.decode(cdata.getWholeText());
+						else
+							_content = new byte[0] ;
+					}
+					else
+					{
+						Node node = child.getFirstChild();
+						while(!(node instanceof Element))
+						{
+							node = node.getNextSibling() ;
+						}
+						if (node instanceof Element) {
+							final Object value = MarshalUnmarshalManager.getInstance().unmarshal((Element)node);
+							if (value == null)
+								throw new UnmarshalException("Cannot unpack object "+child.getNodeName());
+							else
+								_objects.put(child.getNodeName(), value);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	public void setContents(byte[] content)
+	{
+		_content = content;
+	}
+
+	public byte[] getContents()
+	{
+		return _content;
+	}
+
+	public void replace(Body b)
+	{
+		if (b == null)
+			throw new IllegalArgumentException();
+
+		setContents(b.getContents());
+
+		_objects = ((BodyImpl) b)._objects;
+	}
+
+	public void merge(Body b)
+	{
+		if (b == null)
+			throw new IllegalArgumentException();
+
+		byte[] toAdd = b.getContents();
+
+		if ((toAdd != null) && (toAdd.length > 0))
+		{
+			if ((_content == null) || (_content.length == 0))
+			{
+				_content = toAdd;
+			}
+			else
+			{
+				int newSize = _content.length + toAdd.length;
+				byte[] buffer = new byte[newSize];
+
+				System.arraycopy(_content, 0, buffer, 0, _content.length);
+				System.arraycopy(toAdd, 0, buffer, _content.length,
+						toAdd.length);
+
+				_content = buffer;
+			}
+		}
+
+		_objects.putAll(((BodyImpl) b)._objects);
+	}
+
+	private byte[] _content;
+
+	private Hashtable<String, Object> _objects;
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/BodyImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/ContextImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/ContextImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/ContextImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,47 +1,47 @@
-package org.jboss.internal.soa.esb.message.format.xml;
-
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.message.Context;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-public class ContextImpl implements Context
-{
-    public static final String CONTEXT_TAG = "Context";
-    
-	public Element toXML (Element envelope) throws MarshalException
-	{
-		Document doc = envelope.getOwnerDocument();
-		Element contextElement = doc.createElement(CONTEXT_TAG);
-		
-		envelope.appendChild(contextElement);
-		
-		return contextElement;
-	}
-	
-	public void fromXML (Element envelope) throws UnmarshalException
-	{
-	}
+package org.jboss.internal.soa.esb.message.format.xml;
+
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.message.Context;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+public class ContextImpl implements Context
+{
+    public static final String CONTEXT_TAG = "Context";
+    
+	public Element toXML (Element envelope) throws MarshalException
+	{
+		Document doc = envelope.getOwnerDocument();
+		Element contextElement = doc.createElement(CONTEXT_TAG);
+		
+		envelope.appendChild(contextElement);
+		
+		return contextElement;
+	}
+	
+	public void fromXML (Element envelope) throws UnmarshalException
+	{
+	}
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/ContextImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,136 +1,136 @@
-package org.jboss.internal.soa.esb.message.format.xml;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.message.Fault;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-public class FaultImpl implements Fault
-{
-	public static final String FAULT_TAG = "Fault";
-
-	public static final String CODE_TAG = "Code";
-
-	public static final String REASON_TAG = "Reason";
-
-	public URI getCode()
-	{
-		return _code;
-	}
-
-	public void setCode(URI code)
-	{
-		_code = code;
-	}
-
-	public String getReason()
-	{
-		return _reason;
-	}
-
-	public void setReason(String reason)
-	{
-		_reason = reason;
-	}
-
-	public Element toXML(Element envelope) throws MarshalException
-	{
-		Document doc = envelope.getOwnerDocument();
-		Element faultElement = doc.createElement(FAULT_TAG);
-
-		if (_code != null)
-		{
-			Element codeElement = doc.createElement(CODE_TAG);
-			Text content = doc.createTextNode(_code.toString());
-			
-			codeElement.appendChild(content);
-			
-			faultElement.appendChild(codeElement);
-		}
-
-		if (_reason != null)
-		{
-			Element reasonElement = doc.createElement(REASON_TAG);
-			Text content = doc.createTextNode(_reason);
-			
-			reasonElement.appendChild(content);
-
-			faultElement.appendChild(reasonElement);
-		}
-
-		if ((_code != null) || (_reason != null))
-		{
-			envelope.appendChild(faultElement);
-			
-			return faultElement;
-		}
-		else
-			return envelope;
-	}
-
-	public void fromXML (Element envelope) throws UnmarshalException
-	{
-		NodeList nl = envelope.getChildNodes();
-
-		_code = null;
-		_reason = null;
-		
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			if (nl.item(i).getNodeName().equals(FAULT_TAG))
-			{
-				NodeList children = nl.item(i).getChildNodes();
-
-				for (int j = 0; j < children.getLength(); j++)
-				{
-					Element child = (Element) children.item(j);
-
-					if (child.getNodeName().equals(CODE_TAG))
-					{
-						try
-						{
-							_code = new URI(child.getFirstChild().getNodeValue());
-						}
-						catch (Exception ex)
-						{
-							ex.printStackTrace();
-						}
-					}
-
-					if (child.getNodeName().equals(REASON_TAG))
-						_reason = child.getFirstChild().getNodeValue();
-				}
-			}
-		}
-	}
-
-	private URI _code = null;
-	private String _reason = null;
-
+package org.jboss.internal.soa.esb.message.format.xml;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.message.Fault;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+public class FaultImpl implements Fault
+{
+	public static final String FAULT_TAG = "Fault";
+
+	public static final String CODE_TAG = "Code";
+
+	public static final String REASON_TAG = "Reason";
+
+	public URI getCode()
+	{
+		return _code;
+	}
+
+	public void setCode(URI code)
+	{
+		_code = code;
+	}
+
+	public String getReason()
+	{
+		return _reason;
+	}
+
+	public void setReason(String reason)
+	{
+		_reason = reason;
+	}
+
+	public Element toXML(Element envelope) throws MarshalException
+	{
+		Document doc = envelope.getOwnerDocument();
+		Element faultElement = doc.createElement(FAULT_TAG);
+
+		if (_code != null)
+		{
+			Element codeElement = doc.createElement(CODE_TAG);
+			Text content = doc.createTextNode(_code.toString());
+			
+			codeElement.appendChild(content);
+			
+			faultElement.appendChild(codeElement);
+		}
+
+		if (_reason != null)
+		{
+			Element reasonElement = doc.createElement(REASON_TAG);
+			Text content = doc.createTextNode(_reason);
+			
+			reasonElement.appendChild(content);
+
+			faultElement.appendChild(reasonElement);
+		}
+
+		if ((_code != null) || (_reason != null))
+		{
+			envelope.appendChild(faultElement);
+			
+			return faultElement;
+		}
+		else
+			return envelope;
+	}
+
+	public void fromXML (Element envelope) throws UnmarshalException
+	{
+		NodeList nl = envelope.getChildNodes();
+
+		_code = null;
+		_reason = null;
+		
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			if (nl.item(i).getNodeName().equals(FAULT_TAG))
+			{
+				NodeList children = nl.item(i).getChildNodes();
+
+				for (int j = 0; j < children.getLength(); j++)
+				{
+					Element child = (Element) children.item(j);
+
+					if (child.getNodeName().equals(CODE_TAG))
+					{
+						try
+						{
+							_code = new URI(child.getFirstChild().getNodeValue());
+						}
+						catch (Exception ex)
+						{
+							ex.printStackTrace();
+						}
+					}
+
+					if (child.getNodeName().equals(REASON_TAG))
+						_reason = child.getFirstChild().getNodeValue();
+				}
+			}
+		}
+	}
+
+	private URI _code = null;
+	private String _reason = null;
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/HeaderImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/HeaderImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/HeaderImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,103 +1,103 @@
-package org.jboss.internal.soa.esb.message.format.xml;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-import org.jboss.internal.soa.esb.addressing.helpers.CallHelper;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.message.Header;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * The message header. Contains such things as routing information.
- */
-
-public class HeaderImpl implements Header
-{
-    public static final String HEADER_TAG = "Header";
-    
-	public HeaderImpl ()
-	{
-		_call = new Call();
-	}
-	
-	// TODO add other setters/getters for artibitrary attributes
-	
-	public Call getCall ()
-	{
-		return _call;
-	}
-	
-	public void setCall (Call call)
-	{
-		if (call == null)
-			throw new IllegalArgumentException();
-		
-		_call = call;
-	}
-	
-	public Element toXML (Element envelope) throws MarshalException
-	{
-		Document doc = envelope.getOwnerDocument();
-		
-		// TODO remove MAGIC strings!!
-		
-		Element headerElement = doc.createElement(HEADER_TAG);
-		
-		envelope.appendChild(headerElement);
-		
-		if (_call != null)
-			return CallHelper.toXML(_call, doc, headerElement);
-		else
-			return headerElement;
-	}
-	
-	public void fromXML (Element envelope) throws UnmarshalException
-	{
-		_call = new Call();
-		
-		NodeList nl = envelope.getChildNodes();
-		Element headerElement = null;
-		
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			Node n = nl.item(i);
-			
-			if (n.getNodeName().equals(HEADER_TAG))
-			{
-				headerElement = (Element) n;
-				break;
-			}
-		}
-		
-		// TODO error handling!!
-		
-		if (headerElement != null)
-			_call = CallHelper.fromXML(headerElement);
-	}
-	
-	private Call _call;
+package org.jboss.internal.soa.esb.message.format.xml;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+import org.jboss.internal.soa.esb.addressing.helpers.CallHelper;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.message.Header;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * The message header. Contains such things as routing information.
+ */
+
+public class HeaderImpl implements Header
+{
+    public static final String HEADER_TAG = "Header";
+    
+	public HeaderImpl ()
+	{
+		_call = new Call();
+	}
+	
+	// TODO add other setters/getters for artibitrary attributes
+	
+	public Call getCall ()
+	{
+		return _call;
+	}
+	
+	public void setCall (Call call)
+	{
+		if (call == null)
+			throw new IllegalArgumentException();
+		
+		_call = call;
+	}
+	
+	public Element toXML (Element envelope) throws MarshalException
+	{
+		Document doc = envelope.getOwnerDocument();
+		
+		// TODO remove MAGIC strings!!
+		
+		Element headerElement = doc.createElement(HEADER_TAG);
+		
+		envelope.appendChild(headerElement);
+		
+		if (_call != null)
+			return CallHelper.toXML(_call, doc, headerElement);
+		else
+			return headerElement;
+	}
+	
+	public void fromXML (Element envelope) throws UnmarshalException
+	{
+		_call = new Call();
+		
+		NodeList nl = envelope.getChildNodes();
+		Element headerElement = null;
+		
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			Node n = nl.item(i);
+			
+			if (n.getNodeName().equals(HEADER_TAG))
+			{
+				headerElement = (Element) n;
+				break;
+			}
+		}
+		
+		// TODO error handling!!
+		
+		if (headerElement != null)
+			_call = CallHelper.fromXML(headerElement);
+	}
+	
+	private Call _call;
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/HeaderImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,205 +1,205 @@
-/*
- * 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 mark.little at jboss.com
- */
-package org.jboss.internal.soa.esb.message.format.xml;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.message.Attachment;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.message.Context;
-import org.jboss.soa.esb.message.Fault;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Properties;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-/**
- * This is the basic internal core message abstraction. A message consists of the following
- * components:
- * 
- * Header: the header information contains information such as the destination EPR, the
- * sender EPR, where the reply goes etc, i.e., general message-level functional information.
- * Context: additional information to contextualise the message; for example, transaction or
- * security data, the identity of the ultimate receiver, or HTTP-cookie like information.
- * Body: the actual payload of the message.
- * Fault: any fault information associated with the message.
- * Attachment: any attachments associated with the message.
- * Properties: any properties associated with the message.
- * 
- * Each message, once created, has a corresponding element for these 5 components. That element
- * may be empty (<b>NOT NULL</b>). The object representing the element can then be used to act
- * on the corresponding data item in the message.
- * 
- * @author Mark Little
- *
- */
-
-public class MessageImpl implements Message
-{
-    public static final String ENVELOPE_TAG = "Envelope";
-    
-	/**
-	 * @return get the header component of the message.
-	 */
-	
-	public Header getHeader ()
-	{
-		return _theHeader;
-	}
-	
-	/**
-	 * @return get the context component of the message.
-	 */
-	
-	public Context getContext ()
-	{
-		return _theContext;
-	}
-	
-	/**
-	 * @return get the body component of the message.
-	 */
-	
-	public Body getBody ()
-	{
-		return _theBody;
-	}
-	
-	/**
-	 * @return get any faults associated with the message. These should not
-	 * be application level faults, but comms level.
-	 */
-	
-	public Fault getFault ()
-	{
-		return _theFault;
-	}
-	
-	/**
-	 * @return get any message attachments.
-	 */
-	
-	public Attachment getAttachment ()
-	{
-		return _theAttachment;
-	}
-	
-	/**
-	 * @return the type of this message format.
-	 */
-	
-	public URI getType ()
-	{
-		return MessageType.JBOSS_XML;
-	}
-	/**
-	 * getProperties()
-	 * @return org.jboss.soa.esb.message.Properties - any message properties.
-	 */
-	public Properties getProperties() 
-	{
-		return _theProperties;
-	}
-	
-	// to/from XML here, rather than on individual elements
-	
-	public Document toXML (Document doc) throws MarshalException
-	{
-		try
-		{		
-			// TODO remove magic strings!
-			
-			Element envelope = doc.createElement(ENVELOPE_TAG);
-
-			doc.appendChild(envelope);
-			
-			_theHeader.toXML(envelope);
-			_theContext.toXML(envelope);
-			_theBody.toXML(envelope);
-			_theFault.toXML(envelope);
-			_theAttachment.toXML(envelope);
-			_theProperties.toXML(envelope);
-			
-			return doc;
-		}
-		catch (MarshalException ex)
-		{
-			throw ex;
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			throw new MarshalException(ex);
-		}
-	}
-	
-	public void fromXML (Document doc) throws UnmarshalException
-	{
-		try
-		{
-			NodeList nl = doc.getChildNodes();
-			Element envelope = null;
-			
-			for (int i = 0; i < nl.getLength(); i++)
-			{
-				Node n = nl.item(i);
-				
-				if (n.getNodeName().equals(ENVELOPE_TAG))
-				{
-					envelope = (Element) n;
-					break;
-				}
-			}
-
-			_theHeader.fromXML(envelope);
-			_theContext.fromXML(envelope);
-			_theBody.fromXML(envelope);
-			_theFault.fromXML(envelope);
-			_theAttachment.fromXML(envelope);
-			_theProperties.fromXML(envelope);
-		}
-		catch (UnmarshalException ex)
-		{
-			throw ex;
-		}
-		catch (Exception ex)
-		{
-			throw new UnmarshalException(ex);
-		}
-	}
-	
-	// TODO add equality operator(s)
-	
-	private HeaderImpl _theHeader = new HeaderImpl();
-	private ContextImpl _theContext = new ContextImpl();
-	private BodyImpl _theBody = new BodyImpl();
-	private FaultImpl _theFault = new FaultImpl();
-	private AttachmentImpl _theAttachment = new AttachmentImpl();
-	private PropertiesImpl _theProperties = new PropertiesImpl();
-}
+/*
+ * 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 mark.little at jboss.com
+ */
+package org.jboss.internal.soa.esb.message.format.xml;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.message.Attachment;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Context;
+import org.jboss.soa.esb.message.Fault;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Properties;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * This is the basic internal core message abstraction. A message consists of the following
+ * components:
+ * 
+ * Header: the header information contains information such as the destination EPR, the
+ * sender EPR, where the reply goes etc, i.e., general message-level functional information.
+ * Context: additional information to contextualise the message; for example, transaction or
+ * security data, the identity of the ultimate receiver, or HTTP-cookie like information.
+ * Body: the actual payload of the message.
+ * Fault: any fault information associated with the message.
+ * Attachment: any attachments associated with the message.
+ * Properties: any properties associated with the message.
+ * 
+ * Each message, once created, has a corresponding element for these 5 components. That element
+ * may be empty (<b>NOT NULL</b>). The object representing the element can then be used to act
+ * on the corresponding data item in the message.
+ * 
+ * @author Mark Little
+ *
+ */
+
+public class MessageImpl implements Message
+{
+    public static final String ENVELOPE_TAG = "Envelope";
+    
+	/**
+	 * @return get the header component of the message.
+	 */
+	
+	public Header getHeader ()
+	{
+		return _theHeader;
+	}
+	
+	/**
+	 * @return get the context component of the message.
+	 */
+	
+	public Context getContext ()
+	{
+		return _theContext;
+	}
+	
+	/**
+	 * @return get the body component of the message.
+	 */
+	
+	public Body getBody ()
+	{
+		return _theBody;
+	}
+	
+	/**
+	 * @return get any faults associated with the message. These should not
+	 * be application level faults, but comms level.
+	 */
+	
+	public Fault getFault ()
+	{
+		return _theFault;
+	}
+	
+	/**
+	 * @return get any message attachments.
+	 */
+	
+	public Attachment getAttachment ()
+	{
+		return _theAttachment;
+	}
+	
+	/**
+	 * @return the type of this message format.
+	 */
+	
+	public URI getType ()
+	{
+		return MessageType.JBOSS_XML;
+	}
+	/**
+	 * getProperties()
+	 * @return org.jboss.soa.esb.message.Properties - any message properties.
+	 */
+	public Properties getProperties() 
+	{
+		return _theProperties;
+	}
+	
+	// to/from XML here, rather than on individual elements
+	
+	public Document toXML (Document doc) throws MarshalException
+	{
+		try
+		{		
+			// TODO remove magic strings!
+			
+			Element envelope = doc.createElement(ENVELOPE_TAG);
+
+			doc.appendChild(envelope);
+			
+			_theHeader.toXML(envelope);
+			_theContext.toXML(envelope);
+			_theBody.toXML(envelope);
+			_theFault.toXML(envelope);
+			_theAttachment.toXML(envelope);
+			_theProperties.toXML(envelope);
+			
+			return doc;
+		}
+		catch (MarshalException ex)
+		{
+			throw ex;
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			throw new MarshalException(ex);
+		}
+	}
+	
+	public void fromXML (Document doc) throws UnmarshalException
+	{
+		try
+		{
+			NodeList nl = doc.getChildNodes();
+			Element envelope = null;
+			
+			for (int i = 0; i < nl.getLength(); i++)
+			{
+				Node n = nl.item(i);
+				
+				if (n.getNodeName().equals(ENVELOPE_TAG))
+				{
+					envelope = (Element) n;
+					break;
+				}
+			}
+
+			_theHeader.fromXML(envelope);
+			_theContext.fromXML(envelope);
+			_theBody.fromXML(envelope);
+			_theFault.fromXML(envelope);
+			_theAttachment.fromXML(envelope);
+			_theProperties.fromXML(envelope);
+		}
+		catch (UnmarshalException ex)
+		{
+			throw ex;
+		}
+		catch (Exception ex)
+		{
+			throw new UnmarshalException(ex);
+		}
+	}
+	
+	// TODO add equality operator(s)
+	
+	private HeaderImpl _theHeader = new HeaderImpl();
+	private ContextImpl _theContext = new ContextImpl();
+	private BodyImpl _theBody = new BodyImpl();
+	private FaultImpl _theFault = new FaultImpl();
+	private AttachmentImpl _theAttachment = new AttachmentImpl();
+	private PropertiesImpl _theProperties = new PropertiesImpl();
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/PropertiesImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/PropertiesImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/PropertiesImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,167 +1,167 @@
-/*
- * 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 schifest at heuristica.com.ar
- */
-package org.jboss.internal.soa.esb.message.format.xml;
-
-import java.io.Serializable;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.jboss.internal.soa.esb.thirdparty.Base64;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.message.Properties;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class PropertiesImpl implements Properties
-{
-	public static final String PROPERTIES_TAG = "Properties";
-
-	public Object getProperty(String name)
-	{
-		return _table.get(name);
-	}
-
-	public Object getProperty(String name, Object defaultVal)
-	{
-		Object oRet = getProperty(name);
-		return (null == oRet) ? defaultVal : oRet;
-	}
-
-	public Object setProperty(String name, Object value)
-	{
-		if (value instanceof Serializable)
-			return _table.put(name, (Serializable) value);
-		else
-			throw new IllegalArgumentException("value must be XmlSerializable");
-	}
-
-	public Object remove(String name)
-	{
-		return _table.remove(name);
-	}
-
-	public int size() {return _table.size(); } 
-
-	public String[] getNames()
-	{
-		return _table.keySet().toArray(new String[_table.size()]);
-	}
-
-	/**
-	 * toXML(elem) - Will build a child element with appropriate values and
-	 * append it to arg0
-	 * 
-	 * @param elem
-	 *            Element - where to add 'this' as a child node
-	 * @return Element - 'this' as the added Element, or &lt;null&gt; if no
-	 *         properties in table and nothing was appended to arg0
-	 */
-	public Element toXML(Element elem) throws MarshalException
-	{
-		if (_table.size() < 1)
-			return null;
-
-		Document doc = elem.getOwnerDocument();
-		Element thisElement = doc.createElement(PROPERTIES_TAG);
-
-		boolean bAdd = false;
-		for (Map.Entry<String, Serializable> oCurr : _table.entrySet())
-		{
-			Element oProp = doc.createElement(oCurr.getKey());
-			oProp.appendChild(doc.createCDATASection(Base64.encodeObject(oCurr
-					.getValue())));
-			thisElement.appendChild(oProp);
-			bAdd = true;
-		}
-		if (bAdd)
-		{
-			elem.appendChild(thisElement);
-			return thisElement;
-		}
-		else
-			return null;
-	}
-
-	/**
-	 * fromXml(elem) - Populate properties found in appropriate child element
-	 * 
-	 * @see XMLUtil.PROPERTIES_TAG
-	 * @param elem -
-	 *            Element where to look for child nodes
-	 */
-	public void fromXML(Element elem) throws UnmarshalException
-	{
-		_table.clear();
-		
-		NodeList NL = elem.getElementsByTagName(PROPERTIES_TAG);
-		for (int i1 = 0; i1 < NL.getLength(); i1++)
-		{
-			Node oCurr = NL.item(i1);
-			if (!(oCurr instanceof Element))
-				continue;
-			NodeList props = oCurr.getChildNodes();
-			for (int i2 = 0; i2 < props.getLength(); i2++)
-			{
-				Node oProp = props.item(i2);
-				if (oProp instanceof Element)
-				{
-					CDATASection cdata = (CDATASection) oProp.getFirstChild();
-					Object value = Base64.decodeToObject(cdata.getWholeText());
-					_table.put(oProp.getNodeName(), (Serializable) value);
-				}
-			}
-		}
-	}
-
-	public String toString()
-	{
-		return _table.toString();
-	}
-
-	@Override
-	public boolean equals(Object arg)
-	{
-		if (! (arg instanceof Properties))
-			return false;
-		Properties other = (Properties)arg;
-		if (other.size() != _table.size())
-			return false;
-		for(Map.Entry<String,Serializable>oCurr : _table.entrySet())
-		{	
-			Object val = other.getProperty(oCurr.getKey());
-			if (null==oCurr.getValue())
-				if (null==val)
-					continue;
-				else
-					return false;
-			if (!oCurr.getValue().equals(val))
-				return false;
-		}
-		return true;
-	}
-
-	Hashtable<String, Serializable> _table = new Hashtable<String, Serializable>();
-
-}
+/*
+ * 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 schifest at heuristica.com.ar
+ */
+package org.jboss.internal.soa.esb.message.format.xml;
+
+import java.io.Serializable;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.jboss.internal.soa.esb.thirdparty.Base64;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.message.Properties;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class PropertiesImpl implements Properties
+{
+	public static final String PROPERTIES_TAG = "Properties";
+
+	public Object getProperty(String name)
+	{
+		return _table.get(name);
+	}
+
+	public Object getProperty(String name, Object defaultVal)
+	{
+		Object oRet = getProperty(name);
+		return (null == oRet) ? defaultVal : oRet;
+	}
+
+	public Object setProperty(String name, Object value)
+	{
+		if (value instanceof Serializable)
+			return _table.put(name, (Serializable) value);
+		else
+			throw new IllegalArgumentException("value must be XmlSerializable");
+	}
+
+	public Object remove(String name)
+	{
+		return _table.remove(name);
+	}
+
+	public int size() {return _table.size(); } 
+
+	public String[] getNames()
+	{
+		return _table.keySet().toArray(new String[_table.size()]);
+	}
+
+	/**
+	 * toXML(elem) - Will build a child element with appropriate values and
+	 * append it to arg0
+	 * 
+	 * @param elem
+	 *            Element - where to add 'this' as a child node
+	 * @return Element - 'this' as the added Element, or &lt;null&gt; if no
+	 *         properties in table and nothing was appended to arg0
+	 */
+	public Element toXML(Element elem) throws MarshalException
+	{
+		if (_table.size() < 1)
+			return null;
+
+		Document doc = elem.getOwnerDocument();
+		Element thisElement = doc.createElement(PROPERTIES_TAG);
+
+		boolean bAdd = false;
+		for (Map.Entry<String, Serializable> oCurr : _table.entrySet())
+		{
+			Element oProp = doc.createElement(oCurr.getKey());
+			oProp.appendChild(doc.createCDATASection(Base64.encodeObject(oCurr
+					.getValue())));
+			thisElement.appendChild(oProp);
+			bAdd = true;
+		}
+		if (bAdd)
+		{
+			elem.appendChild(thisElement);
+			return thisElement;
+		}
+		else
+			return null;
+	}
+
+	/**
+	 * fromXml(elem) - Populate properties found in appropriate child element
+	 * 
+	 * @see XMLUtil.PROPERTIES_TAG
+	 * @param elem -
+	 *            Element where to look for child nodes
+	 */
+	public void fromXML(Element elem) throws UnmarshalException
+	{
+		_table.clear();
+		
+		NodeList NL = elem.getElementsByTagName(PROPERTIES_TAG);
+		for (int i1 = 0; i1 < NL.getLength(); i1++)
+		{
+			Node oCurr = NL.item(i1);
+			if (!(oCurr instanceof Element))
+				continue;
+			NodeList props = oCurr.getChildNodes();
+			for (int i2 = 0; i2 < props.getLength(); i2++)
+			{
+				Node oProp = props.item(i2);
+				if (oProp instanceof Element)
+				{
+					CDATASection cdata = (CDATASection) oProp.getFirstChild();
+					Object value = Base64.decodeToObject(cdata.getWholeText());
+					_table.put(oProp.getNodeName(), (Serializable) value);
+				}
+			}
+		}
+	}
+
+	public String toString()
+	{
+		return _table.toString();
+	}
+
+	@Override
+	public boolean equals(Object arg)
+	{
+		if (! (arg instanceof Properties))
+			return false;
+		Properties other = (Properties)arg;
+		if (other.size() != _table.size())
+			return false;
+		for(Map.Entry<String,Serializable>oCurr : _table.entrySet())
+		{	
+			Object val = other.getProperty(oCurr.getKey());
+			if (null==oCurr.getValue())
+				if (null==val)
+					continue;
+				else
+					return false;
+			if (!oCurr.getValue().equals(val))
+				return false;
+		}
+		return true;
+	}
+
+	Hashtable<String, Serializable> _table = new Hashtable<String, Serializable>();
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/PropertiesImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLMessagePlugin.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLMessagePlugin.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLMessagePlugin.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,48 +1,48 @@
-package org.jboss.internal.soa.esb.message.format.xml;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessagePlugin;
-import org.jboss.soa.esb.message.format.MessageType;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Used to plug in new message formats dynamically.
- *  
- * @author Mark Little
- *
- */
-
-public class XMLMessagePlugin implements MessagePlugin
-{
-	public Message getMessage ()
-	{
-		return new MessageImpl();
-	}
-	
-	public URI getType ()
-	{
-		return MessageType.JBOSS_XML;
-	}
-}
+package org.jboss.internal.soa.esb.message.format.xml;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessagePlugin;
+import org.jboss.soa.esb.message.format.MessageType;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Used to plug in new message formats dynamically.
+ *  
+ * @author Mark Little
+ *
+ */
+
+public class XMLMessagePlugin implements MessagePlugin
+{
+	public Message getMessage ()
+	{
+		return new MessageImpl();
+	}
+	
+	public URI getType ()
+	{
+		return MessageType.JBOSS_XML;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLMessagePlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,34 +1,34 @@
-/*
- * 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 mark.little at jboss.com
- */
-
-/*
- * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
- *
- * XMLUtil.java
- */
-
-package org.jboss.internal.soa.esb.message.format.xml;
-
-public class XMLUtil
-{
-    public static final String ESB_PREFIX = "jbesb";
-    public static final String ESB_NAMESPACE_URI = "http://www.jboss.org/ws/2006/09/esb";
-}
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * XMLUtil.java
+ */
+
+package org.jboss.internal.soa.esb.message.format.xml;
+
+public class XMLUtil
+{
+    public static final String ESB_PREFIX = "jbesb";
+    public static final String ESB_NAMESPACE_URI = "http://www.jboss.org/ws/2006/09/esb";
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/XMLUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalManager.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalManager.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalManager.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,157 +1,157 @@
-package org.jboss.internal.soa.esb.message.format.xml.marshal;
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Properties;
-
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.w3c.dom.Element;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Used to plug in new Object marshal/unmarshal formats dynamically. When packing
- * objects in XML, the system runs through the list of registered plug-ins until it
- * finds one that can deal with the object type (or faults). When packing, the name (type)
- * of the plug-in that packed the object is also attached to facilitate unpacking.
- *  
- * @author Mark Little
- *
- */
-
-public class MarshalUnmarshalManager
-{
-	public static MarshalUnmarshalManager getInstance ()
-	{
-		return _instance;
-	}
-	
-	private MarshalUnmarshalManager ()
-	{
-		/*
-		 * Go through the properties loaded from the property file. Anything
-		 * starting with MessagePlugin.MESSAGE_PLUGIN is assumed to be a plugin
-		 * that we load and add to the list.
-		 */
-		
-		Properties properties = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperties();
-		
-		if (properties != null)
-		{
-			Enumeration names = properties.propertyNames();
-
-			while (names.hasMoreElements())
-			{
-				String attrName = (String) names.nextElement();
-				
-				if (attrName.startsWith(MarshalUnmarshalPlugin.MARSHAL_UNMARSHAL_PLUGIN))
-				{
-					try
-					{
-						String pluginName = properties.getProperty(attrName);
-						Class c = Class.forName(pluginName);
-						MarshalUnmarshalPlugin thePlugin = (MarshalUnmarshalPlugin) c.newInstance();
-
-						_plugins.put(thePlugin.type(), thePlugin);
-					}
-					catch (ClassNotFoundException ex)
-					{
-						ex.printStackTrace();
-					}
-					catch (IllegalAccessException ex)
-					{
-						ex.printStackTrace();
-					}
-					catch (InstantiationException ex)
-					{
-						ex.printStackTrace();
-					}
-				}
-			}
-			
-			/*
-			 * Add in the default plugin.
-			 */
-			
-			SerializedMarshalUnmarshalPlugin defaultPlugin = new SerializedMarshalUnmarshalPlugin();
-			
-			_plugins.put(defaultPlugin.type(), defaultPlugin);
-		}
-	}
-	
-	/**
-	 * Pack the provided object into the document.
-	 * 
-	 * @param doc the XML document.
-	 * @param param the object to pack.
-	 * 
-	 * @return <code>true</code> if the object was packed, <code>false</code> otherwise.
-	 * @throws MarshalException thrown if there is a problem packing.
-	 */
-	
-	public boolean marshal (Element doc, Object param) throws MarshalException
-	{
-		Enumeration<URI> keys = _plugins.keys();
-		
-		while (keys.hasMoreElements())
-		{
-			if (_plugins.get(keys.nextElement()).marshal(doc, param))
-				return true;
-		}
-		
-		return false;
-	}
-	
-	/**
-	 * Unpack the object from the document.
-	 * 
-	 * @param doc the document.
-	 * 
-	 * @return the object, or <code>null</code> if this implementation cannot deal with the
-	 * format.
-	 * @throws UnmarshalException thrown if there is a problem unpacking.
-	 */
-	
-	public Object unmarshal (Element doc) throws UnmarshalException
-	{
-		Enumeration<URI> keys = _plugins.keys();
-		
-		while (keys.hasMoreElements())
-		{
-			URI uri = keys.nextElement();
-
-			if (doc.getNodeName().equals(uri.toString()))
-			{
-				return _plugins.get(uri).unmarshal(doc);
-			}
-		}
-		
-		return null;
-	}
-	
-	private Hashtable<URI,MarshalUnmarshalPlugin> _plugins = new Hashtable<URI,MarshalUnmarshalPlugin>();
-
-	private static final MarshalUnmarshalManager _instance = new MarshalUnmarshalManager();
-}
+package org.jboss.internal.soa.esb.message.format.xml.marshal;
+
+import java.net.URI;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.w3c.dom.Element;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Used to plug in new Object marshal/unmarshal formats dynamically. When packing
+ * objects in XML, the system runs through the list of registered plug-ins until it
+ * finds one that can deal with the object type (or faults). When packing, the name (type)
+ * of the plug-in that packed the object is also attached to facilitate unpacking.
+ *  
+ * @author Mark Little
+ *
+ */
+
+public class MarshalUnmarshalManager
+{
+	public static MarshalUnmarshalManager getInstance ()
+	{
+		return _instance;
+	}
+	
+	private MarshalUnmarshalManager ()
+	{
+		/*
+		 * Go through the properties loaded from the property file. Anything
+		 * starting with MessagePlugin.MESSAGE_PLUGIN is assumed to be a plugin
+		 * that we load and add to the list.
+		 */
+		
+		Properties properties = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperties();
+		
+		if (properties != null)
+		{
+			Enumeration names = properties.propertyNames();
+
+			while (names.hasMoreElements())
+			{
+				String attrName = (String) names.nextElement();
+				
+				if (attrName.startsWith(MarshalUnmarshalPlugin.MARSHAL_UNMARSHAL_PLUGIN))
+				{
+					try
+					{
+						String pluginName = properties.getProperty(attrName);
+						Class c = Class.forName(pluginName);
+						MarshalUnmarshalPlugin thePlugin = (MarshalUnmarshalPlugin) c.newInstance();
+
+						_plugins.put(thePlugin.type(), thePlugin);
+					}
+					catch (ClassNotFoundException ex)
+					{
+						ex.printStackTrace();
+					}
+					catch (IllegalAccessException ex)
+					{
+						ex.printStackTrace();
+					}
+					catch (InstantiationException ex)
+					{
+						ex.printStackTrace();
+					}
+				}
+			}
+			
+			/*
+			 * Add in the default plugin.
+			 */
+			
+			SerializedMarshalUnmarshalPlugin defaultPlugin = new SerializedMarshalUnmarshalPlugin();
+			
+			_plugins.put(defaultPlugin.type(), defaultPlugin);
+		}
+	}
+	
+	/**
+	 * Pack the provided object into the document.
+	 * 
+	 * @param doc the XML document.
+	 * @param param the object to pack.
+	 * 
+	 * @return <code>true</code> if the object was packed, <code>false</code> otherwise.
+	 * @throws MarshalException thrown if there is a problem packing.
+	 */
+	
+	public boolean marshal (Element doc, Object param) throws MarshalException
+	{
+		Enumeration<URI> keys = _plugins.keys();
+		
+		while (keys.hasMoreElements())
+		{
+			if (_plugins.get(keys.nextElement()).marshal(doc, param))
+				return true;
+		}
+		
+		return false;
+	}
+	
+	/**
+	 * Unpack the object from the document.
+	 * 
+	 * @param doc the document.
+	 * 
+	 * @return the object, or <code>null</code> if this implementation cannot deal with the
+	 * format.
+	 * @throws UnmarshalException thrown if there is a problem unpacking.
+	 */
+	
+	public Object unmarshal (Element doc) throws UnmarshalException
+	{
+		Enumeration<URI> keys = _plugins.keys();
+		
+		while (keys.hasMoreElements())
+		{
+			URI uri = keys.nextElement();
+
+			if (doc.getNodeName().equals(uri.toString()))
+			{
+				return _plugins.get(uri).unmarshal(doc);
+			}
+		}
+		
+		return null;
+	}
+	
+	private Hashtable<URI,MarshalUnmarshalPlugin> _plugins = new Hashtable<URI,MarshalUnmarshalPlugin>();
+
+	private static final MarshalUnmarshalManager _instance = new MarshalUnmarshalManager();
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalManager.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalPlugin.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalPlugin.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalPlugin.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,73 +1,73 @@
-package org.jboss.internal.soa.esb.message.format.xml.marshal;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.w3c.dom.Element;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Used to plug in new Object marshal/unmarshal formats dynamically. When packing
- * objects in XML, the system runs through the list of registered plug-ins until it
- * finds one that can deal with the object type (or faults). When packing, the name (type)
- * of the plug-in that packed the object is also attached to facilitate unpacking.
- *  
- * @author Mark Little
- *
- */
-
-public interface MarshalUnmarshalPlugin
-{
-	public static final String MARSHAL_UNMARSHAL_PLUGIN = "org.jboss.soa.esb.message.format.xml.plugin";
-	
-	/**
-	 * Pack the provided object into the document.
-	 * 
-	 * @param doc the XML document.
-	 * @param param the object to pack.
-	 * 
-	 * @return <code>true</code> if the object was packed, <code>false</code> otherwise.
-	 * @throws MarshalException thrown if there is a problem packing.
-	 */
-	
-	public boolean marshal (Element doc, Object param) throws MarshalException;
-	
-	/**
-	 * Unpack the object from the document.
-	 * 
-	 * @param doc the document.
-	 * 
-	 * @return the object, or <code>null</code> if this implementation cannot deal with the
-	 * format.
-	 * @throws UnmarshalException thrown if there is a problem unpacking.
-	 */
-	
-	public Object unmarshal (Element doc) throws UnmarshalException;
-	
-	/**
-	 * @return the unique name for this plugin.
-	 */
-	
-	public URI type ();
-}
+package org.jboss.internal.soa.esb.message.format.xml.marshal;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.w3c.dom.Element;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Used to plug in new Object marshal/unmarshal formats dynamically. When packing
+ * objects in XML, the system runs through the list of registered plug-ins until it
+ * finds one that can deal with the object type (or faults). When packing, the name (type)
+ * of the plug-in that packed the object is also attached to facilitate unpacking.
+ *  
+ * @author Mark Little
+ *
+ */
+
+public interface MarshalUnmarshalPlugin
+{
+	public static final String MARSHAL_UNMARSHAL_PLUGIN = "org.jboss.soa.esb.message.format.xml.plugin";
+	
+	/**
+	 * Pack the provided object into the document.
+	 * 
+	 * @param doc the XML document.
+	 * @param param the object to pack.
+	 * 
+	 * @return <code>true</code> if the object was packed, <code>false</code> otherwise.
+	 * @throws MarshalException thrown if there is a problem packing.
+	 */
+	
+	public boolean marshal (Element doc, Object param) throws MarshalException;
+	
+	/**
+	 * Unpack the object from the document.
+	 * 
+	 * @param doc the document.
+	 * 
+	 * @return the object, or <code>null</code> if this implementation cannot deal with the
+	 * format.
+	 * @throws UnmarshalException thrown if there is a problem unpacking.
+	 */
+	
+	public Object unmarshal (Element doc) throws UnmarshalException;
+	
+	/**
+	 * @return the unique name for this plugin.
+	 */
+	
+	public URI type ();
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/MarshalUnmarshalPlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/SerializedMarshalUnmarshalPlugin.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/SerializedMarshalUnmarshalPlugin.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/SerializedMarshalUnmarshalPlugin.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,133 +1,133 @@
-package org.jboss.internal.soa.esb.message.format.xml.marshal;
-
-import java.io.Serializable;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.jboss.internal.soa.esb.thirdparty.Base64;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Element;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Used to plug in new Object marshal/unmarshal formats dynamically. When packing
- * objects in XML, the system runs through the list of registered plug-ins until it
- * finds one that can deal with the object type (or faults). When packing, the name (type)
- * of the plug-in that packed the object is also attached to facilitate unpacking.
- *  
- * @author Mark Little
- *
- */
-
-public class SerializedMarshalUnmarshalPlugin implements MarshalUnmarshalPlugin
-{
-	public SerializedMarshalUnmarshalPlugin ()
-	{
-		try
-		{
-			_type = new URI("urn:xml:marshalunmarshal:plugin:serialization");
-		}
-		catch (URISyntaxException ex)
-		{
-			ex.printStackTrace();
-		}
-	}
-	
-	/**
-	 * Pack the provided object into the document.
-	 * 
-	 * @param doc the XML document.
-	 * @param param the object to pack.
-	 * 
-	 * @return <code>true</code> if the object was packed, <code>false</code> otherwise.
-	 * @throws MarshalException thrown if there is a problem packing.
-	 */
-	
-	public boolean marshal (Element doc, Object param) throws MarshalException
-	{
-		if (param instanceof Serializable)
-		{
-			// we can deal with this type!
-			
-			try
-			{
-				Element nodeElement = doc.getOwnerDocument().createElement(type().toString());
-				
-				nodeElement.appendChild(doc.getOwnerDocument().createCDATASection(Base64.encodeObject((Serializable) param)));
-				
-				doc.appendChild(nodeElement);
-			}
-			catch (Exception ex)
-			{
-				throw new MarshalException(ex);
-			}
-			
-			return true;
-		}
-		else
-			return false;
-	}
-	
-	/**
-	 * Unpack the object from the document.
-	 * 
-	 * @param doc the document.
-	 * 
-	 * @return the object, or <code>null</code> if this implementation cannot deal with the
-	 * format.
-	 * @throws UnmarshalException thrown if there is a problem unpacking.
-	 */
-	
-	public Object unmarshal (Element doc) throws UnmarshalException
-	{
-		try
-		{
-			if (doc.getNodeName().equals(type().toString()))
-			{
-				CDATASection cdata = (CDATASection) doc.getFirstChild();
-	
-				return Base64.decodeToObject(cdata.getWholeText());
-			}
-			else
-				return null;
-		}
-		catch (Exception ex)
-		{
-			throw new UnmarshalException(ex);
-		}
-	}
-	
-	/**
-	 * @return the unique name for this plugin.
-	 */
-	
-	public URI type ()
-	{
-		return _type;
-	}
-	
-	private URI _type = null;
-	
-}
+package org.jboss.internal.soa.esb.message.format.xml.marshal;
+
+import java.io.Serializable;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.jboss.internal.soa.esb.thirdparty.Base64;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Element;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Used to plug in new Object marshal/unmarshal formats dynamically. When packing
+ * objects in XML, the system runs through the list of registered plug-ins until it
+ * finds one that can deal with the object type (or faults). When packing, the name (type)
+ * of the plug-in that packed the object is also attached to facilitate unpacking.
+ *  
+ * @author Mark Little
+ *
+ */
+
+public class SerializedMarshalUnmarshalPlugin implements MarshalUnmarshalPlugin
+{
+	public SerializedMarshalUnmarshalPlugin ()
+	{
+		try
+		{
+			_type = new URI("urn:xml:marshalunmarshal:plugin:serialization");
+		}
+		catch (URISyntaxException ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+	
+	/**
+	 * Pack the provided object into the document.
+	 * 
+	 * @param doc the XML document.
+	 * @param param the object to pack.
+	 * 
+	 * @return <code>true</code> if the object was packed, <code>false</code> otherwise.
+	 * @throws MarshalException thrown if there is a problem packing.
+	 */
+	
+	public boolean marshal (Element doc, Object param) throws MarshalException
+	{
+		if (param instanceof Serializable)
+		{
+			// we can deal with this type!
+			
+			try
+			{
+				Element nodeElement = doc.getOwnerDocument().createElement(type().toString());
+				
+				nodeElement.appendChild(doc.getOwnerDocument().createCDATASection(Base64.encodeObject((Serializable) param)));
+				
+				doc.appendChild(nodeElement);
+			}
+			catch (Exception ex)
+			{
+				throw new MarshalException(ex);
+			}
+			
+			return true;
+		}
+		else
+			return false;
+	}
+	
+	/**
+	 * Unpack the object from the document.
+	 * 
+	 * @param doc the document.
+	 * 
+	 * @return the object, or <code>null</code> if this implementation cannot deal with the
+	 * format.
+	 * @throws UnmarshalException thrown if there is a problem unpacking.
+	 */
+	
+	public Object unmarshal (Element doc) throws UnmarshalException
+	{
+		try
+		{
+			if (doc.getNodeName().equals(type().toString()))
+			{
+				CDATASection cdata = (CDATASection) doc.getFirstChild();
+	
+				return Base64.decodeToObject(cdata.getWholeText());
+			}
+			else
+				return null;
+		}
+		catch (Exception ex)
+		{
+			throw new UnmarshalException(ex);
+		}
+	}
+	
+	/**
+	 * @return the unique name for this plugin.
+	 */
+	
+	public URI type ()
+	{
+		return _type;
+	}
+	
+	private URI _type = null;
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/marshal/SerializedMarshalUnmarshalPlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/notification/MacroExpander.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/notification/MacroExpander.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/notification/MacroExpander.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,98 +1,98 @@
-/*
- * 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.internal.soa.esb.notification;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-
-
-/**
- * MacroExpander class.
- * <p/>
- * This class takes a DOM and iterates over it, replacing all "macro" tokens in 
- * any attribute values using the values from the supplied Map.
- * 
- * @author <a href="mailto:schifest at gmail.com">Esteban Shifman</a>
- */
-public class MacroExpander {
-	private static final String CTX_PREFIX = "@@ctx@@";
-
-	public static final String CTX_BATCH_UID = CTX_PREFIX + "batchUid";
-
-	public static final String CTX_BATCH_NUM = CTX_PREFIX + "batchNum";
-
-	public static final String CTX_INPUT_FILE = CTX_PREFIX + "inputFile";
-
-	public static final String CTX_POST_FILE = CTX_PREFIX + "postFile";
-
-	private static final String[] s_saMacros = { 
-		CTX_BATCH_UID, CTX_BATCH_NUM, CTX_INPUT_FILE, CTX_POST_FILE };
-
-	/**
-	 * Perform a macro replacement on the DOM tree attribute values
-	 * of the supplied ConfigTree using the supplied macro token
-	 * replacement map.
-	 * @param domTree The DOM Tree to be operated on.
-	 * @param replacementTokenMapMap The token replacement map.
-	 */
-	public static void replaceMacros(ConfigTree domTree, Map replacementTokenMap) {
-
-		List<KeyValuePair> changed = new ArrayList<KeyValuePair>();
-		for (String currAtt : domTree.getAttributeNames()) 
-		{
-			String sVal = domTree.getAttribute(currAtt);
-			boolean bSubst = false;
-			int iPos = 0;
-
-			while (0 <= (iPos = sVal.indexOf(CTX_PREFIX, 0))) {
-				String sRest = sVal.substring(iPos);
-				for (int ii = 0; ii < s_saMacros.length; ii++) {
-					String sMac = s_saMacros[ii];
-					if (!sRest.startsWith(sMac)) {
-						continue;
-					}
-					Object oRpl = (null != replacementTokenMap) ? replacementTokenMap.get(sMac) : null;
-					if (null == oRpl) {
-						continue;
-					}
-					bSubst = true;
-					sVal = sVal.substring(0, iPos) + oRpl.toString() + sVal.substring(iPos + sMac.length());
-					break;
-				}
-			}
-			if (bSubst)
-					changed.add(new KeyValuePair(currAtt,sVal));
-		}
-		for (KeyValuePair kvp : changed)
-			domTree.setAttribute(kvp.getKey(),kvp.getValue());
-		changed	= null;
-		
-		// Iterate over the child elements and recursively call this method...
-		for (ConfigTree child : domTree.getAllChildren())
-				replaceMacros(child, replacementTokenMap);
-	}
-}
+/*
+ * 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.internal.soa.esb.notification;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.KeyValuePair;
+
+
+/**
+ * MacroExpander class.
+ * <p/>
+ * This class takes a DOM and iterates over it, replacing all "macro" tokens in 
+ * any attribute values using the values from the supplied Map.
+ * 
+ * @author <a href="mailto:schifest at gmail.com">Esteban Shifman</a>
+ */
+public class MacroExpander {
+	private static final String CTX_PREFIX = "@@ctx@@";
+
+	public static final String CTX_BATCH_UID = CTX_PREFIX + "batchUid";
+
+	public static final String CTX_BATCH_NUM = CTX_PREFIX + "batchNum";
+
+	public static final String CTX_INPUT_FILE = CTX_PREFIX + "inputFile";
+
+	public static final String CTX_POST_FILE = CTX_PREFIX + "postFile";
+
+	private static final String[] s_saMacros = { 
+		CTX_BATCH_UID, CTX_BATCH_NUM, CTX_INPUT_FILE, CTX_POST_FILE };
+
+	/**
+	 * Perform a macro replacement on the DOM tree attribute values
+	 * of the supplied ConfigTree using the supplied macro token
+	 * replacement map.
+	 * @param domTree The DOM Tree to be operated on.
+	 * @param replacementTokenMapMap The token replacement map.
+	 */
+	public static void replaceMacros(ConfigTree domTree, Map replacementTokenMap) {
+
+		List<KeyValuePair> changed = new ArrayList<KeyValuePair>();
+		for (String currAtt : domTree.getAttributeNames()) 
+		{
+			String sVal = domTree.getAttribute(currAtt);
+			boolean bSubst = false;
+			int iPos = 0;
+
+			while (0 <= (iPos = sVal.indexOf(CTX_PREFIX, 0))) {
+				String sRest = sVal.substring(iPos);
+				for (int ii = 0; ii < s_saMacros.length; ii++) {
+					String sMac = s_saMacros[ii];
+					if (!sRest.startsWith(sMac)) {
+						continue;
+					}
+					Object oRpl = (null != replacementTokenMap) ? replacementTokenMap.get(sMac) : null;
+					if (null == oRpl) {
+						continue;
+					}
+					bSubst = true;
+					sVal = sVal.substring(0, iPos) + oRpl.toString() + sVal.substring(iPos + sMac.length());
+					break;
+				}
+			}
+			if (bSubst)
+					changed.add(new KeyValuePair(currAtt,sVal));
+		}
+		for (KeyValuePair kvp : changed)
+			domTree.setAttribute(kvp.getKey(),kvp.getValue());
+		changed	= null;
+		
+		// Iterate over the child elements and recursively call this method...
+		for (ConfigTree child : domTree.getAllChildren())
+				replaceMacros(child, replacementTokenMap);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/notification/MacroExpander.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/parameters/ParamFileRepository.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/parameters/ParamFileRepository.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/parameters/ParamFileRepository.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,280 +1,280 @@
-package org.jboss.internal.soa.esb.parameters;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import javax.naming.CompoundName;
-import javax.naming.InvalidNameException;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.util.StreamUtils;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.parameters.ParamRepository;
-import org.jboss.soa.esb.parameters.ParamRepositoryException;
-
-/**
- * This class provides basic file-based storage/retrieval of parameter trees for
- * the JBoss ESB. <p/> This class creates a hierarchical parameter file
- * structure on the file system. E.g. the value for a parameter named
- * "org/jboss/param1" is stored in a file called "param1" in the folder "<root>/org/jboss",
- * where "root" is either the working directory (default) or the directory
- * specified in the "org.jboss.soa.esb.paramsRepository.file.root" System
- * property.
- * 
- * @author Esteban
- * 
- */
-public class ParamFileRepository implements ParamRepository
-{
-
-	/**
-	 * System property defining the repository root directory.
-	 */
-	public static final String FILE_PARAMS_REPOS_ROOT = "org.jboss.soa.esb.paramsRepository.file.root";
-
-	/**
-	 * The repository root dir.
-	 */
-	private File root;
-
-	/**
-	 * Logger.
-	 */
-	private Logger logger = Logger.getLogger(ParamFileRepository.class);
-
-	/**
-	 * Public default constructor.
-	 */
-	public ParamFileRepository()
-	{
-		String rootDir = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE)
-				.getProperty(FILE_PARAMS_REPOS_ROOT);
-
-		// Set the repository root directory.
-		if (rootDir == null)
-		{
-			// set it to the working dir.
-			root = new File("./");
-		} else
-		{
-			root = new File(rootDir);
-			if (!root.exists())
-			{
-				throw new IllegalStateException(
-						"Nonexistant directory specified in the ["
-								+ FILE_PARAMS_REPOS_ROOT
-								+ "] System property: "
-								+ root.getAbsolutePath());
-			}
-		}
-
-		logger.info("Setting parameter repository root dir to ["
-				+ root.getAbsolutePath() + "].");
-	}
-
-	public void add(String name, String value) throws ParamRepositoryException
-	{
-		FileParamName nameParam = asserNameOK(name);
-		if (value == null)
-		{
-			throw new IllegalArgumentException(
-					"null 'value' arg in method call.");
-		}
-
-		synchronized (this)
-		{
-			File paramFile = toParamFile(nameParam);
-			File parentDir = paramFile.getParentFile();
-			if (null==parentDir)
-				parentDir=new File("");
-
-			parentDir.mkdirs();
-			FileOutputStream fileStream = null;
-			try
-			{
-				fileStream = new FileOutputStream(paramFile);
-				fileStream.write(value.getBytes("UTF-8"));
-			} catch (IOException e)
-			{
-				throw new ParamRepositoryException(
-						"IO Error while storing param [" + nameParam + "].", e);
-			} finally
-			{
-				try
-				{
-					if (fileStream != null)
-					{
-						fileStream.flush();
-						fileStream.close();
-					}
-				} catch (IOException e)
-				{
-					logger.warn("Unable to close param file: "
-							+ paramFile.getAbsolutePath(), e);
-				}
-			}
-		}
-	}
-
-	public String get(String name) throws ParamRepositoryException
-	{
-		FileParamName paramName = asserNameOK(name);
-
-		synchronized (this)
-		{
-			File paramFile = new File(name);
-
-			if (!paramFile.exists())
-			{
-				paramFile = toParamFile(paramName);
-				if (!paramFile.exists())
-				{
-					return null;
-				}
-			}
-
-			InputStream fileStream = null;
-			try
-			{
-				fileStream = new FileInputStream(paramFile);
-				byte[] value = StreamUtils.readStream(fileStream);
-				return new String(value, "UTF-8");
-			} catch (Exception e)
-			{
-				throw new ParamRepositoryException(
-						"Unable to load Param Value from file: "
-								+ paramFile.getAbsolutePath(), e);
-			} finally
-			{
-				try
-				{
-					if (fileStream != null)
-					{
-						fileStream.close();
-					}
-				} catch (IOException e)
-				{
-					logger.warn("Unable to close param file: "
-							+ paramFile.getAbsolutePath(), e);
-				}
-			}
-		}
-	}
-
-	public void remove(String name)
-	{
-		FileParamName paramName = asserNameOK(name);
-
-		synchronized (this)
-		{
-			File paramFile = toParamFile(paramName);
-			if (paramFile.exists())
-			{
-				paramFile.delete();
-			}
-		}
-	}
-
-	/**
-	 * Get the repository root directory.
-	 * 
-	 * @return The repository root directory.
-	 */
-	public File getRoot()
-	{
-		return root;
-	}
-
-	/**
-	 * Get the param file for the specified param name.
-	 * 
-	 * @param paramName
-	 *            The param name.
-	 * @return The param file.
-	 */
-	public File toParamFile(String name)
-	{
-		FileParamName paramName = asserNameOK(name);
-		return new File(root, paramName.toString());
-	}
-
-	/**
-	 * Get the param file for the specified param name.
-	 * 
-	 * @param paramName
-	 *            The param name.
-	 * @return The param file.
-	 */
-	private File toParamFile(FileParamName paramName)
-	{
-		return new File(root, paramName.toString());
-	}
-
-	private FileParamName asserNameOK(String name)
-	{
-		FileParamName paramName;
-
-		if (name == null)
-		{
-			throw new IllegalArgumentException(
-					"null 'name' arg in repository call.");
-		}
-		try
-		{
-			paramName = new FileParamName(name);
-		} catch (InvalidNameException e)
-		{
-			throw new IllegalArgumentException("Invalid 'name' arg: " + name, e);
-		}
-		if (paramName.size() == 0)
-		{
-			throw new IllegalArgumentException(
-					"Invalid 'name' arg.  0 tokens: " + name);
-		}
-
-		return paramName;
-	}
-
-	/**
-	 * Parameter Name. <p/> Represents a compound parameter name - from a
-	 * hierarchical namespace.
-	 * <h4 id="syntax">Parameter Name Format</h4>
-	 * The syntax of the parameter name is expected to be in "directory" format,
-	 * read from left to right, where the syntax seperator character is '/' e.g.
-	 * "com/acme/ParameterX".
-	 * 
-	 * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
-	 */
-	private static class FileParamName extends CompoundName
-	{
-
-		private static final long serialVersionUID = 1L;
-
-		private static final Properties nameSyntaxProperties = new Properties();
-		static
-		{
-			nameSyntaxProperties.setProperty("jndi.syntax.direction",
-					"left_to_right");
-			nameSyntaxProperties.setProperty("jndi.syntax.separator", "/");
-		};
-
-		/**
-		 * Public Constructor.
-		 * 
-		 * @param name
-		 *            The name of the parameter, specified according to the <a
-		 *            href="#syntax">defined syntax</a>.
-		 * @throws InvalidNameException
-		 *             The supplied name violates the <a href="#syntax">defined
-		 *             syntax</a>.
-		 */
-		public FileParamName(String name) throws InvalidNameException
-		{
-			super(name, nameSyntaxProperties);
-		}
-	}
+package org.jboss.internal.soa.esb.parameters;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.naming.CompoundName;
+import javax.naming.InvalidNameException;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.parameters.ParamRepository;
+import org.jboss.soa.esb.parameters.ParamRepositoryException;
+
+/**
+ * This class provides basic file-based storage/retrieval of parameter trees for
+ * the JBoss ESB. <p/> This class creates a hierarchical parameter file
+ * structure on the file system. E.g. the value for a parameter named
+ * "org/jboss/param1" is stored in a file called "param1" in the folder "<root>/org/jboss",
+ * where "root" is either the working directory (default) or the directory
+ * specified in the "org.jboss.soa.esb.paramsRepository.file.root" System
+ * property.
+ * 
+ * @author Esteban
+ * 
+ */
+public class ParamFileRepository implements ParamRepository
+{
+
+	/**
+	 * System property defining the repository root directory.
+	 */
+	public static final String FILE_PARAMS_REPOS_ROOT = "org.jboss.soa.esb.paramsRepository.file.root";
+
+	/**
+	 * The repository root dir.
+	 */
+	private File root;
+
+	/**
+	 * Logger.
+	 */
+	private Logger logger = Logger.getLogger(ParamFileRepository.class);
+
+	/**
+	 * Public default constructor.
+	 */
+	public ParamFileRepository()
+	{
+		String rootDir = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE)
+				.getProperty(FILE_PARAMS_REPOS_ROOT);
+
+		// Set the repository root directory.
+		if (rootDir == null)
+		{
+			// set it to the working dir.
+			root = new File("./");
+		} else
+		{
+			root = new File(rootDir);
+			if (!root.exists())
+			{
+				throw new IllegalStateException(
+						"Nonexistant directory specified in the ["
+								+ FILE_PARAMS_REPOS_ROOT
+								+ "] System property: "
+								+ root.getAbsolutePath());
+			}
+		}
+
+		logger.info("Setting parameter repository root dir to ["
+				+ root.getAbsolutePath() + "].");
+	}
+
+	public void add(String name, String value) throws ParamRepositoryException
+	{
+		FileParamName nameParam = asserNameOK(name);
+		if (value == null)
+		{
+			throw new IllegalArgumentException(
+					"null 'value' arg in method call.");
+		}
+
+		synchronized (this)
+		{
+			File paramFile = toParamFile(nameParam);
+			File parentDir = paramFile.getParentFile();
+			if (null==parentDir)
+				parentDir=new File("");
+
+			parentDir.mkdirs();
+			FileOutputStream fileStream = null;
+			try
+			{
+				fileStream = new FileOutputStream(paramFile);
+				fileStream.write(value.getBytes("UTF-8"));
+			} catch (IOException e)
+			{
+				throw new ParamRepositoryException(
+						"IO Error while storing param [" + nameParam + "].", e);
+			} finally
+			{
+				try
+				{
+					if (fileStream != null)
+					{
+						fileStream.flush();
+						fileStream.close();
+					}
+				} catch (IOException e)
+				{
+					logger.warn("Unable to close param file: "
+							+ paramFile.getAbsolutePath(), e);
+				}
+			}
+		}
+	}
+
+	public String get(String name) throws ParamRepositoryException
+	{
+		FileParamName paramName = asserNameOK(name);
+
+		synchronized (this)
+		{
+			File paramFile = new File(name);
+
+			if (!paramFile.exists())
+			{
+				paramFile = toParamFile(paramName);
+				if (!paramFile.exists())
+				{
+					return null;
+				}
+			}
+
+			InputStream fileStream = null;
+			try
+			{
+				fileStream = new FileInputStream(paramFile);
+				byte[] value = StreamUtils.readStream(fileStream);
+				return new String(value, "UTF-8");
+			} catch (Exception e)
+			{
+				throw new ParamRepositoryException(
+						"Unable to load Param Value from file: "
+								+ paramFile.getAbsolutePath(), e);
+			} finally
+			{
+				try
+				{
+					if (fileStream != null)
+					{
+						fileStream.close();
+					}
+				} catch (IOException e)
+				{
+					logger.warn("Unable to close param file: "
+							+ paramFile.getAbsolutePath(), e);
+				}
+			}
+		}
+	}
+
+	public void remove(String name)
+	{
+		FileParamName paramName = asserNameOK(name);
+
+		synchronized (this)
+		{
+			File paramFile = toParamFile(paramName);
+			if (paramFile.exists())
+			{
+				paramFile.delete();
+			}
+		}
+	}
+
+	/**
+	 * Get the repository root directory.
+	 * 
+	 * @return The repository root directory.
+	 */
+	public File getRoot()
+	{
+		return root;
+	}
+
+	/**
+	 * Get the param file for the specified param name.
+	 * 
+	 * @param paramName
+	 *            The param name.
+	 * @return The param file.
+	 */
+	public File toParamFile(String name)
+	{
+		FileParamName paramName = asserNameOK(name);
+		return new File(root, paramName.toString());
+	}
+
+	/**
+	 * Get the param file for the specified param name.
+	 * 
+	 * @param paramName
+	 *            The param name.
+	 * @return The param file.
+	 */
+	private File toParamFile(FileParamName paramName)
+	{
+		return new File(root, paramName.toString());
+	}
+
+	private FileParamName asserNameOK(String name)
+	{
+		FileParamName paramName;
+
+		if (name == null)
+		{
+			throw new IllegalArgumentException(
+					"null 'name' arg in repository call.");
+		}
+		try
+		{
+			paramName = new FileParamName(name);
+		} catch (InvalidNameException e)
+		{
+			throw new IllegalArgumentException("Invalid 'name' arg: " + name, e);
+		}
+		if (paramName.size() == 0)
+		{
+			throw new IllegalArgumentException(
+					"Invalid 'name' arg.  0 tokens: " + name);
+		}
+
+		return paramName;
+	}
+
+	/**
+	 * Parameter Name. <p/> Represents a compound parameter name - from a
+	 * hierarchical namespace.
+	 * <h4 id="syntax">Parameter Name Format</h4>
+	 * The syntax of the parameter name is expected to be in "directory" format,
+	 * read from left to right, where the syntax seperator character is '/' e.g.
+	 * "com/acme/ParameterX".
+	 * 
+	 * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+	 */
+	private static class FileParamName extends CompoundName
+	{
+
+		private static final long serialVersionUID = 1L;
+
+		private static final Properties nameSyntaxProperties = new Properties();
+		static
+		{
+			nameSyntaxProperties.setProperty("jndi.syntax.direction",
+					"left_to_right");
+			nameSyntaxProperties.setProperty("jndi.syntax.separator", "/");
+		};
+
+		/**
+		 * Public Constructor.
+		 * 
+		 * @param name
+		 *            The name of the parameter, specified according to the <a
+		 *            href="#syntax">defined syntax</a>.
+		 * @throws InvalidNameException
+		 *             The supplied name violates the <a href="#syntax">defined
+		 *             syntax</a>.
+		 */
+		public FileParamName(String name) throws InvalidNameException
+		{
+			super(name, nameSyntaxProperties);
+		}
+	}
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/parameters/ParamFileRepository.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/thirdparty/Base64.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,593 +1,593 @@
-/*
- * 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.internal.soa.esb.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.util.FtpClientUtil;
-import org.jboss.soa.esb.util.RemoteFileSystem;
-import org.jboss.soa.esb.util.RemoteFileSystemException;
-
-import com.enterprisedt.net.ftp.FTPClient;
-import com.enterprisedt.net.ftp.FTPConnectMode;
-import com.enterprisedt.net.ftp.FTPException;
-import com.enterprisedt.net.ftp.FTPTransferType;
-
-/**
- * Simplified FTP transfers
- * <p>
- * Description: Implements a simple set of FTP functionality Parameters to
- * establish the FTP connection are provided at construction time and cannot
- * change during the lifetime of the object <br/>Hides low level details.
- * Current implementation is based on the "Entreprise Distributed Technology
- * edtFTPj" library but this can be changed with no impact to existing code,
- * just by changing this class without modifying the signature of it's public
- * methods
- * </p>
- */
-
-public class EdtFtpImpl implements RemoteFileSystem
-{
-
-	private static final Logger _logger = Logger.getLogger(EdtFtpImpl.class);
-
-	private static final String TMP_SUFFIX = ".rosettaPart";
-
-	private boolean m_bPassive;
-
-	private int m_iPort;
-
-	private FTPClient m_oConn = new FTPClient();
-
-	private FTPEpr m_oEpr;
-
-	private ConfigTree m_oParms;
-
-	private FTPTransferType m_oXferType;
-
-	private String m_sFtpServer, m_sUser, m_sPasswd;
-
-	private String m_sRemoteDir, m_sLocalDir;
-
-	/**
-	 * Checks validity and completeness of parameters, and keeps the info
-	 * internally for subsequent FTP requests
-	 * 
-	 * @param p_oP
-	 *            ConfigTree
-	 * @throws ConfigurationException :
-	 *             if parameters are invalid or incomplete
-	 *             <li>Parameters: (XML attributes at the root level) </li>
-	 *             <li> ftpServer = name or IP of FTP server </li>
-	 *             <li> ftpUser = login ID for server </li>
-	 *             <li> ftpPassword </li>
-	 *             <li> localDirURI = absolute path in the local filesystem
-	 *             </li>
-	 *             <li> remoteDirURI = remote path is relative to ftp user home
-	 *             in remote computer </li>
-	 */
-
-	public EdtFtpImpl (ConfigTree p_oP, boolean p_bConnect)
-			throws ConfigurationException, RemoteFileSystemException
-	{
-		m_oParms = p_oP;
-		initialize(p_bConnect);
-	}
-
-	public EdtFtpImpl (FTPEpr p_oP, boolean p_bConnect)
-			throws ConfigurationException, RemoteFileSystemException
-	{
-		m_oEpr = p_oP;
-
-		URL url = null;
-		try
-		{
-			url = m_oEpr.getURL();
-		}
-		catch (MalformedURLException e)
-		{
-			throw new ConfigurationException(e);
-		}
-		catch (URISyntaxException e)
-		{
-			throw new ConfigurationException(e);
-		}
-
-		m_sFtpServer = url.getHost();
-
-		String[] sa = null;
-
-		if (url.getUserInfo() != null) sa = url.getUserInfo().split(":");
-
-		if (sa == null) sa = new String[] { "", "" };
-
-		m_sUser = (sa.length < 1) ? "" : sa[0];
-		m_sPasswd = (sa.length < 2) ? "" : sa[1];
-
-		m_sRemoteDir = url.getFile();
-
-		final String tmpdir = System.getProperty("java.io.tmpdir");
-		if ((m_sRemoteDir == null) || (m_sRemoteDir.equals("")))
-			m_sRemoteDir = ModulePropertyManager.getPropertyManager(
-					ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
-					Environment.FTP_REMOTEDIR, tmpdir);
-
-		m_iPort = url.getPort();
-		if (m_iPort < 0) m_iPort = url.getDefaultPort();
-
-		m_sLocalDir = ModulePropertyManager.getPropertyManager(
-				ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
-				Environment.FTP_LOCALDIR, tmpdir);
-
-		m_bPassive = false;
-
-		try
-		{
-			m_bPassive = m_oEpr.getPassive();
-		}
-		catch (URISyntaxException e)
-		{
-			_logger.warn(e);
-		}
-
-		// TODO there is still a bit of space for improvements here.
-		configTreeFromEpr();
-
-		initialize(p_bConnect);
-	}
-
-	public EdtFtpImpl (List<KeyValuePair> p_oAttribs, boolean p_bConnect)
-			throws ConfigurationException, RemoteFileSystemException
-	{
-		m_oParms = new ConfigTree("fromProps");
-		for (KeyValuePair oCurr : p_oAttribs)
-			m_oParms.setAttribute(oCurr.getKey(), oCurr.getValue());
-		initialize(p_bConnect);
-	}
-
-	private void checkParms () throws ConfigurationException
-	{
-		String att = m_oParms.getAttribute(FileEpr.URL_TAG);
-		URL url = null;
-		
-		try
-		{
-			if (att != null)
-				url = new URL(att);
-		}
-		catch (MalformedURLException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-		
-		m_sFtpServer = (null != url) ? url.getHost() : m_oParms
-				.getAttribute(PARMS_FTP_SERVER);
-		if (null == m_sFtpServer)
-			throw new ConfigurationException("No FTP server specified");
-
-		String[] sa = (null == url) ? null : url.getUserInfo().split(":");
-		m_sUser = (null != sa) ? sa[0] : m_oParms.getAttribute(PARMS_USER);
-		if (null == m_sUser)
-			throw new ConfigurationException("No username specified for FTP");
-
-		m_sPasswd = (null != sa) ? sa[1] : m_oParms.getAttribute(PARMS_PASSWD);
-		if (null == m_sPasswd)
-			throw new ConfigurationException("No password specified for FTP");
-
-		m_sRemoteDir = (null != url) ? url.getFile() : m_oParms
-				.getAttribute(PARMS_REMOTE_DIR);
-		if (null == m_sRemoteDir) m_sRemoteDir = "";
-
-		m_sLocalDir = m_oParms.getAttribute(PARMS_LOCAL_DIR);
-		if (null == m_sLocalDir) m_sLocalDir = ".";
-
-		String sAux = m_oParms.getAttribute(PARMS_PORT);
-		m_iPort = (null != url) ? url.getPort() : (null == sAux) ? 21 : Integer
-				.parseInt(sAux);
-		
-		try
-		{
-			if (m_iPort < 0)
-				m_iPort = new URL("ftp://").getDefaultPort();
-		}
-		catch (MalformedURLException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-
-		// Dec-2006 (b_georges): it has been decided to set the Type to binary.
-		m_oXferType = FTPTransferType.BINARY;
-
-		m_bPassive = false;
-		sAux = m_oParms.getAttribute(PARMS_PASSIVE);
-		m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
-
-		return;
-	}
-
-	private void configTreeFromEpr () throws RemoteFileSystemException
-	{
-		m_oParms = new ConfigTree("fromEpr");
-		try
-		{
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_FTP_SERVER,
-					m_sFtpServer);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_USER, m_sUser);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_PASSWD, m_sPasswd);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_REMOTE_DIR,
-					m_sRemoteDir);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_PORT, Integer
-					.toString(m_iPort));
-			m_oParms
-					.setAttribute(RemoteFileSystem.PARMS_LOCAL_DIR, m_sLocalDir);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_ASCII, Boolean
-					.toString(false));
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_PASSIVE, Boolean
-					.toString(m_bPassive));
-		}
-		catch (Exception e)
-		{
-			throw new RemoteFileSystemException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#deleteRemoteFile(java.lang.String)
-	 */
-	public void deleteRemoteFile (String p_sFile) throws RemoteFileSystemException
-	{
-		try
-		{
-			m_oConn.delete(getRemoteDir() + "/" + new File(p_sFile).getName());
-		}
-		catch (Exception ex)
-		{
-			/*
-			 * It seems as though we have a race condition whereby one thread
-			 * tries to remove a file when another renames it!
-			 */
-			
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#downloadFile(java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void downloadFile (String p_sFile, String p_sFinalName)
-			throws IOException, RemoteFileSystemException
-	{
-		File oLocalDir = new File(m_sLocalDir);
-		File oLclFile = File.createTempFile("Rosetta_", TMP_SUFFIX, oLocalDir);
-
-		try
-		{
-			oLclFile.delete();
-		}
-		catch (Exception e)
-		{
-		}
-
-		try
-		{
-			m_oConn.get(FtpUtils.fileToFtpString(oLclFile), p_sFile);
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-
-		File oNew = new File(oLocalDir, p_sFinalName);
-		
-		if (oNew.exists()) 
-			oNew.delete();
-		
-		oLclFile.renameTo(oNew);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#getFileListFromRemoteDir(java.lang.String)
-	 */
-	public String[] getFileListFromRemoteDir (String p_sSuffix)
-			throws RemoteFileSystemException, IOException
-	{
-		String sSuffix = (null == p_sSuffix) ? "*" : "*" + p_sSuffix;
-
-		try
-		{
-			return m_oConn.dir(sSuffix);
-		}
-		catch (FTPException ex)
-		{
-			String msg = ex.getMessage();
-			int rc = ex.getReplyCode();
-			if (rc == 550) // means File Not Found - see JBESB-303
-			{
-				_logger
-						.debug("No matching file or directory. Server returns: [" + rc + "] " + msg);
-				return null;
-			}
-			else
-			{
-				// TODO Test with different FTP Servers
-				String sMess = this.getClass().getSimpleName() + " can't list " + sSuffix + " due to: [" + rc + "] " + msg;
-				throw new RemoteFileSystemException(sMess);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#getRemoteDir()
-	 */
-	public String getRemoteDir ()
-	{
-		return m_sRemoteDir;
-	}
-
-	private void initialize (boolean bConnect) throws ConfigurationException,
-			RemoteFileSystemException
-	{
-		checkParms();
-		if (bConnect)
-		{
-			try
-			{
-				m_oConn.setRemoteHost(m_sFtpServer);
-			}
-			catch (UnknownHostException ex)
-			{
-				_logger.error("Unknown host for FTP.", ex);
-
-				throw new ConfigurationException(ex);
-			}
-			catch (IOException ex)
-			{
-				_logger.error("Caught IOException", ex);
-				
-				throw new RemoteFileSystemException(ex);
-			}
-			catch (FTPException ex)
-			{
-				_logger.error("Caught FTPException.", ex);
-
-				throw new RemoteFileSystemException(ex);
-			}
-
-			try
-			{
-				m_oConn.setRemotePort(m_iPort);
-
-				m_oConn.connect();
-				for (int i1 = 0; i1 < 10 && !m_oConn.connected(); i1++)
-				{
-					try
-					{
-						Thread.sleep(200); // TODO arbitrary MAGIC number!
-					}
-					catch (InterruptedException ex)
-					{
-					}
-				}
-
-				// Configurable?
-				if (!m_oConn.connected())
-					throw new RemoteFileSystemException(
-							"Can't connect to FTP server");
-				m_oConn.user(m_sUser);
-				m_oConn.password(m_sPasswd);
-				m_oConn
-						.setConnectMode((m_bPassive) ? FTPConnectMode.PASV : FTPConnectMode.ACTIVE);
-				m_oConn.setType(m_oXferType);
-			}
-			catch (IOException ex)
-			{
-				throw new RemoteFileSystemException(ex);
-			}
-			catch (FTPException ex)
-			{
-				_logger.error("Caught FTPException.", ex);
-
-				throw new RemoteFileSystemException(ex);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#quit()
-	 */
-	public void quit ()
-	{
-		if (null != m_oConn)
-		{
-			try
-			{
-				m_oConn.quit();
-			}
-			catch (Exception e)
-			{
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#remoteDelete(java.io.File)
-	 */
-	public void remoteDelete (File p_oFile) throws RemoteFileSystemException
-	{
-		try
-		{
-			m_oConn.delete(getRemoteDir() + "/" + p_oFile.getName());
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#remoteRename(java.io.File,
-	 *      java.io.File)
-	 */
-	public void remoteRename (File p_oFrom, File p_oTo) throws RemoteFileSystemException
-	{
-		try
-		{
-			m_oConn.rename(FtpClientUtil.fileToFtpString(p_oFrom), FtpUtils
-					.fileToFtpString(p_oTo));
-		}
-		catch (FTPException ex)
-		{
-			if (ex.getReplyCode() == 550) // EdtFtp error code meaning File
-			// Not Found
-			{
-				_logger
-						.debug("EdtFtpImpl tried to rename file that had moved.");
-
-				throw new RemoteFileSystemException("File not found.");
-			}
-			else
-			{
-				_logger.error("Caught FTPException.", ex);
-
-				throw new RemoteFileSystemException(ex);
-			}
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-
-			String sMess = this.getClass().getSimpleName() + " can't rename in remote directory <" + e
-					.getMessage() + ">";
-			throw new RemoteFileSystemException(sMess);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#renameInRemoteDir(java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void renameInRemoteDir (String p_sFrom, String p_sTo)
-			throws RemoteFileSystemException
-	{
-		String sRmtFrom = new File(p_sFrom).getName();
-		String sRmtTo = new File(p_sTo).getName();
-
-		try
-		{
-			m_oConn.rename(getRemoteDir() + "/" + sRmtFrom,
-					getRemoteDir() + "/" + sRmtTo);
-		}
-		catch (Exception e)
-		{
-			String sMess = this.getClass().getSimpleName() + " can't rename in remote directory <" + e
-					.getMessage() + ">";
-			throw new RemoteFileSystemException(sMess);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#setRemoteDir(java.lang.String)
-	 */
-	public void setRemoteDir (String p_sDir) throws RemoteFileSystemException
-	{
-		if (p_sDir == null)
-			throw new IllegalArgumentException();
-		
-		try
-		{
-			m_oConn.chdir(p_sDir);
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#uploadFile(java.io.File,
-	 *      java.lang.String)
-	 */
-	public void uploadFile (File p_oFile, String p_sRemoteName)
-			throws RemoteFileSystemException
-	{
-		String sRemoteOK = getRemoteDir() + "/" + p_sRemoteName;
-		String sRemoteTmp = sRemoteOK + TMP_SUFFIX;
-
-		try
-		{
-			m_oConn.put(FtpUtils.fileToFtpString(p_oFile), sRemoteTmp);
-			m_oConn.rename(sRemoteTmp, sRemoteOK);
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-}
+/*
+ * 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.internal.soa.esb.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.FTPEpr;
+import org.jboss.soa.esb.addressing.eprs.FileEpr;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.KeyValuePair;
+import org.jboss.soa.esb.util.FtpClientUtil;
+import org.jboss.soa.esb.util.RemoteFileSystem;
+import org.jboss.soa.esb.util.RemoteFileSystemException;
+
+import com.enterprisedt.net.ftp.FTPClient;
+import com.enterprisedt.net.ftp.FTPConnectMode;
+import com.enterprisedt.net.ftp.FTPException;
+import com.enterprisedt.net.ftp.FTPTransferType;
+
+/**
+ * Simplified FTP transfers
+ * <p>
+ * Description: Implements a simple set of FTP functionality Parameters to
+ * establish the FTP connection are provided at construction time and cannot
+ * change during the lifetime of the object <br/>Hides low level details.
+ * Current implementation is based on the "Entreprise Distributed Technology
+ * edtFTPj" library but this can be changed with no impact to existing code,
+ * just by changing this class without modifying the signature of it's public
+ * methods
+ * </p>
+ */
+
+public class EdtFtpImpl implements RemoteFileSystem
+{
+
+	private static final Logger _logger = Logger.getLogger(EdtFtpImpl.class);
+
+	private static final String TMP_SUFFIX = ".rosettaPart";
+
+	private boolean m_bPassive;
+
+	private int m_iPort;
+
+	private FTPClient m_oConn = new FTPClient();
+
+	private FTPEpr m_oEpr;
+
+	private ConfigTree m_oParms;
+
+	private FTPTransferType m_oXferType;
+
+	private String m_sFtpServer, m_sUser, m_sPasswd;
+
+	private String m_sRemoteDir, m_sLocalDir;
+
+	/**
+	 * Checks validity and completeness of parameters, and keeps the info
+	 * internally for subsequent FTP requests
+	 * 
+	 * @param p_oP
+	 *            ConfigTree
+	 * @throws ConfigurationException :
+	 *             if parameters are invalid or incomplete
+	 *             <li>Parameters: (XML attributes at the root level) </li>
+	 *             <li> ftpServer = name or IP of FTP server </li>
+	 *             <li> ftpUser = login ID for server </li>
+	 *             <li> ftpPassword </li>
+	 *             <li> localDirURI = absolute path in the local filesystem
+	 *             </li>
+	 *             <li> remoteDirURI = remote path is relative to ftp user home
+	 *             in remote computer </li>
+	 */
+
+	public EdtFtpImpl (ConfigTree p_oP, boolean p_bConnect)
+			throws ConfigurationException, RemoteFileSystemException
+	{
+		m_oParms = p_oP;
+		initialize(p_bConnect);
+	}
+
+	public EdtFtpImpl (FTPEpr p_oP, boolean p_bConnect)
+			throws ConfigurationException, RemoteFileSystemException
+	{
+		m_oEpr = p_oP;
+
+		URL url = null;
+		try
+		{
+			url = m_oEpr.getURL();
+		}
+		catch (MalformedURLException e)
+		{
+			throw new ConfigurationException(e);
+		}
+		catch (URISyntaxException e)
+		{
+			throw new ConfigurationException(e);
+		}
+
+		m_sFtpServer = url.getHost();
+
+		String[] sa = null;
+
+		if (url.getUserInfo() != null) sa = url.getUserInfo().split(":");
+
+		if (sa == null) sa = new String[] { "", "" };
+
+		m_sUser = (sa.length < 1) ? "" : sa[0];
+		m_sPasswd = (sa.length < 2) ? "" : sa[1];
+
+		m_sRemoteDir = url.getFile();
+
+		final String tmpdir = System.getProperty("java.io.tmpdir");
+		if ((m_sRemoteDir == null) || (m_sRemoteDir.equals("")))
+			m_sRemoteDir = ModulePropertyManager.getPropertyManager(
+					ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
+					Environment.FTP_REMOTEDIR, tmpdir);
+
+		m_iPort = url.getPort();
+		if (m_iPort < 0) m_iPort = url.getDefaultPort();
+
+		m_sLocalDir = ModulePropertyManager.getPropertyManager(
+				ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
+				Environment.FTP_LOCALDIR, tmpdir);
+
+		m_bPassive = false;
+
+		try
+		{
+			m_bPassive = m_oEpr.getPassive();
+		}
+		catch (URISyntaxException e)
+		{
+			_logger.warn(e);
+		}
+
+		// TODO there is still a bit of space for improvements here.
+		configTreeFromEpr();
+
+		initialize(p_bConnect);
+	}
+
+	public EdtFtpImpl (List<KeyValuePair> p_oAttribs, boolean p_bConnect)
+			throws ConfigurationException, RemoteFileSystemException
+	{
+		m_oParms = new ConfigTree("fromProps");
+		for (KeyValuePair oCurr : p_oAttribs)
+			m_oParms.setAttribute(oCurr.getKey(), oCurr.getValue());
+		initialize(p_bConnect);
+	}
+
+	private void checkParms () throws ConfigurationException
+	{
+		String att = m_oParms.getAttribute(FileEpr.URL_TAG);
+		URL url = null;
+		
+		try
+		{
+			if (att != null)
+				url = new URL(att);
+		}
+		catch (MalformedURLException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+		
+		m_sFtpServer = (null != url) ? url.getHost() : m_oParms
+				.getAttribute(PARMS_FTP_SERVER);
+		if (null == m_sFtpServer)
+			throw new ConfigurationException("No FTP server specified");
+
+		String[] sa = (null == url) ? null : url.getUserInfo().split(":");
+		m_sUser = (null != sa) ? sa[0] : m_oParms.getAttribute(PARMS_USER);
+		if (null == m_sUser)
+			throw new ConfigurationException("No username specified for FTP");
+
+		m_sPasswd = (null != sa) ? sa[1] : m_oParms.getAttribute(PARMS_PASSWD);
+		if (null == m_sPasswd)
+			throw new ConfigurationException("No password specified for FTP");
+
+		m_sRemoteDir = (null != url) ? url.getFile() : m_oParms
+				.getAttribute(PARMS_REMOTE_DIR);
+		if (null == m_sRemoteDir) m_sRemoteDir = "";
+
+		m_sLocalDir = m_oParms.getAttribute(PARMS_LOCAL_DIR);
+		if (null == m_sLocalDir) m_sLocalDir = ".";
+
+		String sAux = m_oParms.getAttribute(PARMS_PORT);
+		m_iPort = (null != url) ? url.getPort() : (null == sAux) ? 21 : Integer
+				.parseInt(sAux);
+		
+		try
+		{
+			if (m_iPort < 0)
+				m_iPort = new URL("ftp://").getDefaultPort();
+		}
+		catch (MalformedURLException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+
+		// Dec-2006 (b_georges): it has been decided to set the Type to binary.
+		m_oXferType = FTPTransferType.BINARY;
+
+		m_bPassive = false;
+		sAux = m_oParms.getAttribute(PARMS_PASSIVE);
+		m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
+
+		return;
+	}
+
+	private void configTreeFromEpr () throws RemoteFileSystemException
+	{
+		m_oParms = new ConfigTree("fromEpr");
+		try
+		{
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_FTP_SERVER,
+					m_sFtpServer);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_USER, m_sUser);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_PASSWD, m_sPasswd);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_REMOTE_DIR,
+					m_sRemoteDir);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_PORT, Integer
+					.toString(m_iPort));
+			m_oParms
+					.setAttribute(RemoteFileSystem.PARMS_LOCAL_DIR, m_sLocalDir);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_ASCII, Boolean
+					.toString(false));
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_PASSIVE, Boolean
+					.toString(m_bPassive));
+		}
+		catch (Exception e)
+		{
+			throw new RemoteFileSystemException(e);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#deleteRemoteFile(java.lang.String)
+	 */
+	public void deleteRemoteFile (String p_sFile) throws RemoteFileSystemException
+	{
+		try
+		{
+			m_oConn.delete(getRemoteDir() + "/" + new File(p_sFile).getName());
+		}
+		catch (Exception ex)
+		{
+			/*
+			 * It seems as though we have a race condition whereby one thread
+			 * tries to remove a file when another renames it!
+			 */
+			
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#downloadFile(java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void downloadFile (String p_sFile, String p_sFinalName)
+			throws IOException, RemoteFileSystemException
+	{
+		File oLocalDir = new File(m_sLocalDir);
+		File oLclFile = File.createTempFile("Rosetta_", TMP_SUFFIX, oLocalDir);
+
+		try
+		{
+			oLclFile.delete();
+		}
+		catch (Exception e)
+		{
+		}
+
+		try
+		{
+			m_oConn.get(FtpUtils.fileToFtpString(oLclFile), p_sFile);
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+
+		File oNew = new File(oLocalDir, p_sFinalName);
+		
+		if (oNew.exists()) 
+			oNew.delete();
+		
+		oLclFile.renameTo(oNew);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#getFileListFromRemoteDir(java.lang.String)
+	 */
+	public String[] getFileListFromRemoteDir (String p_sSuffix)
+			throws RemoteFileSystemException, IOException
+	{
+		String sSuffix = (null == p_sSuffix) ? "*" : "*" + p_sSuffix;
+
+		try
+		{
+			return m_oConn.dir(sSuffix);
+		}
+		catch (FTPException ex)
+		{
+			String msg = ex.getMessage();
+			int rc = ex.getReplyCode();
+			if (rc == 550) // means File Not Found - see JBESB-303
+			{
+				_logger
+						.debug("No matching file or directory. Server returns: [" + rc + "] " + msg);
+				return null;
+			}
+			else
+			{
+				// TODO Test with different FTP Servers
+				String sMess = this.getClass().getSimpleName() + " can't list " + sSuffix + " due to: [" + rc + "] " + msg;
+				throw new RemoteFileSystemException(sMess);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#getRemoteDir()
+	 */
+	public String getRemoteDir ()
+	{
+		return m_sRemoteDir;
+	}
+
+	private void initialize (boolean bConnect) throws ConfigurationException,
+			RemoteFileSystemException
+	{
+		checkParms();
+		if (bConnect)
+		{
+			try
+			{
+				m_oConn.setRemoteHost(m_sFtpServer);
+			}
+			catch (UnknownHostException ex)
+			{
+				_logger.error("Unknown host for FTP.", ex);
+
+				throw new ConfigurationException(ex);
+			}
+			catch (IOException ex)
+			{
+				_logger.error("Caught IOException", ex);
+				
+				throw new RemoteFileSystemException(ex);
+			}
+			catch (FTPException ex)
+			{
+				_logger.error("Caught FTPException.", ex);
+
+				throw new RemoteFileSystemException(ex);
+			}
+
+			try
+			{
+				m_oConn.setRemotePort(m_iPort);
+
+				m_oConn.connect();
+				for (int i1 = 0; i1 < 10 && !m_oConn.connected(); i1++)
+				{
+					try
+					{
+						Thread.sleep(200); // TODO arbitrary MAGIC number!
+					}
+					catch (InterruptedException ex)
+					{
+					}
+				}
+
+				// Configurable?
+				if (!m_oConn.connected())
+					throw new RemoteFileSystemException(
+							"Can't connect to FTP server");
+				m_oConn.user(m_sUser);
+				m_oConn.password(m_sPasswd);
+				m_oConn
+						.setConnectMode((m_bPassive) ? FTPConnectMode.PASV : FTPConnectMode.ACTIVE);
+				m_oConn.setType(m_oXferType);
+			}
+			catch (IOException ex)
+			{
+				throw new RemoteFileSystemException(ex);
+			}
+			catch (FTPException ex)
+			{
+				_logger.error("Caught FTPException.", ex);
+
+				throw new RemoteFileSystemException(ex);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#quit()
+	 */
+	public void quit ()
+	{
+		if (null != m_oConn)
+		{
+			try
+			{
+				m_oConn.quit();
+			}
+			catch (Exception e)
+			{
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#remoteDelete(java.io.File)
+	 */
+	public void remoteDelete (File p_oFile) throws RemoteFileSystemException
+	{
+		try
+		{
+			m_oConn.delete(getRemoteDir() + "/" + p_oFile.getName());
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#remoteRename(java.io.File,
+	 *      java.io.File)
+	 */
+	public void remoteRename (File p_oFrom, File p_oTo) throws RemoteFileSystemException
+	{
+		try
+		{
+			m_oConn.rename(FtpClientUtil.fileToFtpString(p_oFrom), FtpUtils
+					.fileToFtpString(p_oTo));
+		}
+		catch (FTPException ex)
+		{
+			if (ex.getReplyCode() == 550) // EdtFtp error code meaning File
+			// Not Found
+			{
+				_logger
+						.debug("EdtFtpImpl tried to rename file that had moved.");
+
+				throw new RemoteFileSystemException("File not found.");
+			}
+			else
+			{
+				_logger.error("Caught FTPException.", ex);
+
+				throw new RemoteFileSystemException(ex);
+			}
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+
+			String sMess = this.getClass().getSimpleName() + " can't rename in remote directory <" + e
+					.getMessage() + ">";
+			throw new RemoteFileSystemException(sMess);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#renameInRemoteDir(java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void renameInRemoteDir (String p_sFrom, String p_sTo)
+			throws RemoteFileSystemException
+	{
+		String sRmtFrom = new File(p_sFrom).getName();
+		String sRmtTo = new File(p_sTo).getName();
+
+		try
+		{
+			m_oConn.rename(getRemoteDir() + "/" + sRmtFrom,
+					getRemoteDir() + "/" + sRmtTo);
+		}
+		catch (Exception e)
+		{
+			String sMess = this.getClass().getSimpleName() + " can't rename in remote directory <" + e
+					.getMessage() + ">";
+			throw new RemoteFileSystemException(sMess);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#setRemoteDir(java.lang.String)
+	 */
+	public void setRemoteDir (String p_sDir) throws RemoteFileSystemException
+	{
+		if (p_sDir == null)
+			throw new IllegalArgumentException();
+		
+		try
+		{
+			m_oConn.chdir(p_sDir);
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#uploadFile(java.io.File,
+	 *      java.lang.String)
+	 */
+	public void uploadFile (File p_oFile, String p_sRemoteName)
+			throws RemoteFileSystemException
+	{
+		String sRemoteOK = getRemoteDir() + "/" + p_sRemoteName;
+		String sRemoteTmp = sRemoteOK + TMP_SUFFIX;
+
+		try
+		{
+			m_oConn.put(FtpUtils.fileToFtpString(p_oFile), sRemoteTmp);
+			m_oConn.rename(sRemoteTmp, sRemoteOK);
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/EdtFtpImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/FtpUtils.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/FtpUtils.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/FtpUtils.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,42 +1,42 @@
-/*
- * 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.internal.soa.esb.util;
-
-import java.io.File;
-
-/**
- * Ftp handling utilities.
- * @author b_georges
- */
-public class FtpUtils {
-
-	/**
-	 * Transforms File path to FTP path
-	 * @param p_oF The file to transform
-	 * @return The modified path
-	 */
-	public static String fileToFtpString(File p_oF)
-	{
-		return (null == p_oF) ? null : p_oF.toString().replace("\\", "/");
-	}
-	
-}
+/*
+ * 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.internal.soa.esb.util;
+
+import java.io.File;
+
+/**
+ * Ftp handling utilities.
+ * @author b_georges
+ */
+public class FtpUtils {
+
+	/**
+	 * Transforms File path to FTP path
+	 * @param p_oF The file to transform
+	 * @return The modified path
+	 */
+	public static String fileToFtpString(File p_oF)
+	{
+		return (null == p_oF) ? null : p_oF.toString().replace("\\", "/");
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/FtpUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,586 +1,586 @@
-/*
- * 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.internal.soa.esb.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.util.RemoteFileSystem;
-import org.jboss.soa.esb.util.RemoteFileSystemException;
-
-import com.jcraft.jsch.Channel;
-import com.jcraft.jsch.ChannelSftp;
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.SftpATTRS;
-import com.jcraft.jsch.SftpException;
-import com.jcraft.jsch.UserInfo;
-import com.jcraft.jsch.ChannelSftp.LsEntry;
-
-/**
- * 
- * Implementation of sftp (Secure FTP over SSH) Based on JSch from JCraft
- * http://www.jcraft.com/
- * 
- * @author b_georges
- * 
- */
-
-public class SecureFtpImpl implements RemoteFileSystem 
-{
-
-	private static final Logger _logger = Logger.getLogger(SecureFtpImpl.class);
-
-	private static final String TMP_SUFFIX = ".rosettaPart";
-
-	private static final String SECURE_CHANNEL = "sftp";
-
-	// The objects implementing secure FTP over ssh
-	private JSch m_oJSch = new JSch();
-
-	private Session session = null;
-
-	private Channel m_oChannel = null;
-
-	private ChannelSftp m_oSftpChannel = null;
-
-	// TODO Add support for certificate. Not for GA though.
-	private URL m_oCertificate = null;
-
-	@SuppressWarnings("unused")
-	private boolean m_bConnected, m_bPassive;
-
-	private int m_iPort;
-
-	private SFTPEpr m_oEpr;
-
-	private ConfigTree m_oParms;
-
-	private String m_sFtpServer, m_sUser, m_sPasswd;
-
-	private String m_sRemoteDir, m_sLocalDir;
-
-	/*
-	 * Constructor
-	 * 
-	 * @param p_oP Is a config treeThe used to initialize the object
-	 * 
-	 * @param connect If true create a new sftp session
-	 * 
-	 */
-	public SecureFtpImpl(ConfigTree p_oP, boolean p_bConnect) throws ConfigurationException, RemoteFileSystemException
-	{
-		m_oParms = p_oP;
-		initialize(p_bConnect);
-	}
-
-	/*
-	 * Constructor
-	 * 
-	 * @param p_oP Is an EPR used to initialize the object
-	 * 
-	 * @param connect If true create a new sftp session
-	 * 
-	 */
-	public SecureFtpImpl(SFTPEpr p_oP, boolean p_bConnect) throws ConfigurationException, RemoteFileSystemException 
-	{
-
-		m_oEpr = p_oP;
-
-		URL url = null;
-		try {
-			url = m_oEpr.getURL();
-		} catch (MalformedURLException e) {
-			throw new RemoteFileSystemException(e);
-		} catch (URISyntaxException e) {
-			throw new RemoteFileSystemException(e);
-		}
-
-		m_sFtpServer = url.getHost();
-
-		String[] sa = null;
-
-		if (url.getUserInfo() != null)
-			sa = url.getUserInfo().split(":");
-
-		if (sa == null)
-			sa = new String[] { "", "" };
-
-		m_sUser = (sa.length < 1) ? "" : sa[0];
-		m_sPasswd = (sa.length < 2) ? "" : sa[1];
-
-		m_sRemoteDir = url.getFile();
-
-		final String tmpdir = System.getProperty("java.io.tmpdir");
-		if ((m_sRemoteDir == null) || (m_sRemoteDir.equals("")))
-			m_sRemoteDir = ModulePropertyManager.getPropertyManager(
-					ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
-							Environment.FTP_REMOTEDIR, tmpdir);
-
-		m_iPort = url.getPort();
-		if (m_iPort < 0)
-			m_iPort = url.getDefaultPort();
-
-		m_sLocalDir = ModulePropertyManager.getPropertyManager(
-				ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
-						Environment.FTP_LOCALDIR, tmpdir);
-
-		m_bPassive = false;
-
-		try
-		{
-			m_bPassive = m_oEpr.getPassive();
-		} catch (URISyntaxException e) 
-		{
-			_logger.warn(e);
-		}
-
-		try
-		{
-			m_oCertificate = m_oEpr.getCertificateURL();
-		} 
-		catch (MalformedURLException ex)
-		{
-			_logger.error(ex);
-			
-			throw new ConfigurationException(ex);
-		}
-		catch (URISyntaxException e) 
-		{
-			_logger.warn(e);
-			
-			throw new ConfigurationException(e);
-		}
-
-		// TODO there is still a bit of space for improvements here.
-		configTreeFromEpr();
-
-		initialize(p_bConnect);
-	}
-
-	/*
-	 * Constructor
-	 * 
-	 * @param attribs The key/value pairs used to initialize the object
-	 * 
-	 * @param connect If true create a new sftp session using attribs
-	 * 
-	 */
-	public SecureFtpImpl(List<KeyValuePair> attribs, boolean connect)
-	throws ConfigurationException, RemoteFileSystemException 
-	{
-		m_oParms = new ConfigTree("fromProps");
-		for (KeyValuePair oCurr : attribs)
-			m_oParms.setAttribute(oCurr.getKey(), oCurr.getValue());
-		initialize(connect);
-	}
-
-	private void initialize(boolean bConnect) throws ConfigurationException, RemoteFileSystemException
-	{
-		checkParms();
-		
-		if (bConnect) 
-		{
-			try
-			{
-				session = m_oJSch.getSession(m_sUser, m_sFtpServer, m_iPort);
-	
-				UserInfo ui = new SecureFtpUserInfo(m_sPasswd);
-				session.setUserInfo(ui);
-	
-				session.connect();
-	
-				m_oChannel = session.openChannel(SECURE_CHANNEL);
-	
-				m_oChannel.connect();
-	
-				m_oSftpChannel = (ChannelSftp) m_oChannel;
-	
-				for (int i1 = 0; i1 < 10 && !session.isConnected(); i1++)
-				{
-					try
-					{
-						Thread.sleep(200);  // TODO magic number
-					}
-					catch (InterruptedException ex)
-					{
-						// try again?
-					}
-				}
-				
-				if (!session.isConnected())
-					throw new RemoteFileSystemException("Can't connect to FTP server");
-	
-				m_bConnected = this.session.isConnected();
-			}
-			catch (JSchException ex)
-			{
-				_logger.error("Caught Secure FTP Exception.", ex);
-				
-				throw new RemoteFileSystemException(ex);
-			}
-		}
-		// TODO set connection Mode [PASSIVE|ACTIVE]using m_bPassive ?
-
-	}
-
-	private void checkParms() throws ConfigurationException 
-	{
-		m_sFtpServer = m_oParms.getAttribute(PARMS_FTP_SERVER);
-		if (null == m_sFtpServer)
-			throw new ConfigurationException("No SFTP server specified");
-
-		m_sUser = m_oParms.getAttribute(PARMS_USER);
-		if (null == m_sUser)
-			throw new ConfigurationException("No username specified for SFTP");
-
-		m_sPasswd = m_oParms.getAttribute(PARMS_PASSWD);
-		if (null == m_sPasswd)
-			throw new ConfigurationException("No password specified for SFTP");
-
-		m_sRemoteDir = m_oParms.getAttribute(PARMS_REMOTE_DIR);
-		if (null == m_sRemoteDir)
-			m_sRemoteDir = "";
-
-		m_sLocalDir = m_oParms.getAttribute(PARMS_LOCAL_DIR);
-		if (null == m_sLocalDir)
-			m_sLocalDir = ".";
-
-		String sAux = m_oParms.getAttribute(PARMS_PORT);
-		
-		try
-		{
-			m_iPort = (null == sAux) ? 22 : Integer.parseInt(sAux);
-		}
-		catch (Exception ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-
-		m_bPassive = false;
-		sAux = m_oParms.getAttribute(PARMS_PASSIVE);
-		m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
-
-		final String certificate = m_oParms.getAttribute(PARMS_CERTIFICATE) ;
-		
-		if (certificate != null)
-		{
-			try
-			{
-				m_oCertificate = new URL(certificate);
-			}
-			catch (MalformedURLException ex)
-			{
-				throw new ConfigurationException(ex);
-			}
-		}
-	}
-
-	/*
-	 * Deletes a file on the SFTP-Server
-	 * 
-	 * @param fileName The file's Name to be removed from the SFTP-Server
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#deleteRemoteFile(java.lang.String)
-	 */
-	public void deleteRemoteFile(String p_sFile) throws RemoteFileSystemException 
-	{
-		try
-		{
-			m_oSftpChannel.rm(getRemoteDir() + "/" + new File(p_sFile).getName());
-		}
-		catch (SftpException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * Deletes a file on the SFTP-Server
-	 * 
-	 * @param fileName The file to be removed from the SFTP-Server
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#remoteDelete(java.io.File)
-	 */
-	public void remoteDelete(File p_oFile) throws RemoteFileSystemException 
-	{
-		try
-		{
-			m_oSftpChannel.rm(FtpUtils.fileToFtpString(p_oFile));
-		}
-		catch (SftpException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * Returns a list of Filenames for the directory specified in p_Suffix
-	 * 
-	 * @param p_sSuffix The remote directory path from the SFTP-Server
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#getFileListFromRemoteDir(java.lang.String)
-	 */
-	public String[] getFileListFromRemoteDir(String p_sSuffix) throws RemoteFileSystemException 
-	{
-		try
-		{
-			String sSuffix = (null == p_sSuffix) ? "*" : "*" + p_sSuffix;
-			List<String> lFileList = new ArrayList<String>();
-			Vector vFileList = m_oSftpChannel.ls(sSuffix);
-			
-			if (vFileList != null) 
-			{
-				for (int i = 0; i < vFileList.size(); i++) 
-				{
-					Object obj = vFileList.elementAt(i);
-					
-					if (obj instanceof LsEntry) 
-					{
-						SftpATTRS oSftAttr = ((LsEntry) obj).getAttrs();
-						if (!oSftAttr.isDir()) 
-						{
-							lFileList.add(((LsEntry) obj).getFilename());
-						}
-					}
-				}
-			}
-			
-			return (String[]) lFileList.toArray(new String[lFileList.size()]);
-		}
-		catch (SftpException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * Set the new directory to p_SDir
-	 * 
-	 * @param p_sDir The remote directory path name we want to "cd" to.
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#setRemoteDir(java.lang.String)
-	 */
-	public void setRemoteDir(String p_sDir) throws RemoteFileSystemException 
-	{
-		try
-		{
-			m_oSftpChannel.cd(p_sDir);
-		}
-		catch (SftpException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * Rename the Remote Directory name p_sFrom with p_sTo
-	 * 
-	 * @param p_sFrom The remote directory name we want to rename
-	 * 
-	 * @param p_sTo The new remote directory name
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#renameInRemoteDir(java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void renameInRemoteDir(String p_sFrom, String p_sTo)
-	throws RemoteFileSystemException 
-	{
-
-		String sRmtFrom = new File(p_sFrom).getName();
-		String sRmtTo = new File(p_sTo).getName();
-
-		try 
-		{
-			m_oSftpChannel.rename(getRemoteDir() + "/" + sRmtFrom,
-					getRemoteDir() + "/" + sRmtTo);
-		} 
-		catch (Exception e) 
-		{
-			String sMess = this.getClass().getSimpleName()
-			+ " can't rename in remote directory <" + e.getMessage()
-			+ ">";
-			throw new RemoteFileSystemException(sMess);
-		}
-	}
-
-	/*
-	 * Rename the Remote File name p_sFrom with p_sTo
-	 * 
-	 * @param p_oFrom The remote file name we want to rename
-	 * 
-	 * @param p_oTo The new remote file name
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#remoteRename(java.io.File,
-	 *      java.io.File)
-	 */
-	public void remoteRename(File p_oFrom, File p_oTo) throws RemoteFileSystemException 
-	{
-		try 
-		{
-			m_oSftpChannel.rename(FtpUtils.fileToFtpString(p_oFrom), FtpUtils
-					.fileToFtpString(p_oTo));
-		} 
-		catch (Exception e) 
-		{
-			String sMess = this.getClass().getSimpleName()
-			+ " can't rename in remote directory <" + e.getMessage()
-			+ ">";
-			throw new RemoteFileSystemException(sMess);
-		}
-	}
-
-	/*
-	 * Upload the local File p_ofile to p_sRemoteName
-	 * 
-	 * @param p_oFile The local file name we want to upload
-	 * 
-	 * @param p_sRemoteName The remote file name [can be the same as p_oFile of
-	 * course]
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#uploadFile(java.io.File,
-	 *      java.lang.String)
-	 */
-	public void uploadFile(File p_oFile, String p_sRemoteName) throws RemoteFileSystemException 
-	{
-		try
-		{
-			String sRemoteOK = getRemoteDir() + "/" + p_sRemoteName;
-			String sRemoteTmp = sRemoteOK + TMP_SUFFIX;
-			m_oSftpChannel.put(FtpUtils.fileToFtpString(p_oFile), sRemoteTmp);
-			m_oSftpChannel.rename(sRemoteTmp, sRemoteOK);
-		}
-		catch (SftpException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * Download the remote File p_sFile to p_sFile.
-	 * 
-	 * @param p_sFile The remote file name we want to download
-	 * 
-	 * @param p_sFinalName The local file name
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#downloadFile(java.lang.String,
-	 *      java.lang.String)
-	 */
-	public void downloadFile(String p_sFile, String p_sFinalName) throws IOException, RemoteFileSystemException 
-	{
-		File oLocalDir = new File(m_sLocalDir);
-		File oLclFile = File.createTempFile("Rosetta_", TMP_SUFFIX, oLocalDir);
-
-		try 
-		{
-			oLclFile.delete();
-		} 
-		catch (Exception e) 
-		{
-			_logger.warn("Could not delete file: "+oLclFile, e);
-		}
-		// TODO check if we have to set the Transfer Type with JSch impl =>
-		// m_oXferType
-		
-		try
-		{
-			m_oSftpChannel.get(p_sFile, FtpUtils.fileToFtpString(oLclFile));
-	
-			File oNew = new File(oLocalDir, p_sFinalName);
-			if (oNew.exists())
-				oNew.delete();
-			oLclFile.renameTo(oNew);
-		}
-		catch (Exception ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	}
-
-	/*
-	 * Returns the current remote directory
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#getRemoteDir()
-	 */
-	public String getRemoteDir() 
-	{
-		return m_sRemoteDir;
-	}
-
-	/*
-	 * Terminates the sftp session.
-	 * 
-	 * @see org.jboss.soa.esb.util.RemoteFileSystem#quit()
-	 */
-	public void quit() 
-	{
-		m_oSftpChannel.quit();
-	}
-
-	private void configTreeFromEpr() throws ConfigurationException 
-	{
-		m_oParms = new ConfigTree("fromEpr");
-		try 
-		{
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_FTP_SERVER,
-					m_sFtpServer);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_USER, m_sUser);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_PASSWD, m_sPasswd);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_REMOTE_DIR,
-					m_sRemoteDir);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_PORT, Integer
-					.toString(m_iPort));
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_LOCAL_DIR, m_sLocalDir);
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_ASCII, Boolean
-					.toString(false));
-			m_oParms.setAttribute(RemoteFileSystem.PARMS_PASSIVE, Boolean
-					.toString(m_bPassive));
-			if (m_oCertificate != null)
-			{
-				m_oParms.setAttribute(RemoteFileSystem.PARMS_CERTIFICATE, m_oCertificate.toString());
-			}
-		} 
-		catch (Exception e) 
-		{
-			throw new ConfigurationException(e);
-		}
-	}
-
-}
+/*
+ * 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.internal.soa.esb.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Vector;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.KeyValuePair;
+import org.jboss.soa.esb.util.RemoteFileSystem;
+import org.jboss.soa.esb.util.RemoteFileSystemException;
+
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.SftpATTRS;
+import com.jcraft.jsch.SftpException;
+import com.jcraft.jsch.UserInfo;
+import com.jcraft.jsch.ChannelSftp.LsEntry;
+
+/**
+ * 
+ * Implementation of sftp (Secure FTP over SSH) Based on JSch from JCraft
+ * http://www.jcraft.com/
+ * 
+ * @author b_georges
+ * 
+ */
+
+public class SecureFtpImpl implements RemoteFileSystem 
+{
+
+	private static final Logger _logger = Logger.getLogger(SecureFtpImpl.class);
+
+	private static final String TMP_SUFFIX = ".rosettaPart";
+
+	private static final String SECURE_CHANNEL = "sftp";
+
+	// The objects implementing secure FTP over ssh
+	private JSch m_oJSch = new JSch();
+
+	private Session session = null;
+
+	private Channel m_oChannel = null;
+
+	private ChannelSftp m_oSftpChannel = null;
+
+	// TODO Add support for certificate. Not for GA though.
+	private URL m_oCertificate = null;
+
+	@SuppressWarnings("unused")
+	private boolean m_bConnected, m_bPassive;
+
+	private int m_iPort;
+
+	private SFTPEpr m_oEpr;
+
+	private ConfigTree m_oParms;
+
+	private String m_sFtpServer, m_sUser, m_sPasswd;
+
+	private String m_sRemoteDir, m_sLocalDir;
+
+	/*
+	 * Constructor
+	 * 
+	 * @param p_oP Is a config treeThe used to initialize the object
+	 * 
+	 * @param connect If true create a new sftp session
+	 * 
+	 */
+	public SecureFtpImpl(ConfigTree p_oP, boolean p_bConnect) throws ConfigurationException, RemoteFileSystemException
+	{
+		m_oParms = p_oP;
+		initialize(p_bConnect);
+	}
+
+	/*
+	 * Constructor
+	 * 
+	 * @param p_oP Is an EPR used to initialize the object
+	 * 
+	 * @param connect If true create a new sftp session
+	 * 
+	 */
+	public SecureFtpImpl(SFTPEpr p_oP, boolean p_bConnect) throws ConfigurationException, RemoteFileSystemException 
+	{
+
+		m_oEpr = p_oP;
+
+		URL url = null;
+		try {
+			url = m_oEpr.getURL();
+		} catch (MalformedURLException e) {
+			throw new RemoteFileSystemException(e);
+		} catch (URISyntaxException e) {
+			throw new RemoteFileSystemException(e);
+		}
+
+		m_sFtpServer = url.getHost();
+
+		String[] sa = null;
+
+		if (url.getUserInfo() != null)
+			sa = url.getUserInfo().split(":");
+
+		if (sa == null)
+			sa = new String[] { "", "" };
+
+		m_sUser = (sa.length < 1) ? "" : sa[0];
+		m_sPasswd = (sa.length < 2) ? "" : sa[1];
+
+		m_sRemoteDir = url.getFile();
+
+		final String tmpdir = System.getProperty("java.io.tmpdir");
+		if ((m_sRemoteDir == null) || (m_sRemoteDir.equals("")))
+			m_sRemoteDir = ModulePropertyManager.getPropertyManager(
+					ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
+							Environment.FTP_REMOTEDIR, tmpdir);
+
+		m_iPort = url.getPort();
+		if (m_iPort < 0)
+			m_iPort = url.getDefaultPort();
+
+		m_sLocalDir = ModulePropertyManager.getPropertyManager(
+				ModulePropertyManager.TRANSPORTS_MODULE).getProperty(
+						Environment.FTP_LOCALDIR, tmpdir);
+
+		m_bPassive = false;
+
+		try
+		{
+			m_bPassive = m_oEpr.getPassive();
+		} catch (URISyntaxException e) 
+		{
+			_logger.warn(e);
+		}
+
+		try
+		{
+			m_oCertificate = m_oEpr.getCertificateURL();
+		} 
+		catch (MalformedURLException ex)
+		{
+			_logger.error(ex);
+			
+			throw new ConfigurationException(ex);
+		}
+		catch (URISyntaxException e) 
+		{
+			_logger.warn(e);
+			
+			throw new ConfigurationException(e);
+		}
+
+		// TODO there is still a bit of space for improvements here.
+		configTreeFromEpr();
+
+		initialize(p_bConnect);
+	}
+
+	/*
+	 * Constructor
+	 * 
+	 * @param attribs The key/value pairs used to initialize the object
+	 * 
+	 * @param connect If true create a new sftp session using attribs
+	 * 
+	 */
+	public SecureFtpImpl(List<KeyValuePair> attribs, boolean connect)
+	throws ConfigurationException, RemoteFileSystemException 
+	{
+		m_oParms = new ConfigTree("fromProps");
+		for (KeyValuePair oCurr : attribs)
+			m_oParms.setAttribute(oCurr.getKey(), oCurr.getValue());
+		initialize(connect);
+	}
+
+	private void initialize(boolean bConnect) throws ConfigurationException, RemoteFileSystemException
+	{
+		checkParms();
+		
+		if (bConnect) 
+		{
+			try
+			{
+				session = m_oJSch.getSession(m_sUser, m_sFtpServer, m_iPort);
+	
+				UserInfo ui = new SecureFtpUserInfo(m_sPasswd);
+				session.setUserInfo(ui);
+	
+				session.connect();
+	
+				m_oChannel = session.openChannel(SECURE_CHANNEL);
+	
+				m_oChannel.connect();
+	
+				m_oSftpChannel = (ChannelSftp) m_oChannel;
+	
+				for (int i1 = 0; i1 < 10 && !session.isConnected(); i1++)
+				{
+					try
+					{
+						Thread.sleep(200);  // TODO magic number
+					}
+					catch (InterruptedException ex)
+					{
+						// try again?
+					}
+				}
+				
+				if (!session.isConnected())
+					throw new RemoteFileSystemException("Can't connect to FTP server");
+	
+				m_bConnected = this.session.isConnected();
+			}
+			catch (JSchException ex)
+			{
+				_logger.error("Caught Secure FTP Exception.", ex);
+				
+				throw new RemoteFileSystemException(ex);
+			}
+		}
+		// TODO set connection Mode [PASSIVE|ACTIVE]using m_bPassive ?
+
+	}
+
+	private void checkParms() throws ConfigurationException 
+	{
+		m_sFtpServer = m_oParms.getAttribute(PARMS_FTP_SERVER);
+		if (null == m_sFtpServer)
+			throw new ConfigurationException("No SFTP server specified");
+
+		m_sUser = m_oParms.getAttribute(PARMS_USER);
+		if (null == m_sUser)
+			throw new ConfigurationException("No username specified for SFTP");
+
+		m_sPasswd = m_oParms.getAttribute(PARMS_PASSWD);
+		if (null == m_sPasswd)
+			throw new ConfigurationException("No password specified for SFTP");
+
+		m_sRemoteDir = m_oParms.getAttribute(PARMS_REMOTE_DIR);
+		if (null == m_sRemoteDir)
+			m_sRemoteDir = "";
+
+		m_sLocalDir = m_oParms.getAttribute(PARMS_LOCAL_DIR);
+		if (null == m_sLocalDir)
+			m_sLocalDir = ".";
+
+		String sAux = m_oParms.getAttribute(PARMS_PORT);
+		
+		try
+		{
+			m_iPort = (null == sAux) ? 22 : Integer.parseInt(sAux);
+		}
+		catch (Exception ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+
+		m_bPassive = false;
+		sAux = m_oParms.getAttribute(PARMS_PASSIVE);
+		m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
+
+		final String certificate = m_oParms.getAttribute(PARMS_CERTIFICATE) ;
+		
+		if (certificate != null)
+		{
+			try
+			{
+				m_oCertificate = new URL(certificate);
+			}
+			catch (MalformedURLException ex)
+			{
+				throw new ConfigurationException(ex);
+			}
+		}
+	}
+
+	/*
+	 * Deletes a file on the SFTP-Server
+	 * 
+	 * @param fileName The file's Name to be removed from the SFTP-Server
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#deleteRemoteFile(java.lang.String)
+	 */
+	public void deleteRemoteFile(String p_sFile) throws RemoteFileSystemException 
+	{
+		try
+		{
+			m_oSftpChannel.rm(getRemoteDir() + "/" + new File(p_sFile).getName());
+		}
+		catch (SftpException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * Deletes a file on the SFTP-Server
+	 * 
+	 * @param fileName The file to be removed from the SFTP-Server
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#remoteDelete(java.io.File)
+	 */
+	public void remoteDelete(File p_oFile) throws RemoteFileSystemException 
+	{
+		try
+		{
+			m_oSftpChannel.rm(FtpUtils.fileToFtpString(p_oFile));
+		}
+		catch (SftpException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * Returns a list of Filenames for the directory specified in p_Suffix
+	 * 
+	 * @param p_sSuffix The remote directory path from the SFTP-Server
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#getFileListFromRemoteDir(java.lang.String)
+	 */
+	public String[] getFileListFromRemoteDir(String p_sSuffix) throws RemoteFileSystemException 
+	{
+		try
+		{
+			String sSuffix = (null == p_sSuffix) ? "*" : "*" + p_sSuffix;
+			List<String> lFileList = new ArrayList<String>();
+			Vector vFileList = m_oSftpChannel.ls(sSuffix);
+			
+			if (vFileList != null) 
+			{
+				for (int i = 0; i < vFileList.size(); i++) 
+				{
+					Object obj = vFileList.elementAt(i);
+					
+					if (obj instanceof LsEntry) 
+					{
+						SftpATTRS oSftAttr = ((LsEntry) obj).getAttrs();
+						if (!oSftAttr.isDir()) 
+						{
+							lFileList.add(((LsEntry) obj).getFilename());
+						}
+					}
+				}
+			}
+			
+			return (String[]) lFileList.toArray(new String[lFileList.size()]);
+		}
+		catch (SftpException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * Set the new directory to p_SDir
+	 * 
+	 * @param p_sDir The remote directory path name we want to "cd" to.
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#setRemoteDir(java.lang.String)
+	 */
+	public void setRemoteDir(String p_sDir) throws RemoteFileSystemException 
+	{
+		try
+		{
+			m_oSftpChannel.cd(p_sDir);
+		}
+		catch (SftpException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * Rename the Remote Directory name p_sFrom with p_sTo
+	 * 
+	 * @param p_sFrom The remote directory name we want to rename
+	 * 
+	 * @param p_sTo The new remote directory name
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#renameInRemoteDir(java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void renameInRemoteDir(String p_sFrom, String p_sTo)
+	throws RemoteFileSystemException 
+	{
+
+		String sRmtFrom = new File(p_sFrom).getName();
+		String sRmtTo = new File(p_sTo).getName();
+
+		try 
+		{
+			m_oSftpChannel.rename(getRemoteDir() + "/" + sRmtFrom,
+					getRemoteDir() + "/" + sRmtTo);
+		} 
+		catch (Exception e) 
+		{
+			String sMess = this.getClass().getSimpleName()
+			+ " can't rename in remote directory <" + e.getMessage()
+			+ ">";
+			throw new RemoteFileSystemException(sMess);
+		}
+	}
+
+	/*
+	 * Rename the Remote File name p_sFrom with p_sTo
+	 * 
+	 * @param p_oFrom The remote file name we want to rename
+	 * 
+	 * @param p_oTo The new remote file name
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#remoteRename(java.io.File,
+	 *      java.io.File)
+	 */
+	public void remoteRename(File p_oFrom, File p_oTo) throws RemoteFileSystemException 
+	{
+		try 
+		{
+			m_oSftpChannel.rename(FtpUtils.fileToFtpString(p_oFrom), FtpUtils
+					.fileToFtpString(p_oTo));
+		} 
+		catch (Exception e) 
+		{
+			String sMess = this.getClass().getSimpleName()
+			+ " can't rename in remote directory <" + e.getMessage()
+			+ ">";
+			throw new RemoteFileSystemException(sMess);
+		}
+	}
+
+	/*
+	 * Upload the local File p_ofile to p_sRemoteName
+	 * 
+	 * @param p_oFile The local file name we want to upload
+	 * 
+	 * @param p_sRemoteName The remote file name [can be the same as p_oFile of
+	 * course]
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#uploadFile(java.io.File,
+	 *      java.lang.String)
+	 */
+	public void uploadFile(File p_oFile, String p_sRemoteName) throws RemoteFileSystemException 
+	{
+		try
+		{
+			String sRemoteOK = getRemoteDir() + "/" + p_sRemoteName;
+			String sRemoteTmp = sRemoteOK + TMP_SUFFIX;
+			m_oSftpChannel.put(FtpUtils.fileToFtpString(p_oFile), sRemoteTmp);
+			m_oSftpChannel.rename(sRemoteTmp, sRemoteOK);
+		}
+		catch (SftpException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * Download the remote File p_sFile to p_sFile.
+	 * 
+	 * @param p_sFile The remote file name we want to download
+	 * 
+	 * @param p_sFinalName The local file name
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#downloadFile(java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void downloadFile(String p_sFile, String p_sFinalName) throws IOException, RemoteFileSystemException 
+	{
+		File oLocalDir = new File(m_sLocalDir);
+		File oLclFile = File.createTempFile("Rosetta_", TMP_SUFFIX, oLocalDir);
+
+		try 
+		{
+			oLclFile.delete();
+		} 
+		catch (Exception e) 
+		{
+			_logger.warn("Could not delete file: "+oLclFile, e);
+		}
+		// TODO check if we have to set the Transfer Type with JSch impl =>
+		// m_oXferType
+		
+		try
+		{
+			m_oSftpChannel.get(p_sFile, FtpUtils.fileToFtpString(oLclFile));
+	
+			File oNew = new File(oLocalDir, p_sFinalName);
+			if (oNew.exists())
+				oNew.delete();
+			oLclFile.renameTo(oNew);
+		}
+		catch (Exception ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	}
+
+	/*
+	 * Returns the current remote directory
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#getRemoteDir()
+	 */
+	public String getRemoteDir() 
+	{
+		return m_sRemoteDir;
+	}
+
+	/*
+	 * Terminates the sftp session.
+	 * 
+	 * @see org.jboss.soa.esb.util.RemoteFileSystem#quit()
+	 */
+	public void quit() 
+	{
+		m_oSftpChannel.quit();
+	}
+
+	private void configTreeFromEpr() throws ConfigurationException 
+	{
+		m_oParms = new ConfigTree("fromEpr");
+		try 
+		{
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_FTP_SERVER,
+					m_sFtpServer);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_USER, m_sUser);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_PASSWD, m_sPasswd);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_REMOTE_DIR,
+					m_sRemoteDir);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_PORT, Integer
+					.toString(m_iPort));
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_LOCAL_DIR, m_sLocalDir);
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_ASCII, Boolean
+					.toString(false));
+			m_oParms.setAttribute(RemoteFileSystem.PARMS_PASSIVE, Boolean
+					.toString(m_bPassive));
+			if (m_oCertificate != null)
+			{
+				m_oParms.setAttribute(RemoteFileSystem.PARMS_CERTIFICATE, m_oCertificate.toString());
+			}
+		} 
+		catch (Exception e) 
+		{
+			throw new ConfigurationException(e);
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpUserInfo.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpUserInfo.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpUserInfo.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,103 +1,103 @@
-/*
- * 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.internal.soa.esb.util;
-
-import com.jcraft.jsch.UserInfo;
-
-/**
- * @author geo
- * 
- */
-public class SecureFtpUserInfo implements UserInfo {
-
-	/** The user-password */
-	String password = null;
-
-	/**
-	 * Constructor
-	 * 
-	 * @param password
-	 *            The users password.
-	 */
-	public SecureFtpUserInfo(String password) {
-		this.password = password;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.jcraft.jsch.UserInfo#getPassphrase()
-	 */
-	public String getPassphrase() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.jcraft.jsch.UserInfo#getPassword()
-	 */
-	public String getPassword() {
-		return password;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.jcraft.jsch.UserInfo#promptPassphrase(java.lang.String)
-	 */
-	public boolean promptPassphrase(String arg0) {
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.jcraft.jsch.UserInfo#promptPassword(java.lang.String)
-	 */
-	public boolean promptPassword(String arg0) {
-		return true;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.jcraft.jsch.UserInfo#promptYesNo(java.lang.String)
-	 */
-	public boolean promptYesNo(String arg0) {
-		return true;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.jcraft.jsch.UserInfo#showMessage(java.lang.String)
-	 */
-	public void showMessage(String arg0) {
-		
-	}
-
-}
+/*
+ * 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.internal.soa.esb.util;
+
+import com.jcraft.jsch.UserInfo;
+
+/**
+ * @author geo
+ * 
+ */
+public class SecureFtpUserInfo implements UserInfo {
+
+	/** The user-password */
+	String password = null;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param password
+	 *            The users password.
+	 */
+	public SecureFtpUserInfo(String password) {
+		this.password = password;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.jcraft.jsch.UserInfo#getPassphrase()
+	 */
+	public String getPassphrase() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.jcraft.jsch.UserInfo#getPassword()
+	 */
+	public String getPassword() {
+		return password;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.jcraft.jsch.UserInfo#promptPassphrase(java.lang.String)
+	 */
+	public boolean promptPassphrase(String arg0) {
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.jcraft.jsch.UserInfo#promptPassword(java.lang.String)
+	 */
+	public boolean promptPassword(String arg0) {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.jcraft.jsch.UserInfo#promptYesNo(java.lang.String)
+	 */
+	public boolean promptYesNo(String arg0) {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.jcraft.jsch.UserInfo#showMessage(java.lang.String)
+	 */
+	public void showMessage(String arg0) {
+		
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/SecureFtpUserInfo.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,58 +1,58 @@
-/*
- * 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.internal.soa.esb.util;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Stream handling utilities.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class StreamUtils {
-
-	/**
-	 * Read the supplied InputStream and return as an array of bytes.
-	 * @param stream The stream to read.
-	 * @return The stream contents in an array of bytes.
-	 */
-	public static byte[] readStream(InputStream stream) {
-		if(stream == null) {
-			throw new IllegalArgumentException("null 'stream' arg passed in method call.");
-		}
-		
-		ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
-		byte[] buffer = new byte[256];
-		int readCount = 0;
-		
-		try {
-			while((readCount = stream.read(buffer)) != -1) {
-				outBuffer.write(buffer, 0, readCount);
-			}
-		} catch (IOException e) {
-			throw new IllegalStateException("Error reading stream.", e);
-		}		
-		
-		return outBuffer.toByteArray();
-	}
-}
+/*
+ * 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.internal.soa.esb.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Stream handling utilities.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class StreamUtils {
+
+	/**
+	 * Read the supplied InputStream and return as an array of bytes.
+	 * @param stream The stream to read.
+	 * @return The stream contents in an array of bytes.
+	 */
+	public static byte[] readStream(InputStream stream) {
+		if(stream == null) {
+			throw new IllegalArgumentException("null 'stream' arg passed in method call.");
+		}
+		
+		ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
+		byte[] buffer = new byte[256];
+		int readCount = 0;
+		
+		try {
+			while((readCount = stream.read(buffer)) != -1) {
+				outBuffer.write(buffer, 0, readCount);
+			}
+		} catch (IOException e) {
+			throw new IllegalStateException("Error reading stream.", e);
+		}		
+		
+		return outBuffer.toByteArray();
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/BaseException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/BaseException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/BaseException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,42 +1,42 @@
-package org.jboss.soa.esb;
-
-/**
- * Base ESB Exception.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class BaseException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Public Default Constructor.
-	 */
-	public BaseException() {
-		super();
-	}
-
-	/**
-	 * Public Constructor.
-	 * @param message Exception message.
-	 */
-	public BaseException(String message) {
-		super(message);
-	}
-
-	/**
-	 * Public Constructor.
-	 * @param message Exception message.
-	 * @param cause Exception cause.
-	 */
-	public BaseException(String message, Throwable cause) {
-		super(message, cause);
-	}
-
-	/**
-	 * Public Constructor.
-	 * @param cause Exception cause.
-	 */
-	public BaseException(Throwable cause) {
-		super(cause);
-	}
-}
+package org.jboss.soa.esb;
+
+/**
+ * Base ESB Exception.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class BaseException extends Exception {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Public Default Constructor.
+	 */
+	public BaseException() {
+		super();
+	}
+
+	/**
+	 * Public Constructor.
+	 * @param message Exception message.
+	 */
+	public BaseException(String message) {
+		super(message);
+	}
+
+	/**
+	 * Public Constructor.
+	 * @param message Exception message.
+	 * @param cause Exception cause.
+	 */
+	public BaseException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	/**
+	 * Public Constructor.
+	 * @param cause Exception cause.
+	 */
+	public BaseException(Throwable cause) {
+		super(cause);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/BaseException.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/ConfigurationException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/MarshalException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/MarshalException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/MarshalException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,53 +1,53 @@
-package org.jboss.soa.esb;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Thrown if marshalling a message fails. This could be because
- * conversion to XML encounters problems.
- */
-
-public class MarshalException extends Exception
-{
-	private static final long serialVersionUID = 0xE;
-	
-	public MarshalException()
-	{
-		super();
-	}
-
-	public MarshalException(String s)
-	{
-		super(s);
-	}
-
-	public MarshalException (Exception ex)
-	{
-		super(ex);
-	}
-
-	public MarshalException (String message, Exception ex)
-	{
-		super(message, ex);
-	}
-	
-}
+package org.jboss.soa.esb;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Thrown if marshalling a message fails. This could be because
+ * conversion to XML encounters problems.
+ */
+
+public class MarshalException extends Exception
+{
+	private static final long serialVersionUID = 0xE;
+	
+	public MarshalException()
+	{
+		super();
+	}
+
+	public MarshalException(String s)
+	{
+		super(s);
+	}
+
+	public MarshalException (Exception ex)
+	{
+		super(ex);
+	}
+
+	public MarshalException (String message, Exception ex)
+	{
+		super(message, ex);
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/MarshalException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/ProtocolNotSupportedException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/ProtocolNotSupportedException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/ProtocolNotSupportedException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,39 +1,39 @@
-package org.jboss.soa.esb;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-public class ProtocolNotSupportedException extends Exception
-{
-	public static final long serialVersionUID = 0xE;
-	
-	public ProtocolNotSupportedException()
-	{
-		super();
-	}
-
-	public ProtocolNotSupportedException(String s)
-	{
-		super(s);
-	}
-
-}
+package org.jboss.soa.esb;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+public class ProtocolNotSupportedException extends Exception
+{
+	public static final long serialVersionUID = 0xE;
+	
+	public ProtocolNotSupportedException()
+	{
+		super();
+	}
+
+	public ProtocolNotSupportedException(String s)
+	{
+		super(s);
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/ProtocolNotSupportedException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/SendFailedException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/SendFailedException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/SendFailedException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,43 +1,43 @@
-package org.jboss.soa.esb;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-public class SendFailedException extends Exception
-{
-	public static final long serialVersionUID = 0xE;
-	
-	public SendFailedException()
-	{
-		super();
-	}
-
-	public SendFailedException(String s)
-	{
-		super(s);
-	}
-
-	public SendFailedException(Throwable ex)
-	{
-		super(ex);
-	}
-}
+package org.jboss.soa.esb;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+public class SendFailedException extends Exception
+{
+	public static final long serialVersionUID = 0xE;
+	
+	public SendFailedException()
+	{
+		super();
+	}
+
+	public SendFailedException(String s)
+	{
+		super(s);
+	}
+
+	public SendFailedException(Throwable ex)
+	{
+		super(ex);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/SendFailedException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/UnmarshalException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/UnmarshalException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/UnmarshalException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,52 +1,52 @@
-package org.jboss.soa.esb;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Thrown if unmarshalling fails. This could be because
- * conversion from XML encounters problems.
- */
-
-public class UnmarshalException extends Exception
-{
-	private static final long serialVersionUID = 0xE;
-	
-	public UnmarshalException()
-	{
-		super();
-	}
-
-	public UnmarshalException(String s)
-	{
-		super(s);
-	}
-
-	public UnmarshalException (Exception ex)
-	{
-		super(ex);
-	}
-
-	public UnmarshalException (String message, Exception ex)
-	{
-		super(ex);
-	}
-}
+package org.jboss.soa.esb;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Thrown if unmarshalling fails. This could be because
+ * conversion from XML encounters problems.
+ */
+
+public class UnmarshalException extends Exception
+{
+	private static final long serialVersionUID = 0xE;
+	
+	public UnmarshalException()
+	{
+		super();
+	}
+
+	public UnmarshalException(String s)
+	{
+		super(s);
+	}
+
+	public UnmarshalException (Exception ex)
+	{
+		super(ex);
+	}
+
+	public UnmarshalException (String message, Exception ex)
+	{
+		super(ex);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/UnmarshalException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,276 +1,276 @@
-package org.jboss.soa.esb.addressing;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-/**
- * Represents an interaction pattern for a specific message exchange. When sending a message
- * the sender application can specify where errors are to be returned, where responses are
- * to go, along with other interaction information.
- * 
- * A call represents an exchange pattern for this message. It is built up as the message
- * flows through the ESB and identifies where the message should go, along with any
- * routing information for faults, replies etc.
- *
- * 
- * To: the destination. MANDATORY.
- * From: the sender. OPTIONAL. If not defined, then the sender MAY be inferred from the transport.
- * ReplyTo: the destination for any response. OPTIONAL.
- * FaultTo: the destination for any error message. OPTIONAL.
- * RelatesTo: used to indicate that this message is related to another. OPTIONAL.
- * Action: used by the sender to indicate the semantics of the message. Must be unique. MANDATORY.
- * MessageID: used to uniquely identify this message. OPTIONAL.
- * 
- * @author marklittle
- *
- */
-
-// TODO maybe this should simply go into the Header interface?
-
-public class Call
-{
-	/**
-	 * Create a new (empty) call.
-	 */
-	
-	public Call ()
-	{
-	}
-	
-	/**
-	 * Create a new call, whose To field is set to the supplied EPR.
-	 * 
-	 * @param epr the To field.
-	 */
-	
-	public Call (EPR epr)
-	{
-		_to = epr;
-	}
-	
-	/**
-	 * Set the To field. Must not be null.
-	 * 
-	 * @param epr the To field value.
-	 */
-	
-	public void setTo (EPR epr)
-	{
-		if (epr == null)
-			throw new IllegalArgumentException();
-		
-		_to = epr;
-	}
-	
-	/**
-	 * @return the To field.
-	 */
-	
-	public EPR getTo ()
-	{
-		return _to;
-	}
-	
-	/**
-	 * Set the From field. May be null.
-	 * 
-	 * @param from the value of the field.
-	 */
-	
-	public void setFrom (EPR from)
-	{
-		_from = from;
-	}
-	
-	/**
-	 * @return the From field.
-	 * @throws URISyntaxException thrown if the address is invalid.
-	 */
-	
-	public EPR getFrom ()
-	{
-		return _from;
-	}
-	
-	/**
-	 * Set the ReplyTo field. May be null.
-	 * 
-	 * @param replyTo the value of the field.
-	 */
-	
-	public void setReplyTo (EPR replyTo)
-	{
-		_replyTo = replyTo;
-	}
-	
-	/**
-	 * @return the ReplyTo field.
-	 * @throws URISyntaxException thrown if the address is invalid.
-	 */
-	
-	public EPR getReplyTo ()
-	{
-		return _replyTo;
-	}
-	
-	/**
-	 * Set the FaultTo field. May be null.
-	 * 
-	 * @param uri the value of the field.
-	 */
-	
-	public void setFaultTo (EPR uri)
-	{
-		_faultTo = uri;
-	}
-	
-	/**
-	 * @return the FaultTo field.
-	 */
-	
-	public EPR getFaultTo ()
-	{
-		return _faultTo;
-	}
-	
-	/**
-	 * Set the RelatesTo field.
-	 * 
-	 * @param uri the value to set.
-	 */
-	
-	public void setRelatesTo (URI uri)
-	{
-		_relatesTo = uri;
-	}
-	
-	/**
-	 * @return the RelatesTo field.
-	 */
-	
-	public URI getRelatesTo ()
-	{
-		return _relatesTo;
-	}
-	
-	/**
-	 * Set the Action field.
-	 * @param uri the value to set.
-	 */
-	
-	public void setAction (URI uri)
-	{
-		_action = uri;
-	}
-
-	/**
-	 * @return the Action field.
-	 */
-	public URI getAction ()
-	{
-		return _action;
-	}
-	
-	/**
-	 * Set the MessageId for this instance.
-	 * 
-	 * @param uri the value to use.
-	 */
-	
-	public void setMessageID (URI uri)
-	{
-		_messageID = uri;
-	}
-	
-	/**
-	 * @return the MessageID field.
-	 */
-	
-	public URI getMessageID ()
-	{
-		return _messageID;
-	}
-	
-	public final boolean empty ()
-	{
-		if ((_to == null) && (_from == null) && (_replyTo == null))
-		{
-			if ((_relatesTo == null) && (_faultTo == null) && (_action == null) && (_messageID == null))
-				return true;
-		}
-		
-		return false;
-	}
-	
-	/**
-	 * Copy the instance specified.
-	 * 
-	 * @param from the instance to copy.
-	 */
-	
-	public void copy (Call from)
-	{
-		Call fromImpl = (Call) from;
-		
-		_to = fromImpl._to;
-		_from = fromImpl._from;
-		_replyTo = fromImpl._replyTo;
-		_relatesTo = fromImpl._relatesTo;
-		_faultTo = fromImpl._faultTo;
-		_action = fromImpl._action;
-		_messageID = fromImpl._messageID;
-	}
-	
-//	public void setMetaData (MetaData md);
-//	public MetaData getMetaData ();
-//	public void addReferenceParameter (...);
-	
-	public String toString ()
-	{
-		return "To: "+_to+" From: "+_from+" ReplyTo: "+_replyTo+" FaultTo: "+_faultTo+" Action: "+_action+" MessagdID: "+_messageID;
-	}
-	
-	/**
-	 * This instance is valid if all mandatory elements are set.
-	 * 
-	 * @return <code>true</code> if all mandatory elements are set, <code>false</code> otherwise.
-	 */
-	
-	public boolean valid ()
-	{
-		if ((_to != null) && (_action != null))
-			return true;
-		else
-			return false;
-	}
-	
-	private EPR _to = null;
-	private EPR _from = null;
-	private EPR _faultTo = null;
-	private EPR _replyTo = null;
-	private URI _relatesTo = null;
-	private URI _action = null;
-	private URI _messageID = null;
-	
+package org.jboss.soa.esb.addressing;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * Represents an interaction pattern for a specific message exchange. When sending a message
+ * the sender application can specify where errors are to be returned, where responses are
+ * to go, along with other interaction information.
+ * 
+ * A call represents an exchange pattern for this message. It is built up as the message
+ * flows through the ESB and identifies where the message should go, along with any
+ * routing information for faults, replies etc.
+ *
+ * 
+ * To: the destination. MANDATORY.
+ * From: the sender. OPTIONAL. If not defined, then the sender MAY be inferred from the transport.
+ * ReplyTo: the destination for any response. OPTIONAL.
+ * FaultTo: the destination for any error message. OPTIONAL.
+ * RelatesTo: used to indicate that this message is related to another. OPTIONAL.
+ * Action: used by the sender to indicate the semantics of the message. Must be unique. MANDATORY.
+ * MessageID: used to uniquely identify this message. OPTIONAL.
+ * 
+ * @author marklittle
+ *
+ */
+
+// TODO maybe this should simply go into the Header interface?
+
+public class Call
+{
+	/**
+	 * Create a new (empty) call.
+	 */
+	
+	public Call ()
+	{
+	}
+	
+	/**
+	 * Create a new call, whose To field is set to the supplied EPR.
+	 * 
+	 * @param epr the To field.
+	 */
+	
+	public Call (EPR epr)
+	{
+		_to = epr;
+	}
+	
+	/**
+	 * Set the To field. Must not be null.
+	 * 
+	 * @param epr the To field value.
+	 */
+	
+	public void setTo (EPR epr)
+	{
+		if (epr == null)
+			throw new IllegalArgumentException();
+		
+		_to = epr;
+	}
+	
+	/**
+	 * @return the To field.
+	 */
+	
+	public EPR getTo ()
+	{
+		return _to;
+	}
+	
+	/**
+	 * Set the From field. May be null.
+	 * 
+	 * @param from the value of the field.
+	 */
+	
+	public void setFrom (EPR from)
+	{
+		_from = from;
+	}
+	
+	/**
+	 * @return the From field.
+	 * @throws URISyntaxException thrown if the address is invalid.
+	 */
+	
+	public EPR getFrom ()
+	{
+		return _from;
+	}
+	
+	/**
+	 * Set the ReplyTo field. May be null.
+	 * 
+	 * @param replyTo the value of the field.
+	 */
+	
+	public void setReplyTo (EPR replyTo)
+	{
+		_replyTo = replyTo;
+	}
+	
+	/**
+	 * @return the ReplyTo field.
+	 * @throws URISyntaxException thrown if the address is invalid.
+	 */
+	
+	public EPR getReplyTo ()
+	{
+		return _replyTo;
+	}
+	
+	/**
+	 * Set the FaultTo field. May be null.
+	 * 
+	 * @param uri the value of the field.
+	 */
+	
+	public void setFaultTo (EPR uri)
+	{
+		_faultTo = uri;
+	}
+	
+	/**
+	 * @return the FaultTo field.
+	 */
+	
+	public EPR getFaultTo ()
+	{
+		return _faultTo;
+	}
+	
+	/**
+	 * Set the RelatesTo field.
+	 * 
+	 * @param uri the value to set.
+	 */
+	
+	public void setRelatesTo (URI uri)
+	{
+		_relatesTo = uri;
+	}
+	
+	/**
+	 * @return the RelatesTo field.
+	 */
+	
+	public URI getRelatesTo ()
+	{
+		return _relatesTo;
+	}
+	
+	/**
+	 * Set the Action field.
+	 * @param uri the value to set.
+	 */
+	
+	public void setAction (URI uri)
+	{
+		_action = uri;
+	}
+
+	/**
+	 * @return the Action field.
+	 */
+	public URI getAction ()
+	{
+		return _action;
+	}
+	
+	/**
+	 * Set the MessageId for this instance.
+	 * 
+	 * @param uri the value to use.
+	 */
+	
+	public void setMessageID (URI uri)
+	{
+		_messageID = uri;
+	}
+	
+	/**
+	 * @return the MessageID field.
+	 */
+	
+	public URI getMessageID ()
+	{
+		return _messageID;
+	}
+	
+	public final boolean empty ()
+	{
+		if ((_to == null) && (_from == null) && (_replyTo == null))
+		{
+			if ((_relatesTo == null) && (_faultTo == null) && (_action == null) && (_messageID == null))
+				return true;
+		}
+		
+		return false;
+	}
+	
+	/**
+	 * Copy the instance specified.
+	 * 
+	 * @param from the instance to copy.
+	 */
+	
+	public void copy (Call from)
+	{
+		Call fromImpl = (Call) from;
+		
+		_to = fromImpl._to;
+		_from = fromImpl._from;
+		_replyTo = fromImpl._replyTo;
+		_relatesTo = fromImpl._relatesTo;
+		_faultTo = fromImpl._faultTo;
+		_action = fromImpl._action;
+		_messageID = fromImpl._messageID;
+	}
+	
+//	public void setMetaData (MetaData md);
+//	public MetaData getMetaData ();
+//	public void addReferenceParameter (...);
+	
+	public String toString ()
+	{
+		return "To: "+_to+" From: "+_from+" ReplyTo: "+_replyTo+" FaultTo: "+_faultTo+" Action: "+_action+" MessagdID: "+_messageID;
+	}
+	
+	/**
+	 * This instance is valid if all mandatory elements are set.
+	 * 
+	 * @return <code>true</code> if all mandatory elements are set, <code>false</code> otherwise.
+	 */
+	
+	public boolean valid ()
+	{
+		if ((_to != null) && (_action != null))
+			return true;
+		else
+			return false;
+	}
+	
+	private EPR _to = null;
+	private EPR _from = null;
+	private EPR _faultTo = null;
+	private EPR _replyTo = null;
+	private URI _relatesTo = null;
+	private URI _action = null;
+	private URI _messageID = null;
+	
 } 
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/EPR.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/EPR.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/EPR.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,133 +1,133 @@
-package org.jboss.soa.esb.addressing;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-/**
- * This class represents the endpoint reference for services.
- */
-
-import java.net.URI;
-
-/**
- * The Endpoint Reference class. All services (and clients) can be represented by
- * an EPR, which is effectively an address. If using SOA principles then the ultimate
- * recipient of the message should be addressed in a loosely-coupled manner: the service
- * should multiplex/demultiplex work across "objects" based on the message content and
- * the EPR should not address a specific "object".
- * 
- * @author marklittle
- *
- */
-public class EPR
-{
-	/**
-	 * Create a new Endpoint Reference with a null address.
-	 */
-	
-	public EPR ()
-	{
-		_addr = new PortReference();
-	}
-	
-	/**
-	 * Create a new Endpoint Reference with the specified address.
-	 * 
-	 * @param addr the specified address.
-	 */
-	
-	public EPR (PortReference addr)
-	{
-		_addr = addr;
-	}
-
-	/**
-	 * Create a new Endpoint Reference with the specified address.
-	 * 
-	 * @param uri the specified address.
-	 */
-	
-	public EPR (URI uri)
-	{
-		_addr = new PortReference(uri.toString());
-	}
-	
-	/**
-	 * Override the address of this EPR.
-	 * 
-	 * @param uri the new address.
-	 */
-	
-	public void setAddr (PortReference uri)
-	{
-		_addr = uri;
-	}
-	
-	/**
-	 * Get the EPR address.
-	 * 
-	 * @return the address.
-	 */
-	
-	public PortReference getAddr ()
-	{
-		return _addr;
-	}
-
-	/**
-	 * Copy the contents of the specified EPR into this instance.
-	 * 
-	 * @param from the instance to copy.
-	 */
-	
-	public void copy (EPR from)
-	{
-		EPR fromImpl = (EPR) from;
-		
-		_addr = fromImpl._addr;
-	}
-	
-//	public void setMetaData (MetaData md);
-//	public MetaData getMetaData ();
-//	public void addReferenceParameter (...);
-	
-	public String toString ()
-	{
-		return "EPR: "+_addr;
-	}
-
-	public boolean equals (Object obj)
-	{
-		if (obj == this)
-			return true;
-		else
-		{
-			if (obj instanceof EPR)
-				return ((EPR) obj)._addr.equals(_addr);
-		}
-		
-		return false;
-	}
-	
-	private PortReference _addr;
-
+package org.jboss.soa.esb.addressing;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+/**
+ * This class represents the endpoint reference for services.
+ */
+
+import java.net.URI;
+
+/**
+ * The Endpoint Reference class. All services (and clients) can be represented by
+ * an EPR, which is effectively an address. If using SOA principles then the ultimate
+ * recipient of the message should be addressed in a loosely-coupled manner: the service
+ * should multiplex/demultiplex work across "objects" based on the message content and
+ * the EPR should not address a specific "object".
+ * 
+ * @author marklittle
+ *
+ */
+public class EPR
+{
+	/**
+	 * Create a new Endpoint Reference with a null address.
+	 */
+	
+	public EPR ()
+	{
+		_addr = new PortReference();
+	}
+	
+	/**
+	 * Create a new Endpoint Reference with the specified address.
+	 * 
+	 * @param addr the specified address.
+	 */
+	
+	public EPR (PortReference addr)
+	{
+		_addr = addr;
+	}
+
+	/**
+	 * Create a new Endpoint Reference with the specified address.
+	 * 
+	 * @param uri the specified address.
+	 */
+	
+	public EPR (URI uri)
+	{
+		_addr = new PortReference(uri.toString());
+	}
+	
+	/**
+	 * Override the address of this EPR.
+	 * 
+	 * @param uri the new address.
+	 */
+	
+	public void setAddr (PortReference uri)
+	{
+		_addr = uri;
+	}
+	
+	/**
+	 * Get the EPR address.
+	 * 
+	 * @return the address.
+	 */
+	
+	public PortReference getAddr ()
+	{
+		return _addr;
+	}
+
+	/**
+	 * Copy the contents of the specified EPR into this instance.
+	 * 
+	 * @param from the instance to copy.
+	 */
+	
+	public void copy (EPR from)
+	{
+		EPR fromImpl = (EPR) from;
+		
+		_addr = fromImpl._addr;
+	}
+	
+//	public void setMetaData (MetaData md);
+//	public MetaData getMetaData ();
+//	public void addReferenceParameter (...);
+	
+	public String toString ()
+	{
+		return "EPR: "+_addr;
+	}
+
+	public boolean equals (Object obj)
+	{
+		if (obj == this)
+			return true;
+		else
+		{
+			if (obj instanceof EPR)
+				return ((EPR) obj)._addr.equals(_addr);
+		}
+		
+		return false;
+	}
+	
+	private PortReference _addr;
+
 } 
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/EPR.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/MalformedEPRException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/MalformedEPRException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/MalformedEPRException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,51 +1,51 @@
-package org.jboss.soa.esb.addressing;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Thrown if the EPR is not well formed, e.g., contains incorrect information.
- */
-
-public class MalformedEPRException extends Exception
-{
-	public static final long serialVersionUID = 0xE;
-	
-	public MalformedEPRException()
-	{
-		super();
-	}
-
-	public MalformedEPRException(String s)
-	{
-		super(s);
-	}
-	
-	public MalformedEPRException(String s, Throwable ex)
-	{
-		super(s, ex);
-	}
-
-	public MalformedEPRException(Throwable ex)
-	{
-		super(ex);
-	}
-}
+package org.jboss.soa.esb.addressing;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Thrown if the EPR is not well formed, e.g., contains incorrect information.
+ */
+
+public class MalformedEPRException extends Exception
+{
+	public static final long serialVersionUID = 0xE;
+	
+	public MalformedEPRException()
+	{
+		super();
+	}
+
+	public MalformedEPRException(String s)
+	{
+		super(s);
+	}
+	
+	public MalformedEPRException(String s, Throwable ex)
+	{
+		super(s, ex);
+	}
+
+	public MalformedEPRException(Throwable ex)
+	{
+		super(ex);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/MalformedEPRException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,396 +1,396 @@
-/*
- * 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 mark.little at jboss.com
- */
-
-/*
- * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
- *
- * PortReference.java
- */
-
-package org.jboss.soa.esb.addressing;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * An implementation of a WS-Addressing EPR. It needs completely rewriting after
- * the interoperability workshop as it is not extensible. It's morphed with the changing WS-C/WS-T and
- * WS-Addr specifications and their quirks; now that WS-Addr is finalized the
- * old quirks no longer need to be supported so it's best to rewrite this from
- * scratch.
- * 
- * An instance of a PortReference represents a single element in WS-A.
- */
-
-public class PortReference
-{
-	public PortReference()
-	{
-	}
-
-	public PortReference(String address)
-	{
-		setAddress(address);
-	}
-
-	public void setAddress(String address)
-	{
-		_address = address;
-	}
-
-	public String getAddress()
-	{
-		return _address;
-	}
-
-	public void addExtension(PortReference.Extension extension)
-	{
-		_extensions.add(extension);
-	}
-
-	// all extensions are added as the Arjuna namespace.
-
-	public void addExtension(String value)
-	{
-		addExtension(XMLUtil.INSTANCE_IDENTIFIER_TAG, XMLUtil.JBOSSESB_PREFIX,
-				XMLUtil.JBOSSESB_NAMESPACE_URI, value,
-				Extension.REFERENCE_PROPERTIES);
-	}
-
-	public void addExtension(String tag, String value)
-	{
-		addExtension(tag, XMLUtil.JBOSSESB_PREFIX,
-				XMLUtil.JBOSSESB_NAMESPACE_URI, value,
-				Extension.REFERENCE_PROPERTIES);
-	}
-
-	/**
-	 * Define the tag, prefix and namespace URI for the extension value. The
-	 * parent is a refProperty.
-	 */
-
-	public void addExtension(String tag, String prefix, String uri, String value)
-	{
-		_extensions.add(new Extension(tag, prefix, uri, value,
-				Extension.REFERENCE_PROPERTIES));
-	}
-
-	/**
-	 * Define the tag, prefix and namespace URI for the extension value. The
-	 * parent field defines whether the attribute has a refParam, refProp or
-	 * neither as its parent.
-	 */
-
-	public void addExtension(String tag, String prefix, String uri,
-			String value, int parent)
-	{
-		_extensions.add(new Extension(tag, prefix, uri, value, parent));
-	}
-
-	// placeholders only
-
-	public void addPortType(String qName)
-	{
-	}
-
-	public void addServiceName(String portName, String qName)
-	{
-	}
-
-	public void addPolicy()
-	{
-	}
-
-	public String getExtensionValue(String tag)
-	{
-		String extensionValue = null;
-		Iterator iterator = _extensions.iterator();
-
-		while (iterator.hasNext() && (extensionValue == null))
-		{
-			Extension extension = (Extension) iterator.next();
-
-			if (tag.equals(extension.getTag()))
-				extensionValue = extension.getValue();
-		}
-
-		return extensionValue;
-	}
-
-	public Iterator getExtensions()
-	{
-		return _extensions.iterator();
-	}
-
-	public void clearExtensions()
-	{
-		_extensions.clear();
-	}
-
-	public String toString()
-	{
-		return "PortReference < " + _address + " >";
-	}
-
-	public String extendedToString()
-	{
-		String addr = "<" + XMLUtil.WSA_PREFIX + ":Address " + _address + "/>";
-
-		Iterator extensions = getExtensions();
-
-		while (extensions.hasNext())
-		{
-			Extension ext = (Extension) extensions.next();
-
-			addr += ", <" + XMLUtil.WSA_PREFIX + ":"
-					+ XMLUtil.REFERENCE_PROPERTIES_TAG + " " + ext.getPrefix()
-					+ ":" + ext.getTag() + " : " + ext.getValue() + "/>";
-		}
-
-		return "PortReference : " + addr;
-	}
-
-	/**
-	 * Is this object equal to the specified parameter?
-	 * 
-	 * @param rhs
-	 *            The rhs object.
-	 * @return true if the specified object is equal, false otherwise.
-	 */
-	public boolean equals(final Object rhs)
-	{
-		if ((rhs != null) && (rhs.getClass() == getClass()))
-		{
-			// This should really only include reference property extensions
-			final PortReference rhsPortReference = (PortReference) rhs;
-			return (equalsObject(_address, rhsPortReference._address)
-					&& equalsObject(_extensions, rhsPortReference._extensions)
-					&& equalsObject(_portType, rhsPortReference._portType)
-					&& equalsObject(_serviceName, rhsPortReference._serviceName) && equalsObject(
-					_policies, rhsPortReference._policies));
-		}
-		return false;
-	}
-
-	/**
-	 * Return the hash code for this object.
-	 * 
-	 * @return the hash code value.
-	 */
-	public int hashCode()
-	{
-		// Not checked for spread.
-		return (objectHashCode(_address, 0x1)
-				^ objectHashCode(_extensions, 0x2)
-				^ objectHashCode(_portType, 0x4)
-				^ objectHashCode(_serviceName, 0x8) ^ objectHashCode(_policies,
-				0x10));
-	}
-
-	public static class Extension
-	{
-		public static final int REFERENCE_PROPERTIES = 0;
-		public static final int REFERENCE_PARAMETERS = 1;
-		public static final int NEITHER = 2;
-
-		public Extension(String tag, String prefix, String uri)
-		{
-			this(tag, prefix, uri, null, REFERENCE_PROPERTIES);
-		}
-
-		public Extension(String tag, String prefix, String uri, String value)
-		{
-			this(tag, prefix, uri, value, REFERENCE_PROPERTIES);
-		}
-
-		public Extension(String tag, String prefix, String uri, String value,
-				int parent)
-		{
-			_tag = tag;
-			_prefix = prefix;
-			_uri = uri;
-			_value = value;
-			_parent = parent;
-			
-			/*
-			 * If XML was loaded via DOM1 then prefix and namespace won't work!
-			 */
-			
-			if (_uri == null)
-				_uri = XMLUtil.JBOSSESB_NAMESPACE_URI;
-			
-			if (_prefix == null)
-				_prefix = XMLUtil.JBOSSESB_PREFIX;
-			
-			if (_tag.contains(":"))
-			{
-				int colon = _tag.indexOf(':');
-				
-				_tag = _tag.substring(colon+1);
-			}
-		}
-
-		public int getParent()
-		{
-			return _parent;
-		}
-
-		public String getTag()
-		{
-			return _tag;
-		}
-
-		public String getPrefix()
-		{
-			return _prefix;
-		}
-
-		public String getURI()
-		{
-			return _uri;
-		}
-
-		public String getValue()
-		{
-			return _value;
-		}
-
-		public LinkedList getChildren()
-		{
-			return _extensions;
-		}
-
-		public HashMap getAttributes()
-		{
-			return _attributes;
-		}
-
-		public void addAttributes(HashMap props)
-		{
-			_attributes = props;
-		}
-
-		public void addChild(Extension child)
-		{
-			if (_extensions == null)
-				_extensions = new LinkedList<Extension>();
-
-			_extensions.add(child);
-		}
-
-		public String toString()
-		{
-			return new String("< " + _tag + ", " + _prefix + ", " + _uri + ", "
-					+ _value + " >");
-		}
-
-		/**
-		 * Is this object equal to the specified parameter (ignoring prefix)?
-		 * 
-		 * @param rhs
-		 *            The rhs object.
-		 * @return true if the specified object is equal, false otherwise.
-		 */
-		public boolean equals(final Object rhs)
-		{
-			if ((rhs != null) && (rhs.getClass() == getClass()))
-			{
-				final Extension rhsExtension = (Extension) rhs;
-				return (equalsObject(_tag, rhsExtension._tag)
-						&& equalsObject(_uri, rhsExtension._uri)
-						&& equalsObject(_value, rhsExtension._value)
-						&& equalsObject(_extensions, rhsExtension._extensions) && (_parent == rhsExtension._parent));
-			}
-			return false;
-		}
-
-		/**
-		 * Return the hash code for this object.
-		 * 
-		 * @return the hash code value.
-		 */
-		public int hashCode()
-		{
-			// Not checked for spread.
-			return (_parent ^ objectHashCode(_tag, 0x4)
-					^ objectHashCode(_uri, 0x8) ^ objectHashCode(_value, 0x10) ^ objectHashCode(
-					_extensions, 0x20));
-		}
-
-		private String _tag = null;
-
-		private String _prefix = null;
-
-		private String _uri = null;
-
-		private String _value = null;
-
-		private int _parent = NEITHER;
-
-		private LinkedList<Extension> _extensions = null;
-
-		private HashMap _attributes = null;
-
-	}
-
-	/**
-	 * Get the hash code from the object or use the default if null.
-	 * 
-	 * @param obj
-	 *            The object.
-	 * @param defaultHashCode
-	 *            The default hash code.
-	 * @return The hash code.
-	 */
-	static int objectHashCode(final Object obj, final int defaultHashCode)
-	{
-		return (obj == null ? defaultHashCode : obj.hashCode());
-	}
-
-	/**
-	 * Are the two objects equal?
-	 * 
-	 * @param lhs
-	 *            The lhs object.
-	 * @param rhs
-	 *            The rhs object.
-	 * @return true if equal or both null, false otherwise.
-	 */
-	static boolean equalsObject(final Object lhs, final Object rhs)
-	{
-		if (lhs == null)
-		{
-			return (rhs == null);
-		} else
-		{
-			return lhs.equals(rhs);
-		}
-	}
-
-	private String _address = null;
-	private LinkedList<Extension> _extensions = new LinkedList<Extension>();
-	private Extension _portType = null;
-	private Extension _serviceName = null;
-	private List _policies = null;
-
-}
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * PortReference.java
+ */
+
+package org.jboss.soa.esb.addressing;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * An implementation of a WS-Addressing EPR. It needs completely rewriting after
+ * the interoperability workshop as it is not extensible. It's morphed with the changing WS-C/WS-T and
+ * WS-Addr specifications and their quirks; now that WS-Addr is finalized the
+ * old quirks no longer need to be supported so it's best to rewrite this from
+ * scratch.
+ * 
+ * An instance of a PortReference represents a single element in WS-A.
+ */
+
+public class PortReference
+{
+	public PortReference()
+	{
+	}
+
+	public PortReference(String address)
+	{
+		setAddress(address);
+	}
+
+	public void setAddress(String address)
+	{
+		_address = address;
+	}
+
+	public String getAddress()
+	{
+		return _address;
+	}
+
+	public void addExtension(PortReference.Extension extension)
+	{
+		_extensions.add(extension);
+	}
+
+	// all extensions are added as the Arjuna namespace.
+
+	public void addExtension(String value)
+	{
+		addExtension(XMLUtil.INSTANCE_IDENTIFIER_TAG, XMLUtil.JBOSSESB_PREFIX,
+				XMLUtil.JBOSSESB_NAMESPACE_URI, value,
+				Extension.REFERENCE_PROPERTIES);
+	}
+
+	public void addExtension(String tag, String value)
+	{
+		addExtension(tag, XMLUtil.JBOSSESB_PREFIX,
+				XMLUtil.JBOSSESB_NAMESPACE_URI, value,
+				Extension.REFERENCE_PROPERTIES);
+	}
+
+	/**
+	 * Define the tag, prefix and namespace URI for the extension value. The
+	 * parent is a refProperty.
+	 */
+
+	public void addExtension(String tag, String prefix, String uri, String value)
+	{
+		_extensions.add(new Extension(tag, prefix, uri, value,
+				Extension.REFERENCE_PROPERTIES));
+	}
+
+	/**
+	 * Define the tag, prefix and namespace URI for the extension value. The
+	 * parent field defines whether the attribute has a refParam, refProp or
+	 * neither as its parent.
+	 */
+
+	public void addExtension(String tag, String prefix, String uri,
+			String value, int parent)
+	{
+		_extensions.add(new Extension(tag, prefix, uri, value, parent));
+	}
+
+	// placeholders only
+
+	public void addPortType(String qName)
+	{
+	}
+
+	public void addServiceName(String portName, String qName)
+	{
+	}
+
+	public void addPolicy()
+	{
+	}
+
+	public String getExtensionValue(String tag)
+	{
+		String extensionValue = null;
+		Iterator iterator = _extensions.iterator();
+
+		while (iterator.hasNext() && (extensionValue == null))
+		{
+			Extension extension = (Extension) iterator.next();
+
+			if (tag.equals(extension.getTag()))
+				extensionValue = extension.getValue();
+		}
+
+		return extensionValue;
+	}
+
+	public Iterator getExtensions()
+	{
+		return _extensions.iterator();
+	}
+
+	public void clearExtensions()
+	{
+		_extensions.clear();
+	}
+
+	public String toString()
+	{
+		return "PortReference < " + _address + " >";
+	}
+
+	public String extendedToString()
+	{
+		String addr = "<" + XMLUtil.WSA_PREFIX + ":Address " + _address + "/>";
+
+		Iterator extensions = getExtensions();
+
+		while (extensions.hasNext())
+		{
+			Extension ext = (Extension) extensions.next();
+
+			addr += ", <" + XMLUtil.WSA_PREFIX + ":"
+					+ XMLUtil.REFERENCE_PROPERTIES_TAG + " " + ext.getPrefix()
+					+ ":" + ext.getTag() + " : " + ext.getValue() + "/>";
+		}
+
+		return "PortReference : " + addr;
+	}
+
+	/**
+	 * Is this object equal to the specified parameter?
+	 * 
+	 * @param rhs
+	 *            The rhs object.
+	 * @return true if the specified object is equal, false otherwise.
+	 */
+	public boolean equals(final Object rhs)
+	{
+		if ((rhs != null) && (rhs.getClass() == getClass()))
+		{
+			// This should really only include reference property extensions
+			final PortReference rhsPortReference = (PortReference) rhs;
+			return (equalsObject(_address, rhsPortReference._address)
+					&& equalsObject(_extensions, rhsPortReference._extensions)
+					&& equalsObject(_portType, rhsPortReference._portType)
+					&& equalsObject(_serviceName, rhsPortReference._serviceName) && equalsObject(
+					_policies, rhsPortReference._policies));
+		}
+		return false;
+	}
+
+	/**
+	 * Return the hash code for this object.
+	 * 
+	 * @return the hash code value.
+	 */
+	public int hashCode()
+	{
+		// Not checked for spread.
+		return (objectHashCode(_address, 0x1)
+				^ objectHashCode(_extensions, 0x2)
+				^ objectHashCode(_portType, 0x4)
+				^ objectHashCode(_serviceName, 0x8) ^ objectHashCode(_policies,
+				0x10));
+	}
+
+	public static class Extension
+	{
+		public static final int REFERENCE_PROPERTIES = 0;
+		public static final int REFERENCE_PARAMETERS = 1;
+		public static final int NEITHER = 2;
+
+		public Extension(String tag, String prefix, String uri)
+		{
+			this(tag, prefix, uri, null, REFERENCE_PROPERTIES);
+		}
+
+		public Extension(String tag, String prefix, String uri, String value)
+		{
+			this(tag, prefix, uri, value, REFERENCE_PROPERTIES);
+		}
+
+		public Extension(String tag, String prefix, String uri, String value,
+				int parent)
+		{
+			_tag = tag;
+			_prefix = prefix;
+			_uri = uri;
+			_value = value;
+			_parent = parent;
+			
+			/*
+			 * If XML was loaded via DOM1 then prefix and namespace won't work!
+			 */
+			
+			if (_uri == null)
+				_uri = XMLUtil.JBOSSESB_NAMESPACE_URI;
+			
+			if (_prefix == null)
+				_prefix = XMLUtil.JBOSSESB_PREFIX;
+			
+			if (_tag.contains(":"))
+			{
+				int colon = _tag.indexOf(':');
+				
+				_tag = _tag.substring(colon+1);
+			}
+		}
+
+		public int getParent()
+		{
+			return _parent;
+		}
+
+		public String getTag()
+		{
+			return _tag;
+		}
+
+		public String getPrefix()
+		{
+			return _prefix;
+		}
+
+		public String getURI()
+		{
+			return _uri;
+		}
+
+		public String getValue()
+		{
+			return _value;
+		}
+
+		public LinkedList getChildren()
+		{
+			return _extensions;
+		}
+
+		public HashMap getAttributes()
+		{
+			return _attributes;
+		}
+
+		public void addAttributes(HashMap props)
+		{
+			_attributes = props;
+		}
+
+		public void addChild(Extension child)
+		{
+			if (_extensions == null)
+				_extensions = new LinkedList<Extension>();
+
+			_extensions.add(child);
+		}
+
+		public String toString()
+		{
+			return new String("< " + _tag + ", " + _prefix + ", " + _uri + ", "
+					+ _value + " >");
+		}
+
+		/**
+		 * Is this object equal to the specified parameter (ignoring prefix)?
+		 * 
+		 * @param rhs
+		 *            The rhs object.
+		 * @return true if the specified object is equal, false otherwise.
+		 */
+		public boolean equals(final Object rhs)
+		{
+			if ((rhs != null) && (rhs.getClass() == getClass()))
+			{
+				final Extension rhsExtension = (Extension) rhs;
+				return (equalsObject(_tag, rhsExtension._tag)
+						&& equalsObject(_uri, rhsExtension._uri)
+						&& equalsObject(_value, rhsExtension._value)
+						&& equalsObject(_extensions, rhsExtension._extensions) && (_parent == rhsExtension._parent));
+			}
+			return false;
+		}
+
+		/**
+		 * Return the hash code for this object.
+		 * 
+		 * @return the hash code value.
+		 */
+		public int hashCode()
+		{
+			// Not checked for spread.
+			return (_parent ^ objectHashCode(_tag, 0x4)
+					^ objectHashCode(_uri, 0x8) ^ objectHashCode(_value, 0x10) ^ objectHashCode(
+					_extensions, 0x20));
+		}
+
+		private String _tag = null;
+
+		private String _prefix = null;
+
+		private String _uri = null;
+
+		private String _value = null;
+
+		private int _parent = NEITHER;
+
+		private LinkedList<Extension> _extensions = null;
+
+		private HashMap _attributes = null;
+
+	}
+
+	/**
+	 * Get the hash code from the object or use the default if null.
+	 * 
+	 * @param obj
+	 *            The object.
+	 * @param defaultHashCode
+	 *            The default hash code.
+	 * @return The hash code.
+	 */
+	static int objectHashCode(final Object obj, final int defaultHashCode)
+	{
+		return (obj == null ? defaultHashCode : obj.hashCode());
+	}
+
+	/**
+	 * Are the two objects equal?
+	 * 
+	 * @param lhs
+	 *            The lhs object.
+	 * @param rhs
+	 *            The rhs object.
+	 * @return true if equal or both null, false otherwise.
+	 */
+	static boolean equalsObject(final Object lhs, final Object rhs)
+	{
+		if (lhs == null)
+		{
+			return (rhs == null);
+		} else
+		{
+			return lhs.equals(rhs);
+		}
+	}
+
+	private String _address = null;
+	private LinkedList<Extension> _extensions = new LinkedList<Extension>();
+	private Extension _portType = null;
+	private Extension _serviceName = null;
+	private List _policies = null;
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/PortReference.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/XMLUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/XMLUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/XMLUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,62 +1,62 @@
-/*
- * 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 mark.little at jboss.com
- */
-
-/*
- * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
- *
- * XMLUtil.java
- */
-
-package org.jboss.soa.esb.addressing;
-
-public class XMLUtil
-{
-    // WS-Addr
-
-    public static final String WSA_PREFIX = "wsa";
-    public static final String WSA_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
-
-    public static final String ENDPOINT_REFERENCE_TAG   = "EndpointReference";
-    public static final String MESSAGE_IDENTIFIER_TAG   = "MessageID";
-    public static final String REFERENCE_PROPERTIES_TAG = "ReferenceProperties";
-    public static final String REFERENCE_PARAMETERS_TAG = "ReferenceParameters";
-    public static final String REPLY_TO_TAG             = "ReplyTo";
-    public static final String FROM_TAG            		= "From";
-
-    public static final String TO_TAG                   = "To";
-    public static final String ADDRESS_TAG              = "Address";
-    public static final String ACTION_TAG               = "Action";
-    public static final String RELATES_TO_TAG           = "RelatesTo";
-    public static final String FAULT_TO_TAG             = "FaultTo";
-    
-    // JBossESB
-
-    public static final String JBOSSESB_PREFIX        = "jbossesb";
-    public static final String JBOSSESB_NAMESPACE_URI = "http://schemas.jboss.com/ws/2007/01/jbossesb";
-
-    public static final String INSTANCE_IDENTIFIER_TAG = "InstanceIdentifier";
-
-    public static final String UNKNOWNERROR_ERROR_CODE = "UnknownError";
-    
-    // XML Namespace
-    public static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/" ;
-    public static final String XMLNS_PREFIX = "xmlns:" ;
-}
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * XMLUtil.java
+ */
+
+package org.jboss.soa.esb.addressing;
+
+public class XMLUtil
+{
+    // WS-Addr
+
+    public static final String WSA_PREFIX = "wsa";
+    public static final String WSA_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
+
+    public static final String ENDPOINT_REFERENCE_TAG   = "EndpointReference";
+    public static final String MESSAGE_IDENTIFIER_TAG   = "MessageID";
+    public static final String REFERENCE_PROPERTIES_TAG = "ReferenceProperties";
+    public static final String REFERENCE_PARAMETERS_TAG = "ReferenceParameters";
+    public static final String REPLY_TO_TAG             = "ReplyTo";
+    public static final String FROM_TAG            		= "From";
+
+    public static final String TO_TAG                   = "To";
+    public static final String ADDRESS_TAG              = "Address";
+    public static final String ACTION_TAG               = "Action";
+    public static final String RELATES_TO_TAG           = "RelatesTo";
+    public static final String FAULT_TO_TAG             = "FaultTo";
+    
+    // JBossESB
+
+    public static final String JBOSSESB_PREFIX        = "jbossesb";
+    public static final String JBOSSESB_NAMESPACE_URI = "http://schemas.jboss.com/ws/2007/01/jbossesb";
+
+    public static final String INSTANCE_IDENTIFIER_TAG = "InstanceIdentifier";
+
+    public static final String UNKNOWNERROR_ERROR_CODE = "UnknownError";
+    
+    // XML Namespace
+    public static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/" ;
+    public static final String XMLNS_PREFIX = "xmlns:" ;
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/XMLUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/EmailEpr.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/EmailEpr.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/EmailEpr.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,221 +1,221 @@
-package org.jboss.soa.esb.addressing.eprs;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-/**
- * This class represents the endpoint reference for services.
- */
-
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.PortReference;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * A helper class for using email style EPRs. Simply create and use instances of
- * this type.
- * 
- * @author marklittle
- *
- */
-public class EmailEpr extends EPR
-{  
-	public static final String DEFAULT_PORT = "25";
-	public static final String DEFAULT_USERNAME = "";
-	public static final String DEFAULT_PASSWORD = "";
-	
-	public static final String SMTP_PROTOCOL = "smtp";
-	public static final String POP_PROTOCOL = "pop";
-	
-	public static final String USERNAME_TAG = "username";
-	public static final String PASSWORD_TAG = "password";
-	
-	private static final String PROTOCOL_SEPARATOR = "://";
-	private static final String PORT_SEPARATOR = ":";
-	
-	public EmailEpr (EPR epr)
-	{
-		copy(epr);
-	}
-	
-	public EmailEpr (EPR epr, Element header)
-	{
-		copy(epr);
-		
-		NodeList nl = header.getChildNodes();
-
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			String nodeName = nl.item(i).getNodeName();
-			
-			try
-			{
-				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+USERNAME_TAG))
-				{
-					getAddr().addExtension(USERNAME_TAG, nl.item(i).getTextContent());
-				}
-				else
-					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+PASSWORD_TAG))
-					{
-						getAddr().addExtension(PASSWORD_TAG, nl.item(i).getTextContent());
-					}
-			}
-			catch (Exception ex)
-			{
-				ex.printStackTrace();
-			}
-		}
-	}
-	
-	/**
-	 * Create a new email EPR. The port number will be assumed to be 25,
-	 * and there are no values for username and password.
-	 * 
-	 * @param protocol the protocol to use.
-	 * @param host the host name.
-	 */
-	
-	public EmailEpr (String protocol, String host)
-	{
-		this(protocol, host, DEFAULT_PORT, DEFAULT_USERNAME, DEFAULT_PASSWORD);
-	}
-	
-	/**
-	 * Create a new email EPR.
-	 * 
-	 * @param protocol the protocol to use.
-	 * @param host the host name.
-	 * @param port the port to use.
-	 * @param username the username for sending/receiving.
-	 * @param password the password for sending/receiving.
-	 */
-	
-	public EmailEpr (String protocol, String host, String port, String username, String password)
-	{
-		// how many of these do we really need? modify accordingly.
-		
-		if ((protocol == null) || (host == null) || (port == null))
-			throw new IllegalArgumentException();
-		
-		if ((protocol.equals(SMTP_PROTOCOL) || (protocol.equals(POP_PROTOCOL))))
-		{
-			PortReference addr = new PortReference(protocol+PROTOCOL_SEPARATOR+host+PORT_SEPARATOR+port);
-			
-			if (username != null)
-				addr.addExtension(USERNAME_TAG, username);
-			
-			if (password != null)
-				addr.addExtension(PASSWORD_TAG, password);
-			
-			setAddr(addr);
-		}
-		else
-			throw new IllegalArgumentException("Invalid email protocol!");
-	}
-	
-	/**
-	 * @return the email protocol used.
-	 * @throws URISyntaxException thrown if the address is malformed.
-	 */
-	
-	public final String getProtocol () throws URISyntaxException
-	{
-		URI addr = new URI(getAddr().getAddress());
-		
-		return addr.getScheme();
-	}
-	
-	/**
-	 * @return the email host used.
-	 * @throws URISyntaxException thrown if the address is malformed.
-	 */
-	
-	public final String getHost () throws URISyntaxException
-	{	
-		URI addr = new URI(getAddr().getAddress());
-		
-		return addr.getHost();
-	}
-	
-	/**
-	 * @return the email port used, or -1 if not specified.
-	 * @throws URISyntaxException thrown if the address is malformed.
-	 */
-
-	public final int getPort () throws URISyntaxException
-	{
-		URI addr = new URI(getAddr().getAddress());
-		
-		return addr.getPort();
-	}
-	
-	/*
-	 * There are deliberately no setters for the values once the EPR is created.
-	 */
-	
-	/**
-	 * @return the password for this EPR, or <code>null</code> if none is set.
-	 * @throws URISyntaxException thrown if the address is malformed.
-	 */
-	
-	public final String getPassword () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(PASSWORD_TAG);
-	}
-	
-	/**
-	 * @return the username for this EPR, or <code>null</code> if none is set.
-	 * @throws URISyntaxException thrown if the address is malformed.
-	 */
-	
-	public final String getUserName () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(USERNAME_TAG);
-	}
-
-	public static final URI type ()
-	{
-	    return _type;
-	}
-	
-	private static URI _type;
-
-	static
-	{
-	    try
-		{
-		    _type = new URI("urn:jboss:esb:epr:type:email");
-		}
-		catch (Exception ex)
-		{
-		    ex.printStackTrace();
-		    
-		    throw new ExceptionInInitializerError(ex.toString());
-		}
-	}
+package org.jboss.soa.esb.addressing.eprs;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+/**
+ * This class represents the endpoint reference for services.
+ */
+
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * A helper class for using email style EPRs. Simply create and use instances of
+ * this type.
+ * 
+ * @author marklittle
+ *
+ */
+public class EmailEpr extends EPR
+{  
+	public static final String DEFAULT_PORT = "25";
+	public static final String DEFAULT_USERNAME = "";
+	public static final String DEFAULT_PASSWORD = "";
+	
+	public static final String SMTP_PROTOCOL = "smtp";
+	public static final String POP_PROTOCOL = "pop";
+	
+	public static final String USERNAME_TAG = "username";
+	public static final String PASSWORD_TAG = "password";
+	
+	private static final String PROTOCOL_SEPARATOR = "://";
+	private static final String PORT_SEPARATOR = ":";
+	
+	public EmailEpr (EPR epr)
+	{
+		copy(epr);
+	}
+	
+	public EmailEpr (EPR epr, Element header)
+	{
+		copy(epr);
+		
+		NodeList nl = header.getChildNodes();
+
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			String nodeName = nl.item(i).getNodeName();
+			
+			try
+			{
+				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+USERNAME_TAG))
+				{
+					getAddr().addExtension(USERNAME_TAG, nl.item(i).getTextContent());
+				}
+				else
+					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+PASSWORD_TAG))
+					{
+						getAddr().addExtension(PASSWORD_TAG, nl.item(i).getTextContent());
+					}
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+			}
+		}
+	}
+	
+	/**
+	 * Create a new email EPR. The port number will be assumed to be 25,
+	 * and there are no values for username and password.
+	 * 
+	 * @param protocol the protocol to use.
+	 * @param host the host name.
+	 */
+	
+	public EmailEpr (String protocol, String host)
+	{
+		this(protocol, host, DEFAULT_PORT, DEFAULT_USERNAME, DEFAULT_PASSWORD);
+	}
+	
+	/**
+	 * Create a new email EPR.
+	 * 
+	 * @param protocol the protocol to use.
+	 * @param host the host name.
+	 * @param port the port to use.
+	 * @param username the username for sending/receiving.
+	 * @param password the password for sending/receiving.
+	 */
+	
+	public EmailEpr (String protocol, String host, String port, String username, String password)
+	{
+		// how many of these do we really need? modify accordingly.
+		
+		if ((protocol == null) || (host == null) || (port == null))
+			throw new IllegalArgumentException();
+		
+		if ((protocol.equals(SMTP_PROTOCOL) || (protocol.equals(POP_PROTOCOL))))
+		{
+			PortReference addr = new PortReference(protocol+PROTOCOL_SEPARATOR+host+PORT_SEPARATOR+port);
+			
+			if (username != null)
+				addr.addExtension(USERNAME_TAG, username);
+			
+			if (password != null)
+				addr.addExtension(PASSWORD_TAG, password);
+			
+			setAddr(addr);
+		}
+		else
+			throw new IllegalArgumentException("Invalid email protocol!");
+	}
+	
+	/**
+	 * @return the email protocol used.
+	 * @throws URISyntaxException thrown if the address is malformed.
+	 */
+	
+	public final String getProtocol () throws URISyntaxException
+	{
+		URI addr = new URI(getAddr().getAddress());
+		
+		return addr.getScheme();
+	}
+	
+	/**
+	 * @return the email host used.
+	 * @throws URISyntaxException thrown if the address is malformed.
+	 */
+	
+	public final String getHost () throws URISyntaxException
+	{	
+		URI addr = new URI(getAddr().getAddress());
+		
+		return addr.getHost();
+	}
+	
+	/**
+	 * @return the email port used, or -1 if not specified.
+	 * @throws URISyntaxException thrown if the address is malformed.
+	 */
+
+	public final int getPort () throws URISyntaxException
+	{
+		URI addr = new URI(getAddr().getAddress());
+		
+		return addr.getPort();
+	}
+	
+	/*
+	 * There are deliberately no setters for the values once the EPR is created.
+	 */
+	
+	/**
+	 * @return the password for this EPR, or <code>null</code> if none is set.
+	 * @throws URISyntaxException thrown if the address is malformed.
+	 */
+	
+	public final String getPassword () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(PASSWORD_TAG);
+	}
+	
+	/**
+	 * @return the username for this EPR, or <code>null</code> if none is set.
+	 * @throws URISyntaxException thrown if the address is malformed.
+	 */
+	
+	public final String getUserName () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(USERNAME_TAG);
+	}
+
+	public static final URI type ()
+	{
+	    return _type;
+	}
+	
+	private static URI _type;
+
+	static
+	{
+	    try
+		{
+		    _type = new URI("urn:jboss:esb:epr:type:email");
+		}
+		catch (Exception ex)
+		{
+		    ex.printStackTrace();
+		    
+		    throw new ExceptionInInitializerError(ex.toString());
+		}
+	}
 } 
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/EmailEpr.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FTPEpr.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FTPEpr.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FTPEpr.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,243 +1,243 @@
-package org.jboss.soa.esb.addressing.eprs;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-/**
- * This class represents the endpoint reference for services.
- */
-
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.PortReference;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * A helper class for using FTP style EPRs. Simply create instances of this
- * class instead of the base EPR. Since URLs can use FTP, we try to leverage
- * that as much as possible.
- * 
- * @author marklittle
- *
- */
-public class FTPEpr extends FileEpr
-{
-	public static final String USERNAME_TAG = "username";
-	public static final String PASSWORD_TAG = "password";
-	public static final String PASSIVE_TAG = "passive";
-	
-	public FTPEpr (EPR epr)
-	{
-		super(epr);
-		
-		copy(epr);
-	}
-	
-	public FTPEpr (EPR epr, Element header)
-	{
-		super(epr, header);
-		
-		copy(epr);
-		
-		NodeList nl = header.getChildNodes();
-
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			String nodeName = nl.item(i).getNodeName();
-
-			try
-			{
-				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+USERNAME_TAG))
-				{
-					getAddr().addExtension(USERNAME_TAG, nl.item(i).getTextContent());
-				}
-				else
-					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+PASSWORD_TAG))
-					{
-						getAddr().addExtension(PASSWORD_TAG, nl.item(i).getTextContent());
-					}
-					else
-						if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+PASSIVE_TAG))
-					{
-						getAddr().addExtension(PASSIVE_TAG, nl.item(i).getTextContent());
-					}
-			}
-			catch (Exception ex)
-			{
-				ex.printStackTrace();
-			}
-		}
-	}
-			
-	public FTPEpr (URL url) throws URISyntaxException
-	{
-		super(new URI(url.toString()));
-	}
-	
-	public FTPEpr (String url) throws URISyntaxException
-	{
-		super(new URI(url));
-	}
-
-	/**
-	 * Set the URL for this endpoint.
-	 * 
-	 * @param url the address.
-	 */
-	
-	public final void setURL (URL url)
-	{
-		super.setAddr(new PortReference(url.toString()));
-	}
-	
-	/**
-	 * Get the URL address.
-	 * 
-	 * @return the address.
-	 * @throws URISyntaxException thrown if the address is invalid.
-	 */
-	
-	public final URL getURL () throws MalformedURLException, URISyntaxException
-	{
-		return new URL(super.getAddr().getAddress());
-	}
-
-	/**
-	 * Set the username for this FTP EPR. In case it cannot be put in the URL.
-	 * 
-	 * @param username the user's name.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setUserName (String username) throws URISyntaxException
-	{
-		if (username == null)
-			throw new IllegalArgumentException();
-		
-		if (userSet)
-			throw new IllegalStateException("Username already set.");
-		
-		getAddr().addExtension(USERNAME_TAG, username);
-		userSet = true;
-	}
-	
-	/**
-	 * @return the user's name associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getUserName () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(USERNAME_TAG);
-	}
-	
-	/**
-	 * Set the password for this FTP EPR.
-	 * 
-	 * @param password the user's name.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setPassword (String password) throws URISyntaxException
-	{
-		if (password == null)
-			throw new IllegalArgumentException();
-		
-		if (passwordSet)
-			throw new IllegalStateException("Cannot change password");
-		
-		getAddr().addExtension(PASSWORD_TAG, password);
-		passwordSet = true;
-	}
-	
-	/**
-	 * @return the password associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getPassword () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(PASSWORD_TAG);
-	}
-	
-	/**
-	 * Passive FTP?
-	 * 
-	 * @param passive the value.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setPassive (boolean passive) throws URISyntaxException
-	{
-		if (passiveSet)
-			throw new IllegalStateException("Cannot change passive");
-		
-		if (passive)
-			getAddr().addExtension(PASSIVE_TAG, "true");
-		else
-			getAddr().addExtension(PASSIVE_TAG, "false");
-		
-		passiveSet = true;
-	}
-	
-	/**
-	 * @return the passive value associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final boolean getPassive () throws URISyntaxException
-	{
-		return "true".equals(getAddr().getExtensionValue(PASSIVE_TAG));
-	}
-	
-	
-	public static URI type ()
-	{
-	    return _type;
-	}
-
-	private boolean passwordSet = false;
-	private boolean userSet = false;
-	private boolean passiveSet = false;
-	
-	private static URI _type;
-	
-	static
-	{
-	    try
-		{
-		    _type = new URI("urn:jboss:esb:epr:type:ftp");
-		}
-		catch (Exception ex)
-		{
-		    ex.printStackTrace();
-		    
-		    throw new ExceptionInInitializerError(ex.toString());
-		}
-	}
+package org.jboss.soa.esb.addressing.eprs;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+/**
+ * This class represents the endpoint reference for services.
+ */
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * A helper class for using FTP style EPRs. Simply create instances of this
+ * class instead of the base EPR. Since URLs can use FTP, we try to leverage
+ * that as much as possible.
+ * 
+ * @author marklittle
+ *
+ */
+public class FTPEpr extends FileEpr
+{
+	public static final String USERNAME_TAG = "username";
+	public static final String PASSWORD_TAG = "password";
+	public static final String PASSIVE_TAG = "passive";
+	
+	public FTPEpr (EPR epr)
+	{
+		super(epr);
+		
+		copy(epr);
+	}
+	
+	public FTPEpr (EPR epr, Element header)
+	{
+		super(epr, header);
+		
+		copy(epr);
+		
+		NodeList nl = header.getChildNodes();
+
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			String nodeName = nl.item(i).getNodeName();
+
+			try
+			{
+				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+USERNAME_TAG))
+				{
+					getAddr().addExtension(USERNAME_TAG, nl.item(i).getTextContent());
+				}
+				else
+					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+PASSWORD_TAG))
+					{
+						getAddr().addExtension(PASSWORD_TAG, nl.item(i).getTextContent());
+					}
+					else
+						if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+PASSIVE_TAG))
+					{
+						getAddr().addExtension(PASSIVE_TAG, nl.item(i).getTextContent());
+					}
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+			}
+		}
+	}
+			
+	public FTPEpr (URL url) throws URISyntaxException
+	{
+		super(new URI(url.toString()));
+	}
+	
+	public FTPEpr (String url) throws URISyntaxException
+	{
+		super(new URI(url));
+	}
+
+	/**
+	 * Set the URL for this endpoint.
+	 * 
+	 * @param url the address.
+	 */
+	
+	public final void setURL (URL url)
+	{
+		super.setAddr(new PortReference(url.toString()));
+	}
+	
+	/**
+	 * Get the URL address.
+	 * 
+	 * @return the address.
+	 * @throws URISyntaxException thrown if the address is invalid.
+	 */
+	
+	public final URL getURL () throws MalformedURLException, URISyntaxException
+	{
+		return new URL(super.getAddr().getAddress());
+	}
+
+	/**
+	 * Set the username for this FTP EPR. In case it cannot be put in the URL.
+	 * 
+	 * @param username the user's name.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setUserName (String username) throws URISyntaxException
+	{
+		if (username == null)
+			throw new IllegalArgumentException();
+		
+		if (userSet)
+			throw new IllegalStateException("Username already set.");
+		
+		getAddr().addExtension(USERNAME_TAG, username);
+		userSet = true;
+	}
+	
+	/**
+	 * @return the user's name associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getUserName () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(USERNAME_TAG);
+	}
+	
+	/**
+	 * Set the password for this FTP EPR.
+	 * 
+	 * @param password the user's name.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setPassword (String password) throws URISyntaxException
+	{
+		if (password == null)
+			throw new IllegalArgumentException();
+		
+		if (passwordSet)
+			throw new IllegalStateException("Cannot change password");
+		
+		getAddr().addExtension(PASSWORD_TAG, password);
+		passwordSet = true;
+	}
+	
+	/**
+	 * @return the password associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getPassword () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(PASSWORD_TAG);
+	}
+	
+	/**
+	 * Passive FTP?
+	 * 
+	 * @param passive the value.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setPassive (boolean passive) throws URISyntaxException
+	{
+		if (passiveSet)
+			throw new IllegalStateException("Cannot change passive");
+		
+		if (passive)
+			getAddr().addExtension(PASSIVE_TAG, "true");
+		else
+			getAddr().addExtension(PASSIVE_TAG, "false");
+		
+		passiveSet = true;
+	}
+	
+	/**
+	 * @return the passive value associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final boolean getPassive () throws URISyntaxException
+	{
+		return "true".equals(getAddr().getExtensionValue(PASSIVE_TAG));
+	}
+	
+	
+	public static URI type ()
+	{
+	    return _type;
+	}
+
+	private boolean passwordSet = false;
+	private boolean userSet = false;
+	private boolean passiveSet = false;
+	
+	private static URI _type;
+	
+	static
+	{
+	    try
+		{
+		    _type = new URI("urn:jboss:esb:epr:type:ftp");
+		}
+		catch (Exception ex)
+		{
+		    ex.printStackTrace();
+		    
+		    throw new ExceptionInInitializerError(ex.toString());
+		}
+	}
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FTPEpr.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FileEpr.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FileEpr.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FileEpr.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,421 +1,421 @@
-package org.jboss.soa.esb.addressing.eprs;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-/**
- * This class represents the endpoint reference for services.
- */
-
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.PortReference;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * A helper class for using file based  EPRs. Simply create instances of this
- * class instead of the base EPR. Since URLs can use file:// as the protocol, we try to leverage
- * that as much as possible.
- * 
- * @author marklittle
- *
- */
-public class FileEpr extends EPR
-{
-	public static final String INPUT_SUFFIX_TAG = "inputSuffix";
-	public static final String WORK_SUFFIX_TAG 	= "workSuffix";
-	public static final String POST_DIR_TAG 	= "postDir";
-	public static final String POST_SUFFIX_TAG 	= "postSuffix";
-	public static final String POST_DEL_TAG 	= "postDelete";
-	public static final String ERROR_DIR_TAG 	= "errorDir";
-	public static final String ERROR_SUFFIX_TAG	= "errorSuffix";
-	public static final String ERROR_DEL_TAG 	= "errorDelete";
-	public static final String URL_TAG = "URL";
-	
-	public FileEpr (EPR epr)
-	{
-		copy(epr);
-	}
-	
-	public FileEpr (EPR epr, Element header)
-	{
-		copy(epr);
-		
-		NodeList nl = header.getChildNodes();
-
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			String nodeName = nl.item(i).getNodeName();
-
-			try
-			{
-				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+INPUT_SUFFIX_TAG))
-				{
-					getAddr().addExtension(INPUT_SUFFIX_TAG, nl.item(i).getTextContent());
-				}
-				else
-					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+POST_DIR_TAG))
-					{
-						getAddr().addExtension(POST_DIR_TAG, nl.item(i).getTextContent());
-					}
-					else
-						if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+POST_SUFFIX_TAG))
-						{
-							getAddr().addExtension(POST_SUFFIX_TAG, nl.item(i).getTextContent());
-						}
-						else
-							if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+POST_DEL_TAG))
-							{
-								getAddr().addExtension(POST_DEL_TAG, nl.item(i).getTextContent());
-							}
-							else
-				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+ERROR_DIR_TAG))
-				{
-					getAddr().addExtension(ERROR_DIR_TAG, nl.item(i).getTextContent());
-				}
-				else
-					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+ERROR_SUFFIX_TAG))
-					{
-						getAddr().addExtension(ERROR_SUFFIX_TAG, nl.item(i).getTextContent());
-					}
-					else
-						if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+ERROR_DEL_TAG))
-						{
-							getAddr().addExtension(ERROR_DEL_TAG, nl.item(i).getTextContent());
-						}
-			}
-			catch (Exception ex)
-			{
-				ex.printStackTrace();
-			}
-		}
-	}
-
-	public FileEpr (URL url) throws URISyntaxException
-	{
-		super(new URI(url.toString()));
-	}
-	
-	public FileEpr (String url) throws URISyntaxException
-	{
-		super(new URI(url));
-	}
-
-	/**
-	 * Set the URL for this endpoint.
-	 * 
-	 * @param url the address.
-	 */
-	
-	public void setURL (URL url)
-	{
-		super.setAddr(new PortReference(url.toString()));
-	}
-	
-	/**
-	 * Get the URL address.
-	 * 
-	 * @return the address.
-	 * @throws URISyntaxException thrown if the address is invalid.
-	 */
-	
-	public URL getURL () throws MalformedURLException, URISyntaxException
-	{
-		return new URL(super.getAddr().getAddress());
-	}
-
-	/**
-	 * Set the file input suffix.
-	 * 
-	 * @param suffix the input suffix to use.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setInputSuffix (String suffix) throws URISyntaxException
-	{
-		if (suffix == null)
-			throw new IllegalArgumentException();
-		
-		if (inputSet)
-			throw new IllegalStateException("Input suffix already set.");
-		
-		getAddr().addExtension(INPUT_SUFFIX_TAG, suffix);
-		inputSet = true;
-	}
-	
-	/**
-	 * @return the input suffix associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getInputSuffix () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(INPUT_SUFFIX_TAG);
-	}
-	
-	/**
-	 * Set the work suffix for this EPR.
-	 * 
-	 * @param suffix the suffix to use.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setWorkSuffix (String suffix) throws URISyntaxException
-	{
-		if (suffix == null)
-			throw new IllegalArgumentException();
-		
-		if (workSet)
-			throw new IllegalStateException("Cannot change work suffix");
-		
-		getAddr().addExtension(WORK_SUFFIX_TAG, suffix);
-		workSet = true;
-	}
-	
-	/**
-	 * @return the work suffix associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getWorkSuffix () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(WORK_SUFFIX_TAG);
-	}
-	
-	/**
-	 * Set the post directory for this EPR.
-	 * 
-	 * @param dir the directory to use.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setPostDirectory (String dir) throws URISyntaxException
-	{
-		if (dir == null)
-			throw new IllegalArgumentException();
-		
-		if (postDirSet)
-			throw new IllegalStateException("Cannot change post directory");
-		
-		getAddr().addExtension(POST_DIR_TAG, dir);
-		postDirSet = true;
-	}
-	
-	/**
-	 * @return the post directory associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getPostDirectory () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(POST_DIR_TAG);
-	}
-	
-	/**
-	 * Set the post suffix for this EPR.
-	 * 
-	 * @param suffix the suffix to use.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setPostSuffix (String suffix) throws URISyntaxException
-	{
-		if (suffix == null)
-			throw new IllegalArgumentException();
-		
-		if (postSuffixSet)
-			throw new IllegalStateException("Cannot change post suffix");
-		
-		getAddr().addExtension(POST_SUFFIX_TAG, suffix);
-		postSuffixSet = true;
-	}
-	
-	/**
-	 * @return the post suffix associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getPostSuffix () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(POST_SUFFIX_TAG);
-	}
-	
-	/**
-	 * Set the post delete for this EPR.
-	 * 
-	 * @param del the deleted value to use.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setPostDelete (boolean del) throws URISyntaxException
-	{		
-		if (postDelSet)
-			throw new IllegalStateException("Cannot change post delete");
-		
-		if (del)
-			getAddr().addExtension(POST_DEL_TAG, "true");
-		else
-			getAddr().addExtension(POST_DEL_TAG, "false");
-		
-		postDelSet = true;
-	}
-	
-	/**
-	 * @return the delete vazlue associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final boolean getPostDelete () throws URISyntaxException
-	{
-		return ("true".equals(getAddr().getExtensionValue(POST_DEL_TAG)));
-	}
-		
-	/**
-	 * Set the error directory for this EPR.
-	 * 
-	 * @param dir the directory to use.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setErrorDirectory (String dir) throws URISyntaxException
-	{
-		if (dir == null)
-			throw new IllegalArgumentException();
-		
-		if (errorDirSet)
-			throw new IllegalStateException("Cannot change error directory");
-		
-		getAddr().addExtension(ERROR_DIR_TAG, dir);
-		errorDirSet = true;
-	}
-	
-	/**
-	 * @return the error directory associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getErrorDirectory () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(ERROR_DIR_TAG);
-	}
-	
-	/**
-	 * Set the error suffix for this EPR.
-	 * 
-	 * @param suffix the suffix to use.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setErrorSuffix (String suffix) throws URISyntaxException
-	{
-		if (suffix == null)
-			throw new IllegalArgumentException();
-		
-		if (errorSuffixSet)
-			throw new IllegalStateException("Cannot change error suffix");
-		
-		getAddr().addExtension(ERROR_SUFFIX_TAG, suffix);
-		errorSuffixSet = true;
-	}
-	
-	/**
-	 * @return the error suffix associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getErrorSuffix () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(ERROR_SUFFIX_TAG);
-	}
-	
-	/**
-	 * Set the error delete for this EPR. (invalid Message files will be deleted)
-	 * 
-	 * @param del the deleted value to use.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setErrorDelete (boolean del) throws URISyntaxException
-	{		
-		if (errorDelSet)
-			throw new IllegalStateException("Cannot change error delete");
-		
-		if (del)
-			getAddr().addExtension(ERROR_DEL_TAG, "true");
-		else
-			getAddr().addExtension(ERROR_DEL_TAG, "false");
-		
-		errorDelSet = true;
-	}
-	
-	/**
-	 * Attention - Default 
-	 * @return the error delete value associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final boolean getErrorDelete () throws URISyntaxException
-	{
-		return (! "false".equals(getAddr().getExtensionValue(ERROR_DEL_TAG)));
-	}
-		
-	public static URI type ()
-	{
-	    return _type;
-	}
-	
-	protected FileEpr (URI uri)
-	{
-		super(uri);
-	}
-
-	private boolean inputSet = false;
-	private boolean workSet = false;
-	private boolean postDirSet = false;
-	private boolean postSuffixSet = false;
-	private boolean postDelSet = false;
-	private boolean errorDirSet = false;
-	private boolean errorSuffixSet = false;
-	private boolean errorDelSet = false;
-	
-	private static URI _type;
-	
-	static
-	{
-	    try
-		{
-		    _type = new URI("urn:jboss:esb:epr:type:file");
-		}
-		catch (Exception ex)
-		{
-		    ex.printStackTrace();
-		    
-		    throw new ExceptionInInitializerError(ex.toString());
-		}
-	}
+package org.jboss.soa.esb.addressing.eprs;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+/**
+ * This class represents the endpoint reference for services.
+ */
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * A helper class for using file based  EPRs. Simply create instances of this
+ * class instead of the base EPR. Since URLs can use file:// as the protocol, we try to leverage
+ * that as much as possible.
+ * 
+ * @author marklittle
+ *
+ */
+public class FileEpr extends EPR
+{
+	public static final String INPUT_SUFFIX_TAG = "inputSuffix";
+	public static final String WORK_SUFFIX_TAG 	= "workSuffix";
+	public static final String POST_DIR_TAG 	= "postDir";
+	public static final String POST_SUFFIX_TAG 	= "postSuffix";
+	public static final String POST_DEL_TAG 	= "postDelete";
+	public static final String ERROR_DIR_TAG 	= "errorDir";
+	public static final String ERROR_SUFFIX_TAG	= "errorSuffix";
+	public static final String ERROR_DEL_TAG 	= "errorDelete";
+	public static final String URL_TAG = "URL";
+	
+	public FileEpr (EPR epr)
+	{
+		copy(epr);
+	}
+	
+	public FileEpr (EPR epr, Element header)
+	{
+		copy(epr);
+		
+		NodeList nl = header.getChildNodes();
+
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			String nodeName = nl.item(i).getNodeName();
+
+			try
+			{
+				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+INPUT_SUFFIX_TAG))
+				{
+					getAddr().addExtension(INPUT_SUFFIX_TAG, nl.item(i).getTextContent());
+				}
+				else
+					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+POST_DIR_TAG))
+					{
+						getAddr().addExtension(POST_DIR_TAG, nl.item(i).getTextContent());
+					}
+					else
+						if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+POST_SUFFIX_TAG))
+						{
+							getAddr().addExtension(POST_SUFFIX_TAG, nl.item(i).getTextContent());
+						}
+						else
+							if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+POST_DEL_TAG))
+							{
+								getAddr().addExtension(POST_DEL_TAG, nl.item(i).getTextContent());
+							}
+							else
+				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+ERROR_DIR_TAG))
+				{
+					getAddr().addExtension(ERROR_DIR_TAG, nl.item(i).getTextContent());
+				}
+				else
+					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+ERROR_SUFFIX_TAG))
+					{
+						getAddr().addExtension(ERROR_SUFFIX_TAG, nl.item(i).getTextContent());
+					}
+					else
+						if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+ERROR_DEL_TAG))
+						{
+							getAddr().addExtension(ERROR_DEL_TAG, nl.item(i).getTextContent());
+						}
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+			}
+		}
+	}
+
+	public FileEpr (URL url) throws URISyntaxException
+	{
+		super(new URI(url.toString()));
+	}
+	
+	public FileEpr (String url) throws URISyntaxException
+	{
+		super(new URI(url));
+	}
+
+	/**
+	 * Set the URL for this endpoint.
+	 * 
+	 * @param url the address.
+	 */
+	
+	public void setURL (URL url)
+	{
+		super.setAddr(new PortReference(url.toString()));
+	}
+	
+	/**
+	 * Get the URL address.
+	 * 
+	 * @return the address.
+	 * @throws URISyntaxException thrown if the address is invalid.
+	 */
+	
+	public URL getURL () throws MalformedURLException, URISyntaxException
+	{
+		return new URL(super.getAddr().getAddress());
+	}
+
+	/**
+	 * Set the file input suffix.
+	 * 
+	 * @param suffix the input suffix to use.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setInputSuffix (String suffix) throws URISyntaxException
+	{
+		if (suffix == null)
+			throw new IllegalArgumentException();
+		
+		if (inputSet)
+			throw new IllegalStateException("Input suffix already set.");
+		
+		getAddr().addExtension(INPUT_SUFFIX_TAG, suffix);
+		inputSet = true;
+	}
+	
+	/**
+	 * @return the input suffix associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getInputSuffix () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(INPUT_SUFFIX_TAG);
+	}
+	
+	/**
+	 * Set the work suffix for this EPR.
+	 * 
+	 * @param suffix the suffix to use.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setWorkSuffix (String suffix) throws URISyntaxException
+	{
+		if (suffix == null)
+			throw new IllegalArgumentException();
+		
+		if (workSet)
+			throw new IllegalStateException("Cannot change work suffix");
+		
+		getAddr().addExtension(WORK_SUFFIX_TAG, suffix);
+		workSet = true;
+	}
+	
+	/**
+	 * @return the work suffix associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getWorkSuffix () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(WORK_SUFFIX_TAG);
+	}
+	
+	/**
+	 * Set the post directory for this EPR.
+	 * 
+	 * @param dir the directory to use.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setPostDirectory (String dir) throws URISyntaxException
+	{
+		if (dir == null)
+			throw new IllegalArgumentException();
+		
+		if (postDirSet)
+			throw new IllegalStateException("Cannot change post directory");
+		
+		getAddr().addExtension(POST_DIR_TAG, dir);
+		postDirSet = true;
+	}
+	
+	/**
+	 * @return the post directory associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getPostDirectory () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(POST_DIR_TAG);
+	}
+	
+	/**
+	 * Set the post suffix for this EPR.
+	 * 
+	 * @param suffix the suffix to use.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setPostSuffix (String suffix) throws URISyntaxException
+	{
+		if (suffix == null)
+			throw new IllegalArgumentException();
+		
+		if (postSuffixSet)
+			throw new IllegalStateException("Cannot change post suffix");
+		
+		getAddr().addExtension(POST_SUFFIX_TAG, suffix);
+		postSuffixSet = true;
+	}
+	
+	/**
+	 * @return the post suffix associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getPostSuffix () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(POST_SUFFIX_TAG);
+	}
+	
+	/**
+	 * Set the post delete for this EPR.
+	 * 
+	 * @param del the deleted value to use.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setPostDelete (boolean del) throws URISyntaxException
+	{		
+		if (postDelSet)
+			throw new IllegalStateException("Cannot change post delete");
+		
+		if (del)
+			getAddr().addExtension(POST_DEL_TAG, "true");
+		else
+			getAddr().addExtension(POST_DEL_TAG, "false");
+		
+		postDelSet = true;
+	}
+	
+	/**
+	 * @return the delete vazlue associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final boolean getPostDelete () throws URISyntaxException
+	{
+		return ("true".equals(getAddr().getExtensionValue(POST_DEL_TAG)));
+	}
+		
+	/**
+	 * Set the error directory for this EPR.
+	 * 
+	 * @param dir the directory to use.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setErrorDirectory (String dir) throws URISyntaxException
+	{
+		if (dir == null)
+			throw new IllegalArgumentException();
+		
+		if (errorDirSet)
+			throw new IllegalStateException("Cannot change error directory");
+		
+		getAddr().addExtension(ERROR_DIR_TAG, dir);
+		errorDirSet = true;
+	}
+	
+	/**
+	 * @return the error directory associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getErrorDirectory () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(ERROR_DIR_TAG);
+	}
+	
+	/**
+	 * Set the error suffix for this EPR.
+	 * 
+	 * @param suffix the suffix to use.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setErrorSuffix (String suffix) throws URISyntaxException
+	{
+		if (suffix == null)
+			throw new IllegalArgumentException();
+		
+		if (errorSuffixSet)
+			throw new IllegalStateException("Cannot change error suffix");
+		
+		getAddr().addExtension(ERROR_SUFFIX_TAG, suffix);
+		errorSuffixSet = true;
+	}
+	
+	/**
+	 * @return the error suffix associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getErrorSuffix () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(ERROR_SUFFIX_TAG);
+	}
+	
+	/**
+	 * Set the error delete for this EPR. (invalid Message files will be deleted)
+	 * 
+	 * @param del the deleted value to use.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setErrorDelete (boolean del) throws URISyntaxException
+	{		
+		if (errorDelSet)
+			throw new IllegalStateException("Cannot change error delete");
+		
+		if (del)
+			getAddr().addExtension(ERROR_DEL_TAG, "true");
+		else
+			getAddr().addExtension(ERROR_DEL_TAG, "false");
+		
+		errorDelSet = true;
+	}
+	
+	/**
+	 * Attention - Default 
+	 * @return the error delete value associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final boolean getErrorDelete () throws URISyntaxException
+	{
+		return (! "false".equals(getAddr().getExtensionValue(ERROR_DEL_TAG)));
+	}
+		
+	public static URI type ()
+	{
+	    return _type;
+	}
+	
+	protected FileEpr (URI uri)
+	{
+		super(uri);
+	}
+
+	private boolean inputSet = false;
+	private boolean workSet = false;
+	private boolean postDirSet = false;
+	private boolean postSuffixSet = false;
+	private boolean postDelSet = false;
+	private boolean errorDirSet = false;
+	private boolean errorSuffixSet = false;
+	private boolean errorDelSet = false;
+	
+	private static URI _type;
+	
+	static
+	{
+	    try
+		{
+		    _type = new URI("urn:jboss:esb:epr:type:file");
+		}
+		catch (Exception ex)
+		{
+		    ex.printStackTrace();
+		    
+		    throw new ExceptionInInitializerError(ex.toString());
+		}
+	}
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/FileEpr.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/HTTPEpr.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/HTTPEpr.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/HTTPEpr.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,111 +1,111 @@
-package org.jboss.soa.esb.addressing.eprs;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-/**
- * This class represents the endpoint reference for services.
- */
-
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.PortReference;
-import org.w3c.dom.Element;
-
-/**
- * A helper class for using HTTP style EPRs. Simply create instances of this
- * class instead of the base EPR.
- * 
- * @author marklittle
- *
- */
-public class HTTPEpr extends EPR
-{
-
-	public HTTPEpr (EPR epr)
-	{
-		copy(epr);
-	}
-	
-	public HTTPEpr (EPR epr, Element header)
-	{
-		copy(epr);
-	}
-	
-	public HTTPEpr (URL url) throws URISyntaxException
-	{
-		super(new URI(url.toString()));
-	}
-	
-	public HTTPEpr (String url) throws URISyntaxException
-	{
-		super(new URI(url));
-	}
-	
-	/**
-	 * Set the URL for this endpoint.
-	 * 
-	 * @param url the address.
-	 */
-	
-	public final void setURL (URL url)
-	{
-		super.setAddr(new PortReference(url.toString()));
-	}
-	
-	/**
-	 * Get the URL address.
-	 * 
-	 * @return the address.
-	 * @throws URISyntaxException thrown if the address is invalid.
-	 */
-	
-	public final URL getURL () throws MalformedURLException, URISyntaxException
-	{
-		return new URL(super.getAddr().getAddress());
-	}
-	
-	public static final URI type ()
-	{
-	    return _type;
-	}
-
-	private static URI _type;
-	
-	static
-	{
-	    try
-		{
-		    _type = new URI("urn:jboss:esb:epr:type:http");
-		}
-		catch (Exception ex)
-		{
-		    ex.printStackTrace();
-		    
-		    throw new ExceptionInInitializerError(ex.toString());
-		}
-	}
+package org.jboss.soa.esb.addressing.eprs;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+/**
+ * This class represents the endpoint reference for services.
+ */
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.w3c.dom.Element;
+
+/**
+ * A helper class for using HTTP style EPRs. Simply create instances of this
+ * class instead of the base EPR.
+ * 
+ * @author marklittle
+ *
+ */
+public class HTTPEpr extends EPR
+{
+
+	public HTTPEpr (EPR epr)
+	{
+		copy(epr);
+	}
+	
+	public HTTPEpr (EPR epr, Element header)
+	{
+		copy(epr);
+	}
+	
+	public HTTPEpr (URL url) throws URISyntaxException
+	{
+		super(new URI(url.toString()));
+	}
+	
+	public HTTPEpr (String url) throws URISyntaxException
+	{
+		super(new URI(url));
+	}
+	
+	/**
+	 * Set the URL for this endpoint.
+	 * 
+	 * @param url the address.
+	 */
+	
+	public final void setURL (URL url)
+	{
+		super.setAddr(new PortReference(url.toString()));
+	}
+	
+	/**
+	 * Get the URL address.
+	 * 
+	 * @return the address.
+	 * @throws URISyntaxException thrown if the address is invalid.
+	 */
+	
+	public final URL getURL () throws MalformedURLException, URISyntaxException
+	{
+		return new URL(super.getAddr().getAddress());
+	}
+	
+	public static final URI type ()
+	{
+	    return _type;
+	}
+
+	private static URI _type;
+	
+	static
+	{
+	    try
+		{
+		    _type = new URI("urn:jboss:esb:epr:type:http");
+		}
+		catch (Exception ex)
+		{
+		    ex.printStackTrace();
+		    
+		    throw new ExceptionInInitializerError(ex.toString());
+		}
+	}
 } 
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/HTTPEpr.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JDBCEpr.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JDBCEpr.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JDBCEpr.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,495 +1,495 @@
-package org.jboss.soa.esb.addressing.eprs;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-/**
- * This class represents the endpoint reference for services.
- */
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.PortReference;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * A helper class for using database style EPRs. Simply create instances of this
- * class instead of the base EPR.
- * 
- * @author marklittle
- *
- */
-
-public class JDBCEpr extends EPR
-{
-	public static final String JDBC_PROTOCOL = "jdbc";
-	
-	public static final String USERNAME_TAG = "username";
-	public static final String PASSWORD_TAG = "password";
-	public static final String SQL_TAG = "sql";
-	public static final String DRIVER_TAG = "driver";
-	public static final String URL_TAG = "URL";
-
-	public static final String TABLE_NAME_TAG 			= "tablename";
-	public static final String MESSAGE_ID_COLUMN_TAG 	= "message_id_column";
-	public static final String STATUS_COLUMN_TAG 		= "status_column";
-	public static final String DATA_COLUMN_TAG 			= "message_column";
-	public static final String TIMESTAMP_COLUMN_TAG 	= "insert_timestamp_column";
-	public static final String POST_DEL_TAG				= "postDelete";
-	public static final String ERROR_DEL_TAG			= "errorDelete";
-	
-	public JDBCEpr (EPR epr)
-	{
-		copy(epr);
-	}
-	
-	public JDBCEpr (EPR epr, Element header)
-	{
-		copy(epr);
-		
-		NodeList nl = header.getChildNodes();
-
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			String nodeName = nl.item(i).getNodeName();
-			
-			try
-			{
-				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+USERNAME_TAG))
-				{
-					getAddr().addExtension(USERNAME_TAG, nl.item(i).getTextContent());
-				}
-				else
-					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+PASSWORD_TAG))
-					{
-						getAddr().addExtension(PASSWORD_TAG, nl.item(i).getTextContent());
-					}
-					else
-						if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+SQL_TAG))
-						{
-							getAddr().addExtension(SQL_TAG, nl.item(i).getTextContent());
-						}
-						else
-							if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+DRIVER_TAG))
-							{
-								getAddr().addExtension(DRIVER_TAG, nl.item(i).getTextContent());
-							}
-							else
-								if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+URL_TAG))
-								{
-									getAddr().addExtension(URL_TAG, nl.item(i).getTextContent());
-								}
-								else
-									if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+TABLE_NAME_TAG))
-									{
-										getAddr().addExtension(TABLE_NAME_TAG, nl.item(i).getTextContent());
-									}
-									else
-										if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+MESSAGE_ID_COLUMN_TAG))
-										{
-											getAddr().addExtension(MESSAGE_ID_COLUMN_TAG, nl.item(i).getTextContent());
-										}
-										else
-											if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+STATUS_COLUMN_TAG))
-											{
-												getAddr().addExtension(STATUS_COLUMN_TAG, nl.item(i).getTextContent());
-											}
-											else
-												if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+DATA_COLUMN_TAG))
-												{
-													getAddr().addExtension(DATA_COLUMN_TAG, nl.item(i).getTextContent());
-												}
-												else
-													if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+TIMESTAMP_COLUMN_TAG))
-													{
-														getAddr().addExtension(TIMESTAMP_COLUMN_TAG, nl.item(i).getTextContent());
-													}
-													else
-														if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+POST_DEL_TAG))
-														{
-															getAddr().addExtension(POST_DEL_TAG, nl.item(i).getTextContent());
-														}
-														else
-															if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+ERROR_DEL_TAG))
-															{
-																getAddr().addExtension(ERROR_DEL_TAG, nl.item(i).getTextContent());
-															}
-			}
-			catch (Exception ex)
-			{
-				ex.printStackTrace();
-			}
-		}
-	}			
-	
-	public JDBCEpr (String url, String sql) throws URISyntaxException
-	{
-		super(new URI(url));
-		
-		setSQL(sql);
-	}
-
-	public JDBCEpr (String url) throws URISyntaxException
-	{
-		this(url,true,true);
-	}
-
-	public JDBCEpr (String url, boolean postDelete, boolean errorDelete) throws URISyntaxException
-	{
-		super(new URI(url));
-		if (postDelete)
-			getAddr().addExtension(POST_DEL_TAG,Boolean.toString(postDelete));
-		if (errorDelete)
-			getAddr().addExtension(ERROR_DEL_TAG,Boolean.toString(errorDelete));
-	}
-
-	/**
-	 * Set the URL for this endpoint.
-	 * 
-	 * @param url the address.
-	 */
-	
-	public final void setURL (String url)
-	{
-		super.setAddr(new PortReference(url));
-	}
-	
-	/**
-	 * Get the URL address.
-	 * 
-	 * @return the address.
-	 * @throws URISyntaxException thrown if the address is invalid.
-	 */
-	
-	public final String getURL () throws URISyntaxException
-	{
-		return getAddr().getAddress();
-	}
-
-	/**
-	 * Set the username for this FTP EPR.
-	 * 
-	 * @param username the user's name.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setUserName (String username) throws URISyntaxException
-	{
-		if (username == null)
-			throw new IllegalArgumentException();
-		
-		if (userSet)
-			throw new IllegalStateException("Username already set.");
-		
-		getAddr().addExtension(USERNAME_TAG, username);
-		userSet = true;
-	}
-	
-	/**
-	 * @return the user's name associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getUserName () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(USERNAME_TAG);
-	}
-	
-	/**
-	 * Set the password for this FTP EPR.
-	 * 
-	 * @param password the user's name.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setPassword (String password) throws URISyntaxException
-	{
-		if (password == null)
-			throw new IllegalArgumentException();
-		
-		if (passwordSet)
-			throw new IllegalStateException("Password already set.");
-		
-		getAddr().addExtension(PASSWORD_TAG, password);
-		passwordSet = true;
-	}
-	
-	/**
-	 * @return the password associated with this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getPassword () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(PASSWORD_TAG);
-	}
-	
-	/**
-	 * Set the SQL command that is used by this EPR.
-	 * 
-	 * @param sql the statement.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setSQL (String sql) throws URISyntaxException
-	{
-		if (sql == null)
-			throw new IllegalArgumentException();
-		
-		if (sqlSet)
-			throw new IllegalStateException("SQL already set.");
-		
-		getAddr().addExtension(SQL_TAG, sql);
-		sqlSet = true;
-	}
-	
-	/**
-	 * @return the SQL statement for this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getSQL () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(SQL_TAG);
-	}
-	
-	/**
-	 * Set the driver that is used by this EPR.
-	 * 
-	 * @param driver the driver.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setDriver (String driver) throws URISyntaxException
-	{
-		if (driver == null)
-			throw new IllegalArgumentException();
-		
-		if (driverSet)
-			throw new IllegalStateException("Driver already set.");
-		
-		getAddr().addExtension(DRIVER_TAG, driver);
-		driverSet = true;
-	}
-	
-	/**
-	 * @return the driver used by this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getDriver () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(DRIVER_TAG);
-	}
-	
-	/**
-	 * Set the tablename that is used by this EPR.
-	 * 
-	 * @param tableName the table name.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setTableName (String tableName) throws URISyntaxException
-	{
-		if (tableName == null)
-			throw new IllegalArgumentException();
-		
-		if (tableNameSet)
-			throw new IllegalStateException("Table name already set.");
-		
-		getAddr().addExtension(TABLE_NAME_TAG, tableName);
-		tableNameSet = true;
-	}
-	
-	/**
-	 * @return the table name used by this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getTableName () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(TABLE_NAME_TAG);
-	}
-	
-	/**
-	 * Set the message id column name that is used by this EPR.
-	 * 
-	 * @param columnName the column name for the message ID.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setMessageIdColumn (String columnName) throws URISyntaxException
-	{
-		if (columnName == null)
-			throw new IllegalArgumentException();
-		
-		if (messageIdSet)
-			throw new IllegalStateException("Message Id column already set.");
-		
-		getAddr().addExtension(MESSAGE_ID_COLUMN_TAG, columnName);
-		messageIdSet = true;
-	}
-	
-	/**
-	 * @return the message id column used by this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getMessageIdColumn () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(MESSAGE_ID_COLUMN_TAG);
-	}
-	
-	/**
-	 * Set the status column that is used by this EPR.
-	 * 
-	 * @param statusColumn the status column.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setStatusColumn (String statusColumn) throws URISyntaxException
-	{
-		if (statusColumn == null)
-			throw new IllegalArgumentException();
-		
-		if (statusSet)
-			throw new IllegalStateException("Status column already set.");
-		
-		getAddr().addExtension(STATUS_COLUMN_TAG, statusColumn);
-		statusSet = true;
-	}
-	
-	/**
-	 * @return the status column name used by this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getStatusColumn () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(STATUS_COLUMN_TAG);
-	}
-	
-	/**
-	 * Set the column that is used by this EPR to store message data.
-	 * 
-	 * @param dataColumn the column name.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setDataColumn (String dataColumn) throws URISyntaxException
-	{
-		if (dataColumn == null)
-			throw new IllegalArgumentException();
-		
-		if (dataSet)
-			throw new IllegalStateException("Data column already set.");
-		
-		getAddr().addExtension(DATA_COLUMN_TAG, dataColumn);
-		dataSet = true;
-	}
-	
-	/**
-	 * @return the data column name used by this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getDataColumn () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(DATA_COLUMN_TAG);
-	}
-	
-	/**
-	 * Set the column that is used by this EPR to store timestamp when the message was inserted.
-	 * 
-	 * @param timeColumn the column name.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final void setTimestampColumn (String timeColumn) throws URISyntaxException
-	{
-		if (timeColumn == null)
-			throw new IllegalArgumentException();
-		
-		if (timestampSet)
-			throw new IllegalStateException("Timestamp column already set.");
-		
-		getAddr().addExtension(TIMESTAMP_COLUMN_TAG, timeColumn);
-		timestampSet = true;
-	}
-	
-	/**
-	 * @return the timestamp column name used by this EPR.
-	 * @throws URISyntaxException thrown if this EPR is malformed.
-	 */
-	
-	public final String getTimestampColumn () throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(TIMESTAMP_COLUMN_TAG);
-	}
-	
-	
-	public final String getPostDelete() throws URISyntaxException
-	{
-	    return getAddr().getExtensionValue(POST_DEL_TAG);
-	}
-	
-	public final String getErrorDelete() throws URISyntaxException
-	{
-	    return getAddr().getExtensionValue(ERROR_DEL_TAG);
-	}
-	
-	public static final URI type ()
-	{
-	    return _type;
-	}
-	
-	private boolean userSet = false;
-	private boolean passwordSet = false;
-	private boolean sqlSet = false;
-	private boolean driverSet = false;
-	private boolean tableNameSet = false;
-	private boolean messageIdSet = false;
-	private boolean statusSet = false;
-	private boolean dataSet = false;
-	private boolean timestampSet = false;
-	
-	private static URI _type;
-	
-	static
-	{
-	    try
-		{
-		    _type = new URI("urn:jboss:esb:epr:type:jdbc");
-		}
-		catch (Exception ex)
-		{
-		    ex.printStackTrace();
-		    
-		    throw new ExceptionInInitializerError(ex.toString());
-		}
-	}
-	
+package org.jboss.soa.esb.addressing.eprs;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+/**
+ * This class represents the endpoint reference for services.
+ */
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * A helper class for using database style EPRs. Simply create instances of this
+ * class instead of the base EPR.
+ * 
+ * @author marklittle
+ *
+ */
+
+public class JDBCEpr extends EPR
+{
+	public static final String JDBC_PROTOCOL = "jdbc";
+	
+	public static final String USERNAME_TAG = "username";
+	public static final String PASSWORD_TAG = "password";
+	public static final String SQL_TAG = "sql";
+	public static final String DRIVER_TAG = "driver";
+	public static final String URL_TAG = "URL";
+
+	public static final String TABLE_NAME_TAG 			= "tablename";
+	public static final String MESSAGE_ID_COLUMN_TAG 	= "message_id_column";
+	public static final String STATUS_COLUMN_TAG 		= "status_column";
+	public static final String DATA_COLUMN_TAG 			= "message_column";
+	public static final String TIMESTAMP_COLUMN_TAG 	= "insert_timestamp_column";
+	public static final String POST_DEL_TAG				= "postDelete";
+	public static final String ERROR_DEL_TAG			= "errorDelete";
+	
+	public JDBCEpr (EPR epr)
+	{
+		copy(epr);
+	}
+	
+	public JDBCEpr (EPR epr, Element header)
+	{
+		copy(epr);
+		
+		NodeList nl = header.getChildNodes();
+
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			String nodeName = nl.item(i).getNodeName();
+			
+			try
+			{
+				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+USERNAME_TAG))
+				{
+					getAddr().addExtension(USERNAME_TAG, nl.item(i).getTextContent());
+				}
+				else
+					if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+PASSWORD_TAG))
+					{
+						getAddr().addExtension(PASSWORD_TAG, nl.item(i).getTextContent());
+					}
+					else
+						if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+SQL_TAG))
+						{
+							getAddr().addExtension(SQL_TAG, nl.item(i).getTextContent());
+						}
+						else
+							if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+DRIVER_TAG))
+							{
+								getAddr().addExtension(DRIVER_TAG, nl.item(i).getTextContent());
+							}
+							else
+								if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+URL_TAG))
+								{
+									getAddr().addExtension(URL_TAG, nl.item(i).getTextContent());
+								}
+								else
+									if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+TABLE_NAME_TAG))
+									{
+										getAddr().addExtension(TABLE_NAME_TAG, nl.item(i).getTextContent());
+									}
+									else
+										if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+MESSAGE_ID_COLUMN_TAG))
+										{
+											getAddr().addExtension(MESSAGE_ID_COLUMN_TAG, nl.item(i).getTextContent());
+										}
+										else
+											if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+STATUS_COLUMN_TAG))
+											{
+												getAddr().addExtension(STATUS_COLUMN_TAG, nl.item(i).getTextContent());
+											}
+											else
+												if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+DATA_COLUMN_TAG))
+												{
+													getAddr().addExtension(DATA_COLUMN_TAG, nl.item(i).getTextContent());
+												}
+												else
+													if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+TIMESTAMP_COLUMN_TAG))
+													{
+														getAddr().addExtension(TIMESTAMP_COLUMN_TAG, nl.item(i).getTextContent());
+													}
+													else
+														if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+POST_DEL_TAG))
+														{
+															getAddr().addExtension(POST_DEL_TAG, nl.item(i).getTextContent());
+														}
+														else
+															if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+ERROR_DEL_TAG))
+															{
+																getAddr().addExtension(ERROR_DEL_TAG, nl.item(i).getTextContent());
+															}
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+			}
+		}
+	}			
+	
+	public JDBCEpr (String url, String sql) throws URISyntaxException
+	{
+		super(new URI(url));
+		
+		setSQL(sql);
+	}
+
+	public JDBCEpr (String url) throws URISyntaxException
+	{
+		this(url,true,true);
+	}
+
+	public JDBCEpr (String url, boolean postDelete, boolean errorDelete) throws URISyntaxException
+	{
+		super(new URI(url));
+		if (postDelete)
+			getAddr().addExtension(POST_DEL_TAG,Boolean.toString(postDelete));
+		if (errorDelete)
+			getAddr().addExtension(ERROR_DEL_TAG,Boolean.toString(errorDelete));
+	}
+
+	/**
+	 * Set the URL for this endpoint.
+	 * 
+	 * @param url the address.
+	 */
+	
+	public final void setURL (String url)
+	{
+		super.setAddr(new PortReference(url));
+	}
+	
+	/**
+	 * Get the URL address.
+	 * 
+	 * @return the address.
+	 * @throws URISyntaxException thrown if the address is invalid.
+	 */
+	
+	public final String getURL () throws URISyntaxException
+	{
+		return getAddr().getAddress();
+	}
+
+	/**
+	 * Set the username for this FTP EPR.
+	 * 
+	 * @param username the user's name.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setUserName (String username) throws URISyntaxException
+	{
+		if (username == null)
+			throw new IllegalArgumentException();
+		
+		if (userSet)
+			throw new IllegalStateException("Username already set.");
+		
+		getAddr().addExtension(USERNAME_TAG, username);
+		userSet = true;
+	}
+	
+	/**
+	 * @return the user's name associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getUserName () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(USERNAME_TAG);
+	}
+	
+	/**
+	 * Set the password for this FTP EPR.
+	 * 
+	 * @param password the user's name.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setPassword (String password) throws URISyntaxException
+	{
+		if (password == null)
+			throw new IllegalArgumentException();
+		
+		if (passwordSet)
+			throw new IllegalStateException("Password already set.");
+		
+		getAddr().addExtension(PASSWORD_TAG, password);
+		passwordSet = true;
+	}
+	
+	/**
+	 * @return the password associated with this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getPassword () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(PASSWORD_TAG);
+	}
+	
+	/**
+	 * Set the SQL command that is used by this EPR.
+	 * 
+	 * @param sql the statement.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setSQL (String sql) throws URISyntaxException
+	{
+		if (sql == null)
+			throw new IllegalArgumentException();
+		
+		if (sqlSet)
+			throw new IllegalStateException("SQL already set.");
+		
+		getAddr().addExtension(SQL_TAG, sql);
+		sqlSet = true;
+	}
+	
+	/**
+	 * @return the SQL statement for this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getSQL () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(SQL_TAG);
+	}
+	
+	/**
+	 * Set the driver that is used by this EPR.
+	 * 
+	 * @param driver the driver.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setDriver (String driver) throws URISyntaxException
+	{
+		if (driver == null)
+			throw new IllegalArgumentException();
+		
+		if (driverSet)
+			throw new IllegalStateException("Driver already set.");
+		
+		getAddr().addExtension(DRIVER_TAG, driver);
+		driverSet = true;
+	}
+	
+	/**
+	 * @return the driver used by this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getDriver () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(DRIVER_TAG);
+	}
+	
+	/**
+	 * Set the tablename that is used by this EPR.
+	 * 
+	 * @param tableName the table name.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setTableName (String tableName) throws URISyntaxException
+	{
+		if (tableName == null)
+			throw new IllegalArgumentException();
+		
+		if (tableNameSet)
+			throw new IllegalStateException("Table name already set.");
+		
+		getAddr().addExtension(TABLE_NAME_TAG, tableName);
+		tableNameSet = true;
+	}
+	
+	/**
+	 * @return the table name used by this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getTableName () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(TABLE_NAME_TAG);
+	}
+	
+	/**
+	 * Set the message id column name that is used by this EPR.
+	 * 
+	 * @param columnName the column name for the message ID.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setMessageIdColumn (String columnName) throws URISyntaxException
+	{
+		if (columnName == null)
+			throw new IllegalArgumentException();
+		
+		if (messageIdSet)
+			throw new IllegalStateException("Message Id column already set.");
+		
+		getAddr().addExtension(MESSAGE_ID_COLUMN_TAG, columnName);
+		messageIdSet = true;
+	}
+	
+	/**
+	 * @return the message id column used by this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getMessageIdColumn () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(MESSAGE_ID_COLUMN_TAG);
+	}
+	
+	/**
+	 * Set the status column that is used by this EPR.
+	 * 
+	 * @param statusColumn the status column.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setStatusColumn (String statusColumn) throws URISyntaxException
+	{
+		if (statusColumn == null)
+			throw new IllegalArgumentException();
+		
+		if (statusSet)
+			throw new IllegalStateException("Status column already set.");
+		
+		getAddr().addExtension(STATUS_COLUMN_TAG, statusColumn);
+		statusSet = true;
+	}
+	
+	/**
+	 * @return the status column name used by this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getStatusColumn () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(STATUS_COLUMN_TAG);
+	}
+	
+	/**
+	 * Set the column that is used by this EPR to store message data.
+	 * 
+	 * @param dataColumn the column name.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setDataColumn (String dataColumn) throws URISyntaxException
+	{
+		if (dataColumn == null)
+			throw new IllegalArgumentException();
+		
+		if (dataSet)
+			throw new IllegalStateException("Data column already set.");
+		
+		getAddr().addExtension(DATA_COLUMN_TAG, dataColumn);
+		dataSet = true;
+	}
+	
+	/**
+	 * @return the data column name used by this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getDataColumn () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(DATA_COLUMN_TAG);
+	}
+	
+	/**
+	 * Set the column that is used by this EPR to store timestamp when the message was inserted.
+	 * 
+	 * @param timeColumn the column name.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final void setTimestampColumn (String timeColumn) throws URISyntaxException
+	{
+		if (timeColumn == null)
+			throw new IllegalArgumentException();
+		
+		if (timestampSet)
+			throw new IllegalStateException("Timestamp column already set.");
+		
+		getAddr().addExtension(TIMESTAMP_COLUMN_TAG, timeColumn);
+		timestampSet = true;
+	}
+	
+	/**
+	 * @return the timestamp column name used by this EPR.
+	 * @throws URISyntaxException thrown if this EPR is malformed.
+	 */
+	
+	public final String getTimestampColumn () throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(TIMESTAMP_COLUMN_TAG);
+	}
+	
+	
+	public final String getPostDelete() throws URISyntaxException
+	{
+	    return getAddr().getExtensionValue(POST_DEL_TAG);
+	}
+	
+	public final String getErrorDelete() throws URISyntaxException
+	{
+	    return getAddr().getExtensionValue(ERROR_DEL_TAG);
+	}
+	
+	public static final URI type ()
+	{
+	    return _type;
+	}
+	
+	private boolean userSet = false;
+	private boolean passwordSet = false;
+	private boolean sqlSet = false;
+	private boolean driverSet = false;
+	private boolean tableNameSet = false;
+	private boolean messageIdSet = false;
+	private boolean statusSet = false;
+	private boolean dataSet = false;
+	private boolean timestampSet = false;
+	
+	private static URI _type;
+	
+	static
+	{
+	    try
+		{
+		    _type = new URI("urn:jboss:esb:epr:type:jdbc");
+		}
+		catch (Exception ex)
+		{
+		    ex.printStackTrace();
+		    
+		    throw new ExceptionInInitializerError(ex.toString());
+		}
+	}
+	
 } 
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JDBCEpr.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,362 +1,362 @@
-package org.jboss.soa.esb.addressing.eprs;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * This class represents the endpoint reference for services.
- */
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.PortReference;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.jboss.soa.esb.helpers.NamingContext;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * A helper class for using JMS style EPRs. Simply create and use instances of
- * this type.
- * 
- * @author marklittle
- * 
- */
-
-public class JMSEpr extends EPR
-{
-	public static final String JMS_PROTOCOL = "jms";
-
-	public static final String PROTOCOL_SEPARATOR = "://";
-
-	public static final String ONE_ONE_PROTOCOL = "1.1";
-
-	public static final String ONE_ZERO_TWO_PROTOCOL = "1.0.2b";
-
-	public static final String SPECIFICATION_VERSION_TAG = "specification-version";
-
-	public static final String DESTINATION_TYPE_TAG = "destination-type";
-
-	public static final String DESTINATION_NAME_TAG = "destination-name";
-
-	public static final String CONNECTION_FACTORY_TAG = "connection-factory";
-
-	public static final String JNDI_PKG_PREFIX_TAG = "jndi-pkg-prefix";
-
-	public static final String JNDI_URL_TAG = "jndi-URL";
-
-	public static final String JNDI_CONTEXT_FACTORY_TAG = "jndi-context-factory";
-
-	public static final String MESSAGE_SELECTOR_TAG = "message-selector";
-
-	public static final String QUEUE_TYPE = "queue";
-
-	public static final String TOPIC_TYPE = "topic";
-
-	public JMSEpr(EPR epr)
-	{
-		copy(epr);
-	}
-	
-	public JMSEpr(EPR epr, Element header)
-	{
-		copy(epr);
-		
-		NodeList nl = header.getChildNodes();
-
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			String nodeName = nl.item(i).getNodeName();
-			
-			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+SPECIFICATION_VERSION_TAG))
-			{
-				getAddr().addExtension(SPECIFICATION_VERSION_TAG, nl.item(i).getTextContent());
-			}
-			else
-			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+DESTINATION_NAME_TAG))
-			{
-				getAddr().addExtension(DESTINATION_NAME_TAG, nl.item(i).getTextContent());
-			}
-			else
-			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+CONNECTION_FACTORY_TAG))
-			{
-				getAddr().addExtension(CONNECTION_FACTORY_TAG, nl.item(i).getTextContent());
-			}
-			else
-			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+JNDI_CONTEXT_FACTORY_TAG))
-			{
-				getAddr().addExtension(JNDI_CONTEXT_FACTORY_TAG, nl.item(i).getTextContent());
-			}
-			else
-			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+JNDI_PKG_PREFIX_TAG))
-			{
-				getAddr().addExtension(JNDI_PKG_PREFIX_TAG, nl.item(i).getTextContent());
-			}
-			else
-			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+JNDI_URL_TAG))
-			{
-				getAddr().addExtension(JNDI_URL_TAG, nl.item(i).getTextContent());
-			}
-			else
-			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+MESSAGE_SELECTOR_TAG))
-			{
-				getAddr().addExtension(MESSAGE_SELECTOR_TAG, nl.item(i).getTextContent());
-			}
-		}
-	}
-
-	/**
-	 * Create a new JMS EPR. The protocol version is assumed to be 1.1. ,
-	 * jndi_type=jboss, jndi_url=localhost, messageSelector=null
-	 * 
-	 * @param destinationType
-	 *            the type of destination (queue/topic).
-	 * @param destinationName
-	 *            name of the queue/topic.
-	 * @param connection
-	 *            reference to the connection factory.
-	 */
-
-	public JMSEpr(String destinationType, String destinationName,
-			String connection)
-	{
-		this(ONE_ONE_PROTOCOL, destinationType, destinationName, connection,
-				NamingContext.JBOSS_PROVIDER_URL,
-				NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY, null, null);
-	}
-
-	/**
-	 * Create a new JMS EPR. The protocol version is assumed to be 1.1.
-	 * 
-	 * @param destinationType
-	 *            the type of destination (queue/topic).
-	 * @param destinationName
-	 *            name of the queue/topic.
-	 * @param connection
-	 *            reference to the connection factory.
-	 * @param jndiType
-	 *            reference to the type of jndi to obtain the JMS objects from
-	 * @param jndiUrl
-	 *            reference to the location of the jndi to obtain the JMS
-	 *            objects from
-	 * @param messageSelector
-	 *            reference to the connection factory.
-	 */
-
-	public JMSEpr(String destinationType, String destinationName,
-			String connection, String jndiUrl, String jndiContextFactory,
-			String jndiPkgPrefix, String messageSelector)
-	{
-		this(ONE_ONE_PROTOCOL, destinationType, destinationName, connection,
-				jndiUrl, jndiContextFactory, jndiPkgPrefix, messageSelector);
-	}
-
-	/**
-	 * Create a new JMS EPR.
-	 * 
-	 * @param protocol
-	 *            the protocol version.
-	 * @param destinationType
-	 *            the type of destination (queue/topic).
-	 * @param destinationName
-	 *            name of the queue/topic.
-	 * @param connection
-	 *            reference to the connection factory.
-	 * @param jndiType
-	 *            reference to the type of jndi to obtain the JMS objects from
-	 * @param jndiUrl
-	 *            reference to the location of the jndi to obtain the JMS
-	 *            objects from
-	 * @param messageSelector
-	 *            reference to the connection factory.
-	 */
-
-	public JMSEpr(String protocol, String destinationType,
-			String destinationName, String connection, String jndiUrl,
-			String jndiContextFactory, String jndiPkgPrefix,
-			String messageSelector)
-	{
-		// how many of these do we really need? modify accordingly.
-
-		if ((protocol == null) || (destinationType == null)
-				|| (destinationName == null) || (connection == null))
-			throw new IllegalArgumentException();
-
-		if (protocol.equals(ONE_ONE_PROTOCOL)
-				|| (protocol.equals(ONE_ZERO_TWO_PROTOCOL)))
-		{
-			if (destinationType.equals(QUEUE_TYPE)
-					|| destinationType.equals(TOPIC_TYPE))
-			{
-				PortReference addr = new PortReference(JMS_PROTOCOL
-						+ PROTOCOL_SEPARATOR + destinationType);
-
-				addr.addExtension(SPECIFICATION_VERSION_TAG, protocol);
-
-				if (destinationName != null)
-					addr.addExtension(DESTINATION_NAME_TAG, destinationName);
-
-				if (connection != null)
-					addr.addExtension(CONNECTION_FACTORY_TAG, connection);
-
-				if (jndiContextFactory != null)
-					addr.addExtension(JNDI_CONTEXT_FACTORY_TAG, jndiContextFactory);
-
-				if (jndiPkgPrefix != null)
-					addr.addExtension(JNDI_PKG_PREFIX_TAG, jndiPkgPrefix);
-
-				if (jndiUrl != null)
-					addr.addExtension(JNDI_URL_TAG, jndiUrl);
-
-				if (messageSelector != null)
-					addr.addExtension(MESSAGE_SELECTOR_TAG, messageSelector);
-
-				setAddr(addr);
-			}
-			else
-				throw new IllegalArgumentException("Invalid destination type! "+destinationType);
-		}
-		else
-			throw new IllegalArgumentException("Invalid specification version!");
-	}
-
-	/*
-	 * There are deliberately no setters for the values once the EPR is created.
-	 */
-
-	/**
-	 * @return the destination type used.
-	 * @throws URISyntaxException
-	 *             thrown if the address is malformed.
-	 */
-
-	public final String getDestinationType() throws URISyntaxException
-	{
-		URI uri = new URI(getAddr().getAddress());
-
-		return uri.getHost(); // ;-)
-	}
-
-	/**
-	 * @return the specification version used.
-	 * @throws URISyntaxException
-	 *             thrown if the address is malformed.
-	 */
-
-	public final String getVersion() throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(SPECIFICATION_VERSION_TAG);
-	}
-
-	/**
-	 * @return the destination name used.
-	 * @throws URISyntaxException
-	 *             thrown if the address is malformed.
-	 */
-
-	public final String getDestinationName() throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(DESTINATION_NAME_TAG);
-	}
-
-	/**
-	 * @return the connection factory for this EPR, or <code>null</code> if
-	 *         none is set.
-	 * @throws URISyntaxException
-	 *             thrown if the address is malformed.
-	 */
-
-	public final String getConnectionFactory() throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(CONNECTION_FACTORY_TAG);
-	}
-
-	/**
-	 * @return the jndi context factory for this EPR, or <code>null</code> if
-	 *         none is set.
-	 * @throws URISyntaxException
-	 *             thrown if the address is malformed.
-	 */
-
-	public final String getJndiContextFactory() throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(JNDI_CONTEXT_FACTORY_TAG);
-	}
-
-	/**
-	 * @return the jndi pkg prefix for this EPR, or <code>null</code> if none
-	 *         is set.
-	 * @throws URISyntaxException
-	 *             thrown if the address is malformed.
-	 */
-
-	public final String getJndiPkgPrefix() throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(JNDI_PKG_PREFIX_TAG);
-	}
-
-	/**
-	 * @return the jndi URL for this EPR, or <code>null</code> if none is set.
-	 * @throws URISyntaxException
-	 *             thrown if the address is malformed.
-	 */
-
-	public final String getJndiURL() throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(JNDI_URL_TAG);
-	}
-
-	/**
-	 * @return the message selector for this EPR, or <code>null</code> if none
-	 *         is set.
-	 * @throws URISyntaxException
-	 *             thrown if the address is malformed.
-	 */
-
-	public final String getMessageSelector() throws URISyntaxException
-	{
-		return getAddr().getExtensionValue(MESSAGE_SELECTOR_TAG);
-	}
-
-	public static final URI type()
-	{
-		return _type;
-	}
-
-	private static URI _type;
-
-	static
-	{
-		try
-		{
-			_type = new URI("urn:jboss:esb:epr:type:jms");
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-
-			throw new ExceptionInInitializerError(ex.toString());
-		}
-	}
-
+package org.jboss.soa.esb.addressing.eprs;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * This class represents the endpoint reference for services.
+ */
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.jboss.soa.esb.helpers.NamingContext;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * A helper class for using JMS style EPRs. Simply create and use instances of
+ * this type.
+ * 
+ * @author marklittle
+ * 
+ */
+
+public class JMSEpr extends EPR
+{
+	public static final String JMS_PROTOCOL = "jms";
+
+	public static final String PROTOCOL_SEPARATOR = "://";
+
+	public static final String ONE_ONE_PROTOCOL = "1.1";
+
+	public static final String ONE_ZERO_TWO_PROTOCOL = "1.0.2b";
+
+	public static final String SPECIFICATION_VERSION_TAG = "specification-version";
+
+	public static final String DESTINATION_TYPE_TAG = "destination-type";
+
+	public static final String DESTINATION_NAME_TAG = "destination-name";
+
+	public static final String CONNECTION_FACTORY_TAG = "connection-factory";
+
+	public static final String JNDI_PKG_PREFIX_TAG = "jndi-pkg-prefix";
+
+	public static final String JNDI_URL_TAG = "jndi-URL";
+
+	public static final String JNDI_CONTEXT_FACTORY_TAG = "jndi-context-factory";
+
+	public static final String MESSAGE_SELECTOR_TAG = "message-selector";
+
+	public static final String QUEUE_TYPE = "queue";
+
+	public static final String TOPIC_TYPE = "topic";
+
+	public JMSEpr(EPR epr)
+	{
+		copy(epr);
+	}
+	
+	public JMSEpr(EPR epr, Element header)
+	{
+		copy(epr);
+		
+		NodeList nl = header.getChildNodes();
+
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			String nodeName = nl.item(i).getNodeName();
+			
+			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+SPECIFICATION_VERSION_TAG))
+			{
+				getAddr().addExtension(SPECIFICATION_VERSION_TAG, nl.item(i).getTextContent());
+			}
+			else
+			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+DESTINATION_NAME_TAG))
+			{
+				getAddr().addExtension(DESTINATION_NAME_TAG, nl.item(i).getTextContent());
+			}
+			else
+			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+CONNECTION_FACTORY_TAG))
+			{
+				getAddr().addExtension(CONNECTION_FACTORY_TAG, nl.item(i).getTextContent());
+			}
+			else
+			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+JNDI_CONTEXT_FACTORY_TAG))
+			{
+				getAddr().addExtension(JNDI_CONTEXT_FACTORY_TAG, nl.item(i).getTextContent());
+			}
+			else
+			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+JNDI_PKG_PREFIX_TAG))
+			{
+				getAddr().addExtension(JNDI_PKG_PREFIX_TAG, nl.item(i).getTextContent());
+			}
+			else
+			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+JNDI_URL_TAG))
+			{
+				getAddr().addExtension(JNDI_URL_TAG, nl.item(i).getTextContent());
+			}
+			else
+			if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+MESSAGE_SELECTOR_TAG))
+			{
+				getAddr().addExtension(MESSAGE_SELECTOR_TAG, nl.item(i).getTextContent());
+			}
+		}
+	}
+
+	/**
+	 * Create a new JMS EPR. The protocol version is assumed to be 1.1. ,
+	 * jndi_type=jboss, jndi_url=localhost, messageSelector=null
+	 * 
+	 * @param destinationType
+	 *            the type of destination (queue/topic).
+	 * @param destinationName
+	 *            name of the queue/topic.
+	 * @param connection
+	 *            reference to the connection factory.
+	 */
+
+	public JMSEpr(String destinationType, String destinationName,
+			String connection)
+	{
+		this(ONE_ONE_PROTOCOL, destinationType, destinationName, connection,
+				NamingContext.JBOSS_PROVIDER_URL,
+				NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY, null, null);
+	}
+
+	/**
+	 * Create a new JMS EPR. The protocol version is assumed to be 1.1.
+	 * 
+	 * @param destinationType
+	 *            the type of destination (queue/topic).
+	 * @param destinationName
+	 *            name of the queue/topic.
+	 * @param connection
+	 *            reference to the connection factory.
+	 * @param jndiType
+	 *            reference to the type of jndi to obtain the JMS objects from
+	 * @param jndiUrl
+	 *            reference to the location of the jndi to obtain the JMS
+	 *            objects from
+	 * @param messageSelector
+	 *            reference to the connection factory.
+	 */
+
+	public JMSEpr(String destinationType, String destinationName,
+			String connection, String jndiUrl, String jndiContextFactory,
+			String jndiPkgPrefix, String messageSelector)
+	{
+		this(ONE_ONE_PROTOCOL, destinationType, destinationName, connection,
+				jndiUrl, jndiContextFactory, jndiPkgPrefix, messageSelector);
+	}
+
+	/**
+	 * Create a new JMS EPR.
+	 * 
+	 * @param protocol
+	 *            the protocol version.
+	 * @param destinationType
+	 *            the type of destination (queue/topic).
+	 * @param destinationName
+	 *            name of the queue/topic.
+	 * @param connection
+	 *            reference to the connection factory.
+	 * @param jndiType
+	 *            reference to the type of jndi to obtain the JMS objects from
+	 * @param jndiUrl
+	 *            reference to the location of the jndi to obtain the JMS
+	 *            objects from
+	 * @param messageSelector
+	 *            reference to the connection factory.
+	 */
+
+	public JMSEpr(String protocol, String destinationType,
+			String destinationName, String connection, String jndiUrl,
+			String jndiContextFactory, String jndiPkgPrefix,
+			String messageSelector)
+	{
+		// how many of these do we really need? modify accordingly.
+
+		if ((protocol == null) || (destinationType == null)
+				|| (destinationName == null) || (connection == null))
+			throw new IllegalArgumentException();
+
+		if (protocol.equals(ONE_ONE_PROTOCOL)
+				|| (protocol.equals(ONE_ZERO_TWO_PROTOCOL)))
+		{
+			if (destinationType.equals(QUEUE_TYPE)
+					|| destinationType.equals(TOPIC_TYPE))
+			{
+				PortReference addr = new PortReference(JMS_PROTOCOL
+						+ PROTOCOL_SEPARATOR + destinationType);
+
+				addr.addExtension(SPECIFICATION_VERSION_TAG, protocol);
+
+				if (destinationName != null)
+					addr.addExtension(DESTINATION_NAME_TAG, destinationName);
+
+				if (connection != null)
+					addr.addExtension(CONNECTION_FACTORY_TAG, connection);
+
+				if (jndiContextFactory != null)
+					addr.addExtension(JNDI_CONTEXT_FACTORY_TAG, jndiContextFactory);
+
+				if (jndiPkgPrefix != null)
+					addr.addExtension(JNDI_PKG_PREFIX_TAG, jndiPkgPrefix);
+
+				if (jndiUrl != null)
+					addr.addExtension(JNDI_URL_TAG, jndiUrl);
+
+				if (messageSelector != null)
+					addr.addExtension(MESSAGE_SELECTOR_TAG, messageSelector);
+
+				setAddr(addr);
+			}
+			else
+				throw new IllegalArgumentException("Invalid destination type! "+destinationType);
+		}
+		else
+			throw new IllegalArgumentException("Invalid specification version!");
+	}
+
+	/*
+	 * There are deliberately no setters for the values once the EPR is created.
+	 */
+
+	/**
+	 * @return the destination type used.
+	 * @throws URISyntaxException
+	 *             thrown if the address is malformed.
+	 */
+
+	public final String getDestinationType() throws URISyntaxException
+	{
+		URI uri = new URI(getAddr().getAddress());
+
+		return uri.getHost(); // ;-)
+	}
+
+	/**
+	 * @return the specification version used.
+	 * @throws URISyntaxException
+	 *             thrown if the address is malformed.
+	 */
+
+	public final String getVersion() throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(SPECIFICATION_VERSION_TAG);
+	}
+
+	/**
+	 * @return the destination name used.
+	 * @throws URISyntaxException
+	 *             thrown if the address is malformed.
+	 */
+
+	public final String getDestinationName() throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(DESTINATION_NAME_TAG);
+	}
+
+	/**
+	 * @return the connection factory for this EPR, or <code>null</code> if
+	 *         none is set.
+	 * @throws URISyntaxException
+	 *             thrown if the address is malformed.
+	 */
+
+	public final String getConnectionFactory() throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(CONNECTION_FACTORY_TAG);
+	}
+
+	/**
+	 * @return the jndi context factory for this EPR, or <code>null</code> if
+	 *         none is set.
+	 * @throws URISyntaxException
+	 *             thrown if the address is malformed.
+	 */
+
+	public final String getJndiContextFactory() throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(JNDI_CONTEXT_FACTORY_TAG);
+	}
+
+	/**
+	 * @return the jndi pkg prefix for this EPR, or <code>null</code> if none
+	 *         is set.
+	 * @throws URISyntaxException
+	 *             thrown if the address is malformed.
+	 */
+
+	public final String getJndiPkgPrefix() throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(JNDI_PKG_PREFIX_TAG);
+	}
+
+	/**
+	 * @return the jndi URL for this EPR, or <code>null</code> if none is set.
+	 * @throws URISyntaxException
+	 *             thrown if the address is malformed.
+	 */
+
+	public final String getJndiURL() throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(JNDI_URL_TAG);
+	}
+
+	/**
+	 * @return the message selector for this EPR, or <code>null</code> if none
+	 *         is set.
+	 * @throws URISyntaxException
+	 *             thrown if the address is malformed.
+	 */
+
+	public final String getMessageSelector() throws URISyntaxException
+	{
+		return getAddr().getExtensionValue(MESSAGE_SELECTOR_TAG);
+	}
+
+	public static final URI type()
+	{
+		return _type;
+	}
+
+	private static URI _type;
+
+	static
+	{
+		try
+		{
+			_type = new URI("urn:jboss:esb:epr:type:jms");
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+
+			throw new ExceptionInInitializerError(ex.toString());
+		}
+	}
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/SFTPEpr.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/SFTPEpr.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/SFTPEpr.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,162 +1,162 @@
-package org.jboss.soa.esb.addressing.eprs;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * This class represents the endpoint reference for services.
- */
-
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * A helper class for using FTP style EPRs. Simply create instances of this
- * class instead of the base EPR. Since URLs can use FTP, we try to leverage
- * that as much as possible.
- * 
- * @author marklittle
- * 
- */
-public class SFTPEpr extends FTPEpr
-{
-	public static final String CERTIFICATE_TAG = "certificate";
-
-	public SFTPEpr(EPR epr)
-	{
-		super(epr);
-
-		copy(epr);
-	}
-	
-	public SFTPEpr (EPR epr, Element header)
-	{
-		super(epr, header);
-		
-		copy(epr);
-		
-		NodeList nl = header.getChildNodes();
-
-		for (int i = 0; i < nl.getLength(); i++)
-		{
-			String nodeName = nl.item(i).getNodeName();
-			
-			try
-			{		
-				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+CERTIFICATE_TAG))
-				{
-					getAddr().addExtension(CERTIFICATE_TAG, nl.item(i).getTextContent());
-				}
-			}
-			catch (Exception ex)
-			{
-				ex.printStackTrace();
-			}
-		}
-	}
-
-	public SFTPEpr(URL url) throws URISyntaxException
-	{
-		super(url);
-	}
-
-	public SFTPEpr(URL url, URL cert) throws URISyntaxException
-	{
-		super(url);
-		
-		setCertificateURL(cert);
-	}
-
-	public SFTPEpr(String url, String cert) throws URISyntaxException, MalformedURLException
-	{
-		super(url);	
-
-		setCertificateURL(new URL(cert));
-	}
-
-	/**
-	 * Set the Certificate URL for this endpoint.
-	 * 
-	 * @param url
-	 *            the address.
-	 * @throws URISyntaxException
-	 *             thrown if this EPR is malformed.
-	 */
-
-	public final void setCertificateURL(URL cert) throws URISyntaxException
-	{
-		if (cert == null)
-			throw new IllegalArgumentException();
-
-		if (certificateSet)
-			throw new IllegalStateException("Certificate URL already set.");
-
-		getAddr().addExtension(CERTIFICATE_TAG, cert.toString());
-		certificateSet = true;
-	}
-
-	/**
-	 * @return the certificate URL for this EPR.
-	 * @throws URISyntaxException
-	 *             thrown if this EPR is malformed.
-	 */
-
-	public final URL getCertificateURL () throws URISyntaxException,
-			MalformedURLException
-	{
-		String cert = getAddr().getExtensionValue(CERTIFICATE_TAG);
-
-		if (cert != null)
-			return new URL(cert);
-		else
-			return null;
-	}
-
-	public static URI type ()
-	{
-		return _type;
-	}
-
-	private boolean certificateSet = false;
-
-	private static URI _type;
-
-	static
-	{
-		try
-		{
-			_type = new URI("urn:jboss:esb:epr:type:sftp");
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-
-			throw new ExceptionInInitializerError(ex.toString());
-		}
-	}
+package org.jboss.soa.esb.addressing.eprs;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * This class represents the endpoint reference for services.
+ */
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * A helper class for using FTP style EPRs. Simply create instances of this
+ * class instead of the base EPR. Since URLs can use FTP, we try to leverage
+ * that as much as possible.
+ * 
+ * @author marklittle
+ * 
+ */
+public class SFTPEpr extends FTPEpr
+{
+	public static final String CERTIFICATE_TAG = "certificate";
+
+	public SFTPEpr(EPR epr)
+	{
+		super(epr);
+
+		copy(epr);
+	}
+	
+	public SFTPEpr (EPR epr, Element header)
+	{
+		super(epr, header);
+		
+		copy(epr);
+		
+		NodeList nl = header.getChildNodes();
+
+		for (int i = 0; i < nl.getLength(); i++)
+		{
+			String nodeName = nl.item(i).getNodeName();
+			
+			try
+			{		
+				if (nodeName.equals(XMLUtil.JBOSSESB_PREFIX+":"+CERTIFICATE_TAG))
+				{
+					getAddr().addExtension(CERTIFICATE_TAG, nl.item(i).getTextContent());
+				}
+			}
+			catch (Exception ex)
+			{
+				ex.printStackTrace();
+			}
+		}
+	}
+
+	public SFTPEpr(URL url) throws URISyntaxException
+	{
+		super(url);
+	}
+
+	public SFTPEpr(URL url, URL cert) throws URISyntaxException
+	{
+		super(url);
+		
+		setCertificateURL(cert);
+	}
+
+	public SFTPEpr(String url, String cert) throws URISyntaxException, MalformedURLException
+	{
+		super(url);	
+
+		setCertificateURL(new URL(cert));
+	}
+
+	/**
+	 * Set the Certificate URL for this endpoint.
+	 * 
+	 * @param url
+	 *            the address.
+	 * @throws URISyntaxException
+	 *             thrown if this EPR is malformed.
+	 */
+
+	public final void setCertificateURL(URL cert) throws URISyntaxException
+	{
+		if (cert == null)
+			throw new IllegalArgumentException();
+
+		if (certificateSet)
+			throw new IllegalStateException("Certificate URL already set.");
+
+		getAddr().addExtension(CERTIFICATE_TAG, cert.toString());
+		certificateSet = true;
+	}
+
+	/**
+	 * @return the certificate URL for this EPR.
+	 * @throws URISyntaxException
+	 *             thrown if this EPR is malformed.
+	 */
+
+	public final URL getCertificateURL () throws URISyntaxException,
+			MalformedURLException
+	{
+		String cert = getAddr().getExtensionValue(CERTIFICATE_TAG);
+
+		if (cert != null)
+			return new URL(cert);
+		else
+			return null;
+	}
+
+	public static URI type ()
+	{
+		return _type;
+	}
+
+	private boolean certificateSet = false;
+
+	private static URI _type;
+
+	static
+	{
+		try
+		{
+			_type = new URI("urn:jboss:esb:epr:type:sftp");
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+
+			throw new ExceptionInInitializerError(ex.toString());
+		}
+	}
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/eprs/SFTPEpr.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/util/EPRManager.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/util/EPRManager.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/util/EPRManager.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,223 +1,223 @@
-/*
- * 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 mark.little at jboss.com
- */
-
-package org.jboss.soa.esb.addressing.util;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Hashtable;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.addressing.EPR;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-/**
- * Allows EPRs to be saved to and loaded from files. Mainly for testing
- * purposes. This version assumes XML as the output format.
- * 
- * @author marklittle
- * 
- */
-
-public class EPRManager
-{
-
-	/**
-	 * All EPRs are saves in files within the current working directory.
-	 * 
-	 * @return the manager for the cwd.
-	 */
-
-	public static final EPRManager getInstance()
-	{
-		return getInstance("");
-	}
-
-	/**
-	 * All EPRs are saves in files within a defined directory. Get the right
-	 * manager for that directory.
-	 * 
-	 * @param domain
-	 *            the name of the directory. If <code>null</code> then the
-	 *            null String is assumed.
-	 * @return the manager for the directory. If it does not exist, then one
-	 *         will be created.
-	 */
-
-	public static final EPRManager getInstance(String domain)
-	{
-		if (domain == null)
-			domain = "";
-
-		synchronized (_instances)
-		{
-			EPRManager theInstance = _instances.get(domain);
-
-			if (theInstance == null)
-			{
-				theInstance = new EPRManager(domain);
-
-				_instances.put(domain, theInstance);
-			}
-
-			return theInstance;
-		}
-	}
-
-	public final String getDomain()
-	{
-		return _directory;
-	}
-
-	public boolean equals(Object manager)
-	{
-		if (manager instanceof EPRManager)
-		{
-			EPRManager comp = (EPRManager) manager;
-
-			if (_directory.equals(comp.getDomain()))
-				return true;
-		}
-
-		return false;
-	}
-
-	/**
-	 * Save the EPR into the specified file.
-	 * 
-	 * @param name
-	 *            the name of the file to use (the logical service name).
-	 * @param address
-	 *            the EPR to save.
-	 * 
-	 * @throws IOException
-	 *             thrown if there is an error.
-	 */
-
-	public final void saveEPR(String name, EPR address) throws IOException
-	{
-		if ((name == null) || (address == null))
-			throw new IllegalArgumentException();
-
-		try
-		{
-			String documentAsString = EPRHelper.toXMLString(address);
-
-			FileOutputStream output = new FileOutputStream(_directory
-					+ File.separator + name);
-
-			output.write(documentAsString.getBytes());
-			output.flush();
-			output.getFD().sync(); // make sure it's on disk!
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-		}
-	}
-
-	/**
-	 * Remove the EPR-to-file association.
-	 * 
-	 * @param name
-	 *            the logical name for the service.
-	 * @throws IOException
-	 *             thrown if there are any errors.
-	 */
-
-	public final void removeEPR(String name) throws IOException
-	{
-		if (name == null)
-			throw new IllegalArgumentException();
-
-		File theFile = new File(_directory + File.separator + name);
-
-		if (theFile.exists())
-			theFile.delete();
-		else
-			throw new FileNotFoundException();
-	}
-
-	/**
-	 * Get the EPR specified by the logical name.
-	 * 
-	 * @param name
-	 *            the service name.
-	 * @return the EPR, or <code>null</code> if none exists.
-	 * @throws IOException
-	 *             thrown if there is an error.
-	 */
-
-	public final EPR loadEPR(String name) throws IOException
-	{
-		if (name == null)
-			throw new IllegalArgumentException();
-
-		File theFile = new File(_directory + File.separator + name);
-
-		try
-		{
-			if (theFile.exists())
-			{
-				DocumentBuilderFactory factory = DocumentBuilderFactory
-						.newInstance();
-				DocumentBuilder builder = factory.newDocumentBuilder();
-				Document doc = builder.parse(theFile);
-				Element rootElement = doc.getDocumentElement();
-
-				return EPRHelper.fromXML(rootElement);
-			}
-			else
-				throw new FileNotFoundException(theFile.toString());
-		}
-		catch (UnmarshalException ex)
-		{
-			throw new IOException(ex.toString());
-		}
-		catch (SAXException ex)
-		{
-			throw new IOException(ex.toString());
-		}
-		catch (ParserConfigurationException ex)
-		{
-			throw new IllegalArgumentException(ex.toString());
-		}
-	}
-
-	protected EPRManager(String domain)
-	{
-		_directory = domain;
-	}
-
-	private String _directory;
-
-	private static Hashtable<String, EPRManager> _instances = new Hashtable<String, EPRManager>();
-
+/*
+ * 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 mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.addressing.util;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Hashtable;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+/**
+ * Allows EPRs to be saved to and loaded from files. Mainly for testing
+ * purposes. This version assumes XML as the output format.
+ * 
+ * @author marklittle
+ * 
+ */
+
+public class EPRManager
+{
+
+	/**
+	 * All EPRs are saves in files within the current working directory.
+	 * 
+	 * @return the manager for the cwd.
+	 */
+
+	public static final EPRManager getInstance()
+	{
+		return getInstance("");
+	}
+
+	/**
+	 * All EPRs are saves in files within a defined directory. Get the right
+	 * manager for that directory.
+	 * 
+	 * @param domain
+	 *            the name of the directory. If <code>null</code> then the
+	 *            null String is assumed.
+	 * @return the manager for the directory. If it does not exist, then one
+	 *         will be created.
+	 */
+
+	public static final EPRManager getInstance(String domain)
+	{
+		if (domain == null)
+			domain = "";
+
+		synchronized (_instances)
+		{
+			EPRManager theInstance = _instances.get(domain);
+
+			if (theInstance == null)
+			{
+				theInstance = new EPRManager(domain);
+
+				_instances.put(domain, theInstance);
+			}
+
+			return theInstance;
+		}
+	}
+
+	public final String getDomain()
+	{
+		return _directory;
+	}
+
+	public boolean equals(Object manager)
+	{
+		if (manager instanceof EPRManager)
+		{
+			EPRManager comp = (EPRManager) manager;
+
+			if (_directory.equals(comp.getDomain()))
+				return true;
+		}
+
+		return false;
+	}
+
+	/**
+	 * Save the EPR into the specified file.
+	 * 
+	 * @param name
+	 *            the name of the file to use (the logical service name).
+	 * @param address
+	 *            the EPR to save.
+	 * 
+	 * @throws IOException
+	 *             thrown if there is an error.
+	 */
+
+	public final void saveEPR(String name, EPR address) throws IOException
+	{
+		if ((name == null) || (address == null))
+			throw new IllegalArgumentException();
+
+		try
+		{
+			String documentAsString = EPRHelper.toXMLString(address);
+
+			FileOutputStream output = new FileOutputStream(_directory
+					+ File.separator + name);
+
+			output.write(documentAsString.getBytes());
+			output.flush();
+			output.getFD().sync(); // make sure it's on disk!
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+		}
+	}
+
+	/**
+	 * Remove the EPR-to-file association.
+	 * 
+	 * @param name
+	 *            the logical name for the service.
+	 * @throws IOException
+	 *             thrown if there are any errors.
+	 */
+
+	public final void removeEPR(String name) throws IOException
+	{
+		if (name == null)
+			throw new IllegalArgumentException();
+
+		File theFile = new File(_directory + File.separator + name);
+
+		if (theFile.exists())
+			theFile.delete();
+		else
+			throw new FileNotFoundException();
+	}
+
+	/**
+	 * Get the EPR specified by the logical name.
+	 * 
+	 * @param name
+	 *            the service name.
+	 * @return the EPR, or <code>null</code> if none exists.
+	 * @throws IOException
+	 *             thrown if there is an error.
+	 */
+
+	public final EPR loadEPR(String name) throws IOException
+	{
+		if (name == null)
+			throw new IllegalArgumentException();
+
+		File theFile = new File(_directory + File.separator + name);
+
+		try
+		{
+			if (theFile.exists())
+			{
+				DocumentBuilderFactory factory = DocumentBuilderFactory
+						.newInstance();
+				DocumentBuilder builder = factory.newDocumentBuilder();
+				Document doc = builder.parse(theFile);
+				Element rootElement = doc.getDocumentElement();
+
+				return EPRHelper.fromXML(rootElement);
+			}
+			else
+				throw new FileNotFoundException(theFile.toString());
+		}
+		catch (UnmarshalException ex)
+		{
+			throw new IOException(ex.toString());
+		}
+		catch (SAXException ex)
+		{
+			throw new IOException(ex.toString());
+		}
+		catch (ParserConfigurationException ex)
+		{
+			throw new IllegalArgumentException(ex.toString());
+		}
+	}
+
+	protected EPRManager(String domain)
+	{
+		_directory = domain;
+	}
+
+	private String _directory;
+
+	private static Hashtable<String, EPRManager> _instances = new Hashtable<String, EPRManager>();
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/util/EPRManager.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Configuration.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Configuration.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Configuration.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,295 +1,295 @@
-/*
- * 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.common;
-
-import org.jboss.soa.esb.helpers.KeyValuePair;
-
-public class Configuration
-{
-	private static KeyValuePair[] s_oaKV = new KeyValuePair[]
-	{
-			new KeyValuePair(Environment.SMTP_HOST, 					getSmtpHost()),
-			new KeyValuePair(Environment.SMTP_USERNAME, 				getSmtpUsername()),
-			new KeyValuePair(Environment.SMTP_PASSWORD, 				getSmtpPassword()),
-			new KeyValuePair(Environment.SMTP_PORT, 					getSmtpPort()),
-			new KeyValuePair(Environment.SMTP_FROM, 					getSmtpFrom()),
-			new KeyValuePair(Environment.SMTP_AUTH, 					getSmtpAuth()),
-			new KeyValuePair(Environment.JNDI_SERVER_URL, 				getJndiServerURL()),
-			new KeyValuePair(Environment.JNDI_SERVER_CONTEXT_FACTORY,   getJndiServerContextFactory()),
-			new KeyValuePair(Environment.JNDI_SERVER_PKG_PREFIX, 	    getJndiServerPkgPrefix()),
-			new KeyValuePair(Environment.REGISTRY_QUERY_MANAGER_URI, 	getRegistryQueryManageURI()),
-			new KeyValuePair(Environment.REGISTRY_LIFECYCLE_MANAGER_URI,getRegistryLifecycleManagerURI()),
-			new KeyValuePair(Environment.REGISTRY_IMPEMENTATION_CLASS,  getRegistryImplementationClass()),
-			new KeyValuePair(Environment.REGISTRY_FACTORY_CLASS, 		getRegistryFactoryClass()),
-			new KeyValuePair(Environment.REGISTRY_USER, 				getRegistryUser()),
-			new KeyValuePair(Environment.REGISTRY_PASSWORD, 			getRegistryPassword()),
-			new KeyValuePair(Environment.REGISTRY_SCOUT_TRANSPORT_CLASS,getRegistryScoutTransportClass()),
-			new KeyValuePair(Environment.PARAMS_REPOS_IMPL_CLASS,		getParamRepositoryImplClass()),
-			new KeyValuePair(Environment.OBJECT_STORE_CONFIG_FILE, 		getObjStoreConfigFile()),
-			new KeyValuePair(Environment.ENCRYPT_FACTORY_CLASS, 		getEncryptionFactoryClass()),
-			new KeyValuePair(Environment.DB_DRIVER, 					getDbDriver()),
-			new KeyValuePair(Environment.DB_URL, 						getDbUrl()),
-			new KeyValuePair(Environment.DB_USER, 						getDbUser()),
-			new KeyValuePair(Environment.DB_PASSWORD, 					getDbPassword()),
-			new KeyValuePair(Environment.MSG_STORE_DB_CONNECTION_URL, 	getStoreUrl()),
-			new KeyValuePair(Environment.MSG_STORE_DB_JDBC_DRIVER, 		getStoreDriver()),
-			new KeyValuePair(Environment.MSG_STORE_DB_CONNECTION_USER, 	getStoreUser()),
-			new KeyValuePair(Environment.MSG_STORE_DB_CONNECTION_PWD, 	getStorePwd()),
-			new KeyValuePair(Environment.MSG_STORE_DB_POOL_MIN_SIZE, 	getStorePoolMinSize()),
-			new KeyValuePair(Environment.MSG_STORE_DB_POOL_MAX_SIZE, 	getStorePoolMaxSize()),
-			new KeyValuePair(Environment.MSG_STORE_DB_POOL_INITIAL_SIZE,getStorePoolInitialSize()),
-			new KeyValuePair(Environment.MSG_STORE_DB_POOL_TEST_TABLE,  getStorePoolTestTable()),
-			new KeyValuePair(Environment.MSG_STORE_DB_POOL_TIMEOUT_MILLIS,getStorePoolTimeoutMillis()),
-			new KeyValuePair(Environment.MSG_STORE_CONN_FACTORY			 ,getStoreConnectionFactory()),
-			new KeyValuePair(Environment.ROUTER_CBR_CLASS,               getContentBasedRouterImplementationClass())
-	};
-
-	public static String dump()
-	{
-		StringBuilder sb = new StringBuilder("Dump of SystemProperties:\n");
-		for (KeyValuePair oCurr : s_oaKV)
-		{
-			sb.append(oCurr.getKey()).append("=").append(oCurr.getValue())
-					.append("\n");
-		}
-		return sb.append("______________________________________").toString();
-	} // ________________________________
-
-	public static String getSmtpHost()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_HOST, Environment.DEFAULT_HOST);
-	}
-
-	public static String getSmtpUsername()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_USERNAME,
-				Environment.DEFAULT_USERNAME);
-	}
-
-	public static String getSmtpPassword()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_PASSWORD,
-				Environment.DEFAULT_PASSWORD);
-	}
-
-	public static String getSmtpPort()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_PORT, Environment.DEFAULT_PORT);
-	}
-
-	public static String getSmtpFrom()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_FROM);
-	}
-
-	public static String getSmtpAuth()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_AUTH);
-	}
-
-	public static String getJndiServerURL()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_URL,
-				Environment.DEFAULT_HOST);
-	}
-	
-	public static String getJndiServerContextFactory()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY,
-				Environment.DEFAULT_JNDI_CONTEXT_FACTORY);
-	}
-	
-	public static String getJndiServerPkgPrefix()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_PKG_PREFIX,
-				Environment.DEFAULT_JNDI_PKG_PREFIX);
-	}
-	/**
-	 * The Registry Query Manager URI can be used to obtain information about services and their endPoints.
-	 * @return Registry Query Manager URI String
-	 */
-	public static String getRegistryQueryManageURI()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_QUERY_MANAGER_URI);
-	}
-	/**
-	 * The Registry Lifecycle Manager URI can be use to publish services.
-	 * @return Registry Lifecycle Manager URI String
-	 */
-	public static String getRegistryLifecycleManagerURI()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_LIFECYCLE_MANAGER_URI);
-	}
-	/**
-	 * The Registry Factory Class setting specifies which JAXR implementation should be used.
-	 * @return Registry Factory Class String
-	 */
-	public static String getRegistryFactoryClass()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_FACTORY_CLASS);
-	}
-	/**
-	 * The Registry Implememtation Class defines wrapper class
-	 * @return Registry Implementation Class String
-	 */
-	public static String getRegistryImplementationClass()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_IMPEMENTATION_CLASS);
-	}
-	/**
-	 * The Registry Scout Transport Class defines which communication protocol Scout should use to communicate
-	 * with the UDDI registry. Note that this parameter is Scout specific.
-	 * @return Registry Scout Transport Class String
-	 */
-	public static String getRegistryScoutTransportClass()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_SCOUT_TRANSPORT_CLASS);
-	}
-	/**
-	 * The Registry User is used to inquire and publish to the Registry.
-	 * @return Registry User String
-	 */
-	public static String getRegistryUser()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_USER);
-	}
-	/**
-	 * The Registry Password that goes with the Registry User.
-	 * @return Registry Password String
-	 */
-	public static String getRegistryPassword()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_PASSWORD);
-	}
-	
-	public static String getParamRepositoryImplClass()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.PARAMS_REPOS_IMPL_CLASS);
-	}
-
-	public static String getObjStoreConfigFile()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.OBJECT_STORE_CONFIG_FILE);
-		return property;
-	}
-
-	public static String getEncryptionFactoryClass()
-	{
-		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.ENCRYPT_FACTORY_CLASS,
-				org.jboss.soa.esb.services.DefaultEncryptionFactory.class
-						.getName());
-	}
-	
-	public static String getDbDriver()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CONNECTION_MODULE).getProperty(Environment.DB_DRIVER);
-		return property;
-	}
-	
-	public static String getDbUrl()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CONNECTION_MODULE).getProperty(Environment.DB_URL);
-		return property;
-	}
-	
-	public static String getDbUser()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CONNECTION_MODULE).getProperty(Environment.DB_USER);
-		return property;
-	}
-	
-	public static String getDbPassword()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CONNECTION_MODULE).getProperty(Environment.DB_PASSWORD);
-		return property;
-	}
-	
-	public static String getStoreUrl()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_URL);
-		return property;
-	}
-	
-	public static String getStoreDriver()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_JDBC_DRIVER);
-		return property;
-	}	
-	
-	public static String getStorePwd()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_PWD);
-		return property;
-	}
-	
-	public static String getStoreUser()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_USER);
-		return property;
-	}
-	
-	public static String getStorePoolInitialSize()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_INITIAL_SIZE);
-		return property;
-	}
-	
-	public static String getStorePoolMinSize()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_MIN_SIZE);
-		return property;
-	}
-	
-	public static String getStorePoolMaxSize()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_MAX_SIZE);
-		return property;
-	}
-	
-	public static String getStorePoolTestTable()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_TEST_TABLE);
-		return property;
-	}
-	
-	public static String getStorePoolTimeoutMillis()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_TIMEOUT_MILLIS);
-		return property;
-	}
-	
-	public static String getStoreConnectionFactory()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.MSG_STORE_CONN_FACTORY);
-		return property;
-	}
-	
-	public static String getContentBasedRouterImplementationClass()
-	{
-		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.ROUTER_MODULE).getProperty(Environment.ROUTER_CBR_CLASS);
-		return property;
-	}
-	
-	
-	
+/*
+ * 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.common;
+
+import org.jboss.soa.esb.helpers.KeyValuePair;
+
+public class Configuration
+{
+	private static KeyValuePair[] s_oaKV = new KeyValuePair[]
+	{
+			new KeyValuePair(Environment.SMTP_HOST, 					getSmtpHost()),
+			new KeyValuePair(Environment.SMTP_USERNAME, 				getSmtpUsername()),
+			new KeyValuePair(Environment.SMTP_PASSWORD, 				getSmtpPassword()),
+			new KeyValuePair(Environment.SMTP_PORT, 					getSmtpPort()),
+			new KeyValuePair(Environment.SMTP_FROM, 					getSmtpFrom()),
+			new KeyValuePair(Environment.SMTP_AUTH, 					getSmtpAuth()),
+			new KeyValuePair(Environment.JNDI_SERVER_URL, 				getJndiServerURL()),
+			new KeyValuePair(Environment.JNDI_SERVER_CONTEXT_FACTORY,   getJndiServerContextFactory()),
+			new KeyValuePair(Environment.JNDI_SERVER_PKG_PREFIX, 	    getJndiServerPkgPrefix()),
+			new KeyValuePair(Environment.REGISTRY_QUERY_MANAGER_URI, 	getRegistryQueryManageURI()),
+			new KeyValuePair(Environment.REGISTRY_LIFECYCLE_MANAGER_URI,getRegistryLifecycleManagerURI()),
+			new KeyValuePair(Environment.REGISTRY_IMPEMENTATION_CLASS,  getRegistryImplementationClass()),
+			new KeyValuePair(Environment.REGISTRY_FACTORY_CLASS, 		getRegistryFactoryClass()),
+			new KeyValuePair(Environment.REGISTRY_USER, 				getRegistryUser()),
+			new KeyValuePair(Environment.REGISTRY_PASSWORD, 			getRegistryPassword()),
+			new KeyValuePair(Environment.REGISTRY_SCOUT_TRANSPORT_CLASS,getRegistryScoutTransportClass()),
+			new KeyValuePair(Environment.PARAMS_REPOS_IMPL_CLASS,		getParamRepositoryImplClass()),
+			new KeyValuePair(Environment.OBJECT_STORE_CONFIG_FILE, 		getObjStoreConfigFile()),
+			new KeyValuePair(Environment.ENCRYPT_FACTORY_CLASS, 		getEncryptionFactoryClass()),
+			new KeyValuePair(Environment.DB_DRIVER, 					getDbDriver()),
+			new KeyValuePair(Environment.DB_URL, 						getDbUrl()),
+			new KeyValuePair(Environment.DB_USER, 						getDbUser()),
+			new KeyValuePair(Environment.DB_PASSWORD, 					getDbPassword()),
+			new KeyValuePair(Environment.MSG_STORE_DB_CONNECTION_URL, 	getStoreUrl()),
+			new KeyValuePair(Environment.MSG_STORE_DB_JDBC_DRIVER, 		getStoreDriver()),
+			new KeyValuePair(Environment.MSG_STORE_DB_CONNECTION_USER, 	getStoreUser()),
+			new KeyValuePair(Environment.MSG_STORE_DB_CONNECTION_PWD, 	getStorePwd()),
+			new KeyValuePair(Environment.MSG_STORE_DB_POOL_MIN_SIZE, 	getStorePoolMinSize()),
+			new KeyValuePair(Environment.MSG_STORE_DB_POOL_MAX_SIZE, 	getStorePoolMaxSize()),
+			new KeyValuePair(Environment.MSG_STORE_DB_POOL_INITIAL_SIZE,getStorePoolInitialSize()),
+			new KeyValuePair(Environment.MSG_STORE_DB_POOL_TEST_TABLE,  getStorePoolTestTable()),
+			new KeyValuePair(Environment.MSG_STORE_DB_POOL_TIMEOUT_MILLIS,getStorePoolTimeoutMillis()),
+			new KeyValuePair(Environment.MSG_STORE_CONN_FACTORY			 ,getStoreConnectionFactory()),
+			new KeyValuePair(Environment.ROUTER_CBR_CLASS,               getContentBasedRouterImplementationClass())
+	};
+
+	public static String dump()
+	{
+		StringBuilder sb = new StringBuilder("Dump of SystemProperties:\n");
+		for (KeyValuePair oCurr : s_oaKV)
+		{
+			sb.append(oCurr.getKey()).append("=").append(oCurr.getValue())
+					.append("\n");
+		}
+		return sb.append("______________________________________").toString();
+	} // ________________________________
+
+	public static String getSmtpHost()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_HOST, Environment.DEFAULT_HOST);
+	}
+
+	public static String getSmtpUsername()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_USERNAME,
+				Environment.DEFAULT_USERNAME);
+	}
+
+	public static String getSmtpPassword()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_PASSWORD,
+				Environment.DEFAULT_PASSWORD);
+	}
+
+	public static String getSmtpPort()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_PORT, Environment.DEFAULT_PORT);
+	}
+
+	public static String getSmtpFrom()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_FROM);
+	}
+
+	public static String getSmtpAuth()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(Environment.SMTP_AUTH);
+	}
+
+	public static String getJndiServerURL()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_URL,
+				Environment.DEFAULT_HOST);
+	}
+	
+	public static String getJndiServerContextFactory()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY,
+				Environment.DEFAULT_JNDI_CONTEXT_FACTORY);
+	}
+	
+	public static String getJndiServerPkgPrefix()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.JNDI_SERVER_PKG_PREFIX,
+				Environment.DEFAULT_JNDI_PKG_PREFIX);
+	}
+	/**
+	 * The Registry Query Manager URI can be used to obtain information about services and their endPoints.
+	 * @return Registry Query Manager URI String
+	 */
+	public static String getRegistryQueryManageURI()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_QUERY_MANAGER_URI);
+	}
+	/**
+	 * The Registry Lifecycle Manager URI can be use to publish services.
+	 * @return Registry Lifecycle Manager URI String
+	 */
+	public static String getRegistryLifecycleManagerURI()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_LIFECYCLE_MANAGER_URI);
+	}
+	/**
+	 * The Registry Factory Class setting specifies which JAXR implementation should be used.
+	 * @return Registry Factory Class String
+	 */
+	public static String getRegistryFactoryClass()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_FACTORY_CLASS);
+	}
+	/**
+	 * The Registry Implememtation Class defines wrapper class
+	 * @return Registry Implementation Class String
+	 */
+	public static String getRegistryImplementationClass()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_IMPEMENTATION_CLASS);
+	}
+	/**
+	 * The Registry Scout Transport Class defines which communication protocol Scout should use to communicate
+	 * with the UDDI registry. Note that this parameter is Scout specific.
+	 * @return Registry Scout Transport Class String
+	 */
+	public static String getRegistryScoutTransportClass()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_SCOUT_TRANSPORT_CLASS);
+	}
+	/**
+	 * The Registry User is used to inquire and publish to the Registry.
+	 * @return Registry User String
+	 */
+	public static String getRegistryUser()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_USER);
+	}
+	/**
+	 * The Registry Password that goes with the Registry User.
+	 * @return Registry Password String
+	 */
+	public static String getRegistryPassword()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.REGISTRY_MODULE).getProperty(Environment.REGISTRY_PASSWORD);
+	}
+	
+	public static String getParamRepositoryImplClass()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.PARAMS_REPOS_IMPL_CLASS);
+	}
+
+	public static String getObjStoreConfigFile()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.OBJECT_STORE_CONFIG_FILE);
+		return property;
+	}
+
+	public static String getEncryptionFactoryClass()
+	{
+		return ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.ENCRYPT_FACTORY_CLASS,
+				org.jboss.soa.esb.services.DefaultEncryptionFactory.class
+						.getName());
+	}
+	
+	public static String getDbDriver()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CONNECTION_MODULE).getProperty(Environment.DB_DRIVER);
+		return property;
+	}
+	
+	public static String getDbUrl()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CONNECTION_MODULE).getProperty(Environment.DB_URL);
+		return property;
+	}
+	
+	public static String getDbUser()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CONNECTION_MODULE).getProperty(Environment.DB_USER);
+		return property;
+	}
+	
+	public static String getDbPassword()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CONNECTION_MODULE).getProperty(Environment.DB_PASSWORD);
+		return property;
+	}
+	
+	public static String getStoreUrl()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_URL);
+		return property;
+	}
+	
+	public static String getStoreDriver()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_JDBC_DRIVER);
+		return property;
+	}	
+	
+	public static String getStorePwd()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_PWD);
+		return property;
+	}
+	
+	public static String getStoreUser()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_CONNECTION_USER);
+		return property;
+	}
+	
+	public static String getStorePoolInitialSize()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_INITIAL_SIZE);
+		return property;
+	}
+	
+	public static String getStorePoolMinSize()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_MIN_SIZE);
+		return property;
+	}
+	
+	public static String getStorePoolMaxSize()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_MAX_SIZE);
+		return property;
+	}
+	
+	public static String getStorePoolTestTable()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_TEST_TABLE);
+		return property;
+	}
+	
+	public static String getStorePoolTimeoutMillis()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE).getProperty(Environment.MSG_STORE_DB_POOL_TIMEOUT_MILLIS);
+		return property;
+	}
+	
+	public static String getStoreConnectionFactory()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.MSG_STORE_CONN_FACTORY);
+		return property;
+	}
+	
+	public static String getContentBasedRouterImplementationClass()
+	{
+		String property = ModulePropertyManager.getPropertyManager(ModulePropertyManager.ROUTER_MODULE).getProperty(Environment.ROUTER_CBR_CLASS);
+		return property;
+	}
+	
+	
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Configuration.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Environment.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Environment.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,123 +1,123 @@
-/*
- * 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.common;
-
-public class Environment
-{
-	public static final String PROPERTIES_FILE = "org.jboss.soa.esb.propertyFile";
-	
-	/*
-	 * Transport specific properties.
-	 */
-	
-	public static final String SMTP_HOST     = "org.jboss.soa.esb.mail.smtp.host";
-	public static final String SMTP_USERNAME = "org.jboss.soa.esb.mail.smtp.user";
-	public static final String SMTP_PASSWORD = "org.jboss.soa.esb.mail.smtp.password";
-	public static final String SMTP_PORT     = "org.jboss.soa.esb.mail.smtp.port";
-	public static final String SMTP_FROM     = "org.jboss.soa.esb.mail.smtp.from";
-	public static final String SMTP_AUTH     = "org.jboss.soa.esb.mail.smtp.auth";
-	
-	public static final String FTP_LOCALDIR  = "org.jboss.soa.esb.ftp.localdir";
-	public static final String FTP_REMOTEDIR = "org.jboss.soa.esb.ftp.remotedir";
-	
-	/*
-	 * Code properties
-	 */
-	public static final String JNDI_SERVER_URL                = "org.jboss.soa.esb.jndi.server.url";
-	public static final String JNDI_SERVER_CONTEXT_FACTORY    = "org.jboss.soa.esb.jndi.server.context.factory";
-	public static final String JNDI_SERVER_PKG_PREFIX         = "org.jboss.soa.esb.jndi.server.pkg.prefix";
-	public static final String PARAMS_REPOS_IMPL_CLASS        = "org.jboss.soa.esb.paramsRepository.class";
-	public static final String OBJECT_STORE_CONFIG_FILE       = "org.jboss.soa.esb.objStore.configFile";
-	public static final String ENCRYPT_FACTORY_CLASS          = "org.jboss.soa.esb.encryption.factory.class";
-	/** 
-	 * The Registry Query Manager URI defines the endPoint where registry queries can be made. 
-	 */
-	public static final String REGISTRY_QUERY_MANAGER_URI     = "org.jboss.soa.esb.registry.queryManagerURI";
-	/** 
-	 * The Registry Lifecycle Manager URI defines the endPoint where service information can be published to.
-	 */
-	public static final String REGISTRY_LIFECYCLE_MANAGER_URI = "org.jboss.soa.esb.registry.lifeCycleManagerURI";
-    /**
-     * The Registry Implementation class, a light wrapper class.
-     */
-	public static final String REGISTRY_IMPEMENTATION_CLASS = "org.jboss.soa.esb.registry.implementationClass";
-	/** 
-	 * The Registry Factory Class setting specifies which JAXR implementation should be used.
-	 */
-	public static final String REGISTRY_FACTORY_CLASS         = "org.jboss.soa.esb.registry.factoryClass";
-	/**
-	 * The user used to query and publish to the registry.
-	 */
-	public static final String REGISTRY_USER                  = "org.jboss.soa.esb.registry.user";
-	/**
-	 * The password for the registry user.
-	 */
-	public static final String REGISTRY_PASSWORD              = "org.jboss.soa.esb.registry.password";
-	/** 
-	 * The Registry Scout Transport Class property defines which communication protocol Scout should use to communicate
-	 * with the UDDI registry. Note that this parameter is Scout specific.
-	 */
-	public static final String REGISTRY_SCOUT_TRANSPORT_CLASS = "org.jboss.soa.esb.scout.proxy.transportClass";
-	/** 
-	 * Property that holds directory to use with the helper EPRManager class.
-	 */
-	public static final String REGISTRY_FILE_HELPER_DIR       = "org.jboss.soa.esb.registry.file.directory";
-	/**
-	 * The Content Based Router class property declares which CBR Implementation should be used.
-	 */
-	public static final String ROUTER_CBR_CLASS               = "org.jboss.soa.esb.routing.cbrClass";
-	/*
-	 * Connection specific properties
-	 */
-	public static String DB_DRIVER = "org.jboss.esb.db.driver";
-	public static String DB_URL = "org.jboss.esb.db.url";
-	public static String DB_USER = "org.jboss.esb.db.user";
-	public static String DB_PASSWORD = "org.jboss.esb.db.password";
-	
-	/*
-	 * Some default values.
-	 */
-	public static final String DEFAULT_PROPERTY_FILE                  = "jbossesb-properties.xml";
-	public static final String DEFAULT_HOST                           = "localhost";
-	public static final String DEFAULT_USERNAME                       = "";
-	public static final String DEFAULT_PASSWORD                       = "";
-	public static final String DEFAULT_PORT                           = "25";
-	public static final String DEFAULT_JNDI_CONTEXT_FACTORY           = "org.jnp.interfaces.NamingContextFactory";
-	public static final String DEFAULT_JNDI_PKG_PREFIX                = "org.jboss.naming:org.jnp.interfaces";
-	
-	/*
-	 * DatabaseMessageStore Persistence Store properties.
-	 */
-	public static final String MSG_STORE_CONN_FACTORY			= "org.jboss.soa.esb.persistence.connection.factory";
-	public static final String MSG_STORE_DB_CONNECTION_URL 		= "org.jboss.soa.esb.persistence.db.connection.url";
-	public static final String MSG_STORE_DB_CONNECTION_USER 	= "org.jboss.soa.esb.persistence.db.user";
-	public static final String MSG_STORE_DB_CONNECTION_PWD 		= "org.jboss.soa.esb.persistence.db.pwd";
-	public static final String MSG_STORE_DB_TABLE_NAME 			= "org.jboss.soa.esb.persistence.db.table";
-	public static final String MSG_STORE_DB_JDBC_DRIVER			= "org.jboss.soa.esb.persistence.db.jdbc.driver";
-	public static final String MSG_STORE_DB_POOL_INITIAL_SIZE	= "org.jboss.soa.esb.persistence.db.pool.initial.size";
-	public static final String MSG_STORE_DB_POOL_MIN_SIZE		= "org.jboss.soa.esb.persistence.db.pool.min.size";
-	public static final String MSG_STORE_DB_POOL_MAX_SIZE		= "org.jboss.soa.esb.persistence.db.pool.max.size";
-	public static final String MSG_STORE_DB_POOL_TEST_TABLE		= "org.jboss.soa.esb.persistence.db.pool.test.table";
-	public static final String MSG_STORE_DB_POOL_TIMEOUT_MILLIS	= "org.jboss.soa.esb.persistence.db.pool.timeout.millis";	
-
+/*
+ * 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.common;
+
+public class Environment
+{
+	public static final String PROPERTIES_FILE = "org.jboss.soa.esb.propertyFile";
+	
+	/*
+	 * Transport specific properties.
+	 */
+	
+	public static final String SMTP_HOST     = "org.jboss.soa.esb.mail.smtp.host";
+	public static final String SMTP_USERNAME = "org.jboss.soa.esb.mail.smtp.user";
+	public static final String SMTP_PASSWORD = "org.jboss.soa.esb.mail.smtp.password";
+	public static final String SMTP_PORT     = "org.jboss.soa.esb.mail.smtp.port";
+	public static final String SMTP_FROM     = "org.jboss.soa.esb.mail.smtp.from";
+	public static final String SMTP_AUTH     = "org.jboss.soa.esb.mail.smtp.auth";
+	
+	public static final String FTP_LOCALDIR  = "org.jboss.soa.esb.ftp.localdir";
+	public static final String FTP_REMOTEDIR = "org.jboss.soa.esb.ftp.remotedir";
+	
+	/*
+	 * Code properties
+	 */
+	public static final String JNDI_SERVER_URL                = "org.jboss.soa.esb.jndi.server.url";
+	public static final String JNDI_SERVER_CONTEXT_FACTORY    = "org.jboss.soa.esb.jndi.server.context.factory";
+	public static final String JNDI_SERVER_PKG_PREFIX         = "org.jboss.soa.esb.jndi.server.pkg.prefix";
+	public static final String PARAMS_REPOS_IMPL_CLASS        = "org.jboss.soa.esb.paramsRepository.class";
+	public static final String OBJECT_STORE_CONFIG_FILE       = "org.jboss.soa.esb.objStore.configFile";
+	public static final String ENCRYPT_FACTORY_CLASS          = "org.jboss.soa.esb.encryption.factory.class";
+	/** 
+	 * The Registry Query Manager URI defines the endPoint where registry queries can be made. 
+	 */
+	public static final String REGISTRY_QUERY_MANAGER_URI     = "org.jboss.soa.esb.registry.queryManagerURI";
+	/** 
+	 * The Registry Lifecycle Manager URI defines the endPoint where service information can be published to.
+	 */
+	public static final String REGISTRY_LIFECYCLE_MANAGER_URI = "org.jboss.soa.esb.registry.lifeCycleManagerURI";
+    /**
+     * The Registry Implementation class, a light wrapper class.
+     */
+	public static final String REGISTRY_IMPEMENTATION_CLASS = "org.jboss.soa.esb.registry.implementationClass";
+	/** 
+	 * The Registry Factory Class setting specifies which JAXR implementation should be used.
+	 */
+	public static final String REGISTRY_FACTORY_CLASS         = "org.jboss.soa.esb.registry.factoryClass";
+	/**
+	 * The user used to query and publish to the registry.
+	 */
+	public static final String REGISTRY_USER                  = "org.jboss.soa.esb.registry.user";
+	/**
+	 * The password for the registry user.
+	 */
+	public static final String REGISTRY_PASSWORD              = "org.jboss.soa.esb.registry.password";
+	/** 
+	 * The Registry Scout Transport Class property defines which communication protocol Scout should use to communicate
+	 * with the UDDI registry. Note that this parameter is Scout specific.
+	 */
+	public static final String REGISTRY_SCOUT_TRANSPORT_CLASS = "org.jboss.soa.esb.scout.proxy.transportClass";
+	/** 
+	 * Property that holds directory to use with the helper EPRManager class.
+	 */
+	public static final String REGISTRY_FILE_HELPER_DIR       = "org.jboss.soa.esb.registry.file.directory";
+	/**
+	 * The Content Based Router class property declares which CBR Implementation should be used.
+	 */
+	public static final String ROUTER_CBR_CLASS               = "org.jboss.soa.esb.routing.cbrClass";
+	/*
+	 * Connection specific properties
+	 */
+	public static String DB_DRIVER = "org.jboss.esb.db.driver";
+	public static String DB_URL = "org.jboss.esb.db.url";
+	public static String DB_USER = "org.jboss.esb.db.user";
+	public static String DB_PASSWORD = "org.jboss.esb.db.password";
+	
+	/*
+	 * Some default values.
+	 */
+	public static final String DEFAULT_PROPERTY_FILE                  = "jbossesb-properties.xml";
+	public static final String DEFAULT_HOST                           = "localhost";
+	public static final String DEFAULT_USERNAME                       = "";
+	public static final String DEFAULT_PASSWORD                       = "";
+	public static final String DEFAULT_PORT                           = "25";
+	public static final String DEFAULT_JNDI_CONTEXT_FACTORY           = "org.jnp.interfaces.NamingContextFactory";
+	public static final String DEFAULT_JNDI_PKG_PREFIX                = "org.jboss.naming:org.jnp.interfaces";
+	
+	/*
+	 * DatabaseMessageStore Persistence Store properties.
+	 */
+	public static final String MSG_STORE_CONN_FACTORY			= "org.jboss.soa.esb.persistence.connection.factory";
+	public static final String MSG_STORE_DB_CONNECTION_URL 		= "org.jboss.soa.esb.persistence.db.connection.url";
+	public static final String MSG_STORE_DB_CONNECTION_USER 	= "org.jboss.soa.esb.persistence.db.user";
+	public static final String MSG_STORE_DB_CONNECTION_PWD 		= "org.jboss.soa.esb.persistence.db.pwd";
+	public static final String MSG_STORE_DB_TABLE_NAME 			= "org.jboss.soa.esb.persistence.db.table";
+	public static final String MSG_STORE_DB_JDBC_DRIVER			= "org.jboss.soa.esb.persistence.db.jdbc.driver";
+	public static final String MSG_STORE_DB_POOL_INITIAL_SIZE	= "org.jboss.soa.esb.persistence.db.pool.initial.size";
+	public static final String MSG_STORE_DB_POOL_MIN_SIZE		= "org.jboss.soa.esb.persistence.db.pool.min.size";
+	public static final String MSG_STORE_DB_POOL_MAX_SIZE		= "org.jboss.soa.esb.persistence.db.pool.max.size";
+	public static final String MSG_STORE_DB_POOL_TEST_TABLE		= "org.jboss.soa.esb.persistence.db.pool.test.table";
+	public static final String MSG_STORE_DB_POOL_TIMEOUT_MILLIS	= "org.jboss.soa.esb.persistence.db.pool.timeout.millis";	
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Environment.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Factory.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Factory.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Factory.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,58 +1,58 @@
-/*
- * 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.common;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-/**
- * Base class to find a class on the classpath.
- * 
- * @author kurt.stam at redhat.com
- *
- */
-public abstract class Factory 
-{
-	private static Logger logger = Logger.getLogger(Factory.class);
-	/**
-	 * Loads the class with the given name.
-	 * @param className - the className to be found
-	 * @return - the class
-	 * @throws ClassNotFoundException
-	 */
-	protected static Class getClassForName(String className) throws ClassNotFoundException
-	{
-		Class clazz = null;
-		try {
-			logger.log(Priority.DEBUG, "Using the Context ClassLoader");
-			ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
-			clazz = Class.forName(className, true, contextClassLoader);
-		} catch (ClassNotFoundException classNotFound) {
-			if (logger.isDebugEnabled()) {
-				logger.log(Priority.WARN, "The Context ClassLoader could not find the class.");
-				logger.log(Priority.WARN, "Using the System ClassLoader");
-			}
-			ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
-			clazz = Class.forName(className, true, systemClassLoader);
-		}
-		return clazz;
-	}
-}
+/*
+ * 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.common;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+/**
+ * Base class to find a class on the classpath.
+ * 
+ * @author kurt.stam at redhat.com
+ *
+ */
+public abstract class Factory 
+{
+	private static Logger logger = Logger.getLogger(Factory.class);
+	/**
+	 * Loads the class with the given name.
+	 * @param className - the className to be found
+	 * @return - the class
+	 * @throws ClassNotFoundException
+	 */
+	protected static Class getClassForName(String className) throws ClassNotFoundException
+	{
+		Class clazz = null;
+		try {
+			logger.log(Priority.DEBUG, "Using the Context ClassLoader");
+			ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+			clazz = Class.forName(className, true, contextClassLoader);
+		} catch (ClassNotFoundException classNotFound) {
+			if (logger.isDebugEnabled()) {
+				logger.log(Priority.WARN, "The Context ClassLoader could not find the class.");
+				logger.log(Priority.WARN, "Using the System ClassLoader");
+			}
+			ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
+			clazz = Class.forName(className, true, systemClassLoader);
+		}
+		return clazz;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/Factory.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/ModulePropertyManager.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/common/TagNames.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,45 +1,45 @@
-/*
- * 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.couriers;
-
-import org.jboss.internal.soa.esb.couriers.DeliverOnlyCourier;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.message.Message;
-/**
- * Courier interface. Deals relatively low level Message transport options.
- * 
- * @author esteban
- * @author kstam at redhat.com
- *
- */
-public interface Courier extends DeliverOnlyCourier
-{
-	/**
-	 * Try to deliver an ESB message. This is a one shot delivery.
-	 * 
-	 * @param message Message - the message to deliver 
-	 * @return boolean - the result of the delivery
-	 * @throws CourierException - if problems were encountered
-	 */
-	public boolean deliver(Message message) throws CourierException, MalformedEPRException;
-}
+/*
+ * 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.couriers;
+
+import org.jboss.internal.soa.esb.couriers.DeliverOnlyCourier;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.message.Message;
+/**
+ * Courier interface. Deals relatively low level Message transport options.
+ * 
+ * @author esteban
+ * @author kstam at redhat.com
+ *
+ */
+public interface Courier extends DeliverOnlyCourier
+{
+	/**
+	 * Try to deliver an ESB message. This is a one shot delivery.
+	 * 
+	 * @param message Message - the message to deliver 
+	 * @return boolean - the result of the delivery
+	 * @throws CourierException - if problems were encountered
+	 */
+	public boolean deliver(Message message) throws CourierException, MalformedEPRException;
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,55 +1,55 @@
-/*
- * 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.couriers;
-
-import org.jboss.soa.esb.BaseException;
-
-/**
- * Dispatch Exception.
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @since Version 4.0
- */
-public class CourierException extends BaseException 
-{
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Construct an exception instance. 
-     * @param message Exception message.
-     */
-    public CourierException(String message) { super(message); }
-
-    /**
-     * Construct an exception instance. 
-     * @param message Exception message.
-     * @param cause Exception cause.
-     */
-    public CourierException(String message, Throwable cause) { super(message, cause); }
-
-    /**
-     * Construct an exception instance. 
-     * @param cause Exception cause.
-     */
-    public CourierException(Throwable cause) { super(cause); }
-}
+/*
+ * 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.couriers;
+
+import org.jboss.soa.esb.BaseException;
+
+/**
+ * Dispatch Exception.
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @since Version 4.0
+ */
+public class CourierException extends BaseException 
+{
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+     * Construct an exception instance. 
+     * @param message Exception message.
+     */
+    public CourierException(String message) { super(message); }
+
+    /**
+     * Construct an exception instance. 
+     * @param message Exception message.
+     * @param cause Exception cause.
+     */
+    public CourierException(String message, Throwable cause) { super(message, cause); }
+
+    /**
+     * Construct an exception instance. 
+     * @param cause Exception cause.
+     */
+    public CourierException(Throwable cause) { super(cause); }
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,81 +1,81 @@
-/*
- * 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.couriers;
-/**
- * 
- * @author - esteban
- * @author - kstam at redhat.com
- *
- */
-import org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-
-public class CourierFactory 
-{
-	private static final CourierFactory _instance = new CourierFactory();
-	
-	// private default constructor
-	private CourierFactory() {}
-
-	public static CourierFactory getInstance(Object obj)
-	{
-		return _instance;
-	}
-	/**
-	 * Obtain a courier which can perform deliveries only and prime it with the "to address" (toEPR).
-	 * 
-	 * @param toEPR - the 'to address', the address on where to deliver a Message.
-	 * @return
-	 * @throws CourierException if the specific courier implementation cannot be created.
-	 */
-	public static Courier getCourier(EPR toEPR) throws CourierException, MalformedEPRException
-	{
-		return getCourier(toEPR, null);
-	}
-	/**
-	 * Obtain a courier which can perform pickups only and prime it with the "to address" (toEPR) 
-	 * and the "replyTo address" (replyToEPR). 
-	 * 
-	 * @param toEPR      - the 'to address', the address on where to deliver a Message.
-	 * @parem replyToEPR - the 'replyTo address', the address where to deliver the Message we pickup.
-	 * @return
-	 * @throws CourierException if the specific courier implementation cannot be created.
-	 */
-	public static TwoWayCourier getPickupCourier(EPR replyToEPR) throws CourierException, MalformedEPRException
-	{
-		return getCourier(null, replyToEPR);
-	}
-	/**
-	 * Obtain a courier which can perform both deliveries and pickups and prime it with 
-	 * the "to address" (toEPR) and the "replyTo address" (replyToEPR). 
-	 * 
-	 * @param toEPR      - the 'to address', the address on where to deliver a Message.
-	 * @parem replyToEPR - the 'replyTo address', the address where to deliver the Message we pickup.
-	 * @return
-	 * @throws CourierException if the specific courier implementation cannot be created.
-	 */
-	public static TwoWayCourier getCourier(EPR toEPR, EPR replyToEPR) throws CourierException, MalformedEPRException
-	{
-		return new TwoWayCourierImpl(toEPR, replyToEPR);
-	}
-}
+/*
+ * 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.couriers;
+/**
+ * 
+ * @author - esteban
+ * @author - kstam at redhat.com
+ *
+ */
+import org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+
+public class CourierFactory 
+{
+	private static final CourierFactory _instance = new CourierFactory();
+	
+	// private default constructor
+	private CourierFactory() {}
+
+	public static CourierFactory getInstance(Object obj)
+	{
+		return _instance;
+	}
+	/**
+	 * Obtain a courier which can perform deliveries only and prime it with the "to address" (toEPR).
+	 * 
+	 * @param toEPR - the 'to address', the address on where to deliver a Message.
+	 * @return
+	 * @throws CourierException if the specific courier implementation cannot be created.
+	 */
+	public static Courier getCourier(EPR toEPR) throws CourierException, MalformedEPRException
+	{
+		return getCourier(toEPR, null);
+	}
+	/**
+	 * Obtain a courier which can perform pickups only and prime it with the "to address" (toEPR) 
+	 * and the "replyTo address" (replyToEPR). 
+	 * 
+	 * @param toEPR      - the 'to address', the address on where to deliver a Message.
+	 * @parem replyToEPR - the 'replyTo address', the address where to deliver the Message we pickup.
+	 * @return
+	 * @throws CourierException if the specific courier implementation cannot be created.
+	 */
+	public static TwoWayCourier getPickupCourier(EPR replyToEPR) throws CourierException, MalformedEPRException
+	{
+		return getCourier(null, replyToEPR);
+	}
+	/**
+	 * Obtain a courier which can perform both deliveries and pickups and prime it with 
+	 * the "to address" (toEPR) and the "replyTo address" (replyToEPR). 
+	 * 
+	 * @param toEPR      - the 'to address', the address on where to deliver a Message.
+	 * @parem replyToEPR - the 'replyTo address', the address where to deliver the Message we pickup.
+	 * @return
+	 * @throws CourierException if the specific courier implementation cannot be created.
+	 */
+	public static TwoWayCourier getCourier(EPR toEPR, EPR replyToEPR) throws CourierException, MalformedEPRException
+	{
+		return new TwoWayCourierImpl(toEPR, replyToEPR);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierTimeoutException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierTimeoutException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierTimeoutException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,55 +1,55 @@
-/*
- * 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.couriers;
-
-import org.jboss.soa.esb.BaseException;
-
-/**
- * Timeout exception.
- * 
- * @author kstam at redhat.com
- */
-public class CourierTimeoutException extends BaseException 
-{
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Construct an exception instance. 
-     * @param message Exception message.
-     */
-    public CourierTimeoutException(String message) { super(message); }
-
-    /**
-     * Construct an exception instance. 
-     * @param message Exception message.
-     * @param cause Exception cause.
-     */
-    public CourierTimeoutException(String message, Throwable cause) { super(message, cause); }
-
-    /**
-     * Construct an exception instance. 
-     * @param cause Exception cause.
-     */
-    public CourierTimeoutException(Throwable cause) { super(cause); }
-}
+/*
+ * 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.couriers;
+
+import org.jboss.soa.esb.BaseException;
+
+/**
+ * Timeout exception.
+ * 
+ * @author kstam at redhat.com
+ */
+public class CourierTimeoutException extends BaseException 
+{
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+     * Construct an exception instance. 
+     * @param message Exception message.
+     */
+    public CourierTimeoutException(String message) { super(message); }
+
+    /**
+     * Construct an exception instance. 
+     * @param message Exception message.
+     * @param cause Exception cause.
+     */
+    public CourierTimeoutException(String message, Throwable cause) { super(message, cause); }
+
+    /**
+     * Construct an exception instance. 
+     * @param cause Exception cause.
+     */
+    public CourierTimeoutException(Throwable cause) { super(cause); }
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierTimeoutException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,328 +1,328 @@
-/*
- * 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.couriers;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.io.StreamCorruptedException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.couriers.DeliverOnlyCourier;
-import org.jboss.internal.soa.esb.couriers.PickUpOnlyCourier;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.util.Util;
-import org.xml.sax.SAXException;
-
-public class CourierUtil
-{
-	public static final String CORRELATION_ID_TAG = "messageCorrelationId";
-
-	private CourierUtil() {}
-
-	public static List<KeyValuePair> propertiesFromSelector(String selector)
-			throws ConfigurationException
-	{
-		// No problem if selector is null - everything in queue will be returned
-		List<KeyValuePair> oRet = new ArrayList<KeyValuePair>();
-		if (!Util.isNullString(selector))
-		{
-			for (String sCurr : selector.split(","))
-			{
-				String[] sa = sCurr.split("=");
-				if (sa.length != 2 || sa[1].charAt(0) != '\''
-						|| sa[1].charAt(-1 + sa[1].length()) != '\'')
-					throw new ConfigurationException("Illegal message selector syntax <"
-							+ selector + ">");
-				KeyValuePair oNew = new KeyValuePair(sa[0], sa[1].substring(0,
-						-1 + sa[1].length()).substring(1));
-				oRet.add(oNew);
-			}
-		}
-		return oRet;
-	}
-
-	/**
-	 * We will be listening the same queue, but with a 'temporary' message
-	 * selector based of a UUID.
-	 * 
-	 * @param message
-	 *            to which we ill add the CORRELATION_ID_TAG.
-	 * @return the generated unique reply selector.
-	 */
-	public static String getReplySelector()
-	{
-		String uuId = UUID.randomUUID().toString();
-		String uniqueReplySelector = new StringBuilder().append(
-				CORRELATION_ID_TAG).append("='").append(uuId).append("'")
-				.toString();
-		return uniqueReplySelector;
-	}
-
-	/**
-	 * Build a temporary replyToEPR, based on the toEpr, to which we can reply
-	 * to.
-	 * <ul>
-	 * <li> for JMS we will use the toEpr, but change the message selector.
-	 * </ul>
-	 * 
-	 * @param toEpr -
-	 *            the toEPR which will be used a basis to generate the
-	 *            replyToEPR.
-	 * @return replyToEPR - the EPR to which the pickup will be delivered.
-	 * @throws URISyntaxException,
-	 *             CourierException
-	 */
-	public static EPR getTemporaryReplyToEpr(EPR toEpr)
-			throws CourierException, MalformedEPRException
-	{
-		try
-		{
-			if (null==toEpr)
-				return null;
-			if (toEpr instanceof JMSEpr)
-			{
-				JMSEpr jpr = (JMSEpr) toEpr;
-				// Setting the replyTo to the queue we specific in the epr we are
-				// going to call
-				// The selectors will do the job.
-				return new JMSEpr(jpr.getDestinationType(), jpr
-						.getDestinationName(), jpr.getConnectionFactory(), jpr
-						.getJndiURL(), jpr.getJndiContextFactory(), jpr
-						.getJndiPkgPrefix(), getReplySelector());
-			}
-			if(toEpr instanceof FileEpr)
-			{
-				FileEpr fpr = (FileEpr)toEpr; 
-				FileEpr temp = new FileEpr(fpr.getURL());
-
-				String selector = getReplySelector();
-				String suffix = fpr.getPostSuffix();
-				if (null!=suffix)
-					selector += suffix;
-				temp.setPostSuffix(suffix);
-
-				return temp;
-			}
-			if(toEpr instanceof FTPEpr)
-			{
-				FTPEpr fpr = (FTPEpr)toEpr; 
-				FTPEpr temp = new FTPEpr(fpr.getURL());
-
-				String selector = getReplySelector();
-				String suffix = fpr.getPostSuffix();
-				if (null!=suffix)
-					selector += suffix;
-				temp.setPostSuffix(suffix);
-
-				return temp;
-			}
-	//TODO  We need to add a 'selector' to the JDBCEpr also, so we can selectively pickup
-//			if(toEpr instanceof JDBCEpr)
-//			{
-//				JDBCEpr fpr = (JDBCEpr)toEpr; 
-//				JDBCEpr temp = new JDBCEpr(fpr.getURL());
-//
-//				String selector = getReplySelector();
-//
-//				return temp;
-//			}
-		}
-		catch (MalformedURLException ex)
-		{
-			throw new MalformedEPRException(ex);
-		}
-		catch (URISyntaxException ex)
-		{
-			throw new MalformedEPRException(ex);
-		}
-
-		throw new CourierException("Unsupported temporary reply to EPR "
-				+toEpr.getClass().getSimpleName());
-	}
-
-	public static File messageToLocalFile(File directory, Message message)
-			throws IOException, ParserConfigurationException
-	{
-		File tmpFile = File.createTempFile("EsbFileCourier_", ".__esbPart",
-				directory);
-		Serializable serial = Util.serialize(message);
-		FileOutputStream writer = null;
-		try
-		{
-			writer = new FileOutputStream(tmpFile);
-			new ObjectOutputStream(writer).writeObject(serial);
-			
-			writer.flush();
-		}
-		finally
-		{
-			if (null != writer)
-				writer.close();
-		}
-		return tmpFile;
-	}
-
-	public static Message messageFromLocalFile(File from)
-			throws FileNotFoundException, IOException, ClassNotFoundException,
-			ClassCastException, ParserConfigurationException, SAXException,
-			CourierException
-	{
-		FileInputStream reader = null;
-		Serializable serial = null;
-		int retry = 10; // TODO magic number
-		
-		/*
-		 * Just because a file is in the file system doesn't mean it
-		 * has been completely written!
-		 */
-		
-		while (retry > 0)
-		{
-			try
-			{
-				reader = new FileInputStream(from);
-				serial = (Serializable) new ObjectInputStream(reader).readObject();
-				return Util.deserialize(serial);
-			}
-			catch (StreamCorruptedException ex)
-			{
-				// file present but not ready to read - wait
-				
-				retry--;
-			}
-			catch (Exception e)
-			{
-				e.printStackTrace();
-				
-				_logger.debug(from+" "+e.toString());
-				throw new CourierException(e);
-			}
-			finally
-			{
-				if (null != reader)
-					reader.close();
-			}
-			
-			try
-			{
-				Thread.sleep(1000);  // TODO magic number
-			}
-			catch (Exception ex)
-			{
-			}
-		}
-		
-		throw new IOException();
-	}
-
-	public static byte[] bytesFromLocalFile(File from) throws IOException
-	{
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		FileInputStream in = new FileInputStream(from);
-		byte[] buff = new byte[1000];
-		int iQ = 0;
-		try
-		{
-			while ((iQ = in.read(buff)) >= 0)
-				if (iQ > 0)
-					out.write(buff, 0, iQ);
-		}
-		finally
-		{
-			if (null != in)
-				in.close();
-			if (null != out)
-				out.close();
-		}
-		return out.toByteArray();
-	}
-
-	public static void bytesToLocalFile(byte[] bytes, File to)
-			throws IOException
-	{
-		FileOutputStream out = null;
-		try
-		{
-			out = new FileOutputStream(to);
-			out.write(bytes);
-		}
-		finally
-		{
-			if (null != out)
-				out.close();
-		}
-	}
-
-	public static void deliverMessage(Message message)
-			throws URISyntaxException, CourierException, MalformedEPRException
-	{
-		EPR toEpr = message.getHeader().getCall().getTo();
-		Courier courier = CourierFactory.getCourier(toEpr);
-		courier.deliver(message);
-	}
-
-    public static void cleanCourier (PickUpOnlyCourier courier) { cleanableCleanup(courier);}
-    public static void cleanCourier (DeliverOnlyCourier courier){ cleanableCleanup(courier);}
-    public static void cleanCourier (TwoWayCourier courier)		{ cleanableCleanup(courier);}
-	    
-    private static void cleanableCleanup (Object courier)
-    {
-    	if (null!=courier)
-	    	try
-	    	{
-	    		Method cleanMethod = courier.getClass().getMethod("cleanup", new Class[] {});
-	    		cleanMethod.invoke(courier, new Object[] {});
-	    	}
-	    	catch (NoSuchMethodException e) {/*  OK  Just don't invoke it  */  }
-	    	catch (Exception e)
-	    	{
-	    		_logger.error("Problems invoking clean() Method for class "
-	    				+courier.getClass().getSimpleName(),e);
-	    	}
-    } //________________________________
-	
-
-	protected static Logger _logger = Logger.getLogger(CourierUtil.class);
-}
+/*
+ * 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.couriers;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.io.StreamCorruptedException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.couriers.DeliverOnlyCourier;
+import org.jboss.internal.soa.esb.couriers.PickUpOnlyCourier;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.addressing.eprs.FTPEpr;
+import org.jboss.soa.esb.addressing.eprs.FileEpr;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.helpers.KeyValuePair;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.util.Util;
+import org.xml.sax.SAXException;
+
+public class CourierUtil
+{
+	public static final String CORRELATION_ID_TAG = "messageCorrelationId";
+
+	private CourierUtil() {}
+
+	public static List<KeyValuePair> propertiesFromSelector(String selector)
+			throws ConfigurationException
+	{
+		// No problem if selector is null - everything in queue will be returned
+		List<KeyValuePair> oRet = new ArrayList<KeyValuePair>();
+		if (!Util.isNullString(selector))
+		{
+			for (String sCurr : selector.split(","))
+			{
+				String[] sa = sCurr.split("=");
+				if (sa.length != 2 || sa[1].charAt(0) != '\''
+						|| sa[1].charAt(-1 + sa[1].length()) != '\'')
+					throw new ConfigurationException("Illegal message selector syntax <"
+							+ selector + ">");
+				KeyValuePair oNew = new KeyValuePair(sa[0], sa[1].substring(0,
+						-1 + sa[1].length()).substring(1));
+				oRet.add(oNew);
+			}
+		}
+		return oRet;
+	}
+
+	/**
+	 * We will be listening the same queue, but with a 'temporary' message
+	 * selector based of a UUID.
+	 * 
+	 * @param message
+	 *            to which we ill add the CORRELATION_ID_TAG.
+	 * @return the generated unique reply selector.
+	 */
+	public static String getReplySelector()
+	{
+		String uuId = UUID.randomUUID().toString();
+		String uniqueReplySelector = new StringBuilder().append(
+				CORRELATION_ID_TAG).append("='").append(uuId).append("'")
+				.toString();
+		return uniqueReplySelector;
+	}
+
+	/**
+	 * Build a temporary replyToEPR, based on the toEpr, to which we can reply
+	 * to.
+	 * <ul>
+	 * <li> for JMS we will use the toEpr, but change the message selector.
+	 * </ul>
+	 * 
+	 * @param toEpr -
+	 *            the toEPR which will be used a basis to generate the
+	 *            replyToEPR.
+	 * @return replyToEPR - the EPR to which the pickup will be delivered.
+	 * @throws URISyntaxException,
+	 *             CourierException
+	 */
+	public static EPR getTemporaryReplyToEpr(EPR toEpr)
+			throws CourierException, MalformedEPRException
+	{
+		try
+		{
+			if (null==toEpr)
+				return null;
+			if (toEpr instanceof JMSEpr)
+			{
+				JMSEpr jpr = (JMSEpr) toEpr;
+				// Setting the replyTo to the queue we specific in the epr we are
+				// going to call
+				// The selectors will do the job.
+				return new JMSEpr(jpr.getDestinationType(), jpr
+						.getDestinationName(), jpr.getConnectionFactory(), jpr
+						.getJndiURL(), jpr.getJndiContextFactory(), jpr
+						.getJndiPkgPrefix(), getReplySelector());
+			}
+			if(toEpr instanceof FileEpr)
+			{
+				FileEpr fpr = (FileEpr)toEpr; 
+				FileEpr temp = new FileEpr(fpr.getURL());
+
+				String selector = getReplySelector();
+				String suffix = fpr.getPostSuffix();
+				if (null!=suffix)
+					selector += suffix;
+				temp.setPostSuffix(suffix);
+
+				return temp;
+			}
+			if(toEpr instanceof FTPEpr)
+			{
+				FTPEpr fpr = (FTPEpr)toEpr; 
+				FTPEpr temp = new FTPEpr(fpr.getURL());
+
+				String selector = getReplySelector();
+				String suffix = fpr.getPostSuffix();
+				if (null!=suffix)
+					selector += suffix;
+				temp.setPostSuffix(suffix);
+
+				return temp;
+			}
+	//TODO  We need to add a 'selector' to the JDBCEpr also, so we can selectively pickup
+//			if(toEpr instanceof JDBCEpr)
+//			{
+//				JDBCEpr fpr = (JDBCEpr)toEpr; 
+//				JDBCEpr temp = new JDBCEpr(fpr.getURL());
+//
+//				String selector = getReplySelector();
+//
+//				return temp;
+//			}
+		}
+		catch (MalformedURLException ex)
+		{
+			throw new MalformedEPRException(ex);
+		}
+		catch (URISyntaxException ex)
+		{
+			throw new MalformedEPRException(ex);
+		}
+
+		throw new CourierException("Unsupported temporary reply to EPR "
+				+toEpr.getClass().getSimpleName());
+	}
+
+	public static File messageToLocalFile(File directory, Message message)
+			throws IOException, ParserConfigurationException
+	{
+		File tmpFile = File.createTempFile("EsbFileCourier_", ".__esbPart",
+				directory);
+		Serializable serial = Util.serialize(message);
+		FileOutputStream writer = null;
+		try
+		{
+			writer = new FileOutputStream(tmpFile);
+			new ObjectOutputStream(writer).writeObject(serial);
+			
+			writer.flush();
+		}
+		finally
+		{
+			if (null != writer)
+				writer.close();
+		}
+		return tmpFile;
+	}
+
+	public static Message messageFromLocalFile(File from)
+			throws FileNotFoundException, IOException, ClassNotFoundException,
+			ClassCastException, ParserConfigurationException, SAXException,
+			CourierException
+	{
+		FileInputStream reader = null;
+		Serializable serial = null;
+		int retry = 10; // TODO magic number
+		
+		/*
+		 * Just because a file is in the file system doesn't mean it
+		 * has been completely written!
+		 */
+		
+		while (retry > 0)
+		{
+			try
+			{
+				reader = new FileInputStream(from);
+				serial = (Serializable) new ObjectInputStream(reader).readObject();
+				return Util.deserialize(serial);
+			}
+			catch (StreamCorruptedException ex)
+			{
+				// file present but not ready to read - wait
+				
+				retry--;
+			}
+			catch (Exception e)
+			{
+				e.printStackTrace();
+				
+				_logger.debug(from+" "+e.toString());
+				throw new CourierException(e);
+			}
+			finally
+			{
+				if (null != reader)
+					reader.close();
+			}
+			
+			try
+			{
+				Thread.sleep(1000);  // TODO magic number
+			}
+			catch (Exception ex)
+			{
+			}
+		}
+		
+		throw new IOException();
+	}
+
+	public static byte[] bytesFromLocalFile(File from) throws IOException
+	{
+		ByteArrayOutputStream out = new ByteArrayOutputStream();
+		FileInputStream in = new FileInputStream(from);
+		byte[] buff = new byte[1000];
+		int iQ = 0;
+		try
+		{
+			while ((iQ = in.read(buff)) >= 0)
+				if (iQ > 0)
+					out.write(buff, 0, iQ);
+		}
+		finally
+		{
+			if (null != in)
+				in.close();
+			if (null != out)
+				out.close();
+		}
+		return out.toByteArray();
+	}
+
+	public static void bytesToLocalFile(byte[] bytes, File to)
+			throws IOException
+	{
+		FileOutputStream out = null;
+		try
+		{
+			out = new FileOutputStream(to);
+			out.write(bytes);
+		}
+		finally
+		{
+			if (null != out)
+				out.close();
+		}
+	}
+
+	public static void deliverMessage(Message message)
+			throws URISyntaxException, CourierException, MalformedEPRException
+	{
+		EPR toEpr = message.getHeader().getCall().getTo();
+		Courier courier = CourierFactory.getCourier(toEpr);
+		courier.deliver(message);
+	}
+
+    public static void cleanCourier (PickUpOnlyCourier courier) { cleanableCleanup(courier);}
+    public static void cleanCourier (DeliverOnlyCourier courier){ cleanableCleanup(courier);}
+    public static void cleanCourier (TwoWayCourier courier)		{ cleanableCleanup(courier);}
+	    
+    private static void cleanableCleanup (Object courier)
+    {
+    	if (null!=courier)
+	    	try
+	    	{
+	    		Method cleanMethod = courier.getClass().getMethod("cleanup", new Class[] {});
+	    		cleanMethod.invoke(courier, new Object[] {});
+	    	}
+	    	catch (NoSuchMethodException e) {/*  OK  Just don't invoke it  */  }
+	    	catch (Exception e)
+	    	{
+	    		_logger.error("Problems invoking clean() Method for class "
+	    				+courier.getClass().getSimpleName(),e);
+	    	}
+    } //________________________________
+	
+
+	protected static Logger _logger = Logger.getLogger(CourierUtil.class);
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/CourierUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/TwoWayCourier.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/TwoWayCourier.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/TwoWayCourier.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,47 +1,47 @@
-package org.jboss.soa.esb.couriers;
-
-import org.jboss.internal.soa.esb.couriers.PickUpOnlyCourier;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.message.Message;
-
-public interface TwoWayCourier extends Courier, PickUpOnlyCourier
-{
-	/**
-     * Instruct the courier to wait for a pickup in the replyToEpr
-     * 
-     * @param waitTime         - Pickup timeout for before giving up on this pickup. Time in millis.
-     * @return                 - the message that was picked up.
-     * @throws CourierException the courier fails (i.e. gets a flat tire).
-	 * @throws CourierTimeoutException if the pickup timed out (nobody home).
-     */
-	public Message pickup(long waitTime) throws CourierException, CourierTimeoutException;
-	/**
-     * Instruct the courier to wait for a pickup in the specified EPR
-     * 
-     * @param waitTime         - Pickup timeout for before giving up on this pickup. Time in millis.
-     * @param epr              - Pickup address
-     * @return                 - the message that was picked up.
-     * @throws CourierException the courier fails (i.e. gets a flat tire).
-	 * @throws CourierTimeoutException if the pickup timed out (nobody home).
-     */
-	public Message pickup(long waitTime, EPR epr) throws CourierException, CourierTimeoutException, MalformedEPRException;
-	/**
-	 * Sets the toEPR. This can be used if the toEPR is not know at construction time of
-	 * the Courier.
-	 * 
-	 * @param toEPR - EPR specifying the 'to' address.
-	 * @throws CourierException
-	 */
-
-	public void setToEpr(EPR toEPR) throws CourierException, MalformedEPRException;
-	/**
-	 * Sets the replyToEPR. This can be used if the replyToEPR is not know at construction time of
-	 * the Courier.
-	 * 
-	 * @param replyToEPR - EPR specifying the reply to address.
-	 * @throws CourierException
-	 */
-
-	public void setReplyToEpr(EPR replyToEPR) throws CourierException, MalformedEPRException;
-}
+package org.jboss.soa.esb.couriers;
+
+import org.jboss.internal.soa.esb.couriers.PickUpOnlyCourier;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.message.Message;
+
+public interface TwoWayCourier extends Courier, PickUpOnlyCourier
+{
+	/**
+     * Instruct the courier to wait for a pickup in the replyToEpr
+     * 
+     * @param waitTime         - Pickup timeout for before giving up on this pickup. Time in millis.
+     * @return                 - the message that was picked up.
+     * @throws CourierException the courier fails (i.e. gets a flat tire).
+	 * @throws CourierTimeoutException if the pickup timed out (nobody home).
+     */
+	public Message pickup(long waitTime) throws CourierException, CourierTimeoutException;
+	/**
+     * Instruct the courier to wait for a pickup in the specified EPR
+     * 
+     * @param waitTime         - Pickup timeout for before giving up on this pickup. Time in millis.
+     * @param epr              - Pickup address
+     * @return                 - the message that was picked up.
+     * @throws CourierException the courier fails (i.e. gets a flat tire).
+	 * @throws CourierTimeoutException if the pickup timed out (nobody home).
+     */
+	public Message pickup(long waitTime, EPR epr) throws CourierException, CourierTimeoutException, MalformedEPRException;
+	/**
+	 * Sets the toEPR. This can be used if the toEPR is not know at construction time of
+	 * the Courier.
+	 * 
+	 * @param toEPR - EPR specifying the 'to' address.
+	 * @throws CourierException
+	 */
+
+	public void setToEpr(EPR toEPR) throws CourierException, MalformedEPRException;
+	/**
+	 * Sets the replyToEPR. This can be used if the replyToEPR is not know at construction time of
+	 * the Courier.
+	 * 
+	 * @param replyToEPR - EPR specifying the reply to address.
+	 * @throws CourierException
+	 */
+
+	public void setReplyToEpr(EPR replyToEPR) throws CourierException, MalformedEPRException;
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/TwoWayCourier.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,606 +1,606 @@
-package org.jboss.soa.esb.helpers;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-/**
- * Objects of this class are to be used for run time configuration of ESB components 
- * <p/>  This should gradually replace the ConfigTree class
- * <br/> It is a subset of Tree that accepts a Map of attributes, and a List of children
- * <br/> children can only be String values, or objects of this class
- * <p/> fromXml() and toXml() methods allow 'visible' representations of objects of this class
- * and run time loading/dumping from/to standard XML documents
- * 
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- *
- */
-public class ConfigTree implements Serializable, Cloneable
-{
-	private static final long serialVersionUID = 1L;
-/**
- * Constructor of a root node (an uppermost ConfigTree)
- * @param name String - the element name of 'this'
- */
-	public ConfigTree(String name) { this(name,null); }
-/**
- * Constructor of a ConfigTree as a child of another (second arg)
- * @param name String - element name of 'this'
- * @param dad ConfigTree - whom 'this' will be hanging from
- */
-	public ConfigTree(String name, ConfigTree dad)
-	{
-		setName(name);
-		setParent(dad);
-	} // _______________________________
-/**
- * protected constructor
- * @param other - Where to get values for deep copy
- */
-	protected ConfigTree(ConfigTree other)
-	{
-		copyFrom(other);
-	} // _______________________________
-
-	/**
-	 * 
-	 * @return String - the name of this tree (element name for XML representation)
-	 */
-	public String getName() 			{ return _name; }
-	/**
-	 * assign a name to 'this'
-	 * @param name String - The name for this object
-	 */
-	public void   setName(String name) 	
-	{
-		if (null==name)
-			throw new IllegalArgumentException();
-		_name = name; 
-	} // _______________________________
-
-	/**
-	 * whose child is 'this' (null if root)
-	 * @return ConfigTree - the parent tree of 'this' 
-	 */
-	public ConfigTree getParent() 			{ return _dad; }
-	
-	private  void   setParent(ConfigTree dad)	
-	{ 
-		if (null!=_dad && null!=_dad._childs)
-				_dad._childs.remove(this);
-		if (null!=dad)
-			dad.addChild(this); 
-	} 	
-	/**
-	 * assign a value to a named attribute 
-	 * @param name String - the name (key) for the new attribute 
-	 * @param value String - the value assigned to the key (if null - old value will be deleted)
-	 * @return String - old value assigned to the name (null if there was none)
-	 */
-	public String setAttribute(String name,String value)
-	{
-		if (null==name)
-			throw new IllegalArgumentException("Attribute name must be non null");
-		if (null==_attributes)
-			_attributes = new HashMap<String,String>();
-		String oldVal = _attributes.remove(name);
-		if(null!=value)
-			_attributes.put(name,value);
-		return oldVal;
-	} // _______________________________
-	/**
-	 * 
-	 * @return int - the number of non null attributes that this node has been assigned
-	 */
-	public int attributeCount()
-	{
-		return (null==_attributes) ? 0 : _attributes.size();
-	} // _______________________________
-	/**
-	 * retrieve the value assigned to an attribute key
-	 * @param name String - the search key
-	 * @return String - the value assigned to the specified key
-	 */
-	public String getAttribute(String name)
-	{
-		return (null==_attributes) ? null : _attributes.get(name);
-	} // _______________________________
-	/**
-	 * retrieve the value assigned to an attribute key
-	 * @param name String - the search key
-	 * @param defaultValue String - the default value to return if attribute is not set
-	 * @return String - the value assigned to the specified key
-	 */
-	public String getAttribute(String name, String defaultValue)
-		throws ConfigurationException
-	{
-		String ret = (null==_attributes) ? null : _attributes.get(name);
-		if (null!=ret)
-			return ret;
-		if (null!=defaultValue)
-			return defaultValue;
-		throw new ConfigurationException("Invalid or missing <"+name+"> attribute ");
-	} // _______________________________
-	/**
-	 * obtain the list of all attribute names
-	 * @return Set<String>  - the set of keys that have been assigned a non null value
-	 */
-	public Set<String>getAttributeNames() 
-	{ return (null==_attributes) 
-		? new HashSet<String>() 
-		: _attributes.keySet();
-	} // _______________________________
-	/**
-	 * obtain the list of all attribute as a List<KeyValuePair>
-	 * @return List<KeyValuePair> - containing all attributes
-	 */
-	public List<KeyValuePair> attributesAsList() 
-	{
-		List<KeyValuePair> oRet = new ArrayList<KeyValuePair>();
-		if (null!=_attributes) 
-			for (Map.Entry<String,String> oCurr : _attributes.entrySet())
-				oRet.add(new KeyValuePair(oCurr.getKey(),oCurr.getValue()));
-		return oRet;
-	} // _______________________________
-	/**
-	 * obtain the list of all child "property" elements as a List<KeyValuePair>
-	 * @return List<KeyValuePair> - containing all child elements with tag name "property"
-	 */
-	public List<KeyValuePair> childPropertyList() 
-	{
-		List<KeyValuePair> oRet = new ArrayList<KeyValuePair>();
-		for (ConfigTree current : getChildren("property"))
-		{
-			String name = current.getAttribute("name");
-			if (null!=name)
-				oRet.add(new KeyValuePair(name,current.getAttribute("value")));
-		}
-		return oRet;
-	} // _______________________________
-	/**
-	 * concatenated values of all child String values that have been added to 'this'
-	 * <br/>"" (zero length String) if no String child nodes
-	 * @return String - concatenation of all String segments (equivalent to xml text nodes)
-	 */
-	public String getWholeText() 
-	{
-		if (null==_childs)
-			return "";
-		StringBuilder sb = null;
-		for (Child child : _childs)
-		{	if (! (child._obj instanceof String))
-				continue;
-			if (null==sb)
-				sb = new StringBuilder((String)child._obj);
-			else
-				sb.append((String)child._obj);
-		}
-		return sb.toString();
-				
-	} // _______________________________
-/**
- * <b>first</b> child containing only text, with name=arg0
- * @param name String - the name to filter
- * @return full text content of first 'pure text' child element under that name - &lt;null&gt; if none
- */
-	public String getFirstTextChild(String name) 
-	{
-		if (null==name)
-			throw new IllegalArgumentException();
-		if (null!=_childs)
-			for (Child oCurr : _childs)
-			{
-				ConfigTree tree = oCurr.getTree();
-				if (null != tree && tree.isPureText() && name.equals(tree.getName()))
-					 return tree.getWholeText();
-			}
-		return null;
-	} // _______________________________
-
-	/**
- * Obtain all String values with the same name
- * @param name String - filter for child String nodes
- * @return String[]
- */
-	public String[] getTextChildren(String name) 
-	{
-		if (null==name)
-			throw new IllegalArgumentException();
-		if (null==_childs)
-			return new String[0];
-		List<String>oRet = new ArrayList<String>();
-		for (Child oCurr : _childs)
-		{
-			ConfigTree tree = oCurr.getTree();
-			if (null != tree && tree.isPureText() && name.equals(tree.getName()))
-				oRet.add(tree.getWholeText());
-		}
-		return oRet.toArray(new String[oRet.size()]);
-	} // _______________________________
-/**
- * add a child element that consists only of the text in arg0
- * @param value String - the text to assign to the added child node
- */
-	public void addTextChild (String value) { new Child(value); }
-	
-	private void addChild(ConfigTree child)	
-		{ child._dad = this; new Child(child); }
-/**
- * retrieve list of child elements of 'this' that are instances of ConfigTree
- * @return ConfigTree[] - Array containing all child elements of class ConfigTree
- */
-	public ConfigTree[] getAllChildren() 
-	{
-		if (null==_childs) 
-			return new ConfigTree[]{};
-		List<ConfigTree>oRet = new ArrayList<ConfigTree>();
-		for (Child oCurr : _childs)
-			if (null != oCurr.getTree())
-				oRet.add(oCurr.getTree());
-		return oRet.toArray(new ConfigTree[oRet.size()]);
-	} // _______________________________
-
-	/**
-	 * list of child elements of 'this' that are instances of ConfigTree, with name = arg0
-	 * @param name String - the name of child nodes to filter
-	 * @return ConfigTree[] - child elements of class ConfigTree with name provided
-	 */
-	public ConfigTree[] getChildren(String name) 
-	{
-		if (null==name)
-			throw new IllegalArgumentException();
-		if (null==_childs)
-			return new ConfigTree[0];
-		List<ConfigTree>oRet = new ArrayList<ConfigTree>();
-		for (Child oCurr : _childs)
-			if (name.equals(oCurr.getName()))
-					oRet.add(oCurr.getTree());
-		return oRet.toArray(new ConfigTree[oRet.size()]);
-	} // _______________________________
-/**
- * <b>first</b> child of class ConfigTree with name=arg0
- * @param name String - the name to filter
- * @return first child element under that name - &lt;null&gt; if none
- */
-	public ConfigTree getFirstChild(String name) 
-	{
-		if (null==name)
-			throw new IllegalArgumentException();
-		if (null!=_childs)
-			for (Child oCurr : _childs)
-				if (name.equals(oCurr.getName()))
-					return oCurr.getTree();
-		return null;
-	} // _______________________________
-/**
- * purge the list of children
- */
-	public void removeAllChildren() 
-	{
-		_childs = null;
-	} // _______________________________
-
-	/**
-	 * remove children by name
-	 * @param name String - only children by that name will be removed
-	 */
-	public void removeChildrenByName(String name) 
-	{
-		if (null==name)
-			throw new IllegalArgumentException();
-		if (null!=_childs)
-			for (ListIterator<Child> II=_childs.listIterator(); II.hasNext();)
-				if (name.equals(II.next().getName()))
-					II.remove();
-	} // __________________________________
-
-	/**
-	 * 
-	 * @return the number of child nodes (of any type)
-	 */
-	public int childCount()
-	{
-		return (null==_childs) ? 0 : _childs.size();
-	} // __________________________________
-
-	@Override
-	public Object clone() { return cloneObj(); }
-
-	/**
-	 * instantiate a new ConfigTree with the same topology and contents of 'this'
-	 * <br/>Contained ConfigTree child elements will also be cloned
-	 * <br/>Transient objects are NOT copied nor cloned
-	 * @return ConfigTree - Deep copy of 'this'
-	 */
-	public ConfigTree cloneObj() {return cloneSubtree(null); } 
-
-	/**
-	 * @return ConfigTree - Deep copy of 'this'
-	 */
-	private ConfigTree cloneSubtree(ConfigTree dad)
-	{
-		ConfigTree oRet = new ConfigTree(_name, dad);
-		if (null!=_attributes)
-			for (Map.Entry<String,String> oAtt: _attributes.entrySet())
-				oRet.setAttribute(oAtt.getKey(),oAtt.getValue());
-		if (null!= _childs)
-			for (Child oChild : _childs)
-			{	
-				ConfigTree tree = oChild.getTree();
-				if (null!=tree)
-					tree.cloneSubtree(oRet);
-				else
-					oRet.addTextChild(oChild._obj.toString());
-			}
-		return oRet;
-	} // __________________________________
-	/**
-	 * Deep copy of other tree
-	 * @param other - from where to copy values
-	 */
-	protected void copyFrom(ConfigTree other)
-	{
-		this.setName(other.getName());
-		this._pureText	= other._pureText;
-
-		if (null != other._attributes)
-			for (Map.Entry<String,String> oneAtt : other._attributes.entrySet())
-				setAttribute(oneAtt.getKey(),oneAtt.getValue());
-		if (null != other._childs)
-			for (Child child : other._childs)
-				new Child(child);
-			
-	} // __________________________________
-/**
- * obtain an instance of this class, from a 'normalized' xml format, with the default encoding
- * <p/> the 'normalized' xml format is the output of the toXml() instance method
- * @param xml String - what to parse
- * @return ConfigTree - an object of this class
- * @throws SAXException - if xml format is invalid
- */
-	public static ConfigTree fromXml(String xml) throws SAXException
-	{
-		try { return fromXml(xml,java.nio.charset.Charset.defaultCharset().toString()); }
-		catch (UnsupportedEncodingException e)
-		{
-			//  This can't happen
-			_logger.fatal("This should not happen",e);
-			return null;
-		}
-	} // __________________________________
-	
-	/**
-	 * obtain an instance of this class, from a 'normalized' xml format, with the encoding defined in arg1
-	 * <p/> the 'normalized' xml format is the output of the toXml() instance method
-	 * @param xml String - what to parse
-	 * @param encoding String - The encoding of arg 0
-	 * @return ConfigTree - an object of this class
-	 * @throws SAXException - if xml format is invalid
-	 */
-	public static ConfigTree fromXml(String xml, String encoding)
-		throws UnsupportedEncodingException, SAXException
-	{
-		if (null==xml)
-			throw new IllegalArgumentException("Xml source String is null");
-		try { return fromInputStream(new ByteArrayInputStream(xml.getBytes(encoding))); }
-		catch (IOException e)
-		{
-			_logger.fatal("This should NOT happen",e);
-			return null;
-		}
-	} // __________________________________
-
-	/**
-	 * obtain an instance of this class, from a 'normalized' xml format contained in an input stream
-	 * <p/> the 'normalized' xml format is the output of the toXml() instance method
-	 * @param input InputStream - where to parse from
-	 * @return ConfigTree - an object of this class
-	 * @throws SAXException - if xml format is invalid
-	 * @throws IOException - if an input/output error occurs
-	 */
-	public static ConfigTree fromInputStream(InputStream input) 
-		throws SAXException, IOException
-	{
-		if (null==input)
-			throw new IllegalArgumentException();
-		DocumentBuilder builder = null;
-		try { builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); }
-		catch (ParserConfigurationException e2)
-		{	_logger.error("Problems with default Parser Configuration",e2);
-			return null;
-		}
-		Document oDoc = builder.parse(input);
-		oDoc.normalize();
-		
-		return fromElement(oDoc.getDocumentElement());
-		
-	} // __________________________________
-
-	private static ConfigTree fromElement(Element elem)
-	{
-		ConfigTree tree = new ConfigTree(elem.getNodeName());
-		NamedNodeMap NM = elem.getAttributes();
-		if (null!=NM)
-			for (int i1=0; i1<NM.getLength(); i1++)
-			{
-				Node node = NM.item(i1);
-				tree.setAttribute(node.getNodeName(),node.getNodeValue());
-			}
-		NodeList NL = elem.getChildNodes();
-		if (null!=NL)
-			for (int i1=0; i1<NL.getLength(); i1++)
-			{
-				Node node = NL.item(i1);
-				switch (node.getNodeType())
-				{	
-					case Node.ELEMENT_NODE:
-						tree.addChild(ConfigTree.fromElement((Element)node));
-						break;
-					case Node.TEXT_NODE:
-						tree.addTextChild(node.getNodeValue());
-						break;
-				}
-			}
-		
-		return tree;
-	} // __________________________________
-
-	private Element toElement(Document doc)
-	{
-		Element elem = doc.createElement(_name);
-		if (null!=_attributes)
-			for (Map.Entry<String,String> oAtt : _attributes.entrySet())
-				elem.setAttribute(oAtt.getKey(),oAtt.getValue());
-		if (null!=_childs)
-			for (Child child : _childs)
-			{
-				ConfigTree tree = child.getTree();
-				if (null!=tree)
-					elem.appendChild(tree.toElement(doc));
-				else
-					elem.appendChild(doc.createTextNode(child._obj.toString()));
-			}
-		return elem;
-	} // __________________________________
-	/**
-	 * Equivalent to a call to toXml()
-	 * @return String - a String with the 'standard' xml representation of 'this',
-	 * using the default encoding
-	 */
-	public String toString() { return toXml(); }
-	/**
-	 * Equivalent to a call to toXml(encoding)
-	 * @param encoding String - 
-	 * @return String - a String with the 'standard' xml representation of 'this',
-	 * using the encoding specified in arg 0
-	 */
-
-	public String toString(String encoding) { return toXml(encoding); }
-	/**
-	 * @return String - a String with the 'standard' xml representation of 'this',
-	 * using the default encoding
-	 */
-	public String toXml()
-	{
-		return toXml(java.nio.charset.Charset.defaultCharset().toString());
-	} // __________________________________
-	
-	/**
-	 * Serialize this object - Transient objects are
-	 * @param encoding String - String 
-	 * @return String - a String with the 'standard' xml representation of 'this',
-	 * using encoding specified in arg0
-	 */
-	public String toXml(String encoding)
-	{
-		Transformer transf = null;
-		try { transf = TransformerFactory.newInstance().newTransformer(); }
-		catch (TransformerConfigurationException e1)
-		{	_logger.error("Cannot obtain transformer to render XML output",e1);
-			return null;
-		}
-		transf.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,"yes");
-		transf.setOutputProperty(OutputKeys.INDENT, "no");
-		transf.setOutputProperty(OutputKeys.ENCODING, encoding);
-
-		DocumentBuilder builder = null;
-		try { builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); }
-		catch (ParserConfigurationException e2)
-		{	_logger.error("Problems with default Parser Configuration",e2);
-			return null;
-		}
-		Document oDoc = builder.newDocument();
-		oDoc.appendChild(toElement(oDoc));
-		oDoc.normalize();
-		DOMSource src = new DOMSource(oDoc);
-
-		ByteArrayOutputStream oStrm = new ByteArrayOutputStream(5000);
-		StreamResult res = new StreamResult(oStrm);
-
-		try { transf.transform(src, res); }
-		catch (TransformerException e3)
-		{	_logger.error("Problems with XML transformation",e3);
-			return null;
-		}
-
-		return oStrm.toString();
-	} // __________________________________
-	
-	/**
-	 * 
-	 * @return boolean - indicating if 'this' element has ONLY text children (and consequently no ConfigTree children)
-	 */
-	public boolean isPureText() { return _pureText; }
-
-	private class Child
-	{
-		Object _obj;
-		ConfigTree getTree() 
-		{	return (_obj instanceof ConfigTree)? (ConfigTree) _obj : null;
-		}
-		String getName() 
-		{	return (_obj instanceof ConfigTree)? ((ConfigTree) _obj)._name : null;
-		}
-		private Child(ConfigTree obj)	{addToDad(obj); _pureText = false;}
-		private Child(String obj)		{addToDad(obj); }
-		private Child(Child other)		
-		{	
-			if (other._obj instanceof ConfigTree)
-			{
-				addToDad(((ConfigTree)other._obj).cloneObj());
-				_pureText	= false;
-				return;
-			}
-			if (other._obj instanceof String)
-			{
-				addToDad((String)other._obj);
-				return;
-			}
-
-		}
-		private void addToDad(Object obj)
-		{	if (null==_childs)
-				_childs = new ArrayList<Child>();
-			_obj	= obj;
-			_childs.add(this);
-		}
-		
-	}
-
-	private boolean				_pureText=true;
-	private ConfigTree 			_dad;
-	private String 				_name;
-	private Map<String,String> 	_attributes;
-	private List<Child>			_childs;
-
-	private static transient Logger			_logger = Logger.getLogger(ConfigTree.class);
-} //____________________________________________________________________________
+package org.jboss.soa.esb.helpers;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+/**
+ * Objects of this class are to be used for run time configuration of ESB components 
+ * <p/>  This should gradually replace the ConfigTree class
+ * <br/> It is a subset of Tree that accepts a Map of attributes, and a List of children
+ * <br/> children can only be String values, or objects of this class
+ * <p/> fromXml() and toXml() methods allow 'visible' representations of objects of this class
+ * and run time loading/dumping from/to standard XML documents
+ * 
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ *
+ */
+public class ConfigTree implements Serializable, Cloneable
+{
+	private static final long serialVersionUID = 1L;
+/**
+ * Constructor of a root node (an uppermost ConfigTree)
+ * @param name String - the element name of 'this'
+ */
+	public ConfigTree(String name) { this(name,null); }
+/**
+ * Constructor of a ConfigTree as a child of another (second arg)
+ * @param name String - element name of 'this'
+ * @param dad ConfigTree - whom 'this' will be hanging from
+ */
+	public ConfigTree(String name, ConfigTree dad)
+	{
+		setName(name);
+		setParent(dad);
+	} // _______________________________
+/**
+ * protected constructor
+ * @param other - Where to get values for deep copy
+ */
+	protected ConfigTree(ConfigTree other)
+	{
+		copyFrom(other);
+	} // _______________________________
+
+	/**
+	 * 
+	 * @return String - the name of this tree (element name for XML representation)
+	 */
+	public String getName() 			{ return _name; }
+	/**
+	 * assign a name to 'this'
+	 * @param name String - The name for this object
+	 */
+	public void   setName(String name) 	
+	{
+		if (null==name)
+			throw new IllegalArgumentException();
+		_name = name; 
+	} // _______________________________
+
+	/**
+	 * whose child is 'this' (null if root)
+	 * @return ConfigTree - the parent tree of 'this' 
+	 */
+	public ConfigTree getParent() 			{ return _dad; }
+	
+	private  void   setParent(ConfigTree dad)	
+	{ 
+		if (null!=_dad && null!=_dad._childs)
+				_dad._childs.remove(this);
+		if (null!=dad)
+			dad.addChild(this); 
+	} 	
+	/**
+	 * assign a value to a named attribute 
+	 * @param name String - the name (key) for the new attribute 
+	 * @param value String - the value assigned to the key (if null - old value will be deleted)
+	 * @return String - old value assigned to the name (null if there was none)
+	 */
+	public String setAttribute(String name,String value)
+	{
+		if (null==name)
+			throw new IllegalArgumentException("Attribute name must be non null");
+		if (null==_attributes)
+			_attributes = new HashMap<String,String>();
+		String oldVal = _attributes.remove(name);
+		if(null!=value)
+			_attributes.put(name,value);
+		return oldVal;
+	} // _______________________________
+	/**
+	 * 
+	 * @return int - the number of non null attributes that this node has been assigned
+	 */
+	public int attributeCount()
+	{
+		return (null==_attributes) ? 0 : _attributes.size();
+	} // _______________________________
+	/**
+	 * retrieve the value assigned to an attribute key
+	 * @param name String - the search key
+	 * @return String - the value assigned to the specified key
+	 */
+	public String getAttribute(String name)
+	{
+		return (null==_attributes) ? null : _attributes.get(name);
+	} // _______________________________
+	/**
+	 * retrieve the value assigned to an attribute key
+	 * @param name String - the search key
+	 * @param defaultValue String - the default value to return if attribute is not set
+	 * @return String - the value assigned to the specified key
+	 */
+	public String getAttribute(String name, String defaultValue)
+		throws ConfigurationException
+	{
+		String ret = (null==_attributes) ? null : _attributes.get(name);
+		if (null!=ret)
+			return ret;
+		if (null!=defaultValue)
+			return defaultValue;
+		throw new ConfigurationException("Invalid or missing <"+name+"> attribute ");
+	} // _______________________________
+	/**
+	 * obtain the list of all attribute names
+	 * @return Set<String>  - the set of keys that have been assigned a non null value
+	 */
+	public Set<String>getAttributeNames() 
+	{ return (null==_attributes) 
+		? new HashSet<String>() 
+		: _attributes.keySet();
+	} // _______________________________
+	/**
+	 * obtain the list of all attribute as a List<KeyValuePair>
+	 * @return List<KeyValuePair> - containing all attributes
+	 */
+	public List<KeyValuePair> attributesAsList() 
+	{
+		List<KeyValuePair> oRet = new ArrayList<KeyValuePair>();
+		if (null!=_attributes) 
+			for (Map.Entry<String,String> oCurr : _attributes.entrySet())
+				oRet.add(new KeyValuePair(oCurr.getKey(),oCurr.getValue()));
+		return oRet;
+	} // _______________________________
+	/**
+	 * obtain the list of all child "property" elements as a List<KeyValuePair>
+	 * @return List<KeyValuePair> - containing all child elements with tag name "property"
+	 */
+	public List<KeyValuePair> childPropertyList() 
+	{
+		List<KeyValuePair> oRet = new ArrayList<KeyValuePair>();
+		for (ConfigTree current : getChildren("property"))
+		{
+			String name = current.getAttribute("name");
+			if (null!=name)
+				oRet.add(new KeyValuePair(name,current.getAttribute("value")));
+		}
+		return oRet;
+	} // _______________________________
+	/**
+	 * concatenated values of all child String values that have been added to 'this'
+	 * <br/>"" (zero length String) if no String child nodes
+	 * @return String - concatenation of all String segments (equivalent to xml text nodes)
+	 */
+	public String getWholeText() 
+	{
+		if (null==_childs)
+			return "";
+		StringBuilder sb = null;
+		for (Child child : _childs)
+		{	if (! (child._obj instanceof String))
+				continue;
+			if (null==sb)
+				sb = new StringBuilder((String)child._obj);
+			else
+				sb.append((String)child._obj);
+		}
+		return sb.toString();
+				
+	} // _______________________________
+/**
+ * <b>first</b> child containing only text, with name=arg0
+ * @param name String - the name to filter
+ * @return full text content of first 'pure text' child element under that name - &lt;null&gt; if none
+ */
+	public String getFirstTextChild(String name) 
+	{
+		if (null==name)
+			throw new IllegalArgumentException();
+		if (null!=_childs)
+			for (Child oCurr : _childs)
+			{
+				ConfigTree tree = oCurr.getTree();
+				if (null != tree && tree.isPureText() && name.equals(tree.getName()))
+					 return tree.getWholeText();
+			}
+		return null;
+	} // _______________________________
+
+	/**
+ * Obtain all String values with the same name
+ * @param name String - filter for child String nodes
+ * @return String[]
+ */
+	public String[] getTextChildren(String name) 
+	{
+		if (null==name)
+			throw new IllegalArgumentException();
+		if (null==_childs)
+			return new String[0];
+		List<String>oRet = new ArrayList<String>();
+		for (Child oCurr : _childs)
+		{
+			ConfigTree tree = oCurr.getTree();
+			if (null != tree && tree.isPureText() && name.equals(tree.getName()))
+				oRet.add(tree.getWholeText());
+		}
+		return oRet.toArray(new String[oRet.size()]);
+	} // _______________________________
+/**
+ * add a child element that consists only of the text in arg0
+ * @param value String - the text to assign to the added child node
+ */
+	public void addTextChild (String value) { new Child(value); }
+	
+	private void addChild(ConfigTree child)	
+		{ child._dad = this; new Child(child); }
+/**
+ * retrieve list of child elements of 'this' that are instances of ConfigTree
+ * @return ConfigTree[] - Array containing all child elements of class ConfigTree
+ */
+	public ConfigTree[] getAllChildren() 
+	{
+		if (null==_childs) 
+			return new ConfigTree[]{};
+		List<ConfigTree>oRet = new ArrayList<ConfigTree>();
+		for (Child oCurr : _childs)
+			if (null != oCurr.getTree())
+				oRet.add(oCurr.getTree());
+		return oRet.toArray(new ConfigTree[oRet.size()]);
+	} // _______________________________
+
+	/**
+	 * list of child elements of 'this' that are instances of ConfigTree, with name = arg0
+	 * @param name String - the name of child nodes to filter
+	 * @return ConfigTree[] - child elements of class ConfigTree with name provided
+	 */
+	public ConfigTree[] getChildren(String name) 
+	{
+		if (null==name)
+			throw new IllegalArgumentException();
+		if (null==_childs)
+			return new ConfigTree[0];
+		List<ConfigTree>oRet = new ArrayList<ConfigTree>();
+		for (Child oCurr : _childs)
+			if (name.equals(oCurr.getName()))
+					oRet.add(oCurr.getTree());
+		return oRet.toArray(new ConfigTree[oRet.size()]);
+	} // _______________________________
+/**
+ * <b>first</b> child of class ConfigTree with name=arg0
+ * @param name String - the name to filter
+ * @return first child element under that name - &lt;null&gt; if none
+ */
+	public ConfigTree getFirstChild(String name) 
+	{
+		if (null==name)
+			throw new IllegalArgumentException();
+		if (null!=_childs)
+			for (Child oCurr : _childs)
+				if (name.equals(oCurr.getName()))
+					return oCurr.getTree();
+		return null;
+	} // _______________________________
+/**
+ * purge the list of children
+ */
+	public void removeAllChildren() 
+	{
+		_childs = null;
+	} // _______________________________
+
+	/**
+	 * remove children by name
+	 * @param name String - only children by that name will be removed
+	 */
+	public void removeChildrenByName(String name) 
+	{
+		if (null==name)
+			throw new IllegalArgumentException();
+		if (null!=_childs)
+			for (ListIterator<Child> II=_childs.listIterator(); II.hasNext();)
+				if (name.equals(II.next().getName()))
+					II.remove();
+	} // __________________________________
+
+	/**
+	 * 
+	 * @return the number of child nodes (of any type)
+	 */
+	public int childCount()
+	{
+		return (null==_childs) ? 0 : _childs.size();
+	} // __________________________________
+
+	@Override
+	public Object clone() { return cloneObj(); }
+
+	/**
+	 * instantiate a new ConfigTree with the same topology and contents of 'this'
+	 * <br/>Contained ConfigTree child elements will also be cloned
+	 * <br/>Transient objects are NOT copied nor cloned
+	 * @return ConfigTree - Deep copy of 'this'
+	 */
+	public ConfigTree cloneObj() {return cloneSubtree(null); } 
+
+	/**
+	 * @return ConfigTree - Deep copy of 'this'
+	 */
+	private ConfigTree cloneSubtree(ConfigTree dad)
+	{
+		ConfigTree oRet = new ConfigTree(_name, dad);
+		if (null!=_attributes)
+			for (Map.Entry<String,String> oAtt: _attributes.entrySet())
+				oRet.setAttribute(oAtt.getKey(),oAtt.getValue());
+		if (null!= _childs)
+			for (Child oChild : _childs)
+			{	
+				ConfigTree tree = oChild.getTree();
+				if (null!=tree)
+					tree.cloneSubtree(oRet);
+				else
+					oRet.addTextChild(oChild._obj.toString());
+			}
+		return oRet;
+	} // __________________________________
+	/**
+	 * Deep copy of other tree
+	 * @param other - from where to copy values
+	 */
+	protected void copyFrom(ConfigTree other)
+	{
+		this.setName(other.getName());
+		this._pureText	= other._pureText;
+
+		if (null != other._attributes)
+			for (Map.Entry<String,String> oneAtt : other._attributes.entrySet())
+				setAttribute(oneAtt.getKey(),oneAtt.getValue());
+		if (null != other._childs)
+			for (Child child : other._childs)
+				new Child(child);
+			
+	} // __________________________________
+/**
+ * obtain an instance of this class, from a 'normalized' xml format, with the default encoding
+ * <p/> the 'normalized' xml format is the output of the toXml() instance method
+ * @param xml String - what to parse
+ * @return ConfigTree - an object of this class
+ * @throws SAXException - if xml format is invalid
+ */
+	public static ConfigTree fromXml(String xml) throws SAXException
+	{
+		try { return fromXml(xml,java.nio.charset.Charset.defaultCharset().toString()); }
+		catch (UnsupportedEncodingException e)
+		{
+			//  This can't happen
+			_logger.fatal("This should not happen",e);
+			return null;
+		}
+	} // __________________________________
+	
+	/**
+	 * obtain an instance of this class, from a 'normalized' xml format, with the encoding defined in arg1
+	 * <p/> the 'normalized' xml format is the output of the toXml() instance method
+	 * @param xml String - what to parse
+	 * @param encoding String - The encoding of arg 0
+	 * @return ConfigTree - an object of this class
+	 * @throws SAXException - if xml format is invalid
+	 */
+	public static ConfigTree fromXml(String xml, String encoding)
+		throws UnsupportedEncodingException, SAXException
+	{
+		if (null==xml)
+			throw new IllegalArgumentException("Xml source String is null");
+		try { return fromInputStream(new ByteArrayInputStream(xml.getBytes(encoding))); }
+		catch (IOException e)
+		{
+			_logger.fatal("This should NOT happen",e);
+			return null;
+		}
+	} // __________________________________
+
+	/**
+	 * obtain an instance of this class, from a 'normalized' xml format contained in an input stream
+	 * <p/> the 'normalized' xml format is the output of the toXml() instance method
+	 * @param input InputStream - where to parse from
+	 * @return ConfigTree - an object of this class
+	 * @throws SAXException - if xml format is invalid
+	 * @throws IOException - if an input/output error occurs
+	 */
+	public static ConfigTree fromInputStream(InputStream input) 
+		throws SAXException, IOException
+	{
+		if (null==input)
+			throw new IllegalArgumentException();
+		DocumentBuilder builder = null;
+		try { builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); }
+		catch (ParserConfigurationException e2)
+		{	_logger.error("Problems with default Parser Configuration",e2);
+			return null;
+		}
+		Document oDoc = builder.parse(input);
+		oDoc.normalize();
+		
+		return fromElement(oDoc.getDocumentElement());
+		
+	} // __________________________________
+
+	private static ConfigTree fromElement(Element elem)
+	{
+		ConfigTree tree = new ConfigTree(elem.getNodeName());
+		NamedNodeMap NM = elem.getAttributes();
+		if (null!=NM)
+			for (int i1=0; i1<NM.getLength(); i1++)
+			{
+				Node node = NM.item(i1);
+				tree.setAttribute(node.getNodeName(),node.getNodeValue());
+			}
+		NodeList NL = elem.getChildNodes();
+		if (null!=NL)
+			for (int i1=0; i1<NL.getLength(); i1++)
+			{
+				Node node = NL.item(i1);
+				switch (node.getNodeType())
+				{	
+					case Node.ELEMENT_NODE:
+						tree.addChild(ConfigTree.fromElement((Element)node));
+						break;
+					case Node.TEXT_NODE:
+						tree.addTextChild(node.getNodeValue());
+						break;
+				}
+			}
+		
+		return tree;
+	} // __________________________________
+
+	private Element toElement(Document doc)
+	{
+		Element elem = doc.createElement(_name);
+		if (null!=_attributes)
+			for (Map.Entry<String,String> oAtt : _attributes.entrySet())
+				elem.setAttribute(oAtt.getKey(),oAtt.getValue());
+		if (null!=_childs)
+			for (Child child : _childs)
+			{
+				ConfigTree tree = child.getTree();
+				if (null!=tree)
+					elem.appendChild(tree.toElement(doc));
+				else
+					elem.appendChild(doc.createTextNode(child._obj.toString()));
+			}
+		return elem;
+	} // __________________________________
+	/**
+	 * Equivalent to a call to toXml()
+	 * @return String - a String with the 'standard' xml representation of 'this',
+	 * using the default encoding
+	 */
+	public String toString() { return toXml(); }
+	/**
+	 * Equivalent to a call to toXml(encoding)
+	 * @param encoding String - 
+	 * @return String - a String with the 'standard' xml representation of 'this',
+	 * using the encoding specified in arg 0
+	 */
+
+	public String toString(String encoding) { return toXml(encoding); }
+	/**
+	 * @return String - a String with the 'standard' xml representation of 'this',
+	 * using the default encoding
+	 */
+	public String toXml()
+	{
+		return toXml(java.nio.charset.Charset.defaultCharset().toString());
+	} // __________________________________
+	
+	/**
+	 * Serialize this object - Transient objects are
+	 * @param encoding String - String 
+	 * @return String - a String with the 'standard' xml representation of 'this',
+	 * using encoding specified in arg0
+	 */
+	public String toXml(String encoding)
+	{
+		Transformer transf = null;
+		try { transf = TransformerFactory.newInstance().newTransformer(); }
+		catch (TransformerConfigurationException e1)
+		{	_logger.error("Cannot obtain transformer to render XML output",e1);
+			return null;
+		}
+		transf.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,"yes");
+		transf.setOutputProperty(OutputKeys.INDENT, "no");
+		transf.setOutputProperty(OutputKeys.ENCODING, encoding);
+
+		DocumentBuilder builder = null;
+		try { builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); }
+		catch (ParserConfigurationException e2)
+		{	_logger.error("Problems with default Parser Configuration",e2);
+			return null;
+		}
+		Document oDoc = builder.newDocument();
+		oDoc.appendChild(toElement(oDoc));
+		oDoc.normalize();
+		DOMSource src = new DOMSource(oDoc);
+
+		ByteArrayOutputStream oStrm = new ByteArrayOutputStream(5000);
+		StreamResult res = new StreamResult(oStrm);
+
+		try { transf.transform(src, res); }
+		catch (TransformerException e3)
+		{	_logger.error("Problems with XML transformation",e3);
+			return null;
+		}
+
+		return oStrm.toString();
+	} // __________________________________
+	
+	/**
+	 * 
+	 * @return boolean - indicating if 'this' element has ONLY text children (and consequently no ConfigTree children)
+	 */
+	public boolean isPureText() { return _pureText; }
+
+	private class Child
+	{
+		Object _obj;
+		ConfigTree getTree() 
+		{	return (_obj instanceof ConfigTree)? (ConfigTree) _obj : null;
+		}
+		String getName() 
+		{	return (_obj instanceof ConfigTree)? ((ConfigTree) _obj)._name : null;
+		}
+		private Child(ConfigTree obj)	{addToDad(obj); _pureText = false;}
+		private Child(String obj)		{addToDad(obj); }
+		private Child(Child other)		
+		{	
+			if (other._obj instanceof ConfigTree)
+			{
+				addToDad(((ConfigTree)other._obj).cloneObj());
+				_pureText	= false;
+				return;
+			}
+			if (other._obj instanceof String)
+			{
+				addToDad((String)other._obj);
+				return;
+			}
+
+		}
+		private void addToDad(Object obj)
+		{	if (null==_childs)
+				_childs = new ArrayList<Child>();
+			_obj	= obj;
+			_childs.add(this);
+		}
+		
+	}
+
+	private boolean				_pureText=true;
+	private ConfigTree 			_dad;
+	private String 				_name;
+	private Map<String,String> 	_attributes;
+	private List<Child>			_childs;
+
+	private static transient Logger			_logger = Logger.getLogger(ConfigTree.class);
+} //____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/ConfigTree.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/Email.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/Email.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/Email.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,439 +1,439 @@
-/*
- * 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.helpers;
-
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import javax.activation.DataHandler;
-import javax.activation.FileDataSource;
-import javax.mail.Address;
-import javax.mail.Authenticator;
-import javax.mail.BodyPart;
-import javax.mail.MessagingException;
-import javax.mail.Multipart;
-import javax.mail.PasswordAuthentication;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeBodyPart;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.util.Util;
-
-/**
- * Simplifies sending of e-mails with attachments from java.
- * <p/>
- * The message is sent via a subsequent call to the {@link #sendMessage()}
- * method.
- * 
- * <h3 id="p_oMessageParms">Message Parmeters</h3>
- * The class constructor is supplied the following parameters via a
- * {@link org.jboss.soa.esb.helpers.ConfigTree} instance:
- * <ol>
- * 	<li><b>FROM</b>: valid e-mail address</li>
- * 	<li><b>SENDTO</b>: valid comma separated list of e-mail addresses</li>
- * 	<li><b>SUBJECT</b>: free text that will appear as subject of the e-mail</li>
- * 	<li><b>MESSAGE</b>: free text that will appear as contents of the e-mail</li>
- * 	<li><b>ATTACH</b>: list (as Text children) of valid accessible filenames to
- * 			attach to the e-mail</li>
- * </ol>
- * All parameters except 'ATTACH' are attributes of the ConfigTree argument. ATTACH
- * parameters (attachments) are added as child ConfigTrees of the  supplied
- * ConfigTree.
- * 
- * @author: Heuristica - Buenos Aires - Argentina
- */
-public class Email {
-	
-	/**
-	 * Class logger.
-	 */
-	private static Logger logger = Logger.getLogger(Email.class);
-	/**
-	 * ConfigTree attribute : will be the contents of the From: field in the
-	 * outgoing message
-	 */
-	public static final String FROM = "from";
-
-	/**
-	 * ConfigTree attribute : comma separated list of recipients
-	 */
-	public static final String SENDTO = "sendTo";
-
-	/**
-	 * ConfigTree attribute : comma separated list of Copy recipients
-	 */
-	public static final String COPYTO = "ccTo";
-
-	/**
-	 * ConfigTree attribute : will be the contents of the Subject: field in the
-	 * outgoing message
-	 */
-	public static final String SUBJECT = "subject";
-
-	/**
-	 * ConfigTree attribute : Value of this attribute will be the content of the
-	 * e-mail's text
-	 */
-	public static final String ATTACH = "attachment";
-
-	/**
-	 * ConfigTree child Text elements : Each child represents the name of a file
-	 * to be attached in the outgoing message
-	 */
-	public static final String MESSAGE = "message";
-    
-    /**
-     * will be the contents of the From: field in the outgoing message
-     */
-    private String from = null;
-
-    /**
-     * comma separated list of recipients
-     */
-    private String sendTo = null;
-
-    /**
-     * comma separated list of copy recipients
-     */
-    private String copyTo = null;
-
-    /**
-     * This attribute will be the content of the subject of the mail message
-     */
-    private String subject = null;
-
-    /**
-     * Comma separated list of attachment file names
-     */
-    private String[] attachments = null;
-    
-    /**
-     * Value of this attribute will be the content of the e-mail's text
-     */
-    private String message = null;    
-
-	/**
-	 * The message to b sent via a subsequent call to {@link #sendMessage()}.
-	 */
-	private MimeMessage mailMessage;
-    
-    /**
-     * The mail Session to use
-     */
-    private Session oMailSess = null;
-
-	/**
-	 * Public constructor.
-	 * <p/>
-	 * Initialises the mail server session and creates the mail message using 
-	 * the information provided in the p_oMessageParms 
-	 * <a href="p_oMessageParms">listed above</a>.
-	 * <p/>
-	 * The message is sent via a subsequent call to the {@link #sendMessage()}
-	 * method.
-	 * 
-	 * @param p_oMessageParms
-	 *            A ConfigTree object containing the elements mentioned above
-	 * @throws MessagingException 
-	 * @throws AddressException 
-	 * @see ConfigTree
-	 * 
-	 */
-	public Email() throws AddressException, MessagingException {
-		// REVIEW: How about typing the parameters a little better??? Looks as though that might have a huge ripple-on effect accross the codebase!!
-		// REVIEW: Does the session need to ne initialised every time???
-		this.oMailSess = initMailServerSession();
-		
-		// Message can be "sent" via a subsequent call to the sendMessage method!
-	} // __________________________________
-
-	/**
-	 * Send the mail message associated with this instance.
-	 * @throws MessagingException Unable to transport the message associated with this
-	 * Email instance.
-	 */
-	public void sendMessage() throws MessagingException {
-		Transport.send(this.getMailMessage());
-	}
-	
-	/**
-	 * Get the {@link MimeMessage mail message} associated with this EsbMail
-	 * instance.
-	 * @return The mailMessage property value.
-	 */
-	public MimeMessage getMailMessage() throws MessagingException {
-        if (this.mailMessage == null){
-            this.mailMessage = this.createMailMessage(this.oMailSess);
-        }
-		return mailMessage;
-	}    
-
-	/**
-     * @return Returns the attachments.
-     */
-    public String[] getAttachments() {
-        return this.attachments;
-    }
-
-    /**
-     * @param attachments The attachments to set.
-     */
-    public void setAttachments(String[] attachments) {
-        this.attachments = attachments;
-    }
-
-    /**
-     * @return Returns the copyTo.
-     */
-    public String getCopyTo() {
-        return this.copyTo;
-    }
-
-    /**
-     * @param copyTo The copyTo to set.
-     */
-    public void setCopyTo(String copyTo) {
-        this.copyTo = copyTo;
-    }
-
-    /**
-     * @return Returns the from.
-     */
-    public String getFrom() {
-        return this.from;
-    }
-
-    /**
-     * @param from The from to set.
-     */
-    public void setFrom(String from) {
-        this.from = from;
-    }
-
-    /**
-     * @return Returns the sendTo.
-     */
-    public String getSendTo() {
-        return this.sendTo;
-    }
-
-    /**
-     * @param sendTo The sendTo to set.
-     */
-    public void setSendTo(String sendTo) {
-        this.sendTo = sendTo;
-    }
-
-    /**
-     * @return Returns the subject.
-     */
-    public String getSubject() {
-        return this.subject;
-    }
-
-    /**
-     * @param subject The subject to set.
-     */
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    /**
-     * @return Returns the message.
-     */
-    public String getMessage() {
-        return this.message;
-    }
-
-    /**
-     * @param message The message to set.
-     */
-    public void setMessage(String message) {
-        this.message = message;
-    } 
-
-    /**
-	 * Create the mail message instance to be {@link #sendMessage() sent}.
-	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
-	 * @param oMailSess Mail session on which the message is to be transported.
-	 * @return The message.
-	 * @throws AddressException
-	 * @throws MessagingException
-	 */
-	private MimeMessage createMailMessage(Session oMailSess) throws AddressException, MessagingException {
-		MimeMessage oMessage = new MimeMessage(oMailSess);
-		
-		// Populate the message with the data supplied in the p_oMessageParms ConfigTree.
-		addMessageAddressing(oMessage);
-		addMessageSubject( oMessage);
-		addMessageContent(oMessage);
-		
-		return oMessage;
-	}
-
-	/**
-	 * Add the message addressing information to the message.
-	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
-	 * @param oMessage The message.
-	 * @throws AddressException
-	 * @throws MessagingException
-	 */
-	private void addMessageAddressing(MimeMessage oMessage) throws AddressException, MessagingException {		
-		InternetAddress oFrom = new InternetAddress(this.from);
-	
-		oMessage.setFrom(oFrom);
-		oMessage.setReplyTo(new Address[] { oFrom });
-		InternetAddress[] oaTo = 
-			InternetAddress.parse(this.sendTo);
-		
-		for (int i1 = 0; i1 < oaTo.length; i1++) {
-			oMessage.addRecipient(MimeMessage.RecipientType.TO, oaTo[i1]);
-		}
-			
-		if (null != this.copyTo) {
-			oaTo = InternetAddress.parse(this.copyTo);
-			for (int i1 = 0; i1 < oaTo.length; i1++) {
-				oMessage.addRecipient(MimeMessage.RecipientType.CC, oaTo[i1]);
-			}
-		}
-	}
-
-	/**
-	 * Add the message Subject to the message.
-	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
-	 * @param oMessage The message.
-	 * @throws MessagingException
-	 */
-	private void addMessageSubject(MimeMessage oMessage) throws MessagingException {		
-		if (null != this.subject) {
-			oMessage.setSubject(this.subject);
-		}
-	}
-
-	/**
-	 * Add the message content (body, attachments etc) to from the
-	 * message parameters to the message.
-	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
-	 * @param oMessage The message.
-	 * @throws MessagingException
-	 */
-	private void addMessageContent(MimeMessage oMessage) throws MessagingException {
-		BodyPart oBodyP = new MimeBodyPart();
-		Multipart oMultiP = new MimeMultipart();
-
-		oMultiP.addBodyPart(oBodyP);
-		oMessage.setContent(oMultiP);
-		if (null == this.message) {
-            this.message = "";
-		}
-		oBodyP.setText(this.message + "\n");
-
-        
-        if (null != attachments) {
-			for (int i1 = 0; i1 < this.attachments.length; i1++) {
-	            oMultiP.addBodyPart(oBodyP = new MimeBodyPart());
-	            String sFile = this.attachments[i1];
-	            oBodyP.setDataHandler(new DataHandler(new FileDataSource(sFile)));
-	            oBodyP.setFileName(sFile.substring(1 + sFile.lastIndexOf("\\")));
-	        }
-        }
-	}
-
-	/**
-	 * Initialise an authenticated {@link javax.mail.Session} with the mail server.
-	 * @return The {@link javax.mail.Session}. 
-	 */
-	private Session initMailServerSession() {
-		Authenticator oAuth = null;
-		String sSmtpUser = Configuration.getSmtpUsername();
-		
-		if (! Util.isNullString(sSmtpUser)) {
-			oAuth = new MyAuth(sSmtpUser, Configuration.getSmtpPassword());			
-		}
-
-		Properties oMailP = new Properties();
-		oMailP.setProperty("mail.smtp.host", Configuration.getSmtpHost());
-		String sAuth = Configuration.getSmtpAuth();
-		if(sAuth != null) {
-			if(!sAuth.trim().equals("")) {
-				logger.warn("'" + Environment.SMTP_AUTH + "' set to an empty value.");
-			}
-			oMailP.setProperty("mail.smtp.auth", sAuth);
-		}
-		
-		try {
-			String sPort = Configuration.getSmtpPort();			
-			this.from = Configuration.getSmtpFrom();
-			Integer.parseInt(sPort);
-			oMailP.setProperty("mail.smtp.port", sPort);						
-		} 
-		catch (Exception e) { /* OK just leave standard port */ }
-
-		logger.info("Initialising mail server sesson. Properties: " + oMailP);
-		javax.mail.Session oMailSess = javax.mail.Session.getDefaultInstance(oMailP, oAuth);
-		
-		return oMailSess;
-	}
-    
-    /**  
-     * Method parsing filename from a string containing a comma separated list of filenames
-     * @param attachments the string containing the comma separated list of filenames
-     * @return a String array containing an entry for every filename in the given comma separated list
-     */
-    @SuppressWarnings("unused")
-	private String[] getFileNamesAsArray(String attachments) {
-        if (attachments.indexOf(',') != -1){
-            StringTokenizer st = new StringTokenizer(attachments,",");
-            String[] attachmentFileNames = new String[st.countTokens()];
-            int index = 0;
-            while (st.hasMoreTokens()) {
-                attachmentFileNames[index] = st.nextToken();
-                index++;
-            }
-            return attachmentFileNames;
-        }
-        return new String[]{attachments};
-    }
-
-	private class MyAuth extends Authenticator {
-		private String m_sUser, m_sPwd;
-
-		private MyAuth(String p_sU, String p_sP) {
-			m_sUser = p_sU;
-			m_sPwd = p_sP;
-		}
-
-		protected PasswordAuthentication getPasswordAuthentication() {
-			return new PasswordAuthentication(m_sUser, m_sPwd);
-		} // ________________________________
-	} // ______________________________________________________
-
-} // ____________________________________________________________________________
-
+/*
+ * 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.helpers;
+
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import javax.activation.DataHandler;
+import javax.activation.FileDataSource;
+import javax.mail.Address;
+import javax.mail.Authenticator;
+import javax.mail.BodyPart;
+import javax.mail.MessagingException;
+import javax.mail.Multipart;
+import javax.mail.PasswordAuthentication;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.AddressException;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.MimeMultipart;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.util.Util;
+
+/**
+ * Simplifies sending of e-mails with attachments from java.
+ * <p/>
+ * The message is sent via a subsequent call to the {@link #sendMessage()}
+ * method.
+ * 
+ * <h3 id="p_oMessageParms">Message Parmeters</h3>
+ * The class constructor is supplied the following parameters via a
+ * {@link org.jboss.soa.esb.helpers.ConfigTree} instance:
+ * <ol>
+ * 	<li><b>FROM</b>: valid e-mail address</li>
+ * 	<li><b>SENDTO</b>: valid comma separated list of e-mail addresses</li>
+ * 	<li><b>SUBJECT</b>: free text that will appear as subject of the e-mail</li>
+ * 	<li><b>MESSAGE</b>: free text that will appear as contents of the e-mail</li>
+ * 	<li><b>ATTACH</b>: list (as Text children) of valid accessible filenames to
+ * 			attach to the e-mail</li>
+ * </ol>
+ * All parameters except 'ATTACH' are attributes of the ConfigTree argument. ATTACH
+ * parameters (attachments) are added as child ConfigTrees of the  supplied
+ * ConfigTree.
+ * 
+ * @author: Heuristica - Buenos Aires - Argentina
+ */
+public class Email {
+	
+	/**
+	 * Class logger.
+	 */
+	private static Logger logger = Logger.getLogger(Email.class);
+	/**
+	 * ConfigTree attribute : will be the contents of the From: field in the
+	 * outgoing message
+	 */
+	public static final String FROM = "from";
+
+	/**
+	 * ConfigTree attribute : comma separated list of recipients
+	 */
+	public static final String SENDTO = "sendTo";
+
+	/**
+	 * ConfigTree attribute : comma separated list of Copy recipients
+	 */
+	public static final String COPYTO = "ccTo";
+
+	/**
+	 * ConfigTree attribute : will be the contents of the Subject: field in the
+	 * outgoing message
+	 */
+	public static final String SUBJECT = "subject";
+
+	/**
+	 * ConfigTree attribute : Value of this attribute will be the content of the
+	 * e-mail's text
+	 */
+	public static final String ATTACH = "attachment";
+
+	/**
+	 * ConfigTree child Text elements : Each child represents the name of a file
+	 * to be attached in the outgoing message
+	 */
+	public static final String MESSAGE = "message";
+    
+    /**
+     * will be the contents of the From: field in the outgoing message
+     */
+    private String from = null;
+
+    /**
+     * comma separated list of recipients
+     */
+    private String sendTo = null;
+
+    /**
+     * comma separated list of copy recipients
+     */
+    private String copyTo = null;
+
+    /**
+     * This attribute will be the content of the subject of the mail message
+     */
+    private String subject = null;
+
+    /**
+     * Comma separated list of attachment file names
+     */
+    private String[] attachments = null;
+    
+    /**
+     * Value of this attribute will be the content of the e-mail's text
+     */
+    private String message = null;    
+
+	/**
+	 * The message to b sent via a subsequent call to {@link #sendMessage()}.
+	 */
+	private MimeMessage mailMessage;
+    
+    /**
+     * The mail Session to use
+     */
+    private Session oMailSess = null;
+
+	/**
+	 * Public constructor.
+	 * <p/>
+	 * Initialises the mail server session and creates the mail message using 
+	 * the information provided in the p_oMessageParms 
+	 * <a href="p_oMessageParms">listed above</a>.
+	 * <p/>
+	 * The message is sent via a subsequent call to the {@link #sendMessage()}
+	 * method.
+	 * 
+	 * @param p_oMessageParms
+	 *            A ConfigTree object containing the elements mentioned above
+	 * @throws MessagingException 
+	 * @throws AddressException 
+	 * @see ConfigTree
+	 * 
+	 */
+	public Email() throws AddressException, MessagingException {
+		// REVIEW: How about typing the parameters a little better??? Looks as though that might have a huge ripple-on effect accross the codebase!!
+		// REVIEW: Does the session need to ne initialised every time???
+		this.oMailSess = initMailServerSession();
+		
+		// Message can be "sent" via a subsequent call to the sendMessage method!
+	} // __________________________________
+
+	/**
+	 * Send the mail message associated with this instance.
+	 * @throws MessagingException Unable to transport the message associated with this
+	 * Email instance.
+	 */
+	public void sendMessage() throws MessagingException {
+		Transport.send(this.getMailMessage());
+	}
+	
+	/**
+	 * Get the {@link MimeMessage mail message} associated with this EsbMail
+	 * instance.
+	 * @return The mailMessage property value.
+	 */
+	public MimeMessage getMailMessage() throws MessagingException {
+        if (this.mailMessage == null){
+            this.mailMessage = this.createMailMessage(this.oMailSess);
+        }
+		return mailMessage;
+	}    
+
+	/**
+     * @return Returns the attachments.
+     */
+    public String[] getAttachments() {
+        return this.attachments;
+    }
+
+    /**
+     * @param attachments The attachments to set.
+     */
+    public void setAttachments(String[] attachments) {
+        this.attachments = attachments;
+    }
+
+    /**
+     * @return Returns the copyTo.
+     */
+    public String getCopyTo() {
+        return this.copyTo;
+    }
+
+    /**
+     * @param copyTo The copyTo to set.
+     */
+    public void setCopyTo(String copyTo) {
+        this.copyTo = copyTo;
+    }
+
+    /**
+     * @return Returns the from.
+     */
+    public String getFrom() {
+        return this.from;
+    }
+
+    /**
+     * @param from The from to set.
+     */
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    /**
+     * @return Returns the sendTo.
+     */
+    public String getSendTo() {
+        return this.sendTo;
+    }
+
+    /**
+     * @param sendTo The sendTo to set.
+     */
+    public void setSendTo(String sendTo) {
+        this.sendTo = sendTo;
+    }
+
+    /**
+     * @return Returns the subject.
+     */
+    public String getSubject() {
+        return this.subject;
+    }
+
+    /**
+     * @param subject The subject to set.
+     */
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    /**
+     * @return Returns the message.
+     */
+    public String getMessage() {
+        return this.message;
+    }
+
+    /**
+     * @param message The message to set.
+     */
+    public void setMessage(String message) {
+        this.message = message;
+    } 
+
+    /**
+	 * Create the mail message instance to be {@link #sendMessage() sent}.
+	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
+	 * @param oMailSess Mail session on which the message is to be transported.
+	 * @return The message.
+	 * @throws AddressException
+	 * @throws MessagingException
+	 */
+	private MimeMessage createMailMessage(Session oMailSess) throws AddressException, MessagingException {
+		MimeMessage oMessage = new MimeMessage(oMailSess);
+		
+		// Populate the message with the data supplied in the p_oMessageParms ConfigTree.
+		addMessageAddressing(oMessage);
+		addMessageSubject( oMessage);
+		addMessageContent(oMessage);
+		
+		return oMessage;
+	}
+
+	/**
+	 * Add the message addressing information to the message.
+	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
+	 * @param oMessage The message.
+	 * @throws AddressException
+	 * @throws MessagingException
+	 */
+	private void addMessageAddressing(MimeMessage oMessage) throws AddressException, MessagingException {		
+		InternetAddress oFrom = new InternetAddress(this.from);
+	
+		oMessage.setFrom(oFrom);
+		oMessage.setReplyTo(new Address[] { oFrom });
+		InternetAddress[] oaTo = 
+			InternetAddress.parse(this.sendTo);
+		
+		for (int i1 = 0; i1 < oaTo.length; i1++) {
+			oMessage.addRecipient(MimeMessage.RecipientType.TO, oaTo[i1]);
+		}
+			
+		if (null != this.copyTo) {
+			oaTo = InternetAddress.parse(this.copyTo);
+			for (int i1 = 0; i1 < oaTo.length; i1++) {
+				oMessage.addRecipient(MimeMessage.RecipientType.CC, oaTo[i1]);
+			}
+		}
+	}
+
+	/**
+	 * Add the message Subject to the message.
+	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
+	 * @param oMessage The message.
+	 * @throws MessagingException
+	 */
+	private void addMessageSubject(MimeMessage oMessage) throws MessagingException {		
+		if (null != this.subject) {
+			oMessage.setSubject(this.subject);
+		}
+	}
+
+	/**
+	 * Add the message content (body, attachments etc) to from the
+	 * message parameters to the message.
+	 * @param p_oMessageParms <a href="p_oMessageParms">Message parameters.</a>.
+	 * @param oMessage The message.
+	 * @throws MessagingException
+	 */
+	private void addMessageContent(MimeMessage oMessage) throws MessagingException {
+		BodyPart oBodyP = new MimeBodyPart();
+		Multipart oMultiP = new MimeMultipart();
+
+		oMultiP.addBodyPart(oBodyP);
+		oMessage.setContent(oMultiP);
+		if (null == this.message) {
+            this.message = "";
+		}
+		oBodyP.setText(this.message + "\n");
+
+        
+        if (null != attachments) {
+			for (int i1 = 0; i1 < this.attachments.length; i1++) {
+	            oMultiP.addBodyPart(oBodyP = new MimeBodyPart());
+	            String sFile = this.attachments[i1];
+	            oBodyP.setDataHandler(new DataHandler(new FileDataSource(sFile)));
+	            oBodyP.setFileName(sFile.substring(1 + sFile.lastIndexOf("\\")));
+	        }
+        }
+	}
+
+	/**
+	 * Initialise an authenticated {@link javax.mail.Session} with the mail server.
+	 * @return The {@link javax.mail.Session}. 
+	 */
+	private Session initMailServerSession() {
+		Authenticator oAuth = null;
+		String sSmtpUser = Configuration.getSmtpUsername();
+		
+		if (! Util.isNullString(sSmtpUser)) {
+			oAuth = new MyAuth(sSmtpUser, Configuration.getSmtpPassword());			
+		}
+
+		Properties oMailP = new Properties();
+		oMailP.setProperty("mail.smtp.host", Configuration.getSmtpHost());
+		String sAuth = Configuration.getSmtpAuth();
+		if(sAuth != null) {
+			if(!sAuth.trim().equals("")) {
+				logger.warn("'" + Environment.SMTP_AUTH + "' set to an empty value.");
+			}
+			oMailP.setProperty("mail.smtp.auth", sAuth);
+		}
+		
+		try {
+			String sPort = Configuration.getSmtpPort();			
+			this.from = Configuration.getSmtpFrom();
+			Integer.parseInt(sPort);
+			oMailP.setProperty("mail.smtp.port", sPort);						
+		} 
+		catch (Exception e) { /* OK just leave standard port */ }
+
+		logger.info("Initialising mail server sesson. Properties: " + oMailP);
+		javax.mail.Session oMailSess = javax.mail.Session.getDefaultInstance(oMailP, oAuth);
+		
+		return oMailSess;
+	}
+    
+    /**  
+     * Method parsing filename from a string containing a comma separated list of filenames
+     * @param attachments the string containing the comma separated list of filenames
+     * @return a String array containing an entry for every filename in the given comma separated list
+     */
+    @SuppressWarnings("unused")
+	private String[] getFileNamesAsArray(String attachments) {
+        if (attachments.indexOf(',') != -1){
+            StringTokenizer st = new StringTokenizer(attachments,",");
+            String[] attachmentFileNames = new String[st.countTokens()];
+            int index = 0;
+            while (st.hasMoreTokens()) {
+                attachmentFileNames[index] = st.nextToken();
+                index++;
+            }
+            return attachmentFileNames;
+        }
+        return new String[]{attachments};
+    }
+
+	private class MyAuth extends Authenticator {
+		private String m_sUser, m_sPwd;
+
+		private MyAuth(String p_sU, String p_sP) {
+			m_sUser = p_sU;
+			m_sPwd = p_sP;
+		}
+
+		protected PasswordAuthentication getPasswordAuthentication() {
+			return new PasswordAuthentication(m_sUser, m_sPwd);
+		} // ________________________________
+	} // ______________________________________________________
+
+} // ____________________________________________________________________________
+


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/Email.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/KeyValuePair.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/KeyValuePair.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/KeyValuePair.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,163 +1,163 @@
-/*
- * 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.helpers;
-
-import java.io.Serializable;
-import java.util.List;
-
-public class KeyValuePair implements Serializable {
-	private static final long serialVersionUID = 1L;
-
-	private String mKey, mVal;
-
-	public KeyValuePair(String pKey, String pVal) {
-		if(pKey == null || pKey.trim().equals("")) {
-			throw new IllegalArgumentException("null or empty 'pKey' arg in call.");
-		}
-		
-		mKey = pKey;
-		mVal = pVal;
-	}
-
-	public String getKey() {
-		return mKey;
-	}
-
-	public String getValue() {
-		return mVal;
-	}
-
-	public String toString() {
-		return mVal;
-	}
-
-	public String dump() {
-		return "KVpair[" + mKey + "=" + mVal + "]";
-	}
-    
-    /**
-     * Get the value associated with the specified key from the supplied list of Key Value Pairs.
-     * <p/>
-     * Returns the value from the first matching key.
-     * @param key The key to search for.
-     * @param list The list of KeyValuePairs to search.
-     * @return The value associated with the supplied key, or null if key not found.
-     */
-    public static String getValue(String key, List<KeyValuePair> list) {
-        if(key == null) {
-            throw new IllegalArgumentException("null 'key' arg in call.");
-        }
-        if(list == null) {
-            throw new IllegalArgumentException("null 'list' arg in call.");
-        }
-        
-        for(KeyValuePair kvp : list) {
-            if(kvp.mKey.equals(key)) {
-                return kvp.mVal;
-            }
-        }
-        
-        return null;
-    }
-    
-    /**
-     * Get the value associated with the specified key from the supplied list of Key Value Pairs.
-     * <p/>
-     * Returns the value from the first matching key.
-     * @param key The key to search for.
-     * @param list The list of KeyValuePairs to search.
-     * @param defaultVal The default value to be returned where there's no value available for the specified key. 
-     * @return The value associated with the supplied key, or null if key not found.
-     */
-    public static String getValue(String key, List<KeyValuePair> list, String defaultVal) {
-        String value = getValue(key, list);
-        
-        if(value == null) {
-            return defaultVal;
-        }
-        
-        return value;
-    }
-    
-    /**
-     * Get the boolean equivalent value associated with the specified key 
-     * from the supplied list of Key Value Pairs.
-     * <p/>
-     * Returns:
-     * <ul>
-     *  <li><b><code>true</code></b>: If value equals "true" or "yes" or "y" (ignoring case).</li>
-     *  <li><b><code>false</code></b>: If value equals "false" or "no" or "n" (ignoring case).</li>
-     *  <li><b><i>defaultVal</i></b>: If none of the above hold true.</li>
-     * </ul>
-     * <p/>
-     * Returns the value from the first matching key.
-     * @param key The key to search for.
-     * @param list The list of KeyValuePairs to search.
-     * @param defaultVal The default value to be returned where the above listed conditions do not hold
-     * for the associated value, or the value is not specified.
-     * @return The boolean equivalent value associated with the specified key according to the above specified
-     * rules, otherwise the <b><i>defaultVal</i></b> is returned.
-     */
-    public static boolean getBooleanValue(String key, List<KeyValuePair> list, boolean defaultVal) {
-        String value = getValue(key, list);
-        
-        if(value == null) {
-            return defaultVal;
-        }
-        
-        if(value.equalsIgnoreCase("true") || value.equalsIgnoreCase("y") || value.equalsIgnoreCase("yes")) {
-            return true;
-        } else if(value.equalsIgnoreCase("false") || value.equalsIgnoreCase("n") || value.equalsIgnoreCase("no")) {
-            return false;
-        } else {
-            return defaultVal;
-        }
-    }
-
-    /**
-     * Get the numeric <code>double</code> equivalent value associated with the specified key 
-     * from the supplied list of Key Value Pairs.
-     * <p/>
-     * Returns the value from the first matching key.
-     * @param key The key to search for.
-     * @param list The list of KeyValuePairs to search.
-     * @param defaultVal The default value to be returned where the value is not found or is non-numeric.
-     * @return The <code>double</code> equivalent value associated with the specified key if the value is found
-     * and is numeric, otherwise the <b><i>defaultVal</i></b> is returned.
-     */
-    public static double getDoubleValue(String key, List<KeyValuePair> list, double defaultVal) {
-        String value = getValue(key, list);
-        
-        if(value == null) {
-            return defaultVal;
-        }
-
-        try {
-            return Double.parseDouble(value);
-        } catch(NumberFormatException e) {
-            // return the default...
-        }
-        
-        return defaultVal;
-    }
-}
+/*
+ * 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.helpers;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class KeyValuePair implements Serializable {
+	private static final long serialVersionUID = 1L;
+
+	private String mKey, mVal;
+
+	public KeyValuePair(String pKey, String pVal) {
+		if(pKey == null || pKey.trim().equals("")) {
+			throw new IllegalArgumentException("null or empty 'pKey' arg in call.");
+		}
+		
+		mKey = pKey;
+		mVal = pVal;
+	}
+
+	public String getKey() {
+		return mKey;
+	}
+
+	public String getValue() {
+		return mVal;
+	}
+
+	public String toString() {
+		return mVal;
+	}
+
+	public String dump() {
+		return "KVpair[" + mKey + "=" + mVal + "]";
+	}
+    
+    /**
+     * Get the value associated with the specified key from the supplied list of Key Value Pairs.
+     * <p/>
+     * Returns the value from the first matching key.
+     * @param key The key to search for.
+     * @param list The list of KeyValuePairs to search.
+     * @return The value associated with the supplied key, or null if key not found.
+     */
+    public static String getValue(String key, List<KeyValuePair> list) {
+        if(key == null) {
+            throw new IllegalArgumentException("null 'key' arg in call.");
+        }
+        if(list == null) {
+            throw new IllegalArgumentException("null 'list' arg in call.");
+        }
+        
+        for(KeyValuePair kvp : list) {
+            if(kvp.mKey.equals(key)) {
+                return kvp.mVal;
+            }
+        }
+        
+        return null;
+    }
+    
+    /**
+     * Get the value associated with the specified key from the supplied list of Key Value Pairs.
+     * <p/>
+     * Returns the value from the first matching key.
+     * @param key The key to search for.
+     * @param list The list of KeyValuePairs to search.
+     * @param defaultVal The default value to be returned where there's no value available for the specified key. 
+     * @return The value associated with the supplied key, or null if key not found.
+     */
+    public static String getValue(String key, List<KeyValuePair> list, String defaultVal) {
+        String value = getValue(key, list);
+        
+        if(value == null) {
+            return defaultVal;
+        }
+        
+        return value;
+    }
+    
+    /**
+     * Get the boolean equivalent value associated with the specified key 
+     * from the supplied list of Key Value Pairs.
+     * <p/>
+     * Returns:
+     * <ul>
+     *  <li><b><code>true</code></b>: If value equals "true" or "yes" or "y" (ignoring case).</li>
+     *  <li><b><code>false</code></b>: If value equals "false" or "no" or "n" (ignoring case).</li>
+     *  <li><b><i>defaultVal</i></b>: If none of the above hold true.</li>
+     * </ul>
+     * <p/>
+     * Returns the value from the first matching key.
+     * @param key The key to search for.
+     * @param list The list of KeyValuePairs to search.
+     * @param defaultVal The default value to be returned where the above listed conditions do not hold
+     * for the associated value, or the value is not specified.
+     * @return The boolean equivalent value associated with the specified key according to the above specified
+     * rules, otherwise the <b><i>defaultVal</i></b> is returned.
+     */
+    public static boolean getBooleanValue(String key, List<KeyValuePair> list, boolean defaultVal) {
+        String value = getValue(key, list);
+        
+        if(value == null) {
+            return defaultVal;
+        }
+        
+        if(value.equalsIgnoreCase("true") || value.equalsIgnoreCase("y") || value.equalsIgnoreCase("yes")) {
+            return true;
+        } else if(value.equalsIgnoreCase("false") || value.equalsIgnoreCase("n") || value.equalsIgnoreCase("no")) {
+            return false;
+        } else {
+            return defaultVal;
+        }
+    }
+
+    /**
+     * Get the numeric <code>double</code> equivalent value associated with the specified key 
+     * from the supplied list of Key Value Pairs.
+     * <p/>
+     * Returns the value from the first matching key.
+     * @param key The key to search for.
+     * @param list The list of KeyValuePairs to search.
+     * @param defaultVal The default value to be returned where the value is not found or is non-numeric.
+     * @return The <code>double</code> equivalent value associated with the specified key if the value is found
+     * and is numeric, otherwise the <b><i>defaultVal</i></b> is returned.
+     */
+    public static double getDoubleValue(String key, List<KeyValuePair> list, double defaultVal) {
+        String value = getValue(key, list);
+        
+        if(value == null) {
+            return defaultVal;
+        }
+
+        try {
+            return Double.parseDouble(value);
+        } catch(NumberFormatException e) {
+            // return the default...
+        }
+        
+        return defaultVal;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/KeyValuePair.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,86 +1,86 @@
-/*
- * 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.helpers;
-
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.apache.log4j.Logger;
-
-/**
- * Obtains JNDI naming context.
- * 
- */
-public abstract class NamingContext 
-{
-	/**
-	 * Logger for this class
-	 */
-	private static final Logger _logger = Logger
-			.getLogger(NamingContext.class);
-
-	public static final int MAX_RETRIES = 10;
-	public static final String JBOSS_PROVIDER_URL = "localhost";
-	public static final String JBOSS_INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
-	public static final String JBOSS_URL_PKG_PREFIX = ""; //"org.jboss.naming:org.jnp.interfaces"
-	/**
-	 * Tries to connect to the server to obtain the server Context.
-	 * 
-	 * @param providerUrl
-	 * @param initialContextFactory
-	 * @param urlPkgPrefixes
-	 * @return the InitialContext.
-	 */
-	public static Context getServerContext(String providerUrl, 
-			String initialContextFactory, String urlPkgPrefixes) 
-	{
-		Properties properties = new Properties();
-		properties.setProperty(Context.PROVIDER_URL, providerUrl);
-		properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
-		if (urlPkgPrefixes!=null && !"".equals(urlPkgPrefixes)) {
-			properties.setProperty(Context.URL_PKG_PREFIXES, urlPkgPrefixes);
-		}
-
-		boolean bCtxOK = false;
-		Context oCtx = null;
-		for (int i1 = 0; (!bCtxOK) && i1 < MAX_RETRIES; i1++) {
-			// check if context is valid
-			try {
-				oCtx = new InitialContext(properties);
-				oCtx.list("__dummy2@#$%");
-				bCtxOK = true;
-			} catch (NamingException nex) {
-				bCtxOK = true;
-			}
-		}
-		if (bCtxOK) {
-			return oCtx;
-		} else {
-			_logger.error("Can't connect to JNDI Server <" + providerUrl + ">");
-			return null;
-		}
-	}
-
-}
+/*
+ * 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.helpers;
+
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Obtains JNDI naming context.
+ * 
+ */
+public abstract class NamingContext 
+{
+	/**
+	 * Logger for this class
+	 */
+	private static final Logger _logger = Logger
+			.getLogger(NamingContext.class);
+
+	public static final int MAX_RETRIES = 10;
+	public static final String JBOSS_PROVIDER_URL = "localhost";
+	public static final String JBOSS_INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
+	public static final String JBOSS_URL_PKG_PREFIX = ""; //"org.jboss.naming:org.jnp.interfaces"
+	/**
+	 * Tries to connect to the server to obtain the server Context.
+	 * 
+	 * @param providerUrl
+	 * @param initialContextFactory
+	 * @param urlPkgPrefixes
+	 * @return the InitialContext.
+	 */
+	public static Context getServerContext(String providerUrl, 
+			String initialContextFactory, String urlPkgPrefixes) 
+	{
+		Properties properties = new Properties();
+		properties.setProperty(Context.PROVIDER_URL, providerUrl);
+		properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
+		if (urlPkgPrefixes!=null && !"".equals(urlPkgPrefixes)) {
+			properties.setProperty(Context.URL_PKG_PREFIXES, urlPkgPrefixes);
+		}
+
+		boolean bCtxOK = false;
+		Context oCtx = null;
+		for (int i1 = 0; (!bCtxOK) && i1 < MAX_RETRIES; i1++) {
+			// check if context is valid
+			try {
+				oCtx = new InitialContext(properties);
+				oCtx.list("__dummy2@#$%");
+				bCtxOK = true;
+			} catch (NamingException nex) {
+				bCtxOK = true;
+			}
+		}
+		if (bCtxOK) {
+			return oCtx;
+		} else {
+			_logger.error("Can't connect to JNDI Server <" + providerUrl + ">");
+			return null;
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,254 +1,254 @@
-/*
- * 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.helpers.persist;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.sql.DataSource;
-
-import org.apache.log4j.Logger;
-
-public class JdbcCleanConn
-{
-	private DataSource m_oDS = null;
-
-	private Connection m_conn = null;
-
-	protected List<PreparedStatement> m_olPrepSt = new ArrayList<PreparedStatement>();
-
-	protected Logger m_oLogger;
-
-	public JdbcCleanConn(DataSource p_oDS)
-	{
-		m_oDS = p_oDS;
-		m_oLogger = Logger.getLogger(this.getClass());
-	}
-
-	public void commit() throws SQLException
-	{
-		if (null != m_conn)
-		{
-			m_conn.commit();
-		}
-	}
-
-	public void rollback() throws SQLException
-	{
-		if (null != m_conn)
-		{
-			m_conn.rollback();
-		}
-	}
-
-	public void release()
-	{
-		if (null != m_conn)
-		{
-			try
-			{
-				m_conn.rollback();
-			}
-			catch (Exception eRoll)
-			{
-			}
-
-			for (PreparedStatement PS : m_olPrepSt)
-				try
-				{
-					PS.close();
-				}
-				catch (Exception e)
-				{
-				}
-			try
-			{
-				m_conn.close();
-			}
-			catch (Exception e1)
-			{
-			}
-		}
-		m_olPrepSt.clear();
-		m_conn = null;
-	} // __________________________________
-
-	public PreparedStatement prepareStatement(String p_sSt, int p_i1, int p_i2)
-			throws SQLException
-	{
-		if (null == m_conn)
-		{
-			connect();
-		}
-		PreparedStatement PS = m_conn.prepareStatement(p_sSt, p_i1, p_i2);
-		m_olPrepSt.add(PS);
-		return PS;
-	} // __________________________________
-
-	public PreparedStatement prepareStatement(String p_sSt) throws SQLException
-	{
-		if (null == m_conn)
-		{
-			connect();
-		}
-
-		PreparedStatement PS = m_conn.prepareStatement(p_sSt);
-		m_olPrepSt.add(PS);
-		return PS;
-	} // __________________________________
-
-	public ResultSet execQueryWait(PreparedStatement p_PS, int p_iQtry)
-			throws SQLException
-	{
-		if (null == m_conn)
-		{
-			connect();
-		}
-
-		SQLException eRet = null;
-		int iQtry = (p_iQtry < 1) ? 1 : (p_iQtry < 50) ? p_iQtry : 50;
-		for (int i1 = 0; i1 < iQtry; i1++)
-		{
-			try
-			{
-				return p_PS.executeQuery();
-			}
-			catch (SQLException e)
-			{
-				if (null == eRet)
-					eRet = e;
-
-				// TODO magic number!!
-
-				try
-				{
-					Thread.sleep(100 + (new Double(100 * Math.random()))
-							.longValue());
-				}
-				catch (InterruptedException ex)
-				{
-					m_oLogger.warn("Thread interrupted.", ex);
-				}
-			}
-		}
-		m_oLogger.error("execQueryWait() FAILED", eRet);
-		throw eRet;
-	} // __________________________________
-
-	public void execUpdWait(PreparedStatement p_PS, int p_iQtry)
-			throws SQLException
-	{
-		if (null == m_conn)
-		{
-			connect();
-		}
-
-		SQLException eRet = null;
-		int iQtry = (p_iQtry < 1) ? 1 : (p_iQtry < 50) ? p_iQtry : 50;
-		for (int i1 = 0; i1 < iQtry; i1++)
-		{
-			try
-			{
-				p_PS.executeUpdate();
-				return;
-			}
-			catch (SQLException e)
-			{
-				if (null == eRet)
-					eRet = e;
-				
-				try
-				{
-					Thread.sleep(100 + (new Double(100 * Math.random()))
-							.longValue());
-				}
-				catch (InterruptedException ex)
-				{
-					m_oLogger.warn("Thread interrupted.", ex);
-				}
-			}
-		}
-		m_oLogger.error("execUpdWait() FAILED", eRet);
-		throw eRet;
-	} // __________________________________
-
-	private void connect() throws SQLException
-	{
-		if (m_conn != null)
-		{
-			return;
-		}
-
-		SQLException eRet = null;
-		for (int i1 = 0; i1 < 5; i1++)
-		{
-			try
-			{
-				m_conn = m_oDS.getConnection();
-				eRet = null;
-				break;
-			}
-			catch (SQLException e)
-			{
-				if (null == eRet)
-					eRet = e;
-
-				// TODO magic number!!
-
-				try
-				{
-					Thread.sleep(2000 + (new Double(100 * Math.random()))
-							.longValue());
-				}
-				catch (InterruptedException ex)
-				{
-					m_oLogger.warn("Thread interrupted.", ex);
-				}
-			}
-		}
-
-		if (eRet != null)
-		{
-			m_oLogger.error("connect() FAILED", eRet);
-			throw eRet;
-		}
-
-		if (m_conn == null)
-		{
-			m_oLogger.error("connect() FAILED: no connection");
-
-			throw new RuntimeException();
-		}
-
-		m_conn.setAutoCommit(false);
-		m_conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
-
-		m_olPrepSt.clear();
-
-	} // __________________________________
-
-} // ____________________________________________________________________________
+/*
+ * 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.helpers.persist;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.sql.DataSource;
+
+import org.apache.log4j.Logger;
+
+public class JdbcCleanConn
+{
+	private DataSource m_oDS = null;
+
+	private Connection m_conn = null;
+
+	protected List<PreparedStatement> m_olPrepSt = new ArrayList<PreparedStatement>();
+
+	protected Logger m_oLogger;
+
+	public JdbcCleanConn(DataSource p_oDS)
+	{
+		m_oDS = p_oDS;
+		m_oLogger = Logger.getLogger(this.getClass());
+	}
+
+	public void commit() throws SQLException
+	{
+		if (null != m_conn)
+		{
+			m_conn.commit();
+		}
+	}
+
+	public void rollback() throws SQLException
+	{
+		if (null != m_conn)
+		{
+			m_conn.rollback();
+		}
+	}
+
+	public void release()
+	{
+		if (null != m_conn)
+		{
+			try
+			{
+				m_conn.rollback();
+			}
+			catch (Exception eRoll)
+			{
+			}
+
+			for (PreparedStatement PS : m_olPrepSt)
+				try
+				{
+					PS.close();
+				}
+				catch (Exception e)
+				{
+				}
+			try
+			{
+				m_conn.close();
+			}
+			catch (Exception e1)
+			{
+			}
+		}
+		m_olPrepSt.clear();
+		m_conn = null;
+	} // __________________________________
+
+	public PreparedStatement prepareStatement(String p_sSt, int p_i1, int p_i2)
+			throws SQLException
+	{
+		if (null == m_conn)
+		{
+			connect();
+		}
+		PreparedStatement PS = m_conn.prepareStatement(p_sSt, p_i1, p_i2);
+		m_olPrepSt.add(PS);
+		return PS;
+	} // __________________________________
+
+	public PreparedStatement prepareStatement(String p_sSt) throws SQLException
+	{
+		if (null == m_conn)
+		{
+			connect();
+		}
+
+		PreparedStatement PS = m_conn.prepareStatement(p_sSt);
+		m_olPrepSt.add(PS);
+		return PS;
+	} // __________________________________
+
+	public ResultSet execQueryWait(PreparedStatement p_PS, int p_iQtry)
+			throws SQLException
+	{
+		if (null == m_conn)
+		{
+			connect();
+		}
+
+		SQLException eRet = null;
+		int iQtry = (p_iQtry < 1) ? 1 : (p_iQtry < 50) ? p_iQtry : 50;
+		for (int i1 = 0; i1 < iQtry; i1++)
+		{
+			try
+			{
+				return p_PS.executeQuery();
+			}
+			catch (SQLException e)
+			{
+				if (null == eRet)
+					eRet = e;
+
+				// TODO magic number!!
+
+				try
+				{
+					Thread.sleep(100 + (new Double(100 * Math.random()))
+							.longValue());
+				}
+				catch (InterruptedException ex)
+				{
+					m_oLogger.warn("Thread interrupted.", ex);
+				}
+			}
+		}
+		m_oLogger.error("execQueryWait() FAILED", eRet);
+		throw eRet;
+	} // __________________________________
+
+	public void execUpdWait(PreparedStatement p_PS, int p_iQtry)
+			throws SQLException
+	{
+		if (null == m_conn)
+		{
+			connect();
+		}
+
+		SQLException eRet = null;
+		int iQtry = (p_iQtry < 1) ? 1 : (p_iQtry < 50) ? p_iQtry : 50;
+		for (int i1 = 0; i1 < iQtry; i1++)
+		{
+			try
+			{
+				p_PS.executeUpdate();
+				return;
+			}
+			catch (SQLException e)
+			{
+				if (null == eRet)
+					eRet = e;
+				
+				try
+				{
+					Thread.sleep(100 + (new Double(100 * Math.random()))
+							.longValue());
+				}
+				catch (InterruptedException ex)
+				{
+					m_oLogger.warn("Thread interrupted.", ex);
+				}
+			}
+		}
+		m_oLogger.error("execUpdWait() FAILED", eRet);
+		throw eRet;
+	} // __________________________________
+
+	private void connect() throws SQLException
+	{
+		if (m_conn != null)
+		{
+			return;
+		}
+
+		SQLException eRet = null;
+		for (int i1 = 0; i1 < 5; i1++)
+		{
+			try
+			{
+				m_conn = m_oDS.getConnection();
+				eRet = null;
+				break;
+			}
+			catch (SQLException e)
+			{
+				if (null == eRet)
+					eRet = e;
+
+				// TODO magic number!!
+
+				try
+				{
+					Thread.sleep(2000 + (new Double(100 * Math.random()))
+							.longValue());
+				}
+				catch (InterruptedException ex)
+				{
+					m_oLogger.warn("Thread interrupted.", ex);
+				}
+			}
+		}
+
+		if (eRet != null)
+		{
+			m_oLogger.error("connect() FAILED", eRet);
+			throw eRet;
+		}
+
+		if (m_conn == null)
+		{
+			m_oLogger.error("connect() FAILED: no connection");
+
+			throw new RuntimeException();
+		}
+
+		m_conn.setAutoCommit(false);
+		m_conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
+
+		m_olPrepSt.clear();
+
+	} // __________________________________
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,166 +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.helpers.persist;
-
-import java.io.PrintWriter;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import javax.sql.DataSource;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * <p>
- * Obtain a connection that implements the DataSource interface
- * </p>
- * <p>
- * Description: Enable compatible use of JdbcCleanConn from outside a J2EE app
- * container
- * </p>
- * 
- * @version 1.0
- * @see JdbcCleanConn
- * @see ConfigTree
- */
-public class SimpleDataSource implements DataSource
-{
-	private PrintWriter m_oPW = new PrintWriter(System.out);
-
-	private int m_iTO = 10;
-
-	private String m_sUrl, m_sUsr, m_sPwd;
-
-	private Connection m_oConn;
-
-	public static final String DRIVER = "driver-class";
-
-	public static final String URL = "connection-url";
-
-	public static final String USER = "user-name";
-
-	public static final String PASSWORD = "password";
-
-	private static final Logger _logger = Logger
-			.getLogger(SimpleDataSource.class);
-
-	// Disable default constructor
-	private SimpleDataSource ()
-	{
-	}
-
-	/**
-	 * Obtain a DataSource by providing connection parameters. ConfigTree
-	 * argument must contain the following attributes
-	 * <p>
-	 * <li> driver-class</li>
-	 * <li> connection-url</li>
-	 * <li> user-name</li>
-	 * <li> password</li>
-	 * </p>
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - Parameter tree that contains the 4 attributes
-	 *            needed
-	 * @see ConfigTree
-	 * @see SimpleDataSource#SimpleDataSource(String,String,String,String)
-	 * @see javax.sql.DataSource
-	 */
-	public SimpleDataSource (ConfigTree p_oP)
-	{
-		this(p_oP.getAttribute(DRIVER), p_oP.getAttribute(URL), p_oP
-				.getAttribute(USER), p_oP.getAttribute(PASSWORD));
-	} // ________________________________
-
-	/**
-	 * Obtain a connection to a DB using the provided arguments to call
-	 * 
-	 * @param p_sDriver
-	 *            String - Java class of the JDBC driver to use (e.g.
-	 *            org.postgresql.Driver)
-	 * @param p_sDbURL
-	 *            String - The URL of the database (e.g.
-	 *            jdbc:postgresql://chodedb1:5432/cq3)
-	 * @param p_sUsr
-	 *            String - Username
-	 * @param p_sPwd
-	 *            String - Password
-	 * @see DriverManager#getConnection(String,String,String)
-	 * @see javax.sql.DataSource
-	 */
-	public SimpleDataSource (String p_sDriver, String p_sDbURL, String p_sUsr,
-			String p_sPwd)
-	{
-		try
-		{
-			Class.forName(p_sDriver);
-			m_sUrl = p_sDbURL;
-			getConnection(p_sUsr, p_sPwd);
-		}
-		catch (ClassNotFoundException ex)
-		{
-			throw new IllegalArgumentException(ex);
-		}
-	} // ________________________________
-
-	public Connection getConnection ()
-	{
-		return m_oConn;
-	}
-
-	public Connection getConnection (String username, String password)
-	{
-		m_sUsr = username;
-		m_sPwd = password;
-		try
-		{
-			m_oConn = DriverManager.getConnection(m_sUrl, m_sUsr, m_sPwd);
-		}
-		catch (Exception e)
-		{
-			_logger.error("Can't obtain datasource", e);
-			m_oConn = null;
-		}
-		return m_oConn;
-	} // ________________________________
-
-	public int getLoginTimeout ()
-	{
-		return m_iTO;
-	}
-
-	public PrintWriter getLogWriter ()
-	{
-		return m_oPW;
-	}
-
-	public void setLoginTimeout (int seconds)
-	{
-		m_iTO = seconds;
-	}
-
-	public void setLogWriter (PrintWriter out)
-	{
-		m_oPW = out;
-	}
-} // ______________________________________________________
+/*
+ * 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.helpers.persist;
+
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.DriverManager;
+
+import javax.sql.DataSource;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * <p>
+ * Obtain a connection that implements the DataSource interface
+ * </p>
+ * <p>
+ * Description: Enable compatible use of JdbcCleanConn from outside a J2EE app
+ * container
+ * </p>
+ * 
+ * @version 1.0
+ * @see JdbcCleanConn
+ * @see ConfigTree
+ */
+public class SimpleDataSource implements DataSource
+{
+	private PrintWriter m_oPW = new PrintWriter(System.out);
+
+	private int m_iTO = 10;
+
+	private String m_sUrl, m_sUsr, m_sPwd;
+
+	private Connection m_oConn;
+
+	public static final String DRIVER = "driver-class";
+
+	public static final String URL = "connection-url";
+
+	public static final String USER = "user-name";
+
+	public static final String PASSWORD = "password";
+
+	private static final Logger _logger = Logger
+			.getLogger(SimpleDataSource.class);
+
+	// Disable default constructor
+	private SimpleDataSource ()
+	{
+	}
+
+	/**
+	 * Obtain a DataSource by providing connection parameters. ConfigTree
+	 * argument must contain the following attributes
+	 * <p>
+	 * <li> driver-class</li>
+	 * <li> connection-url</li>
+	 * <li> user-name</li>
+	 * <li> password</li>
+	 * </p>
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - Parameter tree that contains the 4 attributes
+	 *            needed
+	 * @see ConfigTree
+	 * @see SimpleDataSource#SimpleDataSource(String,String,String,String)
+	 * @see javax.sql.DataSource
+	 */
+	public SimpleDataSource (ConfigTree p_oP)
+	{
+		this(p_oP.getAttribute(DRIVER), p_oP.getAttribute(URL), p_oP
+				.getAttribute(USER), p_oP.getAttribute(PASSWORD));
+	} // ________________________________
+
+	/**
+	 * Obtain a connection to a DB using the provided arguments to call
+	 * 
+	 * @param p_sDriver
+	 *            String - Java class of the JDBC driver to use (e.g.
+	 *            org.postgresql.Driver)
+	 * @param p_sDbURL
+	 *            String - The URL of the database (e.g.
+	 *            jdbc:postgresql://chodedb1:5432/cq3)
+	 * @param p_sUsr
+	 *            String - Username
+	 * @param p_sPwd
+	 *            String - Password
+	 * @see DriverManager#getConnection(String,String,String)
+	 * @see javax.sql.DataSource
+	 */
+	public SimpleDataSource (String p_sDriver, String p_sDbURL, String p_sUsr,
+			String p_sPwd)
+	{
+		try
+		{
+			Class.forName(p_sDriver);
+			m_sUrl = p_sDbURL;
+			getConnection(p_sUsr, p_sPwd);
+		}
+		catch (ClassNotFoundException ex)
+		{
+			throw new IllegalArgumentException(ex);
+		}
+	} // ________________________________
+
+	public Connection getConnection ()
+	{
+		return m_oConn;
+	}
+
+	public Connection getConnection (String username, String password)
+	{
+		m_sUsr = username;
+		m_sPwd = password;
+		try
+		{
+			m_oConn = DriverManager.getConnection(m_sUrl, m_sUsr, m_sPwd);
+		}
+		catch (Exception e)
+		{
+			_logger.error("Can't obtain datasource", e);
+			m_oConn = null;
+		}
+		return m_oConn;
+	} // ________________________________
+
+	public int getLoginTimeout ()
+	{
+		return m_iTO;
+	}
+
+	public PrintWriter getLogWriter ()
+	{
+		return m_oPW;
+	}
+
+	public void setLoginTimeout (int seconds)
+	{
+		m_iTO = seconds;
+	}
+
+	public void setLogWriter (PrintWriter out)
+	{
+		m_oPW = out;
+	}
+} // ______________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SimpleDataSource.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,202 +1,202 @@
-/*
- * 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.helpers.persist;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-
-import org.jboss.soa.esb.ConfigurationException;
-
-public abstract class SqlDbTable
-{
-	protected String m_sTableName;
-
-	protected SqlField[] m_oaFields;
-
-	protected PreparedStatement[] m_oaPS;
-
-	private JdbcCleanConn m_oConn;
-
-	public JdbcCleanConn getConn ()
-	{
-		return m_oConn;
-	}
-
-	public final String getTableName ()
-	{
-		return m_sTableName;
-	}
-
-	public final SqlField[] getAllFields ()
-	{
-		return m_oaFields;
-	}
-
-	private String m_sInsertSql, m_sUpdateSql, m_sDeleteSql;
-
-	protected String m_sSelectSql;
-
-	public SqlDbTable (JdbcCleanConn p_oC, String p_sTblNm) throws SQLException, ConfigurationException
-	{
-		m_oConn = p_oC;
-		m_sTableName = p_sTblNm;
-		initFields();
-	} // ________________________________
-
-	public abstract int setInsValues (PreparedStatement p_PS, Object bobj)
-			throws SQLException;
-
-	public abstract Object getFromRS (ResultSet p_oRS) throws SQLException;
-
-	protected abstract String getSelectFields ();
-
-	public String getFldName (int p_i)
-	{
-		return (null == m_oaFields) ? null : (p_i < 0) ? null : (p_i >= m_oaFields.length) ? null : m_oaFields[p_i]
-				.getFieldName();
-	} // ________________________________
-
-	public String getSelectStatement ()
-	{
-		if (m_sSelectSql != null) return m_sSelectSql;
-		StringBuffer sb = new StringBuffer("select ").append(getSelectFields());
-		m_sSelectSql = sb.append(" from ").append(getTableName()).toString();
-		return m_sSelectSql;
-	} // ________________________________
-
-	public String getInsertStatement ()
-	{
-		if (m_sInsertSql != null) return m_sInsertSql;
-
-		StringBuffer sb = new StringBuffer(256);
-		sb.append("insert into ").append(getTableName());
-
-		sb.append(" values (");
-		for (int i = 0; i < m_oaFields.length; i++)
-			((i < 1) ? sb : sb.append(",")).append('?');
-		sb.append(')');
-
-		return (m_sInsertSql = sb.toString());
-	} // ________________________________
-
-	public String getUpdateStatement ()
-	{
-		if (m_sUpdateSql != null) return m_sUpdateSql;
-
-		StringBuffer sb = new StringBuffer(256);
-		sb.append("update ").append(getTableName()).append(" set ");
-
-		StringBuffer sbWhere = new StringBuffer(" where ");
-
-		int iVal = 0;
-		int iWh = 0;
-		for (int i = 0; i < m_oaFields.length; i++)
-		{
-			SqlField oCurr = m_oaFields[i];
-			if (oCurr.isPrimaryKey()) ((iWh++ < 1) ? sbWhere : sbWhere
-					.append(" and ")).append(oCurr.getFieldName()).append(
-					" = ?");
-			else
-				((iVal++ < 1) ? sb : sb.append(",")).append(
-						oCurr.getFieldName()).append(" = ?");
-		}
-		sb.append(sbWhere);
-
-		return (m_sUpdateSql = sb.toString());
-	} // ________________________________
-
-	public String getDeleteStatement ()
-	{
-		if (m_sDeleteSql != null) return m_sDeleteSql;
-
-		StringBuffer sb = new StringBuffer(256);
-		sb.append("delete from ").append(getTableName()).append(" where ");
-
-		int iWh = 0;
-		for (int i = 0; i < m_oaFields.length; i++)
-		{
-			SqlField oCurr = m_oaFields[i];
-			if (!oCurr.isPrimaryKey()) continue;
-			((iWh++ < 1) ? sb : sb.append(" and "))
-					.append(oCurr.getFieldName()).append(" = ?");
-		}
-
-		return (m_sDeleteSql = sb.toString());
-	} // ________________________________
-
-	public void setObject (PreparedStatement p_PS, int p_iFld, Object p_sFldVal)
-			throws SQLException
-	{
-		if (null != p_sFldVal) if (p_sFldVal instanceof String)
-		{
-			String sTr = ((String) p_sFldVal).trim();
-			p_sFldVal = (sTr.length() > 0) ? sTr : null;
-		}
-		;
-		int iSqlIdx = 1 + p_iFld;
-		if (null == p_sFldVal) p_PS.setNull(iSqlIdx, m_oaFields[p_iFld]
-				.getSqlType());
-		else
-			p_PS.setObject(iSqlIdx, p_sFldVal);
-	} // ________________________________
-
-	public void setLong (PreparedStatement p_PS, int p_iFld, long p_lVal)
-			throws SQLException
-	{
-		p_PS.setLong(1 + p_iFld, p_lVal);
-	} // ________________________________
-
-	public void setInt (PreparedStatement p_PS, int p_iFld, int p_iVal)
-			throws SQLException
-	{
-		p_PS.setInt(1 + p_iFld, p_iVal);
-	} // ________________________________
-
-	private void initFields () throws SQLException, ConfigurationException
-	{
-		PreparedStatement PS = m_oConn.prepareStatement(getSelectStatement());
-
-		ResultSetMetaData MD = m_oConn.execQueryWait(PS, 3).getMetaData();
-		m_oaFields = new SqlField[MD.getColumnCount()];
-		
-		try
-		{
-			for (int i1 = 0; i1 < m_oaFields.length; i1++)
-			{
-				int iCol = 1 + i1;
-				String sFN = MD.getColumnName(iCol);
-				Class oCL = Class.forName(MD.getColumnClassName(iCol));
-				int iTP = MD.getColumnType(iCol);
-				int iSZ = MD.getColumnDisplaySize(iCol);
-				m_oaFields[i1] = new SqlField(sFN, oCL, iTP, iSZ, false);
-			}
-		}
-		catch (ClassNotFoundException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-		
-		PS.close();
-	} // ________________________________
-} // ____________________________________________________________________________
+/*
+ * 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.helpers.persist;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+
+import org.jboss.soa.esb.ConfigurationException;
+
+public abstract class SqlDbTable
+{
+	protected String m_sTableName;
+
+	protected SqlField[] m_oaFields;
+
+	protected PreparedStatement[] m_oaPS;
+
+	private JdbcCleanConn m_oConn;
+
+	public JdbcCleanConn getConn ()
+	{
+		return m_oConn;
+	}
+
+	public final String getTableName ()
+	{
+		return m_sTableName;
+	}
+
+	public final SqlField[] getAllFields ()
+	{
+		return m_oaFields;
+	}
+
+	private String m_sInsertSql, m_sUpdateSql, m_sDeleteSql;
+
+	protected String m_sSelectSql;
+
+	public SqlDbTable (JdbcCleanConn p_oC, String p_sTblNm) throws SQLException, ConfigurationException
+	{
+		m_oConn = p_oC;
+		m_sTableName = p_sTblNm;
+		initFields();
+	} // ________________________________
+
+	public abstract int setInsValues (PreparedStatement p_PS, Object bobj)
+			throws SQLException;
+
+	public abstract Object getFromRS (ResultSet p_oRS) throws SQLException;
+
+	protected abstract String getSelectFields ();
+
+	public String getFldName (int p_i)
+	{
+		return (null == m_oaFields) ? null : (p_i < 0) ? null : (p_i >= m_oaFields.length) ? null : m_oaFields[p_i]
+				.getFieldName();
+	} // ________________________________
+
+	public String getSelectStatement ()
+	{
+		if (m_sSelectSql != null) return m_sSelectSql;
+		StringBuffer sb = new StringBuffer("select ").append(getSelectFields());
+		m_sSelectSql = sb.append(" from ").append(getTableName()).toString();
+		return m_sSelectSql;
+	} // ________________________________
+
+	public String getInsertStatement ()
+	{
+		if (m_sInsertSql != null) return m_sInsertSql;
+
+		StringBuffer sb = new StringBuffer(256);
+		sb.append("insert into ").append(getTableName());
+
+		sb.append(" values (");
+		for (int i = 0; i < m_oaFields.length; i++)
+			((i < 1) ? sb : sb.append(",")).append('?');
+		sb.append(')');
+
+		return (m_sInsertSql = sb.toString());
+	} // ________________________________
+
+	public String getUpdateStatement ()
+	{
+		if (m_sUpdateSql != null) return m_sUpdateSql;
+
+		StringBuffer sb = new StringBuffer(256);
+		sb.append("update ").append(getTableName()).append(" set ");
+
+		StringBuffer sbWhere = new StringBuffer(" where ");
+
+		int iVal = 0;
+		int iWh = 0;
+		for (int i = 0; i < m_oaFields.length; i++)
+		{
+			SqlField oCurr = m_oaFields[i];
+			if (oCurr.isPrimaryKey()) ((iWh++ < 1) ? sbWhere : sbWhere
+					.append(" and ")).append(oCurr.getFieldName()).append(
+					" = ?");
+			else
+				((iVal++ < 1) ? sb : sb.append(",")).append(
+						oCurr.getFieldName()).append(" = ?");
+		}
+		sb.append(sbWhere);
+
+		return (m_sUpdateSql = sb.toString());
+	} // ________________________________
+
+	public String getDeleteStatement ()
+	{
+		if (m_sDeleteSql != null) return m_sDeleteSql;
+
+		StringBuffer sb = new StringBuffer(256);
+		sb.append("delete from ").append(getTableName()).append(" where ");
+
+		int iWh = 0;
+		for (int i = 0; i < m_oaFields.length; i++)
+		{
+			SqlField oCurr = m_oaFields[i];
+			if (!oCurr.isPrimaryKey()) continue;
+			((iWh++ < 1) ? sb : sb.append(" and "))
+					.append(oCurr.getFieldName()).append(" = ?");
+		}
+
+		return (m_sDeleteSql = sb.toString());
+	} // ________________________________
+
+	public void setObject (PreparedStatement p_PS, int p_iFld, Object p_sFldVal)
+			throws SQLException
+	{
+		if (null != p_sFldVal) if (p_sFldVal instanceof String)
+		{
+			String sTr = ((String) p_sFldVal).trim();
+			p_sFldVal = (sTr.length() > 0) ? sTr : null;
+		}
+		;
+		int iSqlIdx = 1 + p_iFld;
+		if (null == p_sFldVal) p_PS.setNull(iSqlIdx, m_oaFields[p_iFld]
+				.getSqlType());
+		else
+			p_PS.setObject(iSqlIdx, p_sFldVal);
+	} // ________________________________
+
+	public void setLong (PreparedStatement p_PS, int p_iFld, long p_lVal)
+			throws SQLException
+	{
+		p_PS.setLong(1 + p_iFld, p_lVal);
+	} // ________________________________
+
+	public void setInt (PreparedStatement p_PS, int p_iFld, int p_iVal)
+			throws SQLException
+	{
+		p_PS.setInt(1 + p_iFld, p_iVal);
+	} // ________________________________
+
+	private void initFields () throws SQLException, ConfigurationException
+	{
+		PreparedStatement PS = m_oConn.prepareStatement(getSelectStatement());
+
+		ResultSetMetaData MD = m_oConn.execQueryWait(PS, 3).getMetaData();
+		m_oaFields = new SqlField[MD.getColumnCount()];
+		
+		try
+		{
+			for (int i1 = 0; i1 < m_oaFields.length; i1++)
+			{
+				int iCol = 1 + i1;
+				String sFN = MD.getColumnName(iCol);
+				Class oCL = Class.forName(MD.getColumnClassName(iCol));
+				int iTP = MD.getColumnType(iCol);
+				int iSZ = MD.getColumnDisplaySize(iCol);
+				m_oaFields[i1] = new SqlField(sFN, oCL, iTP, iSZ, false);
+			}
+		}
+		catch (ClassNotFoundException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+		
+		PS.close();
+	} // ________________________________
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlDbTable.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlField.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlField.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlField.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,83 +1,83 @@
-/*
- * 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.helpers.persist;
-
-public class SqlField {
-	private int m_sqlType;
-
-	private Class m_javaType;
-
-	private int m_sqlLength;
-
-	private String m_fieldName;
-
-	private boolean m_primaryKey;
-
-	public SqlField(String pFldName, Class pJavaType, int pSqlType,
-			int pFieldLength, boolean pk) {
-		m_fieldName = pFldName;
-		m_javaType = pJavaType;
-		m_sqlType = pSqlType;
-		m_sqlLength = pFieldLength;
-		m_primaryKey = pk;
-	}
-
-	public int getSqlType() {
-		return m_sqlType;
-	}
-
-	public Class getJavaType() {
-		return m_javaType;
-	}
-
-	public int getSqlLength() {
-		return this.m_sqlLength;
-	}
-
-	public String getFieldName() {
-		return this.m_fieldName;
-	}
-
-	public boolean isPrimaryKey() {
-		return this.m_primaryKey;
-	}
-
-	public void setSqlType(int pSqlType) {
-		m_sqlType = pSqlType;
-	}
-
-	public void setJavaType(Class pJavaType) {
-		m_javaType = pJavaType;
-	}
-
-	public void setSqlLength(int pSqlLength) {
-		m_sqlLength = pSqlLength;
-	}
-
-	public void setFieldName(String pFieldName) {
-		m_fieldName = pFieldName;
-	}
-
-	public void setPrimaryKey(boolean pPrimaryKey) {
-		m_primaryKey = pPrimaryKey;
-	}
-} // ____________________________________________________________________________
+/*
+ * 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.helpers.persist;
+
+public class SqlField {
+	private int m_sqlType;
+
+	private Class m_javaType;
+
+	private int m_sqlLength;
+
+	private String m_fieldName;
+
+	private boolean m_primaryKey;
+
+	public SqlField(String pFldName, Class pJavaType, int pSqlType,
+			int pFieldLength, boolean pk) {
+		m_fieldName = pFldName;
+		m_javaType = pJavaType;
+		m_sqlType = pSqlType;
+		m_sqlLength = pFieldLength;
+		m_primaryKey = pk;
+	}
+
+	public int getSqlType() {
+		return m_sqlType;
+	}
+
+	public Class getJavaType() {
+		return m_javaType;
+	}
+
+	public int getSqlLength() {
+		return this.m_sqlLength;
+	}
+
+	public String getFieldName() {
+		return this.m_fieldName;
+	}
+
+	public boolean isPrimaryKey() {
+		return this.m_primaryKey;
+	}
+
+	public void setSqlType(int pSqlType) {
+		m_sqlType = pSqlType;
+	}
+
+	public void setJavaType(Class pJavaType) {
+		m_javaType = pJavaType;
+	}
+
+	public void setSqlLength(int pSqlLength) {
+		m_sqlLength = pSqlLength;
+	}
+
+	public void setFieldName(String pFieldName) {
+		m_fieldName = pFieldName;
+	}
+
+	public void setPrimaryKey(boolean pPrimaryKey) {
+		m_primaryKey = pPrimaryKey;
+	}
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/helpers/persist/SqlField.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Attachment.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Attachment.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Attachment.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,110 +1,110 @@
-package org.jboss.soa.esb.message;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Messages may contain attachments that do not appear in the main payload body.
- * For example, binary document formats, zip files etc.
- * <br/>Handles both 'named' attachment and a list of 'unnamed' attachments
- * 
- * @author Mark Little
- */
-
-public interface Attachment
-{
-	/**
-	 * Returns the attachment to which this object maps the specified key. 
-	 * Returns null if the there's no value mapped for this key.
-	 * @param name String - The name of the attachment to get
-	 * @return Object - the value mapped to arg0 or &lt;null&gt; if none
-	 */
-	Object get(String name);
-	/**
-	 * Associates the specified value with the specified name
-	 * If there was already a mapping for this name, the old value is replaced by 
-	 * arg1
-	 * @param name String - the name for the object to be stored
-	 * @param value Object - the object to be associated with the name (arg0)
-	 * @return Object - previous value associated with specified name,
-	 * or null  if there was none
-	 */
-	Object put(String name, Object value);
-	/**
-	 * Removes the mapping for this name if it was present
-	 * @param name String - the name of the object to be removed
-	 * @return the value previously associated the name, or null if there was none
-	 */
-	Object remove(String name);
-	/**
-	 * @return String[] - the list of names of the named Objects
-	 */
-	String[] getNames();
-
-	/**
-     * get the item at the specified position in the list of unnamed objects
-     * @param index int - index of element to return
-     * @return Object the element at the specified position in the list of unnamed objects
-     * @throws IndexOutOfBoundsException - if the index is out of range
-     */
-	Object itemAt 		(int index) throws IndexOutOfBoundsException;
-	/**
-	 * Removes the element at the specified position in the list of unnamed objects
-	 * Shifts any subsequent elements to the left 
-	 * @param index int - index of element to remove
-	 * @return Object - the element that was removed from the list
-	 * @throws IndexOutOfBoundsException - if the index is out of range
-	 */
-	Object removeItemAt	(int index) throws IndexOutOfBoundsException;
-	/**
-	 * Replaces the element at the specified position in the list of unnamed objects 
-	 * with the value supplied
-	 * @param index int - index of element to be replaced
-	 * @param  value Object - the object to replace the one previously stored at that index
-	 * @return Object - previous value at that index
-	 * @throws IndexOutOfBoundsException - if the index is out of range
-	 */
-	Object replaceItemAt(int index, Object value) throws IndexOutOfBoundsException;
-	/**
-	 * Appends the specified element to the end of the list of unnamed objects
-	 * <br/>null values are allowed 
-	 * @param value Object - the object to be appended
-	 */
-	void addItem		(Object value);
-	/**
-	 * Replaces the element at the specified position in the list of unnamed objects
-	 * <br/> allows null values
-	 * @param index int - index where to insert the value - Shifts any subsequent elements to the right
-	 * @param value Object - value to be stored at the specified position
-	 * @throws IndexOutOfBoundsException
-	 */
-	void addItemAt	(int index, Object value) throws IndexOutOfBoundsException;
-	/**
-	 * getUnnamedCount()
-	 * @return the count of unnamed objects
-	 */
-	int	getUnnamedCount();
-	/**
-	 * getNamedCount()
-	 * @return the count of named objects
-	 */
-	public int getNamedCount(); 
-}
+package org.jboss.soa.esb.message;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Messages may contain attachments that do not appear in the main payload body.
+ * For example, binary document formats, zip files etc.
+ * <br/>Handles both 'named' attachment and a list of 'unnamed' attachments
+ * 
+ * @author Mark Little
+ */
+
+public interface Attachment
+{
+	/**
+	 * Returns the attachment to which this object maps the specified key. 
+	 * Returns null if the there's no value mapped for this key.
+	 * @param name String - The name of the attachment to get
+	 * @return Object - the value mapped to arg0 or &lt;null&gt; if none
+	 */
+	Object get(String name);
+	/**
+	 * Associates the specified value with the specified name
+	 * If there was already a mapping for this name, the old value is replaced by 
+	 * arg1
+	 * @param name String - the name for the object to be stored
+	 * @param value Object - the object to be associated with the name (arg0)
+	 * @return Object - previous value associated with specified name,
+	 * or null  if there was none
+	 */
+	Object put(String name, Object value);
+	/**
+	 * Removes the mapping for this name if it was present
+	 * @param name String - the name of the object to be removed
+	 * @return the value previously associated the name, or null if there was none
+	 */
+	Object remove(String name);
+	/**
+	 * @return String[] - the list of names of the named Objects
+	 */
+	String[] getNames();
+
+	/**
+     * get the item at the specified position in the list of unnamed objects
+     * @param index int - index of element to return
+     * @return Object the element at the specified position in the list of unnamed objects
+     * @throws IndexOutOfBoundsException - if the index is out of range
+     */
+	Object itemAt 		(int index) throws IndexOutOfBoundsException;
+	/**
+	 * Removes the element at the specified position in the list of unnamed objects
+	 * Shifts any subsequent elements to the left 
+	 * @param index int - index of element to remove
+	 * @return Object - the element that was removed from the list
+	 * @throws IndexOutOfBoundsException - if the index is out of range
+	 */
+	Object removeItemAt	(int index) throws IndexOutOfBoundsException;
+	/**
+	 * Replaces the element at the specified position in the list of unnamed objects 
+	 * with the value supplied
+	 * @param index int - index of element to be replaced
+	 * @param  value Object - the object to replace the one previously stored at that index
+	 * @return Object - previous value at that index
+	 * @throws IndexOutOfBoundsException - if the index is out of range
+	 */
+	Object replaceItemAt(int index, Object value) throws IndexOutOfBoundsException;
+	/**
+	 * Appends the specified element to the end of the list of unnamed objects
+	 * <br/>null values are allowed 
+	 * @param value Object - the object to be appended
+	 */
+	void addItem		(Object value);
+	/**
+	 * Replaces the element at the specified position in the list of unnamed objects
+	 * <br/> allows null values
+	 * @param index int - index where to insert the value - Shifts any subsequent elements to the right
+	 * @param value Object - value to be stored at the specified position
+	 * @throws IndexOutOfBoundsException
+	 */
+	void addItemAt	(int index, Object value) throws IndexOutOfBoundsException;
+	/**
+	 * getUnnamedCount()
+	 * @return the count of unnamed objects
+	 */
+	int	getUnnamedCount();
+	/**
+	 * getNamedCount()
+	 * @return the count of named objects
+	 */
+	public int getNamedCount(); 
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Attachment.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Body.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Body.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Body.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,108 +1,108 @@
-package org.jboss.soa.esb.message;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * The message body holds arbitrary information which represents the
- * payload as far as clients and services are concerned. A body may contain:
- * 
- * (i) a byte array for arbitrary data. How that array is interpreted by the
- * service is implementation specific and outside the scope of the ESB to
- * enforce.
- * 
- * (ii) a list of Objects of arbitrary types. How these objects are serialized
- * to/from the message body when it is transmitted is up to the specific
- * Object type. The plan is to add support for various TYPES of Object and the message
- * implementation will use external adapters to externalize/internalize the Objects.
- * Currently we only support Serializable objects.
- */
-
-public interface Body
-{
-	// TODO error handling exceptions
-	
-	/**
-	 * Add the specified Object to the body.
-	 * 
-	 * @param name the name of the object. MUST be unique within this body.
-	 * @param value the Object to add.
-	 */
-	
-	public void add (String name, Object value);
-	
-	/**
-	 * Get the specified Object, or <code>null</code> if not present.
-	 * 
-	 * @param name the name of the Object to retrieve.
-	 * @return the Object.
-	 */
-	
-	public Object get (String name);
-	
-	/**
-	 * Remove the specified Object and return it, or <code>null</code> if not present.
-	 * 
-	 * @param name the name of the Object to remove.
-	 * @return the Object removed.
-	 */
-	
-	public Object remove (String name);
-	
-	/**
-	 * Set the byte content of the body.
-	 * 
-	 * @param content the message bytes
-	 */
-	
-	public void setContents (byte[] content);
-	
-	/**
-	 * @return the byte content of the body.
-	 */
-	
-	public byte[] getContents ();
-
-	/**
-	 * Replace this body instance with the one given.
-	 * 
-	 * @param b the body to be replaced with.
-	 */
-	
-	public void replace (Body b);
-	
-	/**
-	 * Merge two bodies.
-	 * 
-	 * @param b the body to be merged with.
-	 */
-	
-	public void merge (Body b);
-	
-	/**
-	 * @return get the list of names in this instance.
-	 */
-	
-	public String[] getNames ();
-	
-	// TODO replace an entry in the body
-
+package org.jboss.soa.esb.message;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * The message body holds arbitrary information which represents the
+ * payload as far as clients and services are concerned. A body may contain:
+ * 
+ * (i) a byte array for arbitrary data. How that array is interpreted by the
+ * service is implementation specific and outside the scope of the ESB to
+ * enforce.
+ * 
+ * (ii) a list of Objects of arbitrary types. How these objects are serialized
+ * to/from the message body when it is transmitted is up to the specific
+ * Object type. The plan is to add support for various TYPES of Object and the message
+ * implementation will use external adapters to externalize/internalize the Objects.
+ * Currently we only support Serializable objects.
+ */
+
+public interface Body
+{
+	// TODO error handling exceptions
+	
+	/**
+	 * Add the specified Object to the body.
+	 * 
+	 * @param name the name of the object. MUST be unique within this body.
+	 * @param value the Object to add.
+	 */
+	
+	public void add (String name, Object value);
+	
+	/**
+	 * Get the specified Object, or <code>null</code> if not present.
+	 * 
+	 * @param name the name of the Object to retrieve.
+	 * @return the Object.
+	 */
+	
+	public Object get (String name);
+	
+	/**
+	 * Remove the specified Object and return it, or <code>null</code> if not present.
+	 * 
+	 * @param name the name of the Object to remove.
+	 * @return the Object removed.
+	 */
+	
+	public Object remove (String name);
+	
+	/**
+	 * Set the byte content of the body.
+	 * 
+	 * @param content the message bytes
+	 */
+	
+	public void setContents (byte[] content);
+	
+	/**
+	 * @return the byte content of the body.
+	 */
+	
+	public byte[] getContents ();
+
+	/**
+	 * Replace this body instance with the one given.
+	 * 
+	 * @param b the body to be replaced with.
+	 */
+	
+	public void replace (Body b);
+	
+	/**
+	 * Merge two bodies.
+	 * 
+	 * @param b the body to be merged with.
+	 */
+	
+	public void merge (Body b);
+	
+	/**
+	 * @return get the list of names in this instance.
+	 */
+	
+	public String[] getNames ();
+	
+	// TODO replace an entry in the body
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Body.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Context.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Context.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Context.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,33 +1,33 @@
-package org.jboss.soa.esb.message;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * The context is the section of the message containing information such as session
- * management, transaction information, security data etc. Entries in the context
- * may be ordered.
- */
-
-public interface Context
-{
-	// TODO add some methods!
+package org.jboss.soa.esb.message;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * The context is the section of the message containing information such as session
+ * management, transaction information, security data etc. Entries in the context
+ * may be ordered.
+ */
+
+public interface Context
+{
+	// TODO add some methods!
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Context.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Fault.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Fault.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Fault.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,61 +1,61 @@
-package org.jboss.soa.esb.message;
-
-import java.net.URI;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Faults may be returned from a service in response to receiving and acting upon messages.
- * A fault consists of a unique code (MANDATORY) and a reason string (OPTIONAL).
- */
-
-public interface Fault
-{
-	/**
-	 * @return the unique code representing this fault.
-	 */
-	
-	public URI getCode ();
-	
-	/**
-	 * Set the unique code for this fault.
-	 * 
-	 * @param code the code.
-	 */
-	
-	public void setCode (URI code);
-	
-	/**
-	 * @return a String representing the reason for the fault. Typically used for
-	 * logging purposes.
-	 */
-	
-	public String getReason ();
-	
-	/**
-	 * Set the optional reason for this fault.
-	 * 
-	 * @param reason the reason for the fault.
-	 */
-	
-	public void setReason (String reason);
+package org.jboss.soa.esb.message;
+
+import java.net.URI;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Faults may be returned from a service in response to receiving and acting upon messages.
+ * A fault consists of a unique code (MANDATORY) and a reason string (OPTIONAL).
+ */
+
+public interface Fault
+{
+	/**
+	 * @return the unique code representing this fault.
+	 */
+	
+	public URI getCode ();
+	
+	/**
+	 * Set the unique code for this fault.
+	 * 
+	 * @param code the code.
+	 */
+	
+	public void setCode (URI code);
+	
+	/**
+	 * @return a String representing the reason for the fault. Typically used for
+	 * logging purposes.
+	 */
+	
+	public String getReason ();
+	
+	/**
+	 * Set the optional reason for this fault.
+	 * 
+	 * @param reason the reason for the fault.
+	 */
+	
+	public void setReason (String reason);
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Fault.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Header.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Header.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Header.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,45 +1,45 @@
-package org.jboss.soa.esb.message;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-import org.jboss.soa.esb.addressing.Call;
-
-/**
- * The message header. Contains such things as routing information.
- */
-
-public interface Header
-{
-	/**
-	 * @return get the Call information for this message.
-	 */
-	
-	public Call getCall ();
-	
-	/**
-	 * Set the call information for this message.
-	 * 
-	 * @param call the information.
-	 */
-	
-	public void setCall (Call call);
+package org.jboss.soa.esb.message;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+import org.jboss.soa.esb.addressing.Call;
+
+/**
+ * The message header. Contains such things as routing information.
+ */
+
+public interface Header
+{
+	/**
+	 * @return get the Call information for this message.
+	 */
+	
+	public Call getCall ();
+	
+	/**
+	 * Set the call information for this message.
+	 * 
+	 * @param call the information.
+	 */
+	
+	public void setCall (Call call);
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Header.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Message.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Message.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Message.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,92 +1,92 @@
-package org.jboss.soa.esb.message;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-import java.net.URI;
-
-/**
- * This is the basic internal core message abstraction. A message consists of the following
- * components:
- * 
- * Header: the header information contains information such as the destination EPR, the
- * sender EPR, where the reply goes etc, i.e., general message-level functional information.
- * Context: additional information to contextualise the message; for example, transaction or
- * security data, the identity of the ultimate receiver, or HTTP-cookie like information.
- * Body: the actual payload of the message.
- * Fault: any fault information associated with the message.
- * Attachment: any attachments associated with the message.
- * Properties: any message specific properties.
- * 
- * Each message, once created, has a corresponding element for these 5 components. That element
- * may be empty (<b>NOT NULL</b>). The object representing the element can then be used to act
- * on the corresponding data item in the message.
- * 
- * @author Mark Little
- *
- */
-
-public interface Message
-{
-	/**
-	 * @return get the header component of the message.
-	 */
-	
-	public Header getHeader ();
-
-	/**
-	 * @return get the context component of the message.
-	 */
-	
-	public Context getContext ();
-	
-	/**
-	 * @return get the body component of the message.
-	 */
-	
-	public Body getBody ();
-
-	/**
-	 * @return get any faults associated with the message. These should not
-	 * be application level faults, but comms level.
-	 */
-	
-	public Fault getFault ();
-	
-	/**
-	 * @return get any message attachments.
-	 */
-	
-	public Attachment getAttachment ();
-	
-	/**
-	 * @return the type of this message.
-	 */
-	
-	public URI getType ();
-	
-	/**
-	 * @return Properties - any message properties.
-	 */
-	
-	public Properties getProperties ();
-	
-}
+package org.jboss.soa.esb.message;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+import java.net.URI;
+
+/**
+ * This is the basic internal core message abstraction. A message consists of the following
+ * components:
+ * 
+ * Header: the header information contains information such as the destination EPR, the
+ * sender EPR, where the reply goes etc, i.e., general message-level functional information.
+ * Context: additional information to contextualise the message; for example, transaction or
+ * security data, the identity of the ultimate receiver, or HTTP-cookie like information.
+ * Body: the actual payload of the message.
+ * Fault: any fault information associated with the message.
+ * Attachment: any attachments associated with the message.
+ * Properties: any message specific properties.
+ * 
+ * Each message, once created, has a corresponding element for these 5 components. That element
+ * may be empty (<b>NOT NULL</b>). The object representing the element can then be used to act
+ * on the corresponding data item in the message.
+ * 
+ * @author Mark Little
+ *
+ */
+
+public interface Message
+{
+	/**
+	 * @return get the header component of the message.
+	 */
+	
+	public Header getHeader ();
+
+	/**
+	 * @return get the context component of the message.
+	 */
+	
+	public Context getContext ();
+	
+	/**
+	 * @return get the body component of the message.
+	 */
+	
+	public Body getBody ();
+
+	/**
+	 * @return get any faults associated with the message. These should not
+	 * be application level faults, but comms level.
+	 */
+	
+	public Fault getFault ();
+	
+	/**
+	 * @return get any message attachments.
+	 */
+	
+	public Attachment getAttachment ();
+	
+	/**
+	 * @return the type of this message.
+	 */
+	
+	public URI getType ();
+	
+	/**
+	 * @return Properties - any message properties.
+	 */
+	
+	public Properties getProperties ();
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Message.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Properties.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Properties.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Properties.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,88 +1,88 @@
-/*
- * 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 schifest at heuristica.com.ar
- */
-
-package org.jboss.soa.esb.message;
-
-/**
- * The message properties hold arbitrary information in the form of
- * &lt;String,Object&gt; pairs
- * 
- */
-
-public interface Properties
-{
-	/**
-	 * getProperty(name)
-	 * 
-	 * @param name
-	 *            String - name of property
-	 * @return Object - the value stored under the specified name
-	 */
-	public Object getProperty(String name);
-
-	/**
-	 * getProperty(name,defaultVal)
-	 * 
-	 * @param name
-	 *            String - name of property
-	 * @param defaultVal
-	 *            Object - value to return if no value found
-	 * @return Object - the value stored under the specified name
-	 */
-	public Object getProperty(String name, Object defaultVal);
-
-	/**
-	 * setProperty(name,value)
-	 * 
-	 * @param name
-	 *            String - name of property to store
-	 * @param value
-	 *            Object - value of property to store under specified name
-	 * @return Object - the previous value of the specified name, or null if it
-	 *         did not have one
-	 */
-	public Object setProperty(String name, Object value);
-
-	/**
-	 * remove(name)
-	 * 
-	 * @param name
-	 *            String - name of property to remove
-	 * @return Object - the previous value of the specified name, or null if it
-	 *         did not have one
-	 */
-	public Object remove(String name);
-
-	/**
-	 * size()
-	 * 
-	 * @return int - Returns the number of properties in this object
-	 */
-	public int size();
-
-	/**
-	 * getNames()
-	 * 
-	 * @return String[] - containing the names of all properties
-	 */
-	public String[] getNames();
-
-}
+/*
+ * 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 schifest at heuristica.com.ar
+ */
+
+package org.jboss.soa.esb.message;
+
+/**
+ * The message properties hold arbitrary information in the form of
+ * &lt;String,Object&gt; pairs
+ * 
+ */
+
+public interface Properties
+{
+	/**
+	 * getProperty(name)
+	 * 
+	 * @param name
+	 *            String - name of property
+	 * @return Object - the value stored under the specified name
+	 */
+	public Object getProperty(String name);
+
+	/**
+	 * getProperty(name,defaultVal)
+	 * 
+	 * @param name
+	 *            String - name of property
+	 * @param defaultVal
+	 *            Object - value to return if no value found
+	 * @return Object - the value stored under the specified name
+	 */
+	public Object getProperty(String name, Object defaultVal);
+
+	/**
+	 * setProperty(name,value)
+	 * 
+	 * @param name
+	 *            String - name of property to store
+	 * @param value
+	 *            Object - value of property to store under specified name
+	 * @return Object - the previous value of the specified name, or null if it
+	 *         did not have one
+	 */
+	public Object setProperty(String name, Object value);
+
+	/**
+	 * remove(name)
+	 * 
+	 * @param name
+	 *            String - name of property to remove
+	 * @return Object - the previous value of the specified name, or null if it
+	 *         did not have one
+	 */
+	public Object remove(String name);
+
+	/**
+	 * size()
+	 * 
+	 * @return int - Returns the number of properties in this object
+	 */
+	public int size();
+
+	/**
+	 * getNames()
+	 * 
+	 * @return String[] - containing the names of all properties
+	 */
+	public String[] getNames();
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/Properties.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageFactory.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageFactory.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageFactory.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,76 +1,76 @@
-package org.jboss.soa.esb.message.format;
-
-import java.net.URI;
-
-import org.jboss.internal.soa.esb.message.format.MessageFactoryImpl;
-import org.jboss.soa.esb.message.Message;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * You get a message of a specific type when you need it. Obviously that type may not be
- * suitable for the service (hopefully you've got that contractual information a priori, but
- * maybe not) and in which case some translation/transformation may be necessary.
- * 
- * @author Mark Little
- *
- */
-
-public abstract class MessageFactory
-{
-	/**
-	 * @return some default implementation.
-	 */
-	
-	public abstract Message getMessage ();
-	
-	/**
-	 * @param type the unique identifier representing the type of this message.
-	 * @return the message, or <code>null</code> if no suitable plugin is available.
-	 */
-	
-	public abstract Message getMessage (URI type);
-	
-	/**
-	 * @param msg the message to convert.
-	 * @param type the type of the message we want to convert to.
-	 * @return a translated message, or <code>null</code> if no suitable plugin is available.
-	 */
-	
-	public abstract Message getMessage (Message msg, URI type);
-	
-	/**
-	 * Reload the plugins.
-	 */
-	
-	public abstract void reset ();
-	
-	// TODO setters/getters for the plugin programmatically too.
-	
-	public static MessageFactory getInstance ()
-	{
-		return theFactory;
-	}
-	
-	private static final MessageFactory theFactory = new MessageFactoryImpl();
-	
-}
+package org.jboss.soa.esb.message.format;
+
+import java.net.URI;
+
+import org.jboss.internal.soa.esb.message.format.MessageFactoryImpl;
+import org.jboss.soa.esb.message.Message;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * You get a message of a specific type when you need it. Obviously that type may not be
+ * suitable for the service (hopefully you've got that contractual information a priori, but
+ * maybe not) and in which case some translation/transformation may be necessary.
+ * 
+ * @author Mark Little
+ *
+ */
+
+public abstract class MessageFactory
+{
+	/**
+	 * @return some default implementation.
+	 */
+	
+	public abstract Message getMessage ();
+	
+	/**
+	 * @param type the unique identifier representing the type of this message.
+	 * @return the message, or <code>null</code> if no suitable plugin is available.
+	 */
+	
+	public abstract Message getMessage (URI type);
+	
+	/**
+	 * @param msg the message to convert.
+	 * @param type the type of the message we want to convert to.
+	 * @return a translated message, or <code>null</code> if no suitable plugin is available.
+	 */
+	
+	public abstract Message getMessage (Message msg, URI type);
+	
+	/**
+	 * Reload the plugins.
+	 */
+	
+	public abstract void reset ();
+	
+	// TODO setters/getters for the plugin programmatically too.
+	
+	public static MessageFactory getInstance ()
+	{
+		return theFactory;
+	}
+	
+	private static final MessageFactory theFactory = new MessageFactoryImpl();
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessagePlugin.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessagePlugin.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessagePlugin.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,52 +1,52 @@
-package org.jboss.soa.esb.message.format;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.message.Message;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Used to plug in new message formats dynamically. Each plugin is responsible for
- * returning a message implementation that knows how to serialize its state in a
- * specific manner, e.g., XML or ASN.1.
- *  
- * @author Mark Little
- *
- */
-
-public interface MessagePlugin
-{
-	public static final String MESSAGE_PLUGIN = "org.jboss.soa.esb.message.format.plugin";
-	
-	/**
-	 * @return the message instance.
-	 */
-	
-	public Message getMessage ();
-	
-	/**
-	 * @return the unique identifier for this message plugin.
-	 */
-	
-	public URI getType ();
-}
+package org.jboss.soa.esb.message.format;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.message.Message;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Used to plug in new message formats dynamically. Each plugin is responsible for
+ * returning a message implementation that knows how to serialize its state in a
+ * specific manner, e.g., XML or ASN.1.
+ *  
+ * @author Mark Little
+ *
+ */
+
+public interface MessagePlugin
+{
+	public static final String MESSAGE_PLUGIN = "org.jboss.soa.esb.message.format.plugin";
+	
+	/**
+	 * @return the message instance.
+	 */
+	
+	public Message getMessage ();
+	
+	/**
+	 * @return the unique identifier for this message plugin.
+	 */
+	
+	public URI getType ();
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessagePlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,62 +1,62 @@
-package org.jboss.soa.esb.message.format;
-
-import java.net.URI;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * You get a message of a specific type when you need it. Obviously that type may not be
- * suitable for the service (hopefully you've got that contractual information a priori, but
- * maybe not) and in which case some translation/transformation may be necessary.
- * 
- * @author Mark Little
- *
- */
-
-public abstract class MessageType
-{
-	/*
-	 * DO NOT reorder this list. New types may be added as required.
-	 */
-	
-	public static URI JBOSS_XML = null;
-	public static URI JAVA_SERIALIZED = null;
-
-	public static URI DEFAULT_TYPE = null;
-	
-	static
-	{
-		try
-		{
-			JBOSS_XML = new URI("urn:jboss:esb:message:type:JBOSS_XML");
-			JAVA_SERIALIZED = new URI("urn:jboss:esb:message:type:JAVA_SERIALIZED");
-			
-			DEFAULT_TYPE = JBOSS_XML;
-		}
-		catch (Exception ex)
-		{
-			throw new ExceptionInInitializerError(ex.toString());
-		}
-
-	}
-	
-}
+package org.jboss.soa.esb.message.format;
+
+import java.net.URI;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * You get a message of a specific type when you need it. Obviously that type may not be
+ * suitable for the service (hopefully you've got that contractual information a priori, but
+ * maybe not) and in which case some translation/transformation may be necessary.
+ * 
+ * @author Mark Little
+ *
+ */
+
+public abstract class MessageType
+{
+	/*
+	 * DO NOT reorder this list. New types may be added as required.
+	 */
+	
+	public static URI JBOSS_XML = null;
+	public static URI JAVA_SERIALIZED = null;
+
+	public static URI DEFAULT_TYPE = null;
+	
+	static
+	{
+		try
+		{
+			JBOSS_XML = new URI("urn:jboss:esb:message:type:JBOSS_XML");
+			JAVA_SERIALIZED = new URI("urn:jboss:esb:message:type:JAVA_SERIALIZED");
+			
+			DEFAULT_TYPE = JBOSS_XML;
+		}
+		catch (Exception ex)
+		{
+			throw new ExceptionInInitializerError(ex.toString());
+		}
+
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationList.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationList.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationList.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,176 +1,176 @@
-/*
- * 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.notification;
-
-import java.io.Serializable;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * Holds lists of NotificationTarget objects so that the NotificationHandler EJB
- * behaviour can be controlled at runtime by client applications
- * <p>
- * Description: Objects of this class will hold a list of objects that extend
- * the NotificationTarget base class. It's main purpose is to allow Rosetta
- * users to configure lists of recipients of specific events, and request the
- * NotificationHandler EJB to take care of triggering the events to each object
- * specified as a child "target" element
- * </p>
- * <p>
- * Author: Heuristica - Buenos Aires - Argentina
- * </p>
- * 
- * @version 1.0
- */
-public class NotificationList extends ConfigTree
-{
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Mnemonic name for the XML element name for the serialized form of objects
-	 * of this class
-	 */
-	public static final String ELEMENT = "NotificationList";
-
-	public static final String TYPE = "type";
-
-	public static final String CHILD_TGT = "target";
-
-	private String m_sType;
-
-	protected static Logger _logger = Logger.getLogger(NotificationList.class);
-
-	/**
-	 * Instantiate an object according to the contents of &lt;arg 1&gt;
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - Parameter object containing the information
-	 *            needed to instantiate this object, including child elements
-	 *            named "target" that represent each individual
-	 *            NotificationTarget object
-	 */
-	public NotificationList (ConfigTree p_oP)
-	{
-		super(p_oP);
-		m_sType = p_oP.getAttribute(TYPE);
-		if (null != m_sType) m_sType = m_sType.toLowerCase();
-	} // __________________________________
-
-	private NotificationTarget[] getTargets () throws ConfigurationException
-	{
-		ConfigTree[] oaTgts = super.getChildren(CHILD_TGT);
-		NotificationTarget[] oaRet = new NotificationTarget[oaTgts.length];
-
-		for (int i1 = 0; i1 < oaRet.length; i1++)
-		{
-			oaRet[i1] = NotificationTarget.fromParams(oaTgts[i1]);
-		}
-
-		return oaRet;
-	} // __________________________________
-
-	/**
-	 * Invoke the sendNotification() method for all targets in the list. The
-	 * method iterates along it's NotificationTarget child nodes and invokes the
-	 * sendNotification() method with the same object to all of them
-	 * 
-	 * @param p_o
-	 *            Object - The event to notify to all targets
-	 * @throws NotificationException -
-	 *             use Exception.getMessage() at runtime
-	 */
-	public void sendNotification (Serializable p_o) throws NotificationException
-	{
-		try
-		{
-			NotificationTarget[] oaTgt = getTargets();
-	
-			for (int i1 = 0; i1 < oaTgt.length; i1++)
-			{
-				oaTgt[i1].sendNotification(p_o);
-			}
-		}
-		catch (ConfigurationException ex)
-		{
-			throw new NotificationException(ex);
-		}
-	} // __________________________________
-
-	/**
-	 * Is this an OK (success) NotificationList ?
-	 * 
-	 * @return boolean - Yes, Attribute "type" of constructor parameters starts
-	 *         with "ok", OR there was no "type" attribute in the constructor
-	 *         <li>A NotificationList can be both OK and Error if no "type"
-	 *         attribute was specified at constructor time in the ConfigTree
-	 *         argument</li>
-	 * @see ConfigTree#getAttr(String)
-	 */
-	public boolean isOK ()
-	{
-		return (null == m_sType) ? true : m_sType.startsWith("ok");
-	}
-
-	/**
-	 * Is this an Error (failure) NotificationList ?
-	 * 
-	 * @return boolean - Yes, Attribute "type" of constructor parameters starts
-	 *         with "err", OR there was no "type" attribute in the constructor
-	 *         <li>A NotificationList can be both OK and Error if no "type"
-	 *         attribute was specified at constructor time in the ConfigTree
-	 *         argument</li>
-	 * @see ConfigTree#getAttr(String)
-	 */
-	public boolean isErr ()
-	{
-		return (null == m_sType) ? true : m_sType.startsWith("err");
-	}
-
-	public static void notifyAll (ConfigTree[] list, Serializable content)
-	{
-		for (ConfigTree tree : list)
-		{
-			ConfigTree[] targets = tree.getChildren(NotificationList.CHILD_TGT);
-			for (ConfigTree curr : targets)
-			{
-				try
-				{
-					NotificationTarget target = NotificationTarget
-							.fromParams(curr);
-					target.sendNotification(content);
-				}
-				catch (Exception e)
-				{
-					_logger.error(
-							"Can't instantiate target " + curr.toString(), e);
-				}
-			}
-		}
-	} // ________________________________
-
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import java.io.Serializable;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * Holds lists of NotificationTarget objects so that the NotificationHandler EJB
+ * behaviour can be controlled at runtime by client applications
+ * <p>
+ * Description: Objects of this class will hold a list of objects that extend
+ * the NotificationTarget base class. It's main purpose is to allow Rosetta
+ * users to configure lists of recipients of specific events, and request the
+ * NotificationHandler EJB to take care of triggering the events to each object
+ * specified as a child "target" element
+ * </p>
+ * <p>
+ * Author: Heuristica - Buenos Aires - Argentina
+ * </p>
+ * 
+ * @version 1.0
+ */
+public class NotificationList extends ConfigTree
+{
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Mnemonic name for the XML element name for the serialized form of objects
+	 * of this class
+	 */
+	public static final String ELEMENT = "NotificationList";
+
+	public static final String TYPE = "type";
+
+	public static final String CHILD_TGT = "target";
+
+	private String m_sType;
+
+	protected static Logger _logger = Logger.getLogger(NotificationList.class);
+
+	/**
+	 * Instantiate an object according to the contents of &lt;arg 1&gt;
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - Parameter object containing the information
+	 *            needed to instantiate this object, including child elements
+	 *            named "target" that represent each individual
+	 *            NotificationTarget object
+	 */
+	public NotificationList (ConfigTree p_oP)
+	{
+		super(p_oP);
+		m_sType = p_oP.getAttribute(TYPE);
+		if (null != m_sType) m_sType = m_sType.toLowerCase();
+	} // __________________________________
+
+	private NotificationTarget[] getTargets () throws ConfigurationException
+	{
+		ConfigTree[] oaTgts = super.getChildren(CHILD_TGT);
+		NotificationTarget[] oaRet = new NotificationTarget[oaTgts.length];
+
+		for (int i1 = 0; i1 < oaRet.length; i1++)
+		{
+			oaRet[i1] = NotificationTarget.fromParams(oaTgts[i1]);
+		}
+
+		return oaRet;
+	} // __________________________________
+
+	/**
+	 * Invoke the sendNotification() method for all targets in the list. The
+	 * method iterates along it's NotificationTarget child nodes and invokes the
+	 * sendNotification() method with the same object to all of them
+	 * 
+	 * @param p_o
+	 *            Object - The event to notify to all targets
+	 * @throws NotificationException -
+	 *             use Exception.getMessage() at runtime
+	 */
+	public void sendNotification (Serializable p_o) throws NotificationException
+	{
+		try
+		{
+			NotificationTarget[] oaTgt = getTargets();
+	
+			for (int i1 = 0; i1 < oaTgt.length; i1++)
+			{
+				oaTgt[i1].sendNotification(p_o);
+			}
+		}
+		catch (ConfigurationException ex)
+		{
+			throw new NotificationException(ex);
+		}
+	} // __________________________________
+
+	/**
+	 * Is this an OK (success) NotificationList ?
+	 * 
+	 * @return boolean - Yes, Attribute "type" of constructor parameters starts
+	 *         with "ok", OR there was no "type" attribute in the constructor
+	 *         <li>A NotificationList can be both OK and Error if no "type"
+	 *         attribute was specified at constructor time in the ConfigTree
+	 *         argument</li>
+	 * @see ConfigTree#getAttr(String)
+	 */
+	public boolean isOK ()
+	{
+		return (null == m_sType) ? true : m_sType.startsWith("ok");
+	}
+
+	/**
+	 * Is this an Error (failure) NotificationList ?
+	 * 
+	 * @return boolean - Yes, Attribute "type" of constructor parameters starts
+	 *         with "err", OR there was no "type" attribute in the constructor
+	 *         <li>A NotificationList can be both OK and Error if no "type"
+	 *         attribute was specified at constructor time in the ConfigTree
+	 *         argument</li>
+	 * @see ConfigTree#getAttr(String)
+	 */
+	public boolean isErr ()
+	{
+		return (null == m_sType) ? true : m_sType.startsWith("err");
+	}
+
+	public static void notifyAll (ConfigTree[] list, Serializable content)
+	{
+		for (ConfigTree tree : list)
+		{
+			ConfigTree[] targets = tree.getChildren(NotificationList.CHILD_TGT);
+			for (ConfigTree curr : targets)
+			{
+				try
+				{
+					NotificationTarget target = NotificationTarget
+							.fromParams(curr);
+					target.sendNotification(content);
+				}
+				catch (Exception e)
+				{
+					_logger.error(
+							"Can't instantiate target " + curr.toString(), e);
+				}
+			}
+		}
+	} // ________________________________
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationList.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,153 +1,153 @@
-/*
- * 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.notification;
-
-import java.lang.reflect.Constructor;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * Abstract class to define expected behaviour of all NotificationTargets and
- * provide some common functionality to all of them
- * <p>
- * Description:
- * </p>
- * <p>
- * Heuristica - Buenos Aires - Argentina
- * </p>
- * 
- * @version 1.0
- */
-public abstract class NotificationTarget
-{
-	/**
-	 * Derived classes must implement this method to do what has to be done to
-	 * trigger that specific type of notification event
-	 * 
-	 * @param p_o
-	 *            Object - The toString() method of this object will be the
-	 *            actual notification content
-	 * @throws NotificationException -
-	 *             invoke Exception.getMessage() at runtime for this object
-	 * @see ConfigTree
-	 */
-	public abstract void sendNotification (java.io.Serializable p_o)
-			throws NotificationException;
-
-	private static final String NOTIF_PFX = NotificationTarget.class
-			.getPackage().getName();
-
-	public static final String PRM_NOTIF_CLASS = "class";
-
-	/**
-	 * Common object to hold details of object's information - Each derived
-	 * class will hold it's own needs
-	 */
-	protected ConfigTree m_oParms;
-
-	/**
-	 * Instantiate an empty NotificationTarget object
-	 */
-	protected NotificationTarget ()
-	{
-	}
-
-	/**
-	 * Instantiate a NotificationTarget object with the information contained in
-	 * &lt;arg 1&gt;
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - Holds details to instantiate this object
-	 */
-	protected NotificationTarget (ConfigTree p_oP)
-	{
-		m_oParms = p_oP;
-	} // __________________________________
-
-	/**
-	 * A typical Factory.getInstance() method
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - Contents of this argument will determine the type
-	 *            (derived class) of NotificationTarget returned
-	 * @throws ConfigurationException -
-	 *             Arg 1 does not contain a valid structure for currently
-	 *             implemented NotificationTarget subclasses - invoke
-	 *             Exception.getMessage() at runtime for details
-	 * @return NotificationTarget - An object that instantiates the
-	 *         NotificationTarget abstract class
-	 */
-	public static NotificationTarget fromParams (ConfigTree p_oP)
-			throws ConfigurationException
-	{
-		String sClass = p_oP.getAttribute(PRM_NOTIF_CLASS);
-		if (null == sClass)
-			throw new IllegalArgumentException(
-					"Missing '" + PRM_NOTIF_CLASS + "' attribute in parameters");
-		Class oCls = null;
-		try
-		{
-			oCls = Class.forName(NOTIF_PFX + "." + sClass);
-		}
-		catch (Exception e)
-		{
-			try
-			{
-				oCls = Class.forName(sClass);
-			}
-			catch (Exception e1)
-			{/* oCls will be null */
-			}
-		}
-		if (null == oCls)
-			throw new ConfigurationException(
-					"Invalid class <" + sClass + ">, or missing library");
-
-		Constructor oCons = null;
-		try
-		{
-			oCons = oCls.getConstructor(new Class[] { ConfigTree.class });
-		}
-		catch (Exception e)
-		{
-		}
-		if (null == oCons)
-			throw new ConfigurationException(
-					"No valid constructor " + sClass + "(ConfigTree)");
-
-		Object oRet = null;
-		try
-		{
-			oRet = oCons.newInstance(new Object[] { p_oP });
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-		}
-		if (null == oRet || (!(oRet instanceof NotificationTarget)))
-			throw new ConfigurationException(sClass + "  does not extend NotificationTarget");
-
-		return (NotificationTarget) oRet;
-	} // __________________________________
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import java.lang.reflect.Constructor;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * Abstract class to define expected behaviour of all NotificationTargets and
+ * provide some common functionality to all of them
+ * <p>
+ * Description:
+ * </p>
+ * <p>
+ * Heuristica - Buenos Aires - Argentina
+ * </p>
+ * 
+ * @version 1.0
+ */
+public abstract class NotificationTarget
+{
+	/**
+	 * Derived classes must implement this method to do what has to be done to
+	 * trigger that specific type of notification event
+	 * 
+	 * @param p_o
+	 *            Object - The toString() method of this object will be the
+	 *            actual notification content
+	 * @throws NotificationException -
+	 *             invoke Exception.getMessage() at runtime for this object
+	 * @see ConfigTree
+	 */
+	public abstract void sendNotification (java.io.Serializable p_o)
+			throws NotificationException;
+
+	private static final String NOTIF_PFX = NotificationTarget.class
+			.getPackage().getName();
+
+	public static final String PRM_NOTIF_CLASS = "class";
+
+	/**
+	 * Common object to hold details of object's information - Each derived
+	 * class will hold it's own needs
+	 */
+	protected ConfigTree m_oParms;
+
+	/**
+	 * Instantiate an empty NotificationTarget object
+	 */
+	protected NotificationTarget ()
+	{
+	}
+
+	/**
+	 * Instantiate a NotificationTarget object with the information contained in
+	 * &lt;arg 1&gt;
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - Holds details to instantiate this object
+	 */
+	protected NotificationTarget (ConfigTree p_oP)
+	{
+		m_oParms = p_oP;
+	} // __________________________________
+
+	/**
+	 * A typical Factory.getInstance() method
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - Contents of this argument will determine the type
+	 *            (derived class) of NotificationTarget returned
+	 * @throws ConfigurationException -
+	 *             Arg 1 does not contain a valid structure for currently
+	 *             implemented NotificationTarget subclasses - invoke
+	 *             Exception.getMessage() at runtime for details
+	 * @return NotificationTarget - An object that instantiates the
+	 *         NotificationTarget abstract class
+	 */
+	public static NotificationTarget fromParams (ConfigTree p_oP)
+			throws ConfigurationException
+	{
+		String sClass = p_oP.getAttribute(PRM_NOTIF_CLASS);
+		if (null == sClass)
+			throw new IllegalArgumentException(
+					"Missing '" + PRM_NOTIF_CLASS + "' attribute in parameters");
+		Class oCls = null;
+		try
+		{
+			oCls = Class.forName(NOTIF_PFX + "." + sClass);
+		}
+		catch (Exception e)
+		{
+			try
+			{
+				oCls = Class.forName(sClass);
+			}
+			catch (Exception e1)
+			{/* oCls will be null */
+			}
+		}
+		if (null == oCls)
+			throw new ConfigurationException(
+					"Invalid class <" + sClass + ">, or missing library");
+
+		Constructor oCons = null;
+		try
+		{
+			oCons = oCls.getConstructor(new Class[] { ConfigTree.class });
+		}
+		catch (Exception e)
+		{
+		}
+		if (null == oCons)
+			throw new ConfigurationException(
+					"No valid constructor " + sClass + "(ConfigTree)");
+
+		Object oRet = null;
+		try
+		{
+			oRet = oCons.newInstance(new Object[] { p_oP });
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+		}
+		if (null == oRet || (!(oRet instanceof NotificationTarget)))
+			throw new ConfigurationException(sClass + "  does not extend NotificationTarget");
+
+		return (NotificationTarget) oRet;
+	} // __________________________________
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotificationTarget.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyConsole.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyConsole.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyConsole.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,23 +1,23 @@
-package org.jboss.soa.esb.notification;
-
-import java.io.Serializable;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.util.Util;
-
-public class NotifyConsole extends NotificationTarget 
-{
-
-	public NotifyConsole(ConfigTree tree)
-	{
-		super(tree);
-	}
-	
-	@Override
-	public void sendNotification(Serializable content) throws NotificationException 
-	{
-		System.out.println
-			("ConsoleNotifier "+Util.getStamp()+"<"+content+">");
-	}
-	
-}
+package org.jboss.soa.esb.notification;
+
+import java.io.Serializable;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.util.Util;
+
+public class NotifyConsole extends NotificationTarget 
+{
+
+	public NotifyConsole(ConfigTree tree)
+	{
+		super(tree);
+	}
+	
+	@Override
+	public void sendNotification(Serializable content) throws NotificationException 
+	{
+		System.out.println
+			("ConsoleNotifier "+Util.getStamp()+"<"+content+">");
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyConsole.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyEmail.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyEmail.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyEmail.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,137 +1,137 @@
-/*
- * 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.notification;
-
-import java.io.Serializable;
-
-import javax.mail.MessagingException;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.Email;
-import org.jboss.soa.esb.util.Util;
-
-/**
- * This class will send an e-mail using the Email class
- * <p>
- * Description:
- * </p>
- * <p>
- * Author: Heuristica - Buenos Aires - Argentina
- * </p>
- * 
- * @version 1.0
- */
-public class NotifyEmail extends NotificationTarget
-{
-	/**
-	 * Instantiate a NotifyEmail object using the information contained in
-	 * &lt;arg 1&gt;
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - See attributes and structure needed for the
-	 *            Email() constructor - The MESSAGE attribute will be filled in
-	 *            at sendNotification(Serializable) time
-	 * @throws ConfigurationException
-	 * @see NotifyEmail#sendNotification(Serializable)
-	 */
-	public NotifyEmail (ConfigTree p_oP) throws ConfigurationException
-	{
-		super(p_oP);
-
-		try
-		{
-			String sAtt = (String) m_oParms.getAttribute(Email.FROM);
-			
-			if (null != sAtt) 
-				InternetAddress.parse(sAtt);
-	
-			InternetAddress.parse(m_oParms.getAttribute(Email.SENDTO));
-	
-			sAtt = (String) m_oParms.getAttribute(Email.COPYTO);
-			if (null != sAtt) 
-				InternetAddress.parse(sAtt);
-		}
-		catch (AddressException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-	} // __________________________________
-
-	/**
-	 * Send an Email using Email() using p_o.toString() to fill in the message
-	 * text
-	 * 
-	 * @param p_o
-	 *            Object - This object's toString() method will supply contents
-	 *            of mail message
-	 */
-	public void sendNotification (Serializable p_o) throws NotificationException
-	{
-		try
-		{
-			ConfigTree oP = m_oParms.cloneObj();
-			String sMsg = oP.getAttribute(Email.MESSAGE);
-			sMsg = ((null == sMsg) ? p_o.toString() : sMsg + "\n") + p_o
-					.toString();
-			oP.setAttribute(Email.MESSAGE, sMsg);
-			sendEmailNotification(oP);
-		}
-		catch (AddressException e)
-		{
-			Util.getDefaultLogger(this.getClass()).error("Send Mail Failed", e);
-			
-			throw new NotificationException(e);
-		}
-		catch (MessagingException ex)
-		{
-			throw new NotificationException(ex);
-		}
-	} // __________________________________
-
-	/**
-	 * Send an email notification based on the supplied parameters. <p/> This
-	 * method allows overriding for test purposes.
-	 * 
-	 * @param messageParams
-	 *            Message parameters.
-	 */
-	protected void sendEmailNotification (ConfigTree messageParams)
-			throws AddressException, MessagingException
-	{
-
-		Email esbMail = new Email();
-		esbMail.setSendTo(messageParams.getAttribute(Email.SENDTO));
-		esbMail.setFrom(messageParams.getAttribute(Email.FROM));
-		esbMail.setCopyTo(messageParams.getAttribute(Email.COPYTO));
-		esbMail.setSubject(messageParams.getAttribute(Email.SUBJECT));
-
-		esbMail.setAttachments(messageParams.getTextChildren(Email.ATTACH));
-		esbMail.setMessage(messageParams.getAttribute(Email.MESSAGE));
-
-		esbMail.sendMessage();
-	}
-
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import java.io.Serializable;
+
+import javax.mail.MessagingException;
+import javax.mail.internet.AddressException;
+import javax.mail.internet.InternetAddress;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.Email;
+import org.jboss.soa.esb.util.Util;
+
+/**
+ * This class will send an e-mail using the Email class
+ * <p>
+ * Description:
+ * </p>
+ * <p>
+ * Author: Heuristica - Buenos Aires - Argentina
+ * </p>
+ * 
+ * @version 1.0
+ */
+public class NotifyEmail extends NotificationTarget
+{
+	/**
+	 * Instantiate a NotifyEmail object using the information contained in
+	 * &lt;arg 1&gt;
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - See attributes and structure needed for the
+	 *            Email() constructor - The MESSAGE attribute will be filled in
+	 *            at sendNotification(Serializable) time
+	 * @throws ConfigurationException
+	 * @see NotifyEmail#sendNotification(Serializable)
+	 */
+	public NotifyEmail (ConfigTree p_oP) throws ConfigurationException
+	{
+		super(p_oP);
+
+		try
+		{
+			String sAtt = (String) m_oParms.getAttribute(Email.FROM);
+			
+			if (null != sAtt) 
+				InternetAddress.parse(sAtt);
+	
+			InternetAddress.parse(m_oParms.getAttribute(Email.SENDTO));
+	
+			sAtt = (String) m_oParms.getAttribute(Email.COPYTO);
+			if (null != sAtt) 
+				InternetAddress.parse(sAtt);
+		}
+		catch (AddressException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+	} // __________________________________
+
+	/**
+	 * Send an Email using Email() using p_o.toString() to fill in the message
+	 * text
+	 * 
+	 * @param p_o
+	 *            Object - This object's toString() method will supply contents
+	 *            of mail message
+	 */
+	public void sendNotification (Serializable p_o) throws NotificationException
+	{
+		try
+		{
+			ConfigTree oP = m_oParms.cloneObj();
+			String sMsg = oP.getAttribute(Email.MESSAGE);
+			sMsg = ((null == sMsg) ? p_o.toString() : sMsg + "\n") + p_o
+					.toString();
+			oP.setAttribute(Email.MESSAGE, sMsg);
+			sendEmailNotification(oP);
+		}
+		catch (AddressException e)
+		{
+			Util.getDefaultLogger(this.getClass()).error("Send Mail Failed", e);
+			
+			throw new NotificationException(e);
+		}
+		catch (MessagingException ex)
+		{
+			throw new NotificationException(ex);
+		}
+	} // __________________________________
+
+	/**
+	 * Send an email notification based on the supplied parameters. <p/> This
+	 * method allows overriding for test purposes.
+	 * 
+	 * @param messageParams
+	 *            Message parameters.
+	 */
+	protected void sendEmailNotification (ConfigTree messageParams)
+			throws AddressException, MessagingException
+	{
+
+		Email esbMail = new Email();
+		esbMail.setSendTo(messageParams.getAttribute(Email.SENDTO));
+		esbMail.setFrom(messageParams.getAttribute(Email.FROM));
+		esbMail.setCopyTo(messageParams.getAttribute(Email.COPYTO));
+		esbMail.setSubject(messageParams.getAttribute(Email.SUBJECT));
+
+		esbMail.setAttachments(messageParams.getTextChildren(Email.ATTACH));
+		esbMail.setMessage(messageParams.getAttribute(Email.MESSAGE));
+
+		esbMail.sendMessage();
+	}
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyEmail.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,237 +1,237 @@
-/*
- * 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.notification;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.net.URI;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * Write the notification contents into a list of files specified in the
- * constructor time parameters.
- * <p>
- * Description: The constructor searches for all child elements of the
- * ConfigTree argument having "file" as element name, that will be used to store
- * (or append) the contents of the argument to the sendNotification(Object)
- * method, to each and every one of the files contained in the list
- * </p>
- * <p>
- * Author: Heuristica - Buenos Aires - Argentina
- * </p>
- * 
- * @version 1.0
- */
-public class NotifyFiles extends NotificationTarget
-{
-	/**
-	 * Mnemonic for the child element name that hold the files to write ("file")
-	 */
-	public static final String CHILD_FILE = "file";
-
-	/**
-	 * Attribute name that will be interpreted as the URI of the file to write
-	 * to
-	 */
-	public static final String ATT_URI = "URI";
-
-	/**
-	 * Attribute name of indicator to append to an existing file
-	 * 
-	 * @see Boolean#valueOf(String)
-	 */
-	public static final String ATT_APPEND = "append";
-
-	/**
-	 * The NotificationFile[] that holds the output file list.
-	 */
-	protected NotificationFile[] m_oaOutF;
-
-	/**
-	 * Instantiate a NotifyFiles object according to contents of &lt;arg 1&gt;
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - Should contain a nonempty set of child elements
-	 *            with elementName="file". Each child element must have a "URI"
-	 *            attribute and optionally a "append" element
-	 */
-	public NotifyFiles (ConfigTree p_oP)
-	{
-		super(p_oP);
-		setFiles(p_oP.getChildren(CHILD_FILE));
-
-	} // __________________________________
-
-	/**
-	 * Sets the value of m_oaOutF[] and m_baAppend[] to contents of each element
-	 * of the input argument
-	 * 
-	 * @param p_oaP
-	 *            ConfigTree[] - Each entry must have a "URI" attribute, and can
-	 *            have an optional "append" attribute
-	 * @see ConfigTree#getAttr(String)
-	 */
-	protected void setFiles (ConfigTree[] p_oaP)
-	{
-		m_oaOutF = new NotificationFile[p_oaP.length];
-
-		for (int i = 0; i < p_oaP.length; i++)
-		{
-			String fileURI = p_oaP[i].getAttribute(ATT_URI);
-			String append = p_oaP[i].getAttribute(ATT_APPEND);
-
-			if (null == fileURI)
-			{
-				throw new IllegalArgumentException(
-						"Bad File Notification Configuration: Missing file URI attribute.");
-			}
-
-			try
-			{
-				m_oaOutF[i] = new NotificationFile(new URI(fileURI), Boolean
-						.valueOf(append));
-			}
-			catch (Exception e)
-			{
-				m_oaOutF[i] = new NotificationFile(fileURI, Boolean
-						.valueOf(append));
-			}
-
-			// Make sure the parent folder exists...
-			File parent = m_oaOutF[i].getAbsoluteFile().getParentFile();
-			if (null == parent || !parent.exists())
-			{
-				throw new IllegalArgumentException(
-						"Bad File Notification Configuration: Parent folder for file [" + m_oaOutF[i]
-								.getAbsolutePath() + "] doesn't exist.");
-			}
-		}
-	} // __________________________________
-
-	/**
-	 * Writes the result of p_o into each one of the File objects contained in
-	 * the m_oaOutF array
-	 * 
-	 * @param p_o
-	 *            Object - This object's toString() results will be written to
-	 *            (appended to) each one of the files in m_oaOutF
-	 * @see NotifyFiles#setFiles(ConfigTree[])
-	 * @see NotifyFiles#m_oaOutF
-	 */
-	public void sendNotification (Serializable p_o) throws NotificationException
-	{
-		FileOutputStream fileOutStream = null;
-		
-		for (NotificationFile notificationFile : m_oaOutF)
-		{
-			try
-			{
-				fileOutStream = new FileOutputStream(notificationFile,
-						notificationFile.append);
-				if (p_o instanceof String)
-				{
-					stringNotification(fileOutStream, (String) p_o);
-				}
-				else
-				{
-					objectNotification(fileOutStream, p_o);
-				}
-			}
-			catch (Exception e)
-			{ /* We do nothing here for the time being */
-			} 
-			finally
-			{
-				try
-				{
-					fileOutStream.close();
-				}
-				catch (Exception eCl)
-				{
-					/*
-					 * Unable to Close - What could we do
-					 */
-				}
-			}
-		}
-	} // __________________________________
-
-	private void stringNotification (FileOutputStream p_oF, String p_s)
-	{
-		try
-		{
-			p_oF.write(p_s.getBytes());
-			
-			if (!p_s.endsWith("\n")) 
-				p_oF.write("\n".getBytes());
-		}
-		catch (Exception e)
-		{ /* We do nothing here for the time being */
-		}
-	} // __________________________________
-
-	private void objectNotification (FileOutputStream p_oF, Object p_o)
-	{
-		try
-		{
-			ObjectOutputStream OS = new ObjectOutputStream(p_oF);
-			OS.writeObject(p_o);
-		}
-		catch (Exception e)
-		{ 
-			/* We do nothing here for the time being */
-		}
-	} // __________________________________
-
-	/**
-	 * Notification File. <p/> Simply adds the "append" property to the file.
-	 * 
-	 * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
-	 */
-	private class NotificationFile extends File
-	{
-
-		private static final long serialVersionUID = 1L;
-
-		private boolean append = false;
-
-		private NotificationFile (URI fileURI, boolean append)
-		{
-			super(fileURI);
-			this.append = append;
-		}
-
-		/**
-		 * @param file
-		 * @param append2
-		 */
-		public NotificationFile (String file, boolean append)
-		{
-			super(file);
-			this.append = append;
-		}
-	}
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.net.URI;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * Write the notification contents into a list of files specified in the
+ * constructor time parameters.
+ * <p>
+ * Description: The constructor searches for all child elements of the
+ * ConfigTree argument having "file" as element name, that will be used to store
+ * (or append) the contents of the argument to the sendNotification(Object)
+ * method, to each and every one of the files contained in the list
+ * </p>
+ * <p>
+ * Author: Heuristica - Buenos Aires - Argentina
+ * </p>
+ * 
+ * @version 1.0
+ */
+public class NotifyFiles extends NotificationTarget
+{
+	/**
+	 * Mnemonic for the child element name that hold the files to write ("file")
+	 */
+	public static final String CHILD_FILE = "file";
+
+	/**
+	 * Attribute name that will be interpreted as the URI of the file to write
+	 * to
+	 */
+	public static final String ATT_URI = "URI";
+
+	/**
+	 * Attribute name of indicator to append to an existing file
+	 * 
+	 * @see Boolean#valueOf(String)
+	 */
+	public static final String ATT_APPEND = "append";
+
+	/**
+	 * The NotificationFile[] that holds the output file list.
+	 */
+	protected NotificationFile[] m_oaOutF;
+
+	/**
+	 * Instantiate a NotifyFiles object according to contents of &lt;arg 1&gt;
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - Should contain a nonempty set of child elements
+	 *            with elementName="file". Each child element must have a "URI"
+	 *            attribute and optionally a "append" element
+	 */
+	public NotifyFiles (ConfigTree p_oP)
+	{
+		super(p_oP);
+		setFiles(p_oP.getChildren(CHILD_FILE));
+
+	} // __________________________________
+
+	/**
+	 * Sets the value of m_oaOutF[] and m_baAppend[] to contents of each element
+	 * of the input argument
+	 * 
+	 * @param p_oaP
+	 *            ConfigTree[] - Each entry must have a "URI" attribute, and can
+	 *            have an optional "append" attribute
+	 * @see ConfigTree#getAttr(String)
+	 */
+	protected void setFiles (ConfigTree[] p_oaP)
+	{
+		m_oaOutF = new NotificationFile[p_oaP.length];
+
+		for (int i = 0; i < p_oaP.length; i++)
+		{
+			String fileURI = p_oaP[i].getAttribute(ATT_URI);
+			String append = p_oaP[i].getAttribute(ATT_APPEND);
+
+			if (null == fileURI)
+			{
+				throw new IllegalArgumentException(
+						"Bad File Notification Configuration: Missing file URI attribute.");
+			}
+
+			try
+			{
+				m_oaOutF[i] = new NotificationFile(new URI(fileURI), Boolean
+						.valueOf(append));
+			}
+			catch (Exception e)
+			{
+				m_oaOutF[i] = new NotificationFile(fileURI, Boolean
+						.valueOf(append));
+			}
+
+			// Make sure the parent folder exists...
+			File parent = m_oaOutF[i].getAbsoluteFile().getParentFile();
+			if (null == parent || !parent.exists())
+			{
+				throw new IllegalArgumentException(
+						"Bad File Notification Configuration: Parent folder for file [" + m_oaOutF[i]
+								.getAbsolutePath() + "] doesn't exist.");
+			}
+		}
+	} // __________________________________
+
+	/**
+	 * Writes the result of p_o into each one of the File objects contained in
+	 * the m_oaOutF array
+	 * 
+	 * @param p_o
+	 *            Object - This object's toString() results will be written to
+	 *            (appended to) each one of the files in m_oaOutF
+	 * @see NotifyFiles#setFiles(ConfigTree[])
+	 * @see NotifyFiles#m_oaOutF
+	 */
+	public void sendNotification (Serializable p_o) throws NotificationException
+	{
+		FileOutputStream fileOutStream = null;
+		
+		for (NotificationFile notificationFile : m_oaOutF)
+		{
+			try
+			{
+				fileOutStream = new FileOutputStream(notificationFile,
+						notificationFile.append);
+				if (p_o instanceof String)
+				{
+					stringNotification(fileOutStream, (String) p_o);
+				}
+				else
+				{
+					objectNotification(fileOutStream, p_o);
+				}
+			}
+			catch (Exception e)
+			{ /* We do nothing here for the time being */
+			} 
+			finally
+			{
+				try
+				{
+					fileOutStream.close();
+				}
+				catch (Exception eCl)
+				{
+					/*
+					 * Unable to Close - What could we do
+					 */
+				}
+			}
+		}
+	} // __________________________________
+
+	private void stringNotification (FileOutputStream p_oF, String p_s)
+	{
+		try
+		{
+			p_oF.write(p_s.getBytes());
+			
+			if (!p_s.endsWith("\n")) 
+				p_oF.write("\n".getBytes());
+		}
+		catch (Exception e)
+		{ /* We do nothing here for the time being */
+		}
+	} // __________________________________
+
+	private void objectNotification (FileOutputStream p_oF, Object p_o)
+	{
+		try
+		{
+			ObjectOutputStream OS = new ObjectOutputStream(p_oF);
+			OS.writeObject(p_o);
+		}
+		catch (Exception e)
+		{ 
+			/* We do nothing here for the time being */
+		}
+	} // __________________________________
+
+	/**
+	 * Notification File. <p/> Simply adds the "append" property to the file.
+	 * 
+	 * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+	 */
+	private class NotificationFile extends File
+	{
+
+		private static final long serialVersionUID = 1L;
+
+		private boolean append = false;
+
+		private NotificationFile (URI fileURI, boolean append)
+		{
+			super(fileURI);
+			this.append = append;
+		}
+
+		/**
+		 * @param file
+		 * @param append2
+		 */
+		public NotificationFile (String file, boolean append)
+		{
+			super(file);
+			this.append = append;
+		}
+	}
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyFiles.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,214 +1,214 @@
-/*
- * 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.notification;
-
-import java.io.Serializable;
-import java.util.Iterator;
-import java.util.Properties;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * Abstract class that defines the behaviour of NotifyQueues and NotifyTopics
- * (and in fact any other javax.jms.Destination object), and provides common
- * methods to derived classes
- * <p>
- * Description:
- * </p>
- * <p>
- * Author: Heuristica - Buenos Aires - Argentina
- * </p>
- * 
- * @version 1.0
- */
-public abstract class NotifyJMS extends NotificationTarget
-{
-	/**
-	 * Abstract method - All classes that extend NotifyJMS must implement it
-	 * according to their own javax.jms.Destination needs (Queue/Topic)
-	 * 
-	 * @param p_oMsg
-	 *            Message
-	 */
-	protected abstract void sendToAll (Message p_oMsg);
-
-	/**
-	 * Element name mnemonic to search for child elements in the ConfigTree at
-	 * constructor time, that will hold a "name" "value" pair to be included in
-	 * the JMS message header
-	 */
-	public static final String CHILD_MSG_PROP = "messageProp";
-
-	/**
-	 * Attribute name mnemonic for the name of the message property to fill with
-	 * contents of the "value" aattribute
-	 */
-	public static final String ATT_PROP_NAME = "name";
-
-	/**
-	 * Attribute name mnemonic for the value to assign to the corresponding
-	 * message property
-	 */
-	public static final String ATT_PROP_VALUE = "value";
-
-	/**
-	 * Attribute name mnemonic for the att that will hold the JNDI name of the
-	 * destination javax.jms.Destination object
-	 */
-	public static final String ATT_DEST_NAME = "jndiName";
-
-	/**
-	 * This object holds the JNDI naming context that will be used to obtain a
-	 * JMS destination (javax.jms.Destination) to send/publish the notification
-	 * at sendNotification() time
-	 */
-	protected Context m_oCtx;
-
-	private Properties m_oProps = new Properties();
-
-	/**
-	 * The javax.jms.Connection instance used to talk to JMS
-	 */
-	protected Connection m_oConn;
-
-	/**
-	 * The javax.jms.Session instance used to talk to JMS
-	 */
-	protected Session m_oSess;
-
-	/**
-	 * Array with an instance of javax.jms.MessageProducer on each entry that
-	 * will be used to send the notification at sendNotification() time
-	 */
-	protected MessageProducer[] m_oaMssProd;
-
-	/**
-	 * Constructor that will be called by child classes to perform
-	 * initialization tasks that are common to all derived classes
-	 * 
-	 * @param p_oP
-	 *            ConfigTree
-	 *            <p>
-	 *            Will contain a variable number of "messageProp" child elements
-	 *            that will be added to messages sent to
-	 *            </p>
-	 * @throws ConfigurationException
-	 */
-	protected NotifyJMS (ConfigTree p_oP) throws ConfigurationException
-	{
-		super(p_oP);
-
-		ConfigTree[] oaMsgP = p_oP.getChildren(CHILD_MSG_PROP);
-		for (int i1 = 0; i1 < oaMsgP.length; i1++)
-		{
-			String sKey = oaMsgP[i1].getAttribute(ATT_PROP_NAME);
-			if (null == sKey) continue;
-			String sVal = oaMsgP[i1].getAttribute(ATT_PROP_VALUE);
-			if (null == sVal) continue;
-
-			m_oProps.setProperty(sKey.trim(), sVal);
-		}
-
-		try
-		{
-			m_oCtx = new InitialContext();
-		}
-		catch (NamingException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-
-	} // __________________________________
-
-	/**
-	 * Performs an orderly release of all JMS resources utilized - Well behaved
-	 * developers should always call this method before unreferencing this
-	 * object
-	 */
-	public void release ()
-	{
-		if (null != m_oSess) try
-		{
-			m_oSess.close();
-		}
-		catch (Exception e1)
-		{
-		}
-		if (null != m_oConn) try
-		{
-			m_oConn.close();
-		}
-		catch (Exception e2)
-		{
-		}
-	} // __________________________________
-
-	/**
-	 * Send a JMS message using p_o to fill in the message content and the list
-	 * of message properties that will be added to the JMS message header fields
-	 * 
-	 * @param p_o
-	 *            Object - This object or thie object's toString() method will
-	 *            supply contents of JMS message
-	 * @see NotifyJMS#CHILD_MSG_PROP
-	 */
-	public void sendNotification (Serializable p_o) throws NotificationException
-	{
-		try
-		{
-			Message oMsg = null;
-	
-			if (p_o instanceof String)
-			{
-				oMsg = m_oSess.createTextMessage(p_o.toString());
-			}
-			else
-			{
-				oMsg = m_oSess.createObjectMessage((Serializable) p_o);
-			}
-	
-			for (Iterator II = m_oProps.keySet().iterator(); II.hasNext();)
-			{
-				String sKey = (String) II.next();
-				String sVal = m_oProps.getProperty(sKey);
-				oMsg.setStringProperty(sKey, sVal);
-			}
-			sendToAll(oMsg);
-		}
-		catch (JMSException ex)
-		{
-			throw new NotificationException(ex);
-		}
-	} // __________________________________
-
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.Properties;
+
+import javax.jms.Connection;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * Abstract class that defines the behaviour of NotifyQueues and NotifyTopics
+ * (and in fact any other javax.jms.Destination object), and provides common
+ * methods to derived classes
+ * <p>
+ * Description:
+ * </p>
+ * <p>
+ * Author: Heuristica - Buenos Aires - Argentina
+ * </p>
+ * 
+ * @version 1.0
+ */
+public abstract class NotifyJMS extends NotificationTarget
+{
+	/**
+	 * Abstract method - All classes that extend NotifyJMS must implement it
+	 * according to their own javax.jms.Destination needs (Queue/Topic)
+	 * 
+	 * @param p_oMsg
+	 *            Message
+	 */
+	protected abstract void sendToAll (Message p_oMsg);
+
+	/**
+	 * Element name mnemonic to search for child elements in the ConfigTree at
+	 * constructor time, that will hold a "name" "value" pair to be included in
+	 * the JMS message header
+	 */
+	public static final String CHILD_MSG_PROP = "messageProp";
+
+	/**
+	 * Attribute name mnemonic for the name of the message property to fill with
+	 * contents of the "value" aattribute
+	 */
+	public static final String ATT_PROP_NAME = "name";
+
+	/**
+	 * Attribute name mnemonic for the value to assign to the corresponding
+	 * message property
+	 */
+	public static final String ATT_PROP_VALUE = "value";
+
+	/**
+	 * Attribute name mnemonic for the att that will hold the JNDI name of the
+	 * destination javax.jms.Destination object
+	 */
+	public static final String ATT_DEST_NAME = "jndiName";
+
+	/**
+	 * This object holds the JNDI naming context that will be used to obtain a
+	 * JMS destination (javax.jms.Destination) to send/publish the notification
+	 * at sendNotification() time
+	 */
+	protected Context m_oCtx;
+
+	private Properties m_oProps = new Properties();
+
+	/**
+	 * The javax.jms.Connection instance used to talk to JMS
+	 */
+	protected Connection m_oConn;
+
+	/**
+	 * The javax.jms.Session instance used to talk to JMS
+	 */
+	protected Session m_oSess;
+
+	/**
+	 * Array with an instance of javax.jms.MessageProducer on each entry that
+	 * will be used to send the notification at sendNotification() time
+	 */
+	protected MessageProducer[] m_oaMssProd;
+
+	/**
+	 * Constructor that will be called by child classes to perform
+	 * initialization tasks that are common to all derived classes
+	 * 
+	 * @param p_oP
+	 *            ConfigTree
+	 *            <p>
+	 *            Will contain a variable number of "messageProp" child elements
+	 *            that will be added to messages sent to
+	 *            </p>
+	 * @throws ConfigurationException
+	 */
+	protected NotifyJMS (ConfigTree p_oP) throws ConfigurationException
+	{
+		super(p_oP);
+
+		ConfigTree[] oaMsgP = p_oP.getChildren(CHILD_MSG_PROP);
+		for (int i1 = 0; i1 < oaMsgP.length; i1++)
+		{
+			String sKey = oaMsgP[i1].getAttribute(ATT_PROP_NAME);
+			if (null == sKey) continue;
+			String sVal = oaMsgP[i1].getAttribute(ATT_PROP_VALUE);
+			if (null == sVal) continue;
+
+			m_oProps.setProperty(sKey.trim(), sVal);
+		}
+
+		try
+		{
+			m_oCtx = new InitialContext();
+		}
+		catch (NamingException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+
+	} // __________________________________
+
+	/**
+	 * Performs an orderly release of all JMS resources utilized - Well behaved
+	 * developers should always call this method before unreferencing this
+	 * object
+	 */
+	public void release ()
+	{
+		if (null != m_oSess) try
+		{
+			m_oSess.close();
+		}
+		catch (Exception e1)
+		{
+		}
+		if (null != m_oConn) try
+		{
+			m_oConn.close();
+		}
+		catch (Exception e2)
+		{
+		}
+	} // __________________________________
+
+	/**
+	 * Send a JMS message using p_o to fill in the message content and the list
+	 * of message properties that will be added to the JMS message header fields
+	 * 
+	 * @param p_o
+	 *            Object - This object or thie object's toString() method will
+	 *            supply contents of JMS message
+	 * @see NotifyJMS#CHILD_MSG_PROP
+	 */
+	public void sendNotification (Serializable p_o) throws NotificationException
+	{
+		try
+		{
+			Message oMsg = null;
+	
+			if (p_o instanceof String)
+			{
+				oMsg = m_oSess.createTextMessage(p_o.toString());
+			}
+			else
+			{
+				oMsg = m_oSess.createObjectMessage((Serializable) p_o);
+			}
+	
+			for (Iterator II = m_oProps.keySet().iterator(); II.hasNext();)
+			{
+				String sKey = (String) II.next();
+				String sVal = m_oProps.getProperty(sKey);
+				oMsg.setStringProperty(sKey, sVal);
+			}
+			sendToAll(oMsg);
+		}
+		catch (JMSException ex)
+		{
+			throw new NotificationException(ex);
+		}
+	} // __________________________________
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,132 +1,132 @@
-/*
- * 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.notification;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.NamingException;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-;
-
-/**
- * This class that implements abstract methods defined in it's superclass
- * <p>
- * Description:
- * </p>
- * <p>
- * Author: Heuristica - Buenos Aires - Argentina
- * </p>
- * 
- * @version 1.0
- */
-public class NotifyQueues extends NotifyJMS
-{
-	/**
-	 * Connection Factory JNDI name.
-	 */
-	public static final String CONNECTION_FACTORY = "ConnectionFactory";
-
-	/**
-	 * Element name mnemonic to search for child elements in the ConfigTree at
-	 * constructor time, that will hold a "jndiName" attribute specifying the
-	 * value to look up in the JNDI context in order to obtain a queue
-	 * 
-	 * @see NotifyJMS#ATT_DEST_NAME
-	 */
-	public static final String CHILD_QUEUE = "queue";
-
-	public NotifyQueues (ConfigTree p_oP) throws ConfigurationException, JMSException
-	{
-		super(p_oP);
-		setQueues(p_oP.getChildren(CHILD_QUEUE));
-	} // __________________________________
-
-	protected void setQueues (ConfigTree[] p_oaP) throws ConfigurationException, JMSException
-	{
-		try
-		{
-			QueueConnectionFactory qcf = lookupQueueConnectionFactory();
-			QueueConnection oQconn = qcf.createQueueConnection();
-			QueueSession oQsess = oQconn.createQueueSession(false,
-					QueueSession.AUTO_ACKNOWLEDGE);
-	
-			m_oaMssProd = new MessageProducer[p_oaP.length];
-			for (int i1 = 0; i1 < p_oaP.length; i1++)
-			{
-				String sAtt = p_oaP[i1].getAttribute(ATT_DEST_NAME);
-				if (null == sAtt) 
-					throw new ConfigurationException("Missing queue jndiName");
-				Queue oQ = (Queue) m_oCtx.lookup(sAtt);
-				m_oaMssProd[i1] = oQsess.createSender(oQ);
-			}
-	
-			m_oConn = oQconn;
-			m_oSess = oQsess;
-			// m_oConn.start(); Only for incoming messages ???
-		}
-		catch (NamingException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-	} // __________________________________
-
-	/**
-	 * Get the {@link QueueConnectionFactory} to be used for this instance. <p/>
-	 * Can be overridden for testing.
-	 * 
-	 * @return The QueueConnectionFactory fro the JNDI context.
-	 * @throws NamingException
-	 */
-	protected QueueConnectionFactory lookupQueueConnectionFactory ()
-			throws NamingException
-	{
-		// REVIEW: The connection factory name is hardcoded and is the same as
-		// that of the topic connection factory.
-		return (QueueConnectionFactory) m_oCtx.lookup(CONNECTION_FACTORY);
-	}
-
-	protected void sendToAll (Message p_oMsg)
-	{
-		for (int i1 = 0; i1 < m_oaMssProd.length; i1++)
-		{
-			QueueSender oCurr = (QueueSender) m_oaMssProd[i1];
-			try
-			{
-				oCurr.send(p_oMsg);
-			}
-			catch (Exception e)
-			{
-			}
-		}
-	} // __________________________________
-
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.NamingException;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+;
+
+/**
+ * This class that implements abstract methods defined in it's superclass
+ * <p>
+ * Description:
+ * </p>
+ * <p>
+ * Author: Heuristica - Buenos Aires - Argentina
+ * </p>
+ * 
+ * @version 1.0
+ */
+public class NotifyQueues extends NotifyJMS
+{
+	/**
+	 * Connection Factory JNDI name.
+	 */
+	public static final String CONNECTION_FACTORY = "ConnectionFactory";
+
+	/**
+	 * Element name mnemonic to search for child elements in the ConfigTree at
+	 * constructor time, that will hold a "jndiName" attribute specifying the
+	 * value to look up in the JNDI context in order to obtain a queue
+	 * 
+	 * @see NotifyJMS#ATT_DEST_NAME
+	 */
+	public static final String CHILD_QUEUE = "queue";
+
+	public NotifyQueues (ConfigTree p_oP) throws ConfigurationException, JMSException
+	{
+		super(p_oP);
+		setQueues(p_oP.getChildren(CHILD_QUEUE));
+	} // __________________________________
+
+	protected void setQueues (ConfigTree[] p_oaP) throws ConfigurationException, JMSException
+	{
+		try
+		{
+			QueueConnectionFactory qcf = lookupQueueConnectionFactory();
+			QueueConnection oQconn = qcf.createQueueConnection();
+			QueueSession oQsess = oQconn.createQueueSession(false,
+					QueueSession.AUTO_ACKNOWLEDGE);
+	
+			m_oaMssProd = new MessageProducer[p_oaP.length];
+			for (int i1 = 0; i1 < p_oaP.length; i1++)
+			{
+				String sAtt = p_oaP[i1].getAttribute(ATT_DEST_NAME);
+				if (null == sAtt) 
+					throw new ConfigurationException("Missing queue jndiName");
+				Queue oQ = (Queue) m_oCtx.lookup(sAtt);
+				m_oaMssProd[i1] = oQsess.createSender(oQ);
+			}
+	
+			m_oConn = oQconn;
+			m_oSess = oQsess;
+			// m_oConn.start(); Only for incoming messages ???
+		}
+		catch (NamingException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+	} // __________________________________
+
+	/**
+	 * Get the {@link QueueConnectionFactory} to be used for this instance. <p/>
+	 * Can be overridden for testing.
+	 * 
+	 * @return The QueueConnectionFactory fro the JNDI context.
+	 * @throws NamingException
+	 */
+	protected QueueConnectionFactory lookupQueueConnectionFactory ()
+			throws NamingException
+	{
+		// REVIEW: The connection factory name is hardcoded and is the same as
+		// that of the topic connection factory.
+		return (QueueConnectionFactory) m_oCtx.lookup(CONNECTION_FACTORY);
+	}
+
+	protected void sendToAll (Message p_oMsg)
+	{
+		for (int i1 = 0; i1 < m_oaMssProd.length; i1++)
+		{
+			QueueSender oCurr = (QueueSender) m_oaMssProd[i1];
+			try
+			{
+				oCurr.send(p_oMsg);
+			}
+			catch (Exception e)
+			{
+			}
+		}
+	} // __________________________________
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifySqlTable.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifySqlTable.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifySqlTable.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,147 +1,147 @@
-/*
- * 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.notification;
-
-import java.sql.PreparedStatement;
-import java.util.Properties;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.persist.JdbcCleanConn;
-import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
-
-public class NotifySqlTable extends NotificationTarget
-{
-	public static final String CHILD_COLUMN = "column";
-
-	public static final String ATT_TABLE = "table";
-
-	public static final String ATT_DATA = "dataColumn";
-
-	public static final String ATT_NAME = "name";
-
-	public static final String ATT_VALUE = "value";
-
-	protected String m_sDriver, m_sURL, m_sUser, m_sPwd, m_sTable, m_sDataCol;
-
-	protected Properties m_oCols;
-
-	public NotifySqlTable (ConfigTree p_oP) throws ConfigurationException
-	{
-		super(p_oP);
-		m_sDriver = getAttr(SimpleDataSource.DRIVER);
-		m_sURL = getAttr(SimpleDataSource.URL);
-		m_sUser = getAttr(SimpleDataSource.USER);
-		m_sPwd = getAttr(SimpleDataSource.PASSWORD);
-		m_sTable = getAttr(ATT_TABLE);
-		m_sDataCol = getAttr(ATT_DATA);
-
-		m_oCols = new Properties();
-		ConfigTree[] oaP = p_oP.getChildren(CHILD_COLUMN);
-		for (int i1 = 0; i1 < oaP.length; i1++)
-		{
-			ConfigTree oCurr = oaP[i1];
-			String sCol = oCurr.getAttribute(ATT_NAME);
-			if (null == sCol)
-			{
-				continue;
-			}
-			sCol = sCol.trim();
-			if (sCol.length() < 1)
-			{
-				continue;
-			}
-			String sVal = oCurr.getAttribute(ATT_VALUE);
-			if (null == sVal)
-			{
-				sVal = "";
-			}
-			m_oCols.setProperty(sCol, sVal);
-		}
-	} // __________________________________
-
-	private String getAttr (String p_sAtt) throws ConfigurationException
-	{
-		String sRet = m_oParms.getAttribute(p_sAtt);
-		if (null == sRet)
-		{
-			throw new ConfigurationException("Missing " + p_sAtt + " attribute");
-		}
-		sRet = sRet.trim();
-		if (p_sAtt.equals(SimpleDataSource.PASSWORD))
-		{
-			return sRet;
-		}
-		if (sRet.length() < 1)
-		{
-			throw new ConfigurationException("Empty " + p_sAtt + " attribute");
-		}
-		return sRet;
-	} // __________________________________
-
-	public String getInsertStmt ()
-	{
-		String[] saCols = new String[m_oCols.size()];
-		m_oCols.keySet().toArray(saCols);
-
-		StringBuffer sbCol = new StringBuffer("insert into ").append(m_sTable)
-				.append(" ");
-		StringBuffer sbPrm = new StringBuffer(" values ");
-		for (int i1 = 0; i1 < saCols.length; i1++)
-		{
-			String sIn = (i1 == 0) ? "(" : ",";
-			String sCurrCol = saCols[i1];
-			sbCol.append(sIn).append("\"").append(sCurrCol).append("\"");
-			sbPrm.append(sIn).append("'").append(m_oCols.getProperty(sCurrCol))
-					.append("'");
-			// REVIEW: Does the value being inserted not need to be escaped e.g.
-			// what if it has a quote in its value??
-		}
-		return sbCol.append(")").append(sbPrm).append(")").toString();
-	} // __________________________________
-
-	public void sendNotification (java.io.Serializable p_o) throws NotificationException
-	{
-		m_oCols.setProperty(m_sDataCol, p_o.toString());
-		JdbcCleanConn oConn = null;
-		try
-		{
-			oConn = new JdbcCleanConn(new SimpleDataSource(m_sDriver, m_sURL,
-					m_sUser, m_sPwd));
-			PreparedStatement PS = oConn.prepareStatement(getInsertStmt());
-			oConn.execUpdWait(PS, 3);
-			oConn.commit();
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace(System.err);
-		} finally
-		{
-			if (null != oConn)
-			{
-				oConn.release();
-			}
-		}
-	} // __________________________________
-
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import java.sql.PreparedStatement;
+import java.util.Properties;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.persist.JdbcCleanConn;
+import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
+
+public class NotifySqlTable extends NotificationTarget
+{
+	public static final String CHILD_COLUMN = "column";
+
+	public static final String ATT_TABLE = "table";
+
+	public static final String ATT_DATA = "dataColumn";
+
+	public static final String ATT_NAME = "name";
+
+	public static final String ATT_VALUE = "value";
+
+	protected String m_sDriver, m_sURL, m_sUser, m_sPwd, m_sTable, m_sDataCol;
+
+	protected Properties m_oCols;
+
+	public NotifySqlTable (ConfigTree p_oP) throws ConfigurationException
+	{
+		super(p_oP);
+		m_sDriver = getAttr(SimpleDataSource.DRIVER);
+		m_sURL = getAttr(SimpleDataSource.URL);
+		m_sUser = getAttr(SimpleDataSource.USER);
+		m_sPwd = getAttr(SimpleDataSource.PASSWORD);
+		m_sTable = getAttr(ATT_TABLE);
+		m_sDataCol = getAttr(ATT_DATA);
+
+		m_oCols = new Properties();
+		ConfigTree[] oaP = p_oP.getChildren(CHILD_COLUMN);
+		for (int i1 = 0; i1 < oaP.length; i1++)
+		{
+			ConfigTree oCurr = oaP[i1];
+			String sCol = oCurr.getAttribute(ATT_NAME);
+			if (null == sCol)
+			{
+				continue;
+			}
+			sCol = sCol.trim();
+			if (sCol.length() < 1)
+			{
+				continue;
+			}
+			String sVal = oCurr.getAttribute(ATT_VALUE);
+			if (null == sVal)
+			{
+				sVal = "";
+			}
+			m_oCols.setProperty(sCol, sVal);
+		}
+	} // __________________________________
+
+	private String getAttr (String p_sAtt) throws ConfigurationException
+	{
+		String sRet = m_oParms.getAttribute(p_sAtt);
+		if (null == sRet)
+		{
+			throw new ConfigurationException("Missing " + p_sAtt + " attribute");
+		}
+		sRet = sRet.trim();
+		if (p_sAtt.equals(SimpleDataSource.PASSWORD))
+		{
+			return sRet;
+		}
+		if (sRet.length() < 1)
+		{
+			throw new ConfigurationException("Empty " + p_sAtt + " attribute");
+		}
+		return sRet;
+	} // __________________________________
+
+	public String getInsertStmt ()
+	{
+		String[] saCols = new String[m_oCols.size()];
+		m_oCols.keySet().toArray(saCols);
+
+		StringBuffer sbCol = new StringBuffer("insert into ").append(m_sTable)
+				.append(" ");
+		StringBuffer sbPrm = new StringBuffer(" values ");
+		for (int i1 = 0; i1 < saCols.length; i1++)
+		{
+			String sIn = (i1 == 0) ? "(" : ",";
+			String sCurrCol = saCols[i1];
+			sbCol.append(sIn).append("\"").append(sCurrCol).append("\"");
+			sbPrm.append(sIn).append("'").append(m_oCols.getProperty(sCurrCol))
+					.append("'");
+			// REVIEW: Does the value being inserted not need to be escaped e.g.
+			// what if it has a quote in its value??
+		}
+		return sbCol.append(")").append(sbPrm).append(")").toString();
+	} // __________________________________
+
+	public void sendNotification (java.io.Serializable p_o) throws NotificationException
+	{
+		m_oCols.setProperty(m_sDataCol, p_o.toString());
+		JdbcCleanConn oConn = null;
+		try
+		{
+			oConn = new JdbcCleanConn(new SimpleDataSource(m_sDriver, m_sURL,
+					m_sUser, m_sPwd));
+			PreparedStatement PS = oConn.prepareStatement(getInsertStmt());
+			oConn.execUpdWait(PS, 3);
+			oConn.commit();
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace(System.err);
+		} finally
+		{
+			if (null != oConn)
+			{
+				oConn.release();
+			}
+		}
+	} // __________________________________
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifySqlTable.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,110 +1,110 @@
-/*
- * 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.notification;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.naming.NamingException;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-public class NotifyTopics extends NotifyJMS
-{
-
-	public static final String CONNECTION_FACTORY = "ConnectionFactory";
-
-	public static final String CHILD_TOPIC = "topic";
-
-	public NotifyTopics (ConfigTree p_oP) throws ConfigurationException, JMSException
-	{
-		super(p_oP);
-
-		setTopics(p_oP.getChildren(CHILD_TOPIC));
-	} // __________________________________
-
-	protected void setTopics (ConfigTree[] p_oaP) throws ConfigurationException, JMSException
-	{
-		// REVIEW: The connection factory name is hardcoded and is the same as
-		// that of the queue connection factory.
-		TopicConnectionFactory qcf = null;
-		
-		try
-		{
-			qcf = (TopicConnectionFactory) m_oCtx.lookup(CONNECTION_FACTORY);
-		}
-		catch (NamingException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-		
-		TopicConnection oTconn = qcf.createTopicConnection();
-		TopicSession oTsess = oTconn.createTopicSession(false,
-				TopicSession.AUTO_ACKNOWLEDGE);
-
-		m_oaMssProd = new MessageProducer[p_oaP.length];
-		
-		try
-		{
-			for (int i1 = 0; i1 < p_oaP.length; i1++)
-			{
-				String sAtt = p_oaP[i1].getAttribute(ATT_DEST_NAME);
-				if (null == sAtt) throw new ConfigurationException("Missing topic jndiName");
-				Topic oT = (Topic) m_oCtx.lookup(sAtt);
-				m_oaMssProd[i1] = oTsess.createPublisher(oT);
-			}
-		}
-		catch (NamingException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
-
-		m_oConn = oTconn;
-		m_oSess = oTsess;
-		// m_oConn.start(); Only for incoming messages ???
-
-	} // __________________________________
-
-	protected void sendToAll (Message p_oMsg)
-	{
-		for (int i1 = 0; i1 < m_oaMssProd.length; i1++)
-		{
-			TopicPublisher oCurr = (TopicPublisher) m_oaMssProd[i1];
-			
-			try
-			{
-				oCurr.publish(p_oMsg);
-			}
-			catch (Exception e)
-			{
-			}
-		}
-	} // __________________________________
-
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Topic;
+import javax.jms.TopicConnection;
+import javax.jms.TopicConnectionFactory;
+import javax.jms.TopicPublisher;
+import javax.jms.TopicSession;
+import javax.naming.NamingException;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+public class NotifyTopics extends NotifyJMS
+{
+
+	public static final String CONNECTION_FACTORY = "ConnectionFactory";
+
+	public static final String CHILD_TOPIC = "topic";
+
+	public NotifyTopics (ConfigTree p_oP) throws ConfigurationException, JMSException
+	{
+		super(p_oP);
+
+		setTopics(p_oP.getChildren(CHILD_TOPIC));
+	} // __________________________________
+
+	protected void setTopics (ConfigTree[] p_oaP) throws ConfigurationException, JMSException
+	{
+		// REVIEW: The connection factory name is hardcoded and is the same as
+		// that of the queue connection factory.
+		TopicConnectionFactory qcf = null;
+		
+		try
+		{
+			qcf = (TopicConnectionFactory) m_oCtx.lookup(CONNECTION_FACTORY);
+		}
+		catch (NamingException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+		
+		TopicConnection oTconn = qcf.createTopicConnection();
+		TopicSession oTsess = oTconn.createTopicSession(false,
+				TopicSession.AUTO_ACKNOWLEDGE);
+
+		m_oaMssProd = new MessageProducer[p_oaP.length];
+		
+		try
+		{
+			for (int i1 = 0; i1 < p_oaP.length; i1++)
+			{
+				String sAtt = p_oaP[i1].getAttribute(ATT_DEST_NAME);
+				if (null == sAtt) throw new ConfigurationException("Missing topic jndiName");
+				Topic oT = (Topic) m_oCtx.lookup(sAtt);
+				m_oaMssProd[i1] = oTsess.createPublisher(oT);
+			}
+		}
+		catch (NamingException ex)
+		{
+			throw new ConfigurationException(ex);
+		}
+
+		m_oConn = oTconn;
+		m_oSess = oTsess;
+		// m_oConn.start(); Only for incoming messages ???
+
+	} // __________________________________
+
+	protected void sendToAll (Message p_oMsg)
+	{
+		for (int i1 = 0; i1 < m_oaMssProd.length; i1++)
+		{
+			TopicPublisher oCurr = (TopicPublisher) m_oaMssProd[i1];
+			
+			try
+			{
+				oCurr.publish(p_oMsg);
+			}
+			catch (Exception e)
+			{
+			}
+		}
+	} // __________________________________
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,102 +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.notification;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import java.io.Serializable;
-import java.util.Map;
-
-import org.jboss.internal.soa.esb.notification.MacroExpander;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.services.NotificationManager;
-
-public class NotifyUtil
-{
-
-	public static void notifyOK (NotificationManager p_oNH,
-			ConfigTree p_oParent, Serializable p_o, Map p_oCtx)
-	{
-		try
-		{
-			ConfigTree[] oaP = p_oParent.getChildren(NotificationList.ELEMENT);
-			for (int i1 = 0; i1 < oaP.length; i1++)
-			{
-				NotificationList oCurr = new NotificationList(oaP[i1]);
-				if (!oCurr.isOK()) continue;
-				ConfigTree oCpy = oaP[i1].cloneObj();
-				MacroExpander.replaceMacros(oCpy, p_oCtx);
-				p_oNH.sendNotifications(oCpy, p_o);
-			}
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace(System.out);
-		}
-	} // __________________________________
-
-	public static void notifyError (NotificationManager p_oNH,
-			ConfigTree p_oParent, Object p_o, Map p_oCtx, Exception p_e)
-	{
-		ByteArrayOutputStream oBO = new ByteArrayOutputStream();
-		PrintStream oPS = new PrintStream(oBO);
-		try
-		{
-			oPS.println(p_o.toString());
-			if (null != p_e)
-			{
-				p_e.printStackTrace(oPS);
-			}
-			oPS.close();
-
-			String sMsg = oBO.toString();
-			ConfigTree[] oaP = p_oParent.getChildren(NotificationList.ELEMENT);
-			// if (oaP.length<1) // Uncomment this line to send only to the list
-
-			// REVIEW: What's going on here? What's the difference between
-			// sending an
-			// error notification and sending a regular notification apart from
-			// there being an
-			// error message? What's the difference between how the
-			// InotificationHandler
-			// interface is used on the notifyOK and notifyError methods?
-
-			p_oNH.sendNotifications(sMsg);
-			for (int i1 = 0; i1 < oaP.length; i1++)
-			{
-				NotificationList oCurr = new NotificationList(oaP[i1]);
-				if (!oCurr.isErr())
-				{
-					continue;
-				}
-				MacroExpander.replaceMacros(oaP[i1], p_oCtx);
-				p_oNH.sendNotifications(oaP[i1], sMsg);
-			}
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace(System.out);
-		}
-	} // __________________________________
-
-} // ____________________________________________________________________________
+/*
+ * 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.notification;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.io.Serializable;
+import java.util.Map;
+
+import org.jboss.internal.soa.esb.notification.MacroExpander;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.services.NotificationManager;
+
+public class NotifyUtil
+{
+
+	public static void notifyOK (NotificationManager p_oNH,
+			ConfigTree p_oParent, Serializable p_o, Map p_oCtx)
+	{
+		try
+		{
+			ConfigTree[] oaP = p_oParent.getChildren(NotificationList.ELEMENT);
+			for (int i1 = 0; i1 < oaP.length; i1++)
+			{
+				NotificationList oCurr = new NotificationList(oaP[i1]);
+				if (!oCurr.isOK()) continue;
+				ConfigTree oCpy = oaP[i1].cloneObj();
+				MacroExpander.replaceMacros(oCpy, p_oCtx);
+				p_oNH.sendNotifications(oCpy, p_o);
+			}
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace(System.out);
+		}
+	} // __________________________________
+
+	public static void notifyError (NotificationManager p_oNH,
+			ConfigTree p_oParent, Object p_o, Map p_oCtx, Exception p_e)
+	{
+		ByteArrayOutputStream oBO = new ByteArrayOutputStream();
+		PrintStream oPS = new PrintStream(oBO);
+		try
+		{
+			oPS.println(p_o.toString());
+			if (null != p_e)
+			{
+				p_e.printStackTrace(oPS);
+			}
+			oPS.close();
+
+			String sMsg = oBO.toString();
+			ConfigTree[] oaP = p_oParent.getChildren(NotificationList.ELEMENT);
+			// if (oaP.length<1) // Uncomment this line to send only to the list
+
+			// REVIEW: What's going on here? What's the difference between
+			// sending an
+			// error notification and sending a regular notification apart from
+			// there being an
+			// error message? What's the difference between how the
+			// InotificationHandler
+			// interface is used on the notifyOK and notifyError methods?
+
+			p_oNH.sendNotifications(sMsg);
+			for (int i1 = 0; i1 < oaP.length; i1++)
+			{
+				NotificationList oCurr = new NotificationList(oaP[i1]);
+				if (!oCurr.isErr())
+				{
+					continue;
+				}
+				MacroExpander.replaceMacros(oaP[i1], p_oCtx);
+				p_oNH.sendNotifications(oaP[i1], sMsg);
+			}
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace(System.out);
+		}
+	} // __________________________________
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepository.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepository.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepository.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,71 +1,71 @@
-/*
- * 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.parameters;
-
-
-/**
- * Parameter Repository Definition.
- * <p/>
- * A ParamRepository implementation allows persistence, retrieval and removal of
- * parameter values.
- * <p/>
- * Note that it is assumed that implementations are Thread Safe.
- * 
- * @author <a href="mailto:schifest at gmail.com">Esteban Shifman</a>
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public interface ParamRepository {
-	
-	// byte[] versions of the add and get methods might be needed on this.
-	// In fact, if this is done - rename the existing add and get methods
-	// to addString and getString and add the new byte[] methods as add/get.
-	
-	/**
-	 * Store a parameter value in the repository.
-	 * @param name The parameter name.  Must not be <code>null</code>.
-	 * @param value The parameter value.  Must not be <code>null</code>.
-	 * @throws ParamRepositoryException Failed to store the specified parameter value.
-	 */
-	public void add(String name, String value) throws ParamRepositoryException;
-
-	/**
-	 * Get the value associated with the named parameter.
-	 * @param name The parameter name.  Must not be <code>null</code>.
-	 * @return The parameter value, or null if the parameter is not available in 
-	 * the repository.
-	 * @throws ParamRepositoryException  The parameter exists, but an error has occured
-	 * while readingit. 
-	 */
-	public String get(String name) throws ParamRepositoryException;
-
-	/**
-	 * Remove a parameter, or a hierarchy of parameters.
-	 * <p/>
-	 * Because the repository is hierarchical in nature, parameters can be addressed
-	 * explicitly or as a group using a hierarchical name.
-	 * @param name The parameter name.  Must not be <code>null</code>.
-	 * @throws ParamRepositoryException Failed to remove the parameter, or hierarchy of parameters,
-	 * from the repository..
-	 */
-	public void remove(String name) throws ParamRepositoryException;
-}
+/*
+ * 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.parameters;
+
+
+/**
+ * Parameter Repository Definition.
+ * <p/>
+ * A ParamRepository implementation allows persistence, retrieval and removal of
+ * parameter values.
+ * <p/>
+ * Note that it is assumed that implementations are Thread Safe.
+ * 
+ * @author <a href="mailto:schifest at gmail.com">Esteban Shifman</a>
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public interface ParamRepository {
+	
+	// byte[] versions of the add and get methods might be needed on this.
+	// In fact, if this is done - rename the existing add and get methods
+	// to addString and getString and add the new byte[] methods as add/get.
+	
+	/**
+	 * Store a parameter value in the repository.
+	 * @param name The parameter name.  Must not be <code>null</code>.
+	 * @param value The parameter value.  Must not be <code>null</code>.
+	 * @throws ParamRepositoryException Failed to store the specified parameter value.
+	 */
+	public void add(String name, String value) throws ParamRepositoryException;
+
+	/**
+	 * Get the value associated with the named parameter.
+	 * @param name The parameter name.  Must not be <code>null</code>.
+	 * @return The parameter value, or null if the parameter is not available in 
+	 * the repository.
+	 * @throws ParamRepositoryException  The parameter exists, but an error has occured
+	 * while readingit. 
+	 */
+	public String get(String name) throws ParamRepositoryException;
+
+	/**
+	 * Remove a parameter, or a hierarchy of parameters.
+	 * <p/>
+	 * Because the repository is hierarchical in nature, parameters can be addressed
+	 * explicitly or as a group using a hierarchical name.
+	 * @param name The parameter name.  Must not be <code>null</code>.
+	 * @throws ParamRepositoryException Failed to remove the parameter, or hierarchy of parameters,
+	 * from the repository..
+	 */
+	public void remove(String name) throws ParamRepositoryException;
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepository.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,29 +1,29 @@
-package org.jboss.soa.esb.parameters;
-
-import org.jboss.soa.esb.BaseException;
-
-/**
- * {@link org.jboss.soa.esb.parameters.ParamRepository} access Exception.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ParamRepositoryException extends BaseException {
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Public Constructor.
-	 * @param message Exception message.
-	 */
-	public ParamRepositoryException(String message) {
-		super(message);
-	}
-
-	/**
-	 * Public Constructor.
-	 * @param message Exception message.
-	 * @param cause Exception cause.
-	 */
-	public ParamRepositoryException(String message, Throwable cause) {
-		super(message, cause);
-	}
-}
+package org.jboss.soa.esb.parameters;
+
+import org.jboss.soa.esb.BaseException;
+
+/**
+ * {@link org.jboss.soa.esb.parameters.ParamRepository} access Exception.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ParamRepositoryException extends BaseException {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Public Constructor.
+	 * @param message Exception message.
+	 */
+	public ParamRepositoryException(String message) {
+		super(message);
+	}
+
+	/**
+	 * Public Constructor.
+	 * @param message Exception message.
+	 * @param cause Exception cause.
+	 */
+	public ParamRepositoryException(String message, Throwable cause) {
+		super(message, cause);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,119 +1,119 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.parameters;
-
-import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
-import org.jboss.soa.esb.common.Configuration;
-
-/**
- * Factory class for Singleton {@link ParamRepository} creation. <p/> Uses the
- * "org.jboss.soa.esb.paramsRepository.class" system property to determine the
- * {@link ParamRepository} implementation to be created. If not specified, the
- * default implementation is the
- * {@link org.jboss.internal.soa.esb.parameters.ParamFileRepository}.
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public abstract class ParamRepositoryFactory
-{
-
-	/**
-	 * Singleton instance of the repository.
-	 */
-	private static ParamRepository instance;
-
-	/**
-	 * Factory method for creating the Singleton {@link ParamRepository}
-	 * instance for the system.
-	 * 
-	 * @return The ParamRepository instance for the system.
-	 */
-	public static ParamRepository getInstance()
-	{
-		if (instance == null)
-		{
-			// Hasn't been created yet - lets created it in a synchronized
-			// fashion...
-			instance = synchedGetInstance();
-		}
-
-		return instance;
-	}
-
-	/**
-	 * Synchronizes creation of the Singleton instance.
-	 * 
-	 * @return The Singleton ParamRepository instance.
-	 */
-	private static ParamRepository synchedGetInstance()
-	{
-		synchronized (ParamRepositoryFactory.class)
-		{
-			// The following check ensures that multithreads won't create
-			// multiple instances of the singleton. Threads that are blocked
-			// waiting
-			// at the start of this synch block will simply fall through and
-			// return the
-			// instance created by the thread that got in ahead of them.
-			if (instance == null)
-			{
-				String runtimeClassName = Configuration
-						.getParamRepositoryImplClass();
-
-				if (runtimeClassName == null)
-				{
-					// If there's no repository name configured, return the
-					// default file-based repository...
-					instance = new ParamFileRepository();
-				} else
-				{
-					try
-					{
-						Class<?> runtimeClass = Class.forName(runtimeClassName);
-						instance = (ParamRepository) runtimeClass.newInstance();
-					} catch (Exception e)
-					{
-						new IllegalStateException(
-								"System Configuration Exception: Unable to create system "
-										+ ParamRepository.class.getSimpleName()
-										+ " instance from runtime class name ["
-										+ runtimeClassName + "]", e);
-					}
-				}
-			}
-		}
-
-		return instance;
-	}
-
-	/**
-	 * Resets the factory, allowing creation of a new Singleton instance. <p/>
-	 * Should only need to be used for testing purposes.
-	 */
-	protected static void reset()
-	{
-		synchronized (ParamRepositoryFactory.class)
-		{
-			instance = null;
-		}
-	}
-}
+/*
+ * 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.parameters;
+
+import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
+import org.jboss.soa.esb.common.Configuration;
+
+/**
+ * Factory class for Singleton {@link ParamRepository} creation. <p/> Uses the
+ * "org.jboss.soa.esb.paramsRepository.class" system property to determine the
+ * {@link ParamRepository} implementation to be created. If not specified, the
+ * default implementation is the
+ * {@link org.jboss.internal.soa.esb.parameters.ParamFileRepository}.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class ParamRepositoryFactory
+{
+
+	/**
+	 * Singleton instance of the repository.
+	 */
+	private static ParamRepository instance;
+
+	/**
+	 * Factory method for creating the Singleton {@link ParamRepository}
+	 * instance for the system.
+	 * 
+	 * @return The ParamRepository instance for the system.
+	 */
+	public static ParamRepository getInstance()
+	{
+		if (instance == null)
+		{
+			// Hasn't been created yet - lets created it in a synchronized
+			// fashion...
+			instance = synchedGetInstance();
+		}
+
+		return instance;
+	}
+
+	/**
+	 * Synchronizes creation of the Singleton instance.
+	 * 
+	 * @return The Singleton ParamRepository instance.
+	 */
+	private static ParamRepository synchedGetInstance()
+	{
+		synchronized (ParamRepositoryFactory.class)
+		{
+			// The following check ensures that multithreads won't create
+			// multiple instances of the singleton. Threads that are blocked
+			// waiting
+			// at the start of this synch block will simply fall through and
+			// return the
+			// instance created by the thread that got in ahead of them.
+			if (instance == null)
+			{
+				String runtimeClassName = Configuration
+						.getParamRepositoryImplClass();
+
+				if (runtimeClassName == null)
+				{
+					// If there's no repository name configured, return the
+					// default file-based repository...
+					instance = new ParamFileRepository();
+				} else
+				{
+					try
+					{
+						Class<?> runtimeClass = Class.forName(runtimeClassName);
+						instance = (ParamRepository) runtimeClass.newInstance();
+					} catch (Exception e)
+					{
+						new IllegalStateException(
+								"System Configuration Exception: Unable to create system "
+										+ ParamRepository.class.getSimpleName()
+										+ " instance from runtime class name ["
+										+ runtimeClassName + "]", e);
+					}
+				}
+			}
+		}
+
+		return instance;
+	}
+
+	/**
+	 * Resets the factory, allowing creation of a new Singleton instance. <p/>
+	 * Should only need to be used for testing purposes.
+	 */
+	protected static void reset()
+	{
+		synchronized (ParamRepositoryFactory.class)
+		{
+			instance = null;
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/DefaultEncryptionFactory.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/DefaultEncryptionFactory.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/DefaultEncryptionFactory.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,63 +1,63 @@
-/*
- * 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.services;
-
-public class DefaultEncryptionFactory
-{
-	public static Encryption getEncrypter()
-	{
-		return new DummyEncrypter();
-
-	} //________________________________
-
-	public static Encryption getEncrypter(Object p_o)
-	{
-		return new DummyEncrypter();
-
-	} //________________________________
-
-	/**
-	 *  This is a dummy class to provide dummy
-	 *  encrypt/decrypt methods for a byte[]
-	 *
-	 */
-	private static class DummyEncrypter implements Encryption
-	{
-//	  private static Cipher s_oCC;
-//	  static
-//	  { try { s_oCC = Cipher.getInstance("DES"); }
-//	    catch (Exception e) { e.printStackTrace(); }
-//	  }
-	  public byte [] encrypt (byte [] p_ba, Object p_oParms)
-	         throws EncryptionFailedException
-	  {
-		  return  p_ba;
-	  } //__________________________________
-
-	  public byte [] decrypt (byte [] p_ba, Object p_oParms)
-	         throws EncryptionFailedException
-	  {
-		  return p_ba;
-	  } //__________________________________
-	} //___________________________________________________
-
+/*
+ * 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.services;
+
+public class DefaultEncryptionFactory
+{
+	public static Encryption getEncrypter()
+	{
+		return new DummyEncrypter();
+
+	} //________________________________
+
+	public static Encryption getEncrypter(Object p_o)
+	{
+		return new DummyEncrypter();
+
+	} //________________________________
+
+	/**
+	 *  This is a dummy class to provide dummy
+	 *  encrypt/decrypt methods for a byte[]
+	 *
+	 */
+	private static class DummyEncrypter implements Encryption
+	{
+//	  private static Cipher s_oCC;
+//	  static
+//	  { try { s_oCC = Cipher.getInstance("DES"); }
+//	    catch (Exception e) { e.printStackTrace(); }
+//	  }
+	  public byte [] encrypt (byte [] p_ba, Object p_oParms)
+	         throws EncryptionFailedException
+	  {
+		  return  p_ba;
+	  } //__________________________________
+
+	  public byte [] decrypt (byte [] p_ba, Object p_oParms)
+	         throws EncryptionFailedException
+	  {
+		  return p_ba;
+	  } //__________________________________
+	} //___________________________________________________
+
 } //____________________________________________________________________________
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/DefaultEncryptionFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/Encryption.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/Encryption.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/Encryption.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,28 +1,28 @@
-/*
-* 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.services;
-
-public interface Encryption 
-{
-	  public byte [] encrypt (byte [] p_ba, Object p_oParms) throws EncryptionFailedException;
-	  public byte [] decrypt (byte [] p_ba, Object p_oParms) throws EncryptionFailedException;
-}
+/*
+* 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.services;
+
+public interface Encryption 
+{
+	  public byte [] encrypt (byte [] p_ba, Object p_oParms) throws EncryptionFailedException;
+	  public byte [] decrypt (byte [] p_ba, Object p_oParms) throws EncryptionFailedException;
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/Encryption.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/EncryptionFailedException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/NotificationManager.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/NotificationManager.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/NotificationManager.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-/*
- * 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.services;
-
-import java.io.Serializable;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.notification.NotificationException;
-
-/**
- * Use this interface to group all methods that can be useful to trigger events
- * that can be caught by listeners, within or outside of the Rosetta framework
- * 
- * @author Esteban
- * 
- */
-public interface NotificationManager
-{
-
-	// REVIEW: Add some Javadoc for this interface!!!
-	/**
-	 * public void sendNotifications(ConfigTree p_oP, Serializable p_o)
-	 * 
-	 * @param p_oP
-	 *            ConfigTree - A serialized NotificationList object (as a
-	 *            ConfigTree)
-	 * @param p_o
-	 *            The Serializable object that will be sent to all the
-	 *            NotificationTarget objects contained in the NotificationList
-	 * 
-	 * <p/>Implementations of this interface will be responsible of sending the
-	 * Serializable (arg 1) to destinations determined by each
-	 * NotificationTarget contained in the NotificationList represented by arg
-	 * 0. <p/>Please see org.jboss.soa.esb.notification package for existing
-	 * classes that extend NotificationTarget (Files, Queues, Topics,
-	 * SqlTable...)
-	 * 
-	 * <p/> Invoking processes are responsible to provide dynamic content of
-	 * notification <p/> The NotificationTarget objects can define 'static'
-	 * content for (suc as contents of certain columns in SQL, or message
-	 * properties for JMS notification targets, etc.
-	 */
-	public void sendNotifications (ConfigTree p_oP, Serializable p_o)
-			throws ConfigurationException, NotificationException;
-
-	public void sendNotifications (Serializable p_o)
-			throws NotificationException;
-} // ____________________________________________________________________________
+/*
+ * 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.services;
+
+import java.io.Serializable;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.notification.NotificationException;
+
+/**
+ * Use this interface to group all methods that can be useful to trigger events
+ * that can be caught by listeners, within or outside of the Rosetta framework
+ * 
+ * @author Esteban
+ * 
+ */
+public interface NotificationManager
+{
+
+	// REVIEW: Add some Javadoc for this interface!!!
+	/**
+	 * public void sendNotifications(ConfigTree p_oP, Serializable p_o)
+	 * 
+	 * @param p_oP
+	 *            ConfigTree - A serialized NotificationList object (as a
+	 *            ConfigTree)
+	 * @param p_o
+	 *            The Serializable object that will be sent to all the
+	 *            NotificationTarget objects contained in the NotificationList
+	 * 
+	 * <p/>Implementations of this interface will be responsible of sending the
+	 * Serializable (arg 1) to destinations determined by each
+	 * NotificationTarget contained in the NotificationList represented by arg
+	 * 0. <p/>Please see org.jboss.soa.esb.notification package for existing
+	 * classes that extend NotificationTarget (Files, Queues, Topics,
+	 * SqlTable...)
+	 * 
+	 * <p/> Invoking processes are responsible to provide dynamic content of
+	 * notification <p/> The NotificationTarget objects can define 'static'
+	 * content for (suc as contents of certain columns in SQL, or message
+	 * properties for JMS notification targets, etc.
+	 */
+	public void sendNotifications (ConfigTree p_oP, Serializable p_o)
+			throws ConfigurationException, NotificationException;
+
+	public void sendNotifications (Serializable p_o)
+			throws NotificationException;
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/NotificationManager.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStore.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStoreException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStoreException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStoreException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,53 +1,53 @@
-package org.jboss.soa.esb.services.persistence;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Thrown if marshalling a message fails. This could be because
- * conversion to XML encounters problems.
- */
-
-public class MessageStoreException extends Exception
-{
-	private static final long serialVersionUID = 0xE;
-	
-	public MessageStoreException()
-	{
-		super();
-	}
-
-	public MessageStoreException(String s)
-	{
-		super(s);
-	}
-
-	public MessageStoreException (Exception ex)
-	{
-		super(ex);
-	}
-
-	public MessageStoreException (String message, Exception ex)
-	{
-		super(message, ex);
-	}
-	
-}
+package org.jboss.soa.esb.services.persistence;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Thrown if marshalling a message fails. This could be because
+ * conversion to XML encounters problems.
+ */
+
+public class MessageStoreException extends Exception
+{
+	private static final long serialVersionUID = 0xE;
+	
+	public MessageStoreException()
+	{
+		super();
+	}
+
+	public MessageStoreException(String s)
+	{
+		super(s);
+	}
+
+	public MessageStoreException (Exception ex)
+	{
+		super(ex);
+	}
+
+	public MessageStoreException (String message, Exception ex)
+	{
+		super(message, ex);
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStoreException.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStoreFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/transform/TransformationException.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/transform/TransformationService.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,469 +1,469 @@
-/*
- * 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.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-
-import com.enterprisedt.net.ftp.FTPClient;
-import com.enterprisedt.net.ftp.FTPConnectMode;
-import com.enterprisedt.net.ftp.FTPException;
-import com.enterprisedt.net.ftp.FTPTransferType;
-
-/**
- * Simplified FTP transfers
- * <p>
- * Description: Implements a simple set of FTP functionality Parameters to
- * establish the FTP connection are provided at construction time and cannot
- * change during the lifetime of the object <br/>Hides low level details.
- * Current implementation is based on the "Entreprise Distributed Technology
- * edtFTPj" library but this can be changed with no impact to existing code,
- * just by changing this class without modifying the signature of it's public
- * methods
- * </p>
- */
-
-public class FtpClientUtil
-{
-	public static final String PARMS_FTP_SERVER = "ftpServer";
-
-	public static final String PARMS_USER = "ftpUser";
-
-	public static final String PARMS_PASSWD = "ftpPassword";
-
-	public static final String PARMS_PORT = "ftpPort";
-
-	public static final String PARMS_REMOTE_DIR = "ftpRemoteDir";
-
-	public static final String PARMS_LOCAL_DIR = "ftpLocalDir";
-
-	public static final String PARMS_ASCII = "ftpAscii";
-
-	public static final String PARMS_PASSIVE = "ftpPassive";
-
-	private static final String TMP_SUFFIX = ".rosettaPart";
-
-	public enum XFER_TYPE
-	{
-		ascii, binary
-	};
-
-	private ConfigTree m_oParms;
-
-	private String m_sFtpServer, m_sUser, m_sPasswd;
-
-	private String m_sRemoteDir, m_sLocalDir;
-
-	private int m_iPort;
-
-	private boolean m_bPassive;
-
-	public String getRemoteDir ()
-	{
-		return m_sRemoteDir;
-	}
-
-	private FTPClient m_oConn = new FTPClient();
-
-	private FTPTransferType m_oXferType = FTPTransferType.BINARY;
-
-	/**
-	 * Checks validity and completeness of parameters, and keeps the info
-	 * internally for subsequent FTP requests
-	 * 
-	 * @param p_oP
-	 *            ConfigTree
-	 * @throws ConfigurationException :
-	 *             if parameters are invalid or incomplete
-	 *             <li>Parameters: (XML attributes at the root level) </li>
-	 *             <li> ftpServer = name or IP of FTP server </li>
-	 *             <li> ftpUser = login ID for server </li>
-	 *             <li> ftpPassword </li>
-	 *             <li> localDirURI = absolute path in the local filesystem
-	 *             </li>
-	 *             <li> remoteDirURI = remote path is relative to ftp user home
-	 *             in remote computer </li>
-	 * @throws RemoteFileSystemException
-	 */
-
-	public FtpClientUtil (ConfigTree p_oP, boolean p_bConnect) throws RemoteFileSystemException, ConfigurationException
-	{
-		m_oParms = p_oP;
-		initialize(p_bConnect);
-	} // _________________________________
-
-	public FtpClientUtil (List<KeyValuePair> attribs, boolean connect)
-			throws RemoteFileSystemException, ConfigurationException
-	{
-		m_oParms = new ConfigTree("fromProps");
-		for (KeyValuePair oCurr : attribs)
-			m_oParms.setAttribute(oCurr.getKey(), oCurr.getValue());
-		initialize(connect);
-	} // __________________________________
-
-	private void initialize (boolean bConnect) throws RemoteFileSystemException, ConfigurationException
-	{
-		checkParms();
-		
-		try
-		{
-			if (bConnect)
-			{
-				m_oConn.setRemoteHost(m_sFtpServer);
-				m_oConn.setRemotePort(m_iPort);
-				m_oConn.connect();
-				
-				for (int i1 = 0; i1 < 10 && !m_oConn.connected(); i1++)
-				{
-					try
-					{
-						// TODO magic number
-						Thread.sleep(200);
-					}
-					catch (InterruptedException ex)
-					{
-					}
-				}
-				
-				if (!m_oConn.connected())
-					throw new RemoteFileSystemException("Can't connect to FTP server");
-				m_oConn.user(m_sUser);
-				m_oConn.password(m_sPasswd);
-				m_oConn
-						.setConnectMode((m_bPassive) ? FTPConnectMode.PASV : FTPConnectMode.ACTIVE);
-			}
-		}
-		catch (RemoteFileSystemException ex)
-		{
-			throw ex;
-		}
-		catch (Exception ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	} // __________________________________
-
-	/**
-	 * Terminates ftp session and frees resources
-	 * <li>Well behaved programs should make sure to call this method </li>
-	 */
-	public void quit ()
-	{
-		if (null != m_oConn) try
-		{
-			m_oConn.quit();
-		}
-		catch (Exception e)
-		{
-		}
-	} // _________________________________
-
-	/**
-	 * Deletes specified file in remote directory
-	 * 
-	 * @param p_sFile
-	 *            String : filename to delete. Method will attempt to delete
-	 *            file with rightmost node of argument within remote directory
-	 *            specified in 'remoteDirURI'
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or file cannot be
-	 *             deleted in remote directory
-	 */
-	public void deleteRemoteFile (String p_sFile) throws RemoteFileSystemException
-	{
-		try
-		{
-			m_oConn.delete(getRemoteDir() + "/" + new File(p_sFile).getName());
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	} // _________________________________
-
-	public void remoteDelete (File p_oFile) throws RemoteFileSystemException
-	{
-		try
-		{
-			m_oConn.delete(fileToFtpString(p_oFile));
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	} // _________________________________
-
-	/**
-	 * Gets the list of files in the remote directory that end with arg0
-	 * 
-	 * @param p_sSuffix
-	 *            String : retrieve only files that end with that suffix - all
-	 *            files if null
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or problems
-	 *             encountered
-	 */
-	public String[] getFileListFromRemoteDir (String p_sSuffix)
-			throws RemoteFileSystemException
-	{
-		String sSuffix = (null == p_sSuffix) ? "*" : "*" + p_sSuffix;
-		
-		try
-		{
-			return m_oConn.dir(sSuffix);
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	} // _________________________________
-
-	/**
-	 * Change remote directory
-	 * 
-	 * @param p_sDir
-	 *            String : directory to set
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or problems
-	 *             encountered
-	 */
-	public void setRemoteDir (String p_sDir) throws RemoteFileSystemException
-	{
-		try
-		{
-			m_oConn.chdir(p_sDir);
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	} // _________________________________
-
-	/**
-	 * Renames specified file in remote directory to specified new name
-	 * 
-	 * @param p_sFrom
-	 *            String : filename to rename
-	 * @param p_sTo
-	 *            String : new filename
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or file cannot be
-	 *             renamed to new name in remote directory
-	 *             <li>Method will attempt to rename file with rightmost node
-	 *             of argument within remote directory specified in
-	 *             'remoteDirURI', to new name inside the SAME remote directory
-	 */
-	public void renameInRemoteDir (String p_sFrom, String p_sTo)
-			throws RemoteFileSystemException
-	{
-		String sRmtFrom = new File(p_sFrom).getName();
-		String sRmtTo = new File(p_sTo).getName();
-
-		try
-		{
-			m_oConn.rename(getRemoteDir() + "/" + sRmtFrom,
-					getRemoteDir() + "/" + sRmtTo);
-		}
-		catch (Exception e)
-		{
-			String sMess = this.getClass().getSimpleName() + " can't rename in remote directory <" + e
-					.getMessage() + ">";
-			throw new RemoteFileSystemException(sMess);
-		}
-	} // _________________________________
-
-	public void remoteRename (File p_oFrom, File p_oTo) throws RemoteFileSystemException
-	{
-		try
-		{
-			m_oConn.rename(fileToFtpString(p_oFrom), fileToFtpString(p_oTo));
-		}
-		catch (Exception e)
-		{
-			String sMess = this.getClass().getSimpleName() + " can't rename in remote directory <" + e
-					.getMessage() + ">";
-			throw new RemoteFileSystemException(sMess);
-		}
-	} // _________________________________
-
-	/**
-	 * Uploads specified file from local directory (localDirURI) to remote
-	 * directory (remoteDirURI)
-	 * 
-	 * @param p_sFile
-	 *            String : filename to upload
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or file cannot be
-	 *             uploaded
-	 *             <li> local file will be renamed during transfer
-	 *             ('.xferNotReady' appended to name)</li>
-	 *             <li> upon successful completion. the suffix '.xferDone' will
-	 *             be appended to the original filename </li>
-	 */
-	public void uploadFile (File p_oFile, String p_sRemoteName)
-			throws RemoteFileSystemException
-	{
-		String sRemoteOK = getRemoteDir() + "/" + p_sRemoteName;
-		String sRemoteTmp = sRemoteOK + TMP_SUFFIX;
-		
-		try
-		{
-			m_oConn.setType(m_oXferType);
-			m_oConn.put(fileToFtpString(p_oFile), sRemoteTmp);
-			m_oConn.rename(sRemoteTmp, sRemoteOK);
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	} // _________________________________
-
-	/**
-	 * Downloads specified file from remote directory (remoteDirURI) to local
-	 * directory (localDirURI)
-	 * 
-	 * @param p_sFile
-	 *            String : filename to download
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or file cannot be
-	 *             downloaded
-	 *             <li> local file is assigned a temporary name during transfer
-	 *             </li>
-	 *             <li> upon successful completion, local temporary file will be
-	 *             renamed to name specified in argument, and suffix '.xferDone'
-	 *             will be appended to the original filename in the remote
-	 *             directory </li>
-	 */
-	public void downloadFile (String p_sFile, String p_sFinalName)
-			throws RemoteFileSystemException
-	{
-		try
-		{
-			File oLocalDir = new File(m_sLocalDir);
-			File oLclFile = File.createTempFile("Rosetta_", TMP_SUFFIX, oLocalDir);
-	
-			try
-			{
-				oLclFile.delete();
-			}
-			catch (Exception e)
-			{
-			}
-			
-			m_oConn.setType(m_oXferType);
-			m_oConn.get(fileToFtpString(oLclFile), p_sFile);
-	
-			File oNew = new File(oLocalDir, p_sFinalName);
-			
-			if (oNew.exists()) 
-				oNew.delete();
-			
-			oLclFile.renameTo(oNew);
-		}
-		catch (FTPException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-		catch (IOException ex)
-		{
-			throw new RemoteFileSystemException(ex);
-		}
-	} // _________________________________
-
-	// Beware !!! The logic here seems wrong, but it works
-	// It appears that there's some kind of bug in the edtftpj.jar library
-	// The !XFER_TYPE.ascii.equals(p_oMode) should NOT be negated
-	// But it works when negated (newlines from Unix to DOS)
-	private void setXferType (XFER_TYPE p_oMode)
-	{
-		m_oXferType = !XFER_TYPE.ascii.equals(p_oMode) ? FTPTransferType.ASCII : FTPTransferType.BINARY;
-	} // _________________________________
-
-	private void checkParms () throws ConfigurationException
-	{
-		m_sFtpServer = m_oParms.getAttribute(PARMS_FTP_SERVER);
-		if (null == m_sFtpServer)
-			throw new ConfigurationException("No FTP server specified");
-
-		m_sUser = m_oParms.getAttribute(PARMS_USER);
-		if (null == m_sUser)
-			throw new ConfigurationException("No username specified for FTP");
-
-		m_sPasswd = m_oParms.getAttribute(PARMS_PASSWD);
-		if (null == m_sPasswd)
-			throw new ConfigurationException("No password specified for FTP");
-
-		m_sRemoteDir = m_oParms.getAttribute(PARMS_REMOTE_DIR);
-		if (null == m_sRemoteDir) 
-			m_sRemoteDir = "";
-
-		m_sLocalDir = m_oParms.getAttribute(PARMS_LOCAL_DIR);
-		if (null == m_sLocalDir) 
-			m_sLocalDir = ".";
-
-		String sAux = m_oParms.getAttribute(PARMS_PORT);
-		m_iPort = (null == sAux) ? 21 : Integer.parseInt(sAux);
-
-		boolean bAscii = false;
-		sAux = m_oParms.getAttribute(PARMS_ASCII);
-		
-		if (null != sAux) 
-			bAscii = Boolean.parseBoolean(sAux);
-		
-		setXferType((bAscii) ? XFER_TYPE.ascii : XFER_TYPE.binary);
-
-		m_bPassive = false;
-		sAux = m_oParms.getAttribute(PARMS_PASSIVE);
-		m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
-	} // __________________________________
-
-	public static String fileToFtpString (File p_oF)
-	{
-		return (null == p_oF) ? null : p_oF.toString().replace("\\", "/");
-	} // ________________________________
-
-} // ____________________________________________________________________________
+/*
+ * 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.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.KeyValuePair;
+
+import com.enterprisedt.net.ftp.FTPClient;
+import com.enterprisedt.net.ftp.FTPConnectMode;
+import com.enterprisedt.net.ftp.FTPException;
+import com.enterprisedt.net.ftp.FTPTransferType;
+
+/**
+ * Simplified FTP transfers
+ * <p>
+ * Description: Implements a simple set of FTP functionality Parameters to
+ * establish the FTP connection are provided at construction time and cannot
+ * change during the lifetime of the object <br/>Hides low level details.
+ * Current implementation is based on the "Entreprise Distributed Technology
+ * edtFTPj" library but this can be changed with no impact to existing code,
+ * just by changing this class without modifying the signature of it's public
+ * methods
+ * </p>
+ */
+
+public class FtpClientUtil
+{
+	public static final String PARMS_FTP_SERVER = "ftpServer";
+
+	public static final String PARMS_USER = "ftpUser";
+
+	public static final String PARMS_PASSWD = "ftpPassword";
+
+	public static final String PARMS_PORT = "ftpPort";
+
+	public static final String PARMS_REMOTE_DIR = "ftpRemoteDir";
+
+	public static final String PARMS_LOCAL_DIR = "ftpLocalDir";
+
+	public static final String PARMS_ASCII = "ftpAscii";
+
+	public static final String PARMS_PASSIVE = "ftpPassive";
+
+	private static final String TMP_SUFFIX = ".rosettaPart";
+
+	public enum XFER_TYPE
+	{
+		ascii, binary
+	};
+
+	private ConfigTree m_oParms;
+
+	private String m_sFtpServer, m_sUser, m_sPasswd;
+
+	private String m_sRemoteDir, m_sLocalDir;
+
+	private int m_iPort;
+
+	private boolean m_bPassive;
+
+	public String getRemoteDir ()
+	{
+		return m_sRemoteDir;
+	}
+
+	private FTPClient m_oConn = new FTPClient();
+
+	private FTPTransferType m_oXferType = FTPTransferType.BINARY;
+
+	/**
+	 * Checks validity and completeness of parameters, and keeps the info
+	 * internally for subsequent FTP requests
+	 * 
+	 * @param p_oP
+	 *            ConfigTree
+	 * @throws ConfigurationException :
+	 *             if parameters are invalid or incomplete
+	 *             <li>Parameters: (XML attributes at the root level) </li>
+	 *             <li> ftpServer = name or IP of FTP server </li>
+	 *             <li> ftpUser = login ID for server </li>
+	 *             <li> ftpPassword </li>
+	 *             <li> localDirURI = absolute path in the local filesystem
+	 *             </li>
+	 *             <li> remoteDirURI = remote path is relative to ftp user home
+	 *             in remote computer </li>
+	 * @throws RemoteFileSystemException
+	 */
+
+	public FtpClientUtil (ConfigTree p_oP, boolean p_bConnect) throws RemoteFileSystemException, ConfigurationException
+	{
+		m_oParms = p_oP;
+		initialize(p_bConnect);
+	} // _________________________________
+
+	public FtpClientUtil (List<KeyValuePair> attribs, boolean connect)
+			throws RemoteFileSystemException, ConfigurationException
+	{
+		m_oParms = new ConfigTree("fromProps");
+		for (KeyValuePair oCurr : attribs)
+			m_oParms.setAttribute(oCurr.getKey(), oCurr.getValue());
+		initialize(connect);
+	} // __________________________________
+
+	private void initialize (boolean bConnect) throws RemoteFileSystemException, ConfigurationException
+	{
+		checkParms();
+		
+		try
+		{
+			if (bConnect)
+			{
+				m_oConn.setRemoteHost(m_sFtpServer);
+				m_oConn.setRemotePort(m_iPort);
+				m_oConn.connect();
+				
+				for (int i1 = 0; i1 < 10 && !m_oConn.connected(); i1++)
+				{
+					try
+					{
+						// TODO magic number
+						Thread.sleep(200);
+					}
+					catch (InterruptedException ex)
+					{
+					}
+				}
+				
+				if (!m_oConn.connected())
+					throw new RemoteFileSystemException("Can't connect to FTP server");
+				m_oConn.user(m_sUser);
+				m_oConn.password(m_sPasswd);
+				m_oConn
+						.setConnectMode((m_bPassive) ? FTPConnectMode.PASV : FTPConnectMode.ACTIVE);
+			}
+		}
+		catch (RemoteFileSystemException ex)
+		{
+			throw ex;
+		}
+		catch (Exception ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	} // __________________________________
+
+	/**
+	 * Terminates ftp session and frees resources
+	 * <li>Well behaved programs should make sure to call this method </li>
+	 */
+	public void quit ()
+	{
+		if (null != m_oConn) try
+		{
+			m_oConn.quit();
+		}
+		catch (Exception e)
+		{
+		}
+	} // _________________________________
+
+	/**
+	 * Deletes specified file in remote directory
+	 * 
+	 * @param p_sFile
+	 *            String : filename to delete. Method will attempt to delete
+	 *            file with rightmost node of argument within remote directory
+	 *            specified in 'remoteDirURI'
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or file cannot be
+	 *             deleted in remote directory
+	 */
+	public void deleteRemoteFile (String p_sFile) throws RemoteFileSystemException
+	{
+		try
+		{
+			m_oConn.delete(getRemoteDir() + "/" + new File(p_sFile).getName());
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	} // _________________________________
+
+	public void remoteDelete (File p_oFile) throws RemoteFileSystemException
+	{
+		try
+		{
+			m_oConn.delete(fileToFtpString(p_oFile));
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	} // _________________________________
+
+	/**
+	 * Gets the list of files in the remote directory that end with arg0
+	 * 
+	 * @param p_sSuffix
+	 *            String : retrieve only files that end with that suffix - all
+	 *            files if null
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or problems
+	 *             encountered
+	 */
+	public String[] getFileListFromRemoteDir (String p_sSuffix)
+			throws RemoteFileSystemException
+	{
+		String sSuffix = (null == p_sSuffix) ? "*" : "*" + p_sSuffix;
+		
+		try
+		{
+			return m_oConn.dir(sSuffix);
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	} // _________________________________
+
+	/**
+	 * Change remote directory
+	 * 
+	 * @param p_sDir
+	 *            String : directory to set
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or problems
+	 *             encountered
+	 */
+	public void setRemoteDir (String p_sDir) throws RemoteFileSystemException
+	{
+		try
+		{
+			m_oConn.chdir(p_sDir);
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	} // _________________________________
+
+	/**
+	 * Renames specified file in remote directory to specified new name
+	 * 
+	 * @param p_sFrom
+	 *            String : filename to rename
+	 * @param p_sTo
+	 *            String : new filename
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or file cannot be
+	 *             renamed to new name in remote directory
+	 *             <li>Method will attempt to rename file with rightmost node
+	 *             of argument within remote directory specified in
+	 *             'remoteDirURI', to new name inside the SAME remote directory
+	 */
+	public void renameInRemoteDir (String p_sFrom, String p_sTo)
+			throws RemoteFileSystemException
+	{
+		String sRmtFrom = new File(p_sFrom).getName();
+		String sRmtTo = new File(p_sTo).getName();
+
+		try
+		{
+			m_oConn.rename(getRemoteDir() + "/" + sRmtFrom,
+					getRemoteDir() + "/" + sRmtTo);
+		}
+		catch (Exception e)
+		{
+			String sMess = this.getClass().getSimpleName() + " can't rename in remote directory <" + e
+					.getMessage() + ">";
+			throw new RemoteFileSystemException(sMess);
+		}
+	} // _________________________________
+
+	public void remoteRename (File p_oFrom, File p_oTo) throws RemoteFileSystemException
+	{
+		try
+		{
+			m_oConn.rename(fileToFtpString(p_oFrom), fileToFtpString(p_oTo));
+		}
+		catch (Exception e)
+		{
+			String sMess = this.getClass().getSimpleName() + " can't rename in remote directory <" + e
+					.getMessage() + ">";
+			throw new RemoteFileSystemException(sMess);
+		}
+	} // _________________________________
+
+	/**
+	 * Uploads specified file from local directory (localDirURI) to remote
+	 * directory (remoteDirURI)
+	 * 
+	 * @param p_sFile
+	 *            String : filename to upload
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or file cannot be
+	 *             uploaded
+	 *             <li> local file will be renamed during transfer
+	 *             ('.xferNotReady' appended to name)</li>
+	 *             <li> upon successful completion. the suffix '.xferDone' will
+	 *             be appended to the original filename </li>
+	 */
+	public void uploadFile (File p_oFile, String p_sRemoteName)
+			throws RemoteFileSystemException
+	{
+		String sRemoteOK = getRemoteDir() + "/" + p_sRemoteName;
+		String sRemoteTmp = sRemoteOK + TMP_SUFFIX;
+		
+		try
+		{
+			m_oConn.setType(m_oXferType);
+			m_oConn.put(fileToFtpString(p_oFile), sRemoteTmp);
+			m_oConn.rename(sRemoteTmp, sRemoteOK);
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	} // _________________________________
+
+	/**
+	 * Downloads specified file from remote directory (remoteDirURI) to local
+	 * directory (localDirURI)
+	 * 
+	 * @param p_sFile
+	 *            String : filename to download
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or file cannot be
+	 *             downloaded
+	 *             <li> local file is assigned a temporary name during transfer
+	 *             </li>
+	 *             <li> upon successful completion, local temporary file will be
+	 *             renamed to name specified in argument, and suffix '.xferDone'
+	 *             will be appended to the original filename in the remote
+	 *             directory </li>
+	 */
+	public void downloadFile (String p_sFile, String p_sFinalName)
+			throws RemoteFileSystemException
+	{
+		try
+		{
+			File oLocalDir = new File(m_sLocalDir);
+			File oLclFile = File.createTempFile("Rosetta_", TMP_SUFFIX, oLocalDir);
+	
+			try
+			{
+				oLclFile.delete();
+			}
+			catch (Exception e)
+			{
+			}
+			
+			m_oConn.setType(m_oXferType);
+			m_oConn.get(fileToFtpString(oLclFile), p_sFile);
+	
+			File oNew = new File(oLocalDir, p_sFinalName);
+			
+			if (oNew.exists()) 
+				oNew.delete();
+			
+			oLclFile.renameTo(oNew);
+		}
+		catch (FTPException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+		catch (IOException ex)
+		{
+			throw new RemoteFileSystemException(ex);
+		}
+	} // _________________________________
+
+	// Beware !!! The logic here seems wrong, but it works
+	// It appears that there's some kind of bug in the edtftpj.jar library
+	// The !XFER_TYPE.ascii.equals(p_oMode) should NOT be negated
+	// But it works when negated (newlines from Unix to DOS)
+	private void setXferType (XFER_TYPE p_oMode)
+	{
+		m_oXferType = !XFER_TYPE.ascii.equals(p_oMode) ? FTPTransferType.ASCII : FTPTransferType.BINARY;
+	} // _________________________________
+
+	private void checkParms () throws ConfigurationException
+	{
+		m_sFtpServer = m_oParms.getAttribute(PARMS_FTP_SERVER);
+		if (null == m_sFtpServer)
+			throw new ConfigurationException("No FTP server specified");
+
+		m_sUser = m_oParms.getAttribute(PARMS_USER);
+		if (null == m_sUser)
+			throw new ConfigurationException("No username specified for FTP");
+
+		m_sPasswd = m_oParms.getAttribute(PARMS_PASSWD);
+		if (null == m_sPasswd)
+			throw new ConfigurationException("No password specified for FTP");
+
+		m_sRemoteDir = m_oParms.getAttribute(PARMS_REMOTE_DIR);
+		if (null == m_sRemoteDir) 
+			m_sRemoteDir = "";
+
+		m_sLocalDir = m_oParms.getAttribute(PARMS_LOCAL_DIR);
+		if (null == m_sLocalDir) 
+			m_sLocalDir = ".";
+
+		String sAux = m_oParms.getAttribute(PARMS_PORT);
+		m_iPort = (null == sAux) ? 21 : Integer.parseInt(sAux);
+
+		boolean bAscii = false;
+		sAux = m_oParms.getAttribute(PARMS_ASCII);
+		
+		if (null != sAux) 
+			bAscii = Boolean.parseBoolean(sAux);
+		
+		setXferType((bAscii) ? XFER_TYPE.ascii : XFER_TYPE.binary);
+
+		m_bPassive = false;
+		sAux = m_oParms.getAttribute(PARMS_PASSIVE);
+		m_bPassive = (null != sAux) && Boolean.parseBoolean(sAux);
+	} // __________________________________
+
+	public static String fileToFtpString (File p_oF)
+	{
+		return (null == p_oF) ? null : p_oF.toString().replace("\\", "/");
+	} // ________________________________
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/FtpClientUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocator.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocator.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocator.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,93 +1,93 @@
-/*
-* 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.util;
-
-import java.io.Serializable;
-
- at SuppressWarnings("serial")
-public class ObjLocator implements Serializable
-{
-  private long        m_lUid;
-  private Object []   m_oaLocs;
-
-  public  long        getUid() { return m_lUid; }
-  public  String []   getStrings() { return (String []) m_oaLocs; }
-  public int getColumnCount()
-  { return (null == m_oaLocs) ? 0 : m_oaLocs.length;
-  } //__________________________________
-
-  public ObjLocator(long p_lUid, Object [] p_sa)
-  { m_lUid    = p_lUid;
-    m_oaLocs  = (null == p_sa) ? new Object [0] : p_sa;
-    for (int i1=0; i1<m_oaLocs.length;i1++)
-      if (null == m_oaLocs[i1]) m_oaLocs[i1]="";
-  } //__________________________________
-
-  public Object get(int p_iCol)
-  { return (null == m_oaLocs) ? ""
-        :(p_iCol < 0 || p_iCol >= m_oaLocs.length) ? ""
-        : m_oaLocs[p_iCol];
-  } //__________________________________
-
-  public void set(int p_iCol, Object p_o)
-  { if (null == m_oaLocs)                         return;
-    if (p_iCol < 0 || p_iCol >= m_oaLocs.length)  return;
-    m_oaLocs[p_iCol]    = p_o;
-  } //__________________________________
-
-  public boolean    equals(Object p_o)
-  { return (p_o instanceof ObjLocator)
-      ? m_lUid == ((ObjLocator)p_o).getUid()
-      : false;
-  } //__________________________________
-
-  public static ObjLocator find(long p_l, ObjLocator[] p_ola)
-  { ObjLocator oRet;
-    if (null != p_ola)
-      for (int i1=0; i1<p_ola.length;i1++)
-        if (p_l == (oRet = p_ola[i1]).getUid()) return oRet;
-    return null;
-  } //__________________________________
-
-  public String toString()
-  { StringBuffer sb = new StringBuffer(200);
-    sb.append("ObjLocator: ").append(m_lUid).append(" <");
-    for (int i1=0; i1<m_oaLocs.length;i1++)
-    { if (i1 > 0) sb.append(" ");
-      sb.append(m_oaLocs[i1].toString());
-    }
-    sb.append(">");
-    return sb.toString();
-  } //__________________________________
-
-  public static long [] getUids(ObjLocator[] p_ola)
-  { long [] laRet = new long [] {};
-    if (null == p_ola)  return laRet;
-    if (p_ola.length<1) return laRet;
-    laRet = new long[p_ola.length];
-    for (int i1=0; i1<laRet.length; i1++)
-      laRet[i1] = p_ola[i1].getUid();
-
-    return laRet;
-  } //__________________________________
-
-} //____________________________________________________________________________
+/*
+* 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.util;
+
+import java.io.Serializable;
+
+ at SuppressWarnings("serial")
+public class ObjLocator implements Serializable
+{
+  private long        m_lUid;
+  private Object []   m_oaLocs;
+
+  public  long        getUid() { return m_lUid; }
+  public  String []   getStrings() { return (String []) m_oaLocs; }
+  public int getColumnCount()
+  { return (null == m_oaLocs) ? 0 : m_oaLocs.length;
+  } //__________________________________
+
+  public ObjLocator(long p_lUid, Object [] p_sa)
+  { m_lUid    = p_lUid;
+    m_oaLocs  = (null == p_sa) ? new Object [0] : p_sa;
+    for (int i1=0; i1<m_oaLocs.length;i1++)
+      if (null == m_oaLocs[i1]) m_oaLocs[i1]="";
+  } //__________________________________
+
+  public Object get(int p_iCol)
+  { return (null == m_oaLocs) ? ""
+        :(p_iCol < 0 || p_iCol >= m_oaLocs.length) ? ""
+        : m_oaLocs[p_iCol];
+  } //__________________________________
+
+  public void set(int p_iCol, Object p_o)
+  { if (null == m_oaLocs)                         return;
+    if (p_iCol < 0 || p_iCol >= m_oaLocs.length)  return;
+    m_oaLocs[p_iCol]    = p_o;
+  } //__________________________________
+
+  public boolean    equals(Object p_o)
+  { return (p_o instanceof ObjLocator)
+      ? m_lUid == ((ObjLocator)p_o).getUid()
+      : false;
+  } //__________________________________
+
+  public static ObjLocator find(long p_l, ObjLocator[] p_ola)
+  { ObjLocator oRet;
+    if (null != p_ola)
+      for (int i1=0; i1<p_ola.length;i1++)
+        if (p_l == (oRet = p_ola[i1]).getUid()) return oRet;
+    return null;
+  } //__________________________________
+
+  public String toString()
+  { StringBuffer sb = new StringBuffer(200);
+    sb.append("ObjLocator: ").append(m_lUid).append(" <");
+    for (int i1=0; i1<m_oaLocs.length;i1++)
+    { if (i1 > 0) sb.append(" ");
+      sb.append(m_oaLocs[i1].toString());
+    }
+    sb.append(">");
+    return sb.toString();
+  } //__________________________________
+
+  public static long [] getUids(ObjLocator[] p_ola)
+  { long [] laRet = new long [] {};
+    if (null == p_ola)  return laRet;
+    if (p_ola.length<1) return laRet;
+    laRet = new long[p_ola.length];
+    for (int i1=0; i1<laRet.length; i1++)
+      laRet[i1] = p_ola[i1].getUid();
+
+    return laRet;
+  } //__________________________________
+
+} //____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocator.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocatorSorter.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocatorSorter.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocatorSorter.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,87 +1,87 @@
-/*
-* 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.util;
-
-import java.util.Arrays;
-import java.util.Comparator;
-
-public class ObjLocatorSorter
-{
-  private java.util.List<ObjLocator> m_olRows;
-  private int m_iQcols;
-  private char[] m_caSrt;
-
-  public ObjLocatorSorter(ObjLocator[] p_oa)
-  { m_iQcols  = (null==p_oa) ? 0
-      : p_oa.length<1 ? 0
-      : p_oa[0].getColumnCount();
-    m_olRows = Arrays.asList(p_oa);
-  } //________________________________
-
-  public ObjLocator[] sort (int p_iCol)
-  { if (null == m_caSrt)
-    { m_caSrt = new char[m_iQcols];
-      for (int i1=0; i1<m_caSrt.length; i1++) m_caSrt[i1]='d';
-    }
-    ObjLocator [] oaLoc = new ObjLocator[m_olRows.size()];
-    m_olRows.toArray(oaLoc);
-    Arrays.sort(oaLoc,new RowCmp(p_iCol,ascOrDesc(oaLoc,p_iCol)));
-    m_olRows  = Arrays.asList(oaLoc);
-    return oaLoc;
-  } //________________________________
-  private static char ascOrDesc(ObjLocator[] p_oa, int p_iCol)
-  {
-    String sMin = "";
-    for (int i1=0; i1<p_oa.length;i1++)
-    { Object oCurr = p_oa[i1].get(p_iCol);
-      if (! (oCurr instanceof String))    continue;
-      if (sMin.compareToIgnoreCase((String)oCurr) > 0)
-          return 'a';
-      sMin  = (String) oCurr;
-    }
-    return 'd';
-  } //________________________________
-
-  // ---------------------------------------------------------
-  //  Comparator for Table Columns
-  // ---------------------------------------------------------
-  private class RowCmp implements Comparator<ObjLocator>
-  {
-    int m_iCol;
-    boolean m_bAsc;
-
-    RowCmp(int p_i, char p_c)
-    {
-      m_iCol = p_i;
-      m_bAsc = 'a'==Character.toLowerCase(p_c);
-    } //______________________________
-
-    public int compare(ObjLocator o1, ObjLocator o2)
-    {
-      String s1 = (String) o1.get(m_iCol);
-      String s2 = (String) o2.get(m_iCol);
-      int iCmp = s1.compareToIgnoreCase(s2);
-      return (m_bAsc) ? iCmp : -iCmp;
-    } //______________________________
-  } //_______________________________________________
-} //______________________________________________________
-
+/*
+* 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.util;
+
+import java.util.Arrays;
+import java.util.Comparator;
+
+public class ObjLocatorSorter
+{
+  private java.util.List<ObjLocator> m_olRows;
+  private int m_iQcols;
+  private char[] m_caSrt;
+
+  public ObjLocatorSorter(ObjLocator[] p_oa)
+  { m_iQcols  = (null==p_oa) ? 0
+      : p_oa.length<1 ? 0
+      : p_oa[0].getColumnCount();
+    m_olRows = Arrays.asList(p_oa);
+  } //________________________________
+
+  public ObjLocator[] sort (int p_iCol)
+  { if (null == m_caSrt)
+    { m_caSrt = new char[m_iQcols];
+      for (int i1=0; i1<m_caSrt.length; i1++) m_caSrt[i1]='d';
+    }
+    ObjLocator [] oaLoc = new ObjLocator[m_olRows.size()];
+    m_olRows.toArray(oaLoc);
+    Arrays.sort(oaLoc,new RowCmp(p_iCol,ascOrDesc(oaLoc,p_iCol)));
+    m_olRows  = Arrays.asList(oaLoc);
+    return oaLoc;
+  } //________________________________
+  private static char ascOrDesc(ObjLocator[] p_oa, int p_iCol)
+  {
+    String sMin = "";
+    for (int i1=0; i1<p_oa.length;i1++)
+    { Object oCurr = p_oa[i1].get(p_iCol);
+      if (! (oCurr instanceof String))    continue;
+      if (sMin.compareToIgnoreCase((String)oCurr) > 0)
+          return 'a';
+      sMin  = (String) oCurr;
+    }
+    return 'd';
+  } //________________________________
+
+  // ---------------------------------------------------------
+  //  Comparator for Table Columns
+  // ---------------------------------------------------------
+  private class RowCmp implements Comparator<ObjLocator>
+  {
+    int m_iCol;
+    boolean m_bAsc;
+
+    RowCmp(int p_i, char p_c)
+    {
+      m_iCol = p_i;
+      m_bAsc = 'a'==Character.toLowerCase(p_c);
+    } //______________________________
+
+    public int compare(ObjLocator o1, ObjLocator o2)
+    {
+      String s1 = (String) o1.get(m_iCol);
+      String s2 = (String) o2.get(m_iCol);
+      int iCmp = s1.compareToIgnoreCase(s2);
+      return (m_bAsc) ? iCmp : -iCmp;
+    } //______________________________
+  } //_______________________________________________
+} //______________________________________________________
+


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ObjLocatorSorter.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,166 +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.util;
-
-import java.io.File;
-import java.io.IOException;
-
-public interface RemoteFileSystem
-{
-
-	public static final String FTP_PROTOCOL = "ftp";
-
-	public static final String SFTP_PROTOCOL = "sftp";
-
-	public static final String FTPS_PROTOCOL = "ftps";
-
-	public static final String PARMS_PROTOCOL = "protocol";
-
-	public static final String PARMS_FTP_SERVER = "ftpServer";
-
-	public static final String PARMS_USER = "ftpUser";
-
-	public static final String PARMS_PASSWD = "ftpPassword";
-
-	public static final String PARMS_PORT = "ftpPort";
-
-	public static final String PARMS_REMOTE_DIR = "ftpRemoteDir";
-
-	public static final String PARMS_LOCAL_DIR = "ftpLocalDir";
-
-	public static final String PARMS_ASCII = "ftpAscii";
-
-	public static final String PARMS_PASSIVE = "ftpPassive";
-
-	public static final String PARMS_CERTIFICATE = "certificate";
-
-	public String getRemoteDir ();
-
-	/**
-	 * Terminates ftp session and frees resources
-	 * <li>Well behaved programs should make sure to call this method </li>
-	 */
-	public void quit (); // _________________________________
-
-	/**
-	 * Deletes specified file in remote directory
-	 * 
-	 * @param p_sFile
-	 *            String : filename to delete. Method will attempt to delete
-	 *            file with rightmost node of argument within remote directory
-	 *            specified in 'remoteDirURI'
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or file cannot be
-	 *             deleted in remote directory
-	 */
-	public void deleteRemoteFile (String p_sFile) throws RemoteFileSystemException; // _________________________________
-
-	public void remoteDelete (File p_oFile) throws RemoteFileSystemException; // _________________________________
-
-	/**
-	 * Gets the list of files in the remote directory that end with arg0
-	 * 
-	 * @param p_sSuffix
-	 *            String : retrieve only files that end with that suffix - all
-	 *            files if null
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or problems
-	 *             encountered
-	 */
-	public String[] getFileListFromRemoteDir (String p_sSuffix)
-			throws IOException, RemoteFileSystemException; // _________________________________
-
-	/**
-	 * Change remote directory
-	 * 
-	 * @param p_sDir
-	 *            String : directory to set
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or problems
-	 *             encountered
-	 */
-	public void setRemoteDir (String p_sDir) throws RemoteFileSystemException; // _________________________________
-
-	/**
-	 * Renames specified file in remote directory to specified new name
-	 * 
-	 * @param p_sFrom
-	 *            String : filename to rename
-	 * @param p_sTo
-	 *            String : new filename
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or file cannot be
-	 *             renamed to new name in remote directory
-	 *             <li>Method will attempt to rename file with rightmost node
-	 *             of argument within remote directory specified in
-	 *             'remoteDirURI', to new name inside the SAME remote directory
-	 */
-	public void renameInRemoteDir (String p_sFrom, String p_sTo)
-			throws RemoteFileSystemException; // _________________________________
-
-	/**
-	 * 
-	 * @param p_oFrom
-	 * @param p_oTo
-	 * @throws IOException if file not found.
-	 * @throws RemoteFileSystemException
-	 */
-	public void remoteRename (File p_oFrom, File p_oTo) throws IOException, RemoteFileSystemException; // _________________________________
-
-	/**
-	 * Uploads specified file from local directory (localDirURI) to remote
-	 * directory (remoteDirURI)
-	 * 
-	 * @param p_sFile
-	 *            String : filename to upload
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or file cannot be
-	 *             uploaded
-	 *             <li> local file will be renamed during transfer
-	 *             ('.xferNotReady' appended to name)</li>
-	 *             <li> upon successful completion. the suffix '.xferDone' will
-	 *             be appended to the original filename </li>
-	 */
-	public void uploadFile (File p_oFile, String p_sRemoteName)
-			throws RemoteFileSystemException; // _________________________________
-
-	/**
-	 * Downloads specified file from remote directory (remoteDirURI) to local
-	 * directory (localDirURI)
-	 * 
-	 * @param p_sFile
-	 *            String : filename to download
-	 * @throws RemoteFileSystemException :
-	 *             if ftp connection cannot be established, or file cannot be
-	 *             downloaded
-	 *             <li> local file is assigned a temporary name during transfer
-	 *             </li>
-	 *             <li> upon successful completion, local temporary file will be
-	 *             renamed to name specified in argument, and suffix '.xferDone'
-	 *             will be appended to the original filename in the remote
-	 *             directory </li>
-	 */
-	public void downloadFile (String p_sFile, String p_sFinalName)
-			throws IOException, RemoteFileSystemException; // _________________________________
-
+/*
+ * 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.util;
+
+import java.io.File;
+import java.io.IOException;
+
+public interface RemoteFileSystem
+{
+
+	public static final String FTP_PROTOCOL = "ftp";
+
+	public static final String SFTP_PROTOCOL = "sftp";
+
+	public static final String FTPS_PROTOCOL = "ftps";
+
+	public static final String PARMS_PROTOCOL = "protocol";
+
+	public static final String PARMS_FTP_SERVER = "ftpServer";
+
+	public static final String PARMS_USER = "ftpUser";
+
+	public static final String PARMS_PASSWD = "ftpPassword";
+
+	public static final String PARMS_PORT = "ftpPort";
+
+	public static final String PARMS_REMOTE_DIR = "ftpRemoteDir";
+
+	public static final String PARMS_LOCAL_DIR = "ftpLocalDir";
+
+	public static final String PARMS_ASCII = "ftpAscii";
+
+	public static final String PARMS_PASSIVE = "ftpPassive";
+
+	public static final String PARMS_CERTIFICATE = "certificate";
+
+	public String getRemoteDir ();
+
+	/**
+	 * Terminates ftp session and frees resources
+	 * <li>Well behaved programs should make sure to call this method </li>
+	 */
+	public void quit (); // _________________________________
+
+	/**
+	 * Deletes specified file in remote directory
+	 * 
+	 * @param p_sFile
+	 *            String : filename to delete. Method will attempt to delete
+	 *            file with rightmost node of argument within remote directory
+	 *            specified in 'remoteDirURI'
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or file cannot be
+	 *             deleted in remote directory
+	 */
+	public void deleteRemoteFile (String p_sFile) throws RemoteFileSystemException; // _________________________________
+
+	public void remoteDelete (File p_oFile) throws RemoteFileSystemException; // _________________________________
+
+	/**
+	 * Gets the list of files in the remote directory that end with arg0
+	 * 
+	 * @param p_sSuffix
+	 *            String : retrieve only files that end with that suffix - all
+	 *            files if null
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or problems
+	 *             encountered
+	 */
+	public String[] getFileListFromRemoteDir (String p_sSuffix)
+			throws IOException, RemoteFileSystemException; // _________________________________
+
+	/**
+	 * Change remote directory
+	 * 
+	 * @param p_sDir
+	 *            String : directory to set
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or problems
+	 *             encountered
+	 */
+	public void setRemoteDir (String p_sDir) throws RemoteFileSystemException; // _________________________________
+
+	/**
+	 * Renames specified file in remote directory to specified new name
+	 * 
+	 * @param p_sFrom
+	 *            String : filename to rename
+	 * @param p_sTo
+	 *            String : new filename
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or file cannot be
+	 *             renamed to new name in remote directory
+	 *             <li>Method will attempt to rename file with rightmost node
+	 *             of argument within remote directory specified in
+	 *             'remoteDirURI', to new name inside the SAME remote directory
+	 */
+	public void renameInRemoteDir (String p_sFrom, String p_sTo)
+			throws RemoteFileSystemException; // _________________________________
+
+	/**
+	 * 
+	 * @param p_oFrom
+	 * @param p_oTo
+	 * @throws IOException if file not found.
+	 * @throws RemoteFileSystemException
+	 */
+	public void remoteRename (File p_oFrom, File p_oTo) throws IOException, RemoteFileSystemException; // _________________________________
+
+	/**
+	 * Uploads specified file from local directory (localDirURI) to remote
+	 * directory (remoteDirURI)
+	 * 
+	 * @param p_sFile
+	 *            String : filename to upload
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or file cannot be
+	 *             uploaded
+	 *             <li> local file will be renamed during transfer
+	 *             ('.xferNotReady' appended to name)</li>
+	 *             <li> upon successful completion. the suffix '.xferDone' will
+	 *             be appended to the original filename </li>
+	 */
+	public void uploadFile (File p_oFile, String p_sRemoteName)
+			throws RemoteFileSystemException; // _________________________________
+
+	/**
+	 * Downloads specified file from remote directory (remoteDirURI) to local
+	 * directory (localDirURI)
+	 * 
+	 * @param p_sFile
+	 *            String : filename to download
+	 * @throws RemoteFileSystemException :
+	 *             if ftp connection cannot be established, or file cannot be
+	 *             downloaded
+	 *             <li> local file is assigned a temporary name during transfer
+	 *             </li>
+	 *             <li> upon successful completion, local temporary file will be
+	 *             renamed to name specified in argument, and suffix '.xferDone'
+	 *             will be appended to the original filename in the remote
+	 *             directory </li>
+	 */
+	public void downloadFile (String p_sFile, String p_sFinalName)
+			throws IOException, RemoteFileSystemException; // _________________________________
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystem.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemException.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,55 +1,55 @@
-/*
- * 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.util;
-
-import org.jboss.soa.esb.BaseException;
-
-/**
- * Remote File System exception.
- * @author b_georges
- * @since Version 4.0
- */
-public class RemoteFileSystemException extends BaseException 
-{
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Construct an exception instance. 
-     * @param message Exception message.
-     */
-    public RemoteFileSystemException(String message) { super(message); }
-
-    /**
-     * Construct an exception instance. 
-     * @param message Exception message.
-     * @param cause Exception cause.
-     */
-    public RemoteFileSystemException(String message, Throwable cause) { super(message, cause); }
-
-    /**
-     * Construct an exception instance. 
-     * @param cause Exception cause.
-     */
-    public RemoteFileSystemException(Throwable cause) { super(cause); }
-}
+/*
+ * 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.util;
+
+import org.jboss.soa.esb.BaseException;
+
+/**
+ * Remote File System exception.
+ * @author b_georges
+ * @since Version 4.0
+ */
+public class RemoteFileSystemException extends BaseException 
+{
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+     * Construct an exception instance. 
+     * @param message Exception message.
+     */
+    public RemoteFileSystemException(String message) { super(message); }
+
+    /**
+     * Construct an exception instance. 
+     * @param message Exception message.
+     * @param cause Exception cause.
+     */
+    public RemoteFileSystemException(String message, Throwable cause) { super(message, cause); }
+
+    /**
+     * Construct an exception instance. 
+     * @param cause Exception cause.
+     */
+    public RemoteFileSystemException(Throwable cause) { super(cause); }
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemFactory.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemFactory.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemFactory.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,78 +1,78 @@
-/*
- * 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.util;
-
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.jboss.internal.soa.esb.util.EdtFtpImpl;
-import org.jboss.internal.soa.esb.util.SecureFtpImpl;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
-
-public class RemoteFileSystemFactory
-{
-
-	// private default constructor
-	private RemoteFileSystemFactory()
-	{
-	}
-
-	/**
-	 * This method returns a RemoteFileSystem Implementation at runtime.
-	 * The implementation depends on which protocol is specified in the 
-	 * URL of the RemoteFileSystem.
-	 * We currently support "ftp" and "sftp" 
-	 * Refactoring related to JIRA Tasks: JBESB-127 and JBESB-197 
-	 * @param p_oEpr
-	 * @param p_bConnect
-	 * @return
-	 * @throws RemoteFileSystemException
-	 */
-	public static RemoteFileSystem getRemoteFileSystem(FTPEpr p_oEpr,
-			boolean p_bConnect) throws RemoteFileSystemException
-	{
-		URL url = null;
-		try
-		{
-			url = p_oEpr.getURL();
-			if (url.getProtocol().equals(RemoteFileSystem.FTP_PROTOCOL))
-				return new EdtFtpImpl((FTPEpr) p_oEpr, p_bConnect);
-			else if (url.getProtocol().equals(RemoteFileSystem.SFTP_PROTOCOL))
-				return new SecureFtpImpl((SFTPEpr) p_oEpr, p_bConnect);
-
-		} catch (MalformedURLException e)
-		{
-			throw new RemoteFileSystemException(e);
-		} catch (URISyntaxException e)
-		{
-			throw new RemoteFileSystemException(e);
-		} catch (Exception e)
-		{
-			throw new RemoteFileSystemException(e);
-		}
-		throw new RemoteFileSystemException("Unknown or unsupported protocol");
-	}
-
-}
+/*
+ * 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.util;
+
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.internal.soa.esb.util.EdtFtpImpl;
+import org.jboss.internal.soa.esb.util.SecureFtpImpl;
+import org.jboss.soa.esb.addressing.eprs.FTPEpr;
+import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
+
+public class RemoteFileSystemFactory
+{
+
+	// private default constructor
+	private RemoteFileSystemFactory()
+	{
+	}
+
+	/**
+	 * This method returns a RemoteFileSystem Implementation at runtime.
+	 * The implementation depends on which protocol is specified in the 
+	 * URL of the RemoteFileSystem.
+	 * We currently support "ftp" and "sftp" 
+	 * Refactoring related to JIRA Tasks: JBESB-127 and JBESB-197 
+	 * @param p_oEpr
+	 * @param p_bConnect
+	 * @return
+	 * @throws RemoteFileSystemException
+	 */
+	public static RemoteFileSystem getRemoteFileSystem(FTPEpr p_oEpr,
+			boolean p_bConnect) throws RemoteFileSystemException
+	{
+		URL url = null;
+		try
+		{
+			url = p_oEpr.getURL();
+			if (url.getProtocol().equals(RemoteFileSystem.FTP_PROTOCOL))
+				return new EdtFtpImpl((FTPEpr) p_oEpr, p_bConnect);
+			else if (url.getProtocol().equals(RemoteFileSystem.SFTP_PROTOCOL))
+				return new SecureFtpImpl((SFTPEpr) p_oEpr, p_bConnect);
+
+		} catch (MalformedURLException e)
+		{
+			throw new RemoteFileSystemException(e);
+		} catch (URISyntaxException e)
+		{
+			throw new RemoteFileSystemException(e);
+		} catch (Exception e)
+		{
+			throw new RemoteFileSystemException(e);
+		}
+		throw new RemoteFileSystemException("Unknown or unsupported protocol");
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/RemoteFileSystemFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,249 +1,249 @@
-/*
- * 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.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.io.Serializable;
-import java.io.StringWriter;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.log4j.Appender;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Logger;
-import org.apache.log4j.TTCCLayout;
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.XMLSerializer;
-import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.message.Message;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-public class Util
-{
-	private Util()
-	{
-	}
-
-	public static void dumpSysProps(PrintStream p_OS)
-	{
-		String[] sa = new String[ModulePropertyManager.getPropertyManager(
-				ModulePropertyManager.TRANSPORTS_MODULE).getProperties().size()];
-		ModulePropertyManager.getPropertyManager(
-				ModulePropertyManager.TRANSPORTS_MODULE).getProperties()
-				.keySet().toArray(sa);
-		Arrays.sort(sa);
-		for (String sCurr : sa)
-			p_OS.println(sCurr
-					+ "="
-					+ ModulePropertyManager.getPropertyManager(
-							ModulePropertyManager.TRANSPORTS_MODULE)
-							.getProperty(sCurr));
-	} // __________________________________
-
-	public static boolean isNullString(String p_s)
-	{
-		return (null == p_s) ? true : p_s.trim().length() < 1;
-	} // __________________________________
-
-	public static boolean isLong(String p_s)
-	{
-		if (isNullString(p_s))
-			return false;
-		
-		try
-		{
-			Long.parseLong(p_s);
-			return true;
-		}
-		catch (Exception e)
-		{
-			return false;
-		}
-	} // __________________________________
-
-	public static boolean isPositiveLong(String p_s)
-	{
-		if (isNullString(p_s))
-			return false;
-		
-		try
-		{
-			long lBk = Long.parseLong(p_s);
-			return lBk > 0;
-		}
-		catch (Exception e)
-		{
-			return false;
-		}
-	} // __________________________________
-
-	public static int parseInt(String s)
-	{
-		if (s == null)
-			return 0;
-		
-		String sVal = s.trim();
-		
-		if (sVal.length() < 1)
-			return 0;
-		else
-		{
-			try
-			{
-				return Integer.parseInt(s);
-			}
-			catch (NumberFormatException ex)
-			{
-				return 0;
-			}
-		}
-	} // __________________________________
-
-	public static long parseLong(String s)
-	{
-		if (s == null)
-			return 0;
-		
-		String sVal = s.trim();
-		
-		if (sVal.length() < 1)
-			return 0;
-		else
-		{
-			try
-			{
-				return Long.parseLong(s);
-			}
-			catch (NumberFormatException ex)
-			{
-				return 0;
-			}
-		}
-	} // __________________________________
-
-	public static Logger getDefaultLogger(Class p_oCls)
-	{
-		Logger oRet = Logger.getLogger(p_oCls.getName());
-		Appender oApp = new ConsoleAppender(new TTCCLayout("ISO8601"));
-		oRet.addAppender(oApp);
-		return oRet;
-	} // __________________________________
-
-	public static Serializable serialize(Message message)
-			throws ParserConfigurationException, IOException
-	{
-		if (message.getType().equals(
-				org.jboss.soa.esb.message.format.MessageType.JAVA_SERIALIZED))
-			return (Serializable) message;
-
-		try
-		{
-			Document doc = DocumentBuilderFactory.newInstance()
-					.newDocumentBuilder().newDocument();
-			((org.jboss.internal.soa.esb.message.format.xml.MessageImpl) message)
-					.toXML(doc);
-			StringWriter sWriter = new StringWriter();
-			OutputFormat format = new OutputFormat();
-			format.setIndenting(true);
-			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
-			xmlS.asDOMSerializer();
-			xmlS.serialize(doc);
-			return sWriter.toString();
-		}
-		catch (MarshalException ex)
-		{
-			throw new IOException(ex.toString());
-		}
-	}// ________________________________
-
-	public static Message deserialize(Serializable serial)
-			throws ParserConfigurationException, SAXException, IOException
-	{
-		if (serial instanceof MessageImpl) // MessageType.JAVA_SERIALIZED
-			return (Message) serial;
-
-		try
-		{
-			// MessageType.JBOSS_XML
-			InputStream inStream = new ByteArrayInputStream(((String) serial)
-					.getBytes());
-			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.parse(inStream);
-	
-			org.jboss.internal.soa.esb.message.format.xml.MessageImpl message = new org.jboss.internal.soa.esb.message.format.xml.MessageImpl();
-			message.fromXML(doc);
-			return message;
-		}
-		catch (UnmarshalException ex)
-		{
-			throw new IOException(ex.toString());
-		}
-	} // ________________________________
-
-	public static List<KeyValuePair> propertiesFromSelector(String selector)
-	{
-		// No problem if selector is null - everything in queue will be returned
-		List<KeyValuePair> oRet = new ArrayList<KeyValuePair>();
-		
-		if (!Util.isNullString(selector))
-		{
-			for (String sCurr : selector.split(","))
-			{
-				String[] sa = sCurr.split("=");
-				if (sa.length != 2 || sa[1].charAt(0) != '\''
-						|| sa[1].charAt(-1 + sa[1].length()) != '\'')
-					throw new IllegalArgumentException("Illegal message selector syntax <"
-							+ selector + ">");
-				KeyValuePair oNew = new KeyValuePair(sa[0], sa[1].substring(0,
-						-1 + sa[1].length()).substring(1));
-				oRet.add(oNew);
-			}
-		}
-		
-		return oRet;
-	} // ________________________________
-
-	public static String getStamp()
-	{
-		return s_oTS.format(new java.util.Date(System.currentTimeMillis()));
-	}
-
-	private static final SimpleDateFormat s_oTS = new SimpleDateFormat(
-			"yyyy/MM/dd hh:mm:ss.SSS");
-
-} // ____________________________________________________________________________
+/*
+ * 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.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.io.Serializable;
+import java.io.StringWriter;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.log4j.Appender;
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Logger;
+import org.apache.log4j.TTCCLayout;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.helpers.KeyValuePair;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+public class Util
+{
+	private Util()
+	{
+	}
+
+	public static void dumpSysProps(PrintStream p_OS)
+	{
+		String[] sa = new String[ModulePropertyManager.getPropertyManager(
+				ModulePropertyManager.TRANSPORTS_MODULE).getProperties().size()];
+		ModulePropertyManager.getPropertyManager(
+				ModulePropertyManager.TRANSPORTS_MODULE).getProperties()
+				.keySet().toArray(sa);
+		Arrays.sort(sa);
+		for (String sCurr : sa)
+			p_OS.println(sCurr
+					+ "="
+					+ ModulePropertyManager.getPropertyManager(
+							ModulePropertyManager.TRANSPORTS_MODULE)
+							.getProperty(sCurr));
+	} // __________________________________
+
+	public static boolean isNullString(String p_s)
+	{
+		return (null == p_s) ? true : p_s.trim().length() < 1;
+	} // __________________________________
+
+	public static boolean isLong(String p_s)
+	{
+		if (isNullString(p_s))
+			return false;
+		
+		try
+		{
+			Long.parseLong(p_s);
+			return true;
+		}
+		catch (Exception e)
+		{
+			return false;
+		}
+	} // __________________________________
+
+	public static boolean isPositiveLong(String p_s)
+	{
+		if (isNullString(p_s))
+			return false;
+		
+		try
+		{
+			long lBk = Long.parseLong(p_s);
+			return lBk > 0;
+		}
+		catch (Exception e)
+		{
+			return false;
+		}
+	} // __________________________________
+
+	public static int parseInt(String s)
+	{
+		if (s == null)
+			return 0;
+		
+		String sVal = s.trim();
+		
+		if (sVal.length() < 1)
+			return 0;
+		else
+		{
+			try
+			{
+				return Integer.parseInt(s);
+			}
+			catch (NumberFormatException ex)
+			{
+				return 0;
+			}
+		}
+	} // __________________________________
+
+	public static long parseLong(String s)
+	{
+		if (s == null)
+			return 0;
+		
+		String sVal = s.trim();
+		
+		if (sVal.length() < 1)
+			return 0;
+		else
+		{
+			try
+			{
+				return Long.parseLong(s);
+			}
+			catch (NumberFormatException ex)
+			{
+				return 0;
+			}
+		}
+	} // __________________________________
+
+	public static Logger getDefaultLogger(Class p_oCls)
+	{
+		Logger oRet = Logger.getLogger(p_oCls.getName());
+		Appender oApp = new ConsoleAppender(new TTCCLayout("ISO8601"));
+		oRet.addAppender(oApp);
+		return oRet;
+	} // __________________________________
+
+	public static Serializable serialize(Message message)
+			throws ParserConfigurationException, IOException
+	{
+		if (message.getType().equals(
+				org.jboss.soa.esb.message.format.MessageType.JAVA_SERIALIZED))
+			return (Serializable) message;
+
+		try
+		{
+			Document doc = DocumentBuilderFactory.newInstance()
+					.newDocumentBuilder().newDocument();
+			((org.jboss.internal.soa.esb.message.format.xml.MessageImpl) message)
+					.toXML(doc);
+			StringWriter sWriter = new StringWriter();
+			OutputFormat format = new OutputFormat();
+			format.setIndenting(true);
+			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
+			xmlS.asDOMSerializer();
+			xmlS.serialize(doc);
+			return sWriter.toString();
+		}
+		catch (MarshalException ex)
+		{
+			throw new IOException(ex.toString());
+		}
+	}// ________________________________
+
+	public static Message deserialize(Serializable serial)
+			throws ParserConfigurationException, SAXException, IOException
+	{
+		if (serial instanceof MessageImpl) // MessageType.JAVA_SERIALIZED
+			return (Message) serial;
+
+		try
+		{
+			// MessageType.JBOSS_XML
+			InputStream inStream = new ByteArrayInputStream(((String) serial)
+					.getBytes());
+			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.parse(inStream);
+	
+			org.jboss.internal.soa.esb.message.format.xml.MessageImpl message = new org.jboss.internal.soa.esb.message.format.xml.MessageImpl();
+			message.fromXML(doc);
+			return message;
+		}
+		catch (UnmarshalException ex)
+		{
+			throw new IOException(ex.toString());
+		}
+	} // ________________________________
+
+	public static List<KeyValuePair> propertiesFromSelector(String selector)
+	{
+		// No problem if selector is null - everything in queue will be returned
+		List<KeyValuePair> oRet = new ArrayList<KeyValuePair>();
+		
+		if (!Util.isNullString(selector))
+		{
+			for (String sCurr : selector.split(","))
+			{
+				String[] sa = sCurr.split("=");
+				if (sa.length != 2 || sa[1].charAt(0) != '\''
+						|| sa[1].charAt(-1 + sa[1].length()) != '\'')
+					throw new IllegalArgumentException("Illegal message selector syntax <"
+							+ selector + ">");
+				KeyValuePair oNew = new KeyValuePair(sa[0], sa[1].substring(0,
+						-1 + sa[1].length()).substring(1));
+				oRet.add(oNew);
+			}
+		}
+		
+		return oRet;
+	} // ________________________________
+
+	public static String getStamp()
+	{
+		return s_oTS.format(new java.util.Date(System.currentTimeMillis()));
+	}
+
+	private static final SimpleDateFormat s_oTS = new SimpleDateFormat(
+			"yyyy/MM/dd hh:mm:ss.SSS");
+
+} // ____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,142 +1,142 @@
-<?xml version="1.0"?>
-<project name="build.rosetta.tests" default="org.jboss.esb.rosetta.tests.compile" basedir=".">
-
-	<property name="org.jboss.esb.internal.dest" location="../../../build"/>
-    <property name="org.jboss.esb.module.src.dir" location="../src"/>
-    <property name="org.jboss.esb.module.classes.dir" location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
-    <property name="org.jboss.esb.module.tests.src.dir" location="src"/>
-    <property name="org.jboss.esb.tests.classes.dir" location="${org.jboss.esb.internal.dest}/tests"/>
-    <property name="org.jboss.esb.tests.report.dir" location="${org.jboss.esb.internal.dest}/tests/junit"/>
-    <property name="org.jboss.esb.root.dir" location="../.."/>
-    <property name="org.jboss.esb.module.tests.coverage.dir" location="${org.jboss.esb.internal.dest}/tests/coverage/rosetta"/>
-    <property name="org.jboss.esb.module.classes.instr.dir" location="${org.jboss.esb.module.tests.coverage.dir}/instr" />
-    <property environment="env"/>
-    <property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
-	<!-- Set deployment properties filename -->
-	<property name="org.jboss.esb.deployment.properties" location="../../../install/deployment.properties"/>
-	<!-- Load deployment properties File -->
-	<property file="${org.jboss.esb.deployment.properties}"/>
-	
-        <property name="org.jboss.esb.test.ftp.hostname" value="ftp.ncl.ac.uk"/>
-        <property name="org.jboss.esb.test.ftp.user" value="anonymous"/>
-        <property name="org.jboss.esb.test.ftp.pwd" value=""/>
-        <property name="org.jboss.esb.test.ftp.dir" value="/pub/DNS"/>
-        <property name="org.jboss.esb.test.persistdb.dir" location="${org.jboss.esb.internal.dest}/testdb"/>
-    <condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/client">
-        <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
-    </condition>
-
-    <path id="org.jboss.esb.tests.base.classpath">
-        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
-    	<pathelement location="${org.jboss.esb.root.dir}/core/rosetta/tests/resources/etc"/>
-        <pathelement location="${org.jboss.esb.module.classes.dir}"/>
-    </path>
-
-    <target name="org.jboss.esb.tests.init">
-        <tstamp>
-            <format property="TODAY" pattern="dd-MM-yy"/>
-        </tstamp>
-
-        <mkdir dir="${org.jboss.esb.tests.classes.dir}"/>
-        <mkdir dir="${org.jboss.esb.tests.report.dir}"/>
-    </target>
-
-    <target name="clean">
-        <delete dir="${org.jboss.esb.tests.classes.dir}"/>
-        <delete file="TESTS-TestSuites.xml"/>
-    </target>
-
-    <target name="org.jboss.esb.rosetta.tests.compile" if="org.jboss.esb.buildtests" depends="org.jboss.esb.tests.init">
-
-        <javac
-                destdir="${org.jboss.esb.tests.classes.dir}"
-                classpathref="org.jboss.esb.tests.base.classpath"
-                debug="${org.jboss.esb.debug}"
-                optimize="${org.jboss.esb.optimize}"
-                >
-            <src path="${org.jboss.esb.module.tests.src.dir}"/>
-        </javac>
-
-    </target>
-
-	<!-- ====================================================================== -->
-    <!--                             T E S T                                    -->
-    <!-- ====================================================================== -->
-    <target name="org.jboss.esb.rosetta.internal.test">
-		<!-- Instrument the code for code coverage - using emma... -->
-    	<delete dir="${org.jboss.esb.module.tests.coverage.dir}" />
-	    <mkdir dir="${org.jboss.esb.module.classes.instr.dir}" />
-	    <emma>
-			<instr 	instrpath="${org.jboss.esb.module.classes.dir}" 
-					destdir="${org.jboss.esb.module.classes.instr.dir}" 
-					metadatafile="${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
-	    </emma>        
-
-    	<!-- Run the tests -->
-        <antcall target="org.jboss.esb.services.internal.test.exec"/>        
-
-    	<!-- Generate the coverage report -->
-	    <emma>
-			<report sourcepath="${org.jboss.esb.module.src.dir}" sort="+block,+name,+method,+class" metrics="method:70,block:80,line:80,class:100">
-		        <fileset dir="${org.jboss.esb.module.tests.coverage.dir}" >
-					<include name="*.emma" />
-		        </fileset>
-		        <html outfile="${org.jboss.esb.module.tests.coverage.dir}/index.html" depth="method" columns="name,line,class,method,block"/>
-			</report>
-	    </emma>
-    </target>
-
-    <!-- ====================================================================== -->
-    <!--         U N I T   A N D   F U N C T I O N A L   T E S T S              -->
-    <!-- ====================================================================== -->
-    <target name="org.jboss.esb.services.internal.test.exec">
-        <echo message="Running tests for module, excluding integration"/>
-        <delete dir="${org.jboss.esb.test.persistdb.dir}" failonerror="false"/>
-        <mkdir dir="${org.jboss.esb.test.persistdb.dir}"/>
-        <copy todir="${org.jboss.esb.test.persistdb.dir}">
-            <fileset dir="resources/etc/" includes="persistUnitTestDB*"/>
-        </copy>
-
-        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
-            <formatter type="plain" usefile="false"/>
-            <formatter type="xml"/>
-            <batchtest todir="${org.jboss.esb.tests.report.dir}">
-                <fileset dir="${org.jboss.esb.module.tests.src.dir}">
-                    <include name="**/**UnitTest.java"/>
-                    <include name="**/**FuncTest.java"/>
-                </fileset>
-            </batchtest>
-            <classpath>
-        		<!-- using instrumented code for code coverage -->
-                <pathelement location="${org.jboss.esb.module.classes.instr.dir}"/>
-                <pathelement location="${org.jboss.esb.tests.classes.dir}"/>
-            	<!-- Need the tests src folder because there may be non-compiled test resources -->
-                <pathelement location="${org.jboss.esb.module.tests.src.dir}"/>
-                <path refid="org.jboss.esb.tests.base.classpath"/>
-            </classpath>
-			<!-- emma jvm args -->
-			<jvmarg value="-Demma.coverage.out.file=${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
-			<jvmarg value="-Demma.coverage.out.merge=true" />
-        	
-        	<sysproperty key="org.jboss.esb.test.db.driver" value="${org.jboss.esb.test.db.driver}"/>
-        	<sysproperty key="org.jboss.esb.test.db.url" value="${org.jboss.esb.test.db.url}"/>
-        	<sysproperty key="org.jboss.esb.test.db.user" value="${org.jboss.esb.test.db.user}"/>
-        	<sysproperty key="org.jboss.esb.test.db.password" value="${org.jboss.esb.test.db.password}"/>
-        	<sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
-        	<sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
-        	<sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
-        	<sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
-                <sysproperty key="org.jboss.esb.test.persistdb.dir" value="${org.jboss.esb.test.persistdb.dir}"/>
-        	<sysproperty key="log4j.configuration" value="log4j.xml"/>
-        </junit>
-        <junitreport>
-            <fileset dir="${org.jboss.esb.tests.report.dir}">
-                <include name="*.xml"/>
-            </fileset>
-            <report format="frames" todir="${org.jboss.esb.tests.report.dir}"/>
-            <report format="noframes" todir="${org.jboss.esb.tests.report.dir}"/>
-        </junitreport>
+<?xml version="1.0"?>
+<project name="build.rosetta.tests" default="org.jboss.esb.rosetta.tests.compile" basedir=".">
+
+	<property name="org.jboss.esb.internal.dest" location="../../../build"/>
+    <property name="org.jboss.esb.module.src.dir" location="../src"/>
+    <property name="org.jboss.esb.module.classes.dir" location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
+    <property name="org.jboss.esb.module.tests.src.dir" location="src"/>
+    <property name="org.jboss.esb.tests.classes.dir" location="${org.jboss.esb.internal.dest}/tests"/>
+    <property name="org.jboss.esb.tests.report.dir" location="${org.jboss.esb.internal.dest}/tests/junit"/>
+    <property name="org.jboss.esb.root.dir" location="../.."/>
+    <property name="org.jboss.esb.module.tests.coverage.dir" location="${org.jboss.esb.internal.dest}/tests/coverage/rosetta"/>
+    <property name="org.jboss.esb.module.classes.instr.dir" location="${org.jboss.esb.module.tests.coverage.dir}/instr" />
+    <property environment="env"/>
+    <property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
+	<!-- Set deployment properties filename -->
+	<property name="org.jboss.esb.deployment.properties" location="../../../install/deployment.properties"/>
+	<!-- Load deployment properties File -->
+	<property file="${org.jboss.esb.deployment.properties}"/>
+	
+        <property name="org.jboss.esb.test.ftp.hostname" value="ftp.ncl.ac.uk"/>
+        <property name="org.jboss.esb.test.ftp.user" value="anonymous"/>
+        <property name="org.jboss.esb.test.ftp.pwd" value=""/>
+        <property name="org.jboss.esb.test.ftp.dir" value="/pub/DNS"/>
+        <property name="org.jboss.esb.test.persistdb.dir" location="${org.jboss.esb.internal.dest}/testdb"/>
+    <condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/client">
+        <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+    </condition>
+
+    <path id="org.jboss.esb.tests.base.classpath">
+        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
+    	<pathelement location="${org.jboss.esb.root.dir}/core/rosetta/tests/resources/etc"/>
+        <pathelement location="${org.jboss.esb.module.classes.dir}"/>
+    </path>
+
+    <target name="org.jboss.esb.tests.init">
+        <tstamp>
+            <format property="TODAY" pattern="dd-MM-yy"/>
+        </tstamp>
+
+        <mkdir dir="${org.jboss.esb.tests.classes.dir}"/>
+        <mkdir dir="${org.jboss.esb.tests.report.dir}"/>
     </target>
+
+    <target name="clean">
+        <delete dir="${org.jboss.esb.tests.classes.dir}"/>
+        <delete file="TESTS-TestSuites.xml"/>
+    </target>
+
+    <target name="org.jboss.esb.rosetta.tests.compile" if="org.jboss.esb.buildtests" depends="org.jboss.esb.tests.init">
+
+        <javac
+                destdir="${org.jboss.esb.tests.classes.dir}"
+                classpathref="org.jboss.esb.tests.base.classpath"
+                debug="${org.jboss.esb.debug}"
+                optimize="${org.jboss.esb.optimize}"
+                >
+            <src path="${org.jboss.esb.module.tests.src.dir}"/>
+        </javac>
+
+    </target>
+
+	<!-- ====================================================================== -->
+    <!--                             T E S T                                    -->
+    <!-- ====================================================================== -->
+    <target name="org.jboss.esb.rosetta.internal.test">
+		<!-- Instrument the code for code coverage - using emma... -->
+    	<delete dir="${org.jboss.esb.module.tests.coverage.dir}" />
+	    <mkdir dir="${org.jboss.esb.module.classes.instr.dir}" />
+	    <emma>
+			<instr 	instrpath="${org.jboss.esb.module.classes.dir}" 
+					destdir="${org.jboss.esb.module.classes.instr.dir}" 
+					metadatafile="${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
+	    </emma>        
+
+    	<!-- Run the tests -->
+        <antcall target="org.jboss.esb.services.internal.test.exec"/>        
+
+    	<!-- Generate the coverage report -->
+	    <emma>
+			<report sourcepath="${org.jboss.esb.module.src.dir}" sort="+block,+name,+method,+class" metrics="method:70,block:80,line:80,class:100">
+		        <fileset dir="${org.jboss.esb.module.tests.coverage.dir}" >
+					<include name="*.emma" />
+		        </fileset>
+		        <html outfile="${org.jboss.esb.module.tests.coverage.dir}/index.html" depth="method" columns="name,line,class,method,block"/>
+			</report>
+	    </emma>
+    </target>
+
+    <!-- ====================================================================== -->
+    <!--         U N I T   A N D   F U N C T I O N A L   T E S T S              -->
+    <!-- ====================================================================== -->
+    <target name="org.jboss.esb.services.internal.test.exec">
+        <echo message="Running tests for module, excluding integration"/>
+        <delete dir="${org.jboss.esb.test.persistdb.dir}" failonerror="false"/>
+        <mkdir dir="${org.jboss.esb.test.persistdb.dir}"/>
+        <copy todir="${org.jboss.esb.test.persistdb.dir}">
+            <fileset dir="resources/etc/" includes="persistUnitTestDB*"/>
+        </copy>
+
+        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
+            <formatter type="plain" usefile="false"/>
+            <formatter type="xml"/>
+            <batchtest todir="${org.jboss.esb.tests.report.dir}">
+                <fileset dir="${org.jboss.esb.module.tests.src.dir}">
+                    <include name="**/**UnitTest.java"/>
+                    <include name="**/**FuncTest.java"/>
+                </fileset>
+            </batchtest>
+            <classpath>
+        		<!-- using instrumented code for code coverage -->
+                <pathelement location="${org.jboss.esb.module.classes.instr.dir}"/>
+                <pathelement location="${org.jboss.esb.tests.classes.dir}"/>
+            	<!-- Need the tests src folder because there may be non-compiled test resources -->
+                <pathelement location="${org.jboss.esb.module.tests.src.dir}"/>
+                <path refid="org.jboss.esb.tests.base.classpath"/>
+            </classpath>
+			<!-- emma jvm args -->
+			<jvmarg value="-Demma.coverage.out.file=${org.jboss.esb.module.tests.coverage.dir}/coverage.emma" />
+			<jvmarg value="-Demma.coverage.out.merge=true" />
+        	
+        	<sysproperty key="org.jboss.esb.test.db.driver" value="${org.jboss.esb.test.db.driver}"/>
+        	<sysproperty key="org.jboss.esb.test.db.url" value="${org.jboss.esb.test.db.url}"/>
+        	<sysproperty key="org.jboss.esb.test.db.user" value="${org.jboss.esb.test.db.user}"/>
+        	<sysproperty key="org.jboss.esb.test.db.password" value="${org.jboss.esb.test.db.password}"/>
+        	<sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
+        	<sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
+        	<sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
+        	<sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
+                <sysproperty key="org.jboss.esb.test.persistdb.dir" value="${org.jboss.esb.test.persistdb.dir}"/>
+        	<sysproperty key="log4j.configuration" value="log4j.xml"/>
+        </junit>
+        <junitreport>
+            <fileset dir="${org.jboss.esb.tests.report.dir}">
+                <include name="*.xml"/>
+            </fileset>
+            <report format="frames" todir="${org.jboss.esb.tests.report.dir}"/>
+            <report format="noframes" todir="${org.jboss.esb.tests.report.dir}"/>
+        </junitreport>
+    </target>
 	
 	<!-- ====================================================================== -->
 	    <!--                            INTEGRATION  T E S T                                    -->
@@ -170,11 +170,11 @@
 	    <!-- ====================================================================== -->
 	    <target name="org.jboss.esb.services.internal.integration.test.exec">
 	        <echo message="Running all tests for module"/>
-                <delete dir="${org.jboss.esb.test.persistdb.dir}" failonerror="false"/>
-                <mkdir dir="${org.jboss.esb.test.persistdb.dir}"/>
-                <copy todir="${org.jboss.esb.test.persistdb.dir}">
-                    <fileset dir="resources/etc/" includes="persistUnitTestDB*"/>
-                </copy>
+                <delete dir="${org.jboss.esb.test.persistdb.dir}" failonerror="false"/>
+                <mkdir dir="${org.jboss.esb.test.persistdb.dir}"/>
+                <copy todir="${org.jboss.esb.test.persistdb.dir}">
+                    <fileset dir="resources/etc/" includes="persistUnitTestDB*"/>
+                </copy>
 
 	        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
 	            <formatter type="plain" usefile="false"/>
@@ -206,7 +206,7 @@
 	        	<sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
 	        	<sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
 	        	<sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
-                        <sysproperty key="org.jboss.esb.test.persistdb.dir" value="${org.jboss.esb.test.persistdb.dir}"/>
+                        <sysproperty key="org.jboss.esb.test.persistdb.dir" value="${org.jboss.esb.test.persistdb.dir}"/>
 	        	<sysproperty key="log4j.configuration" value="log4j.xml"/>
 	        </junit>
 	        <junitreport>
@@ -216,5 +216,5 @@
 	            <report format="frames" todir="${org.jboss.esb.tests.report.dir}"/>
 	            <report format="noframes" todir="${org.jboss.esb.tests.report.dir}"/>
 	        </junitreport>
-	    </target>
-</project>
+	    </target>
+</project>


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/resources/device-profile.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/resources/etc/jbossesb-test-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/resources/etc/persistUnitTestDB.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/CourierIntegrationTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/CourierUtilUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/FileCourierUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/FtpFileHandlerIntegrationTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/util/SecureFtpTestConfig.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StreamUtils.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StreamUtils.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StreamUtils.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,57 +1,57 @@
-/*
- * 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;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.TestCase;
-
-/**
- * Stream handling utilities for testing.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class StreamUtils {
-
-	/**
-	 * Read the supplied InputStream and return as an array of bytes.
-	 * @param stream The stream to read.
-	 * @return The stream contents in an array of bytes.
-	 */
-	public static byte[] readStream(InputStream stream) {
-		ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
-		byte[] buffer = new byte[256];
-		int readCount = 0;
-		
-		try {
-			while((readCount = stream.read(buffer)) != -1) {
-				outBuffer.write(buffer, 0, readCount);
-			}
-		} catch (IOException e) {
-			e.printStackTrace();
-			TestCase.fail("Error reading input stream - See above stack trace.");
-		}		
-		
-		return outBuffer.toByteArray();
-	}
-}
+/*
+ * 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;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+/**
+ * Stream handling utilities for testing.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class StreamUtils {
+
+	/**
+	 * Read the supplied InputStream and return as an array of bytes.
+	 * @param stream The stream to read.
+	 * @return The stream contents in an array of bytes.
+	 */
+	public static byte[] readStream(InputStream stream) {
+		ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
+		byte[] buffer = new byte[256];
+		int readCount = 0;
+		
+		try {
+			while((readCount = stream.read(buffer)) != -1) {
+				outBuffer.write(buffer, 0, readCount);
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+			TestCase.fail("Error reading input stream - See above stack trace.");
+		}		
+		
+		return outBuffer.toByteArray();
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StreamUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StringUtils.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StringUtils.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StringUtils.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,70 +1,70 @@
-/*
- * 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;
-
-/**
- * Utility methods for string manipulation and testing.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class StringUtils {
-
-	/**
-	 * Compare the supplied strings, ignoring line break characters.
-	 * @param string1 The 1st string.
-	 * @param string2 The 2nd string.
-	 * @param ignorecase True if a case insensitive comparison is to
-	 * be performed, otherwise false. 
-	 * @return True if the strings are equal, otherwise false.
-	 */
-	public static boolean equalsIgnoreLinebreaks(String string1, String string2, boolean ignorecase) {
-		string1 = removeChar(string1, '\r');
-		string1 = removeChar(string1, '\n');
-		string2 = removeChar(string2, '\r');
-		string2 = removeChar(string2, '\n');
-
-		if(ignorecase) {
-			return string1.equalsIgnoreCase(string2);
-		} else {
-			return string1.equals(string2);
-		}
-	}
-	
-	/**
-	 * Delete all instances of the specified character from the supplied string.
-	 * @param string The string to be opperated on.
-	 * @param character The character to be removed.
-	 */
-	public static String removeChar(String string, char character) {
-		StringBuffer stringBuf = new StringBuffer(string);
-		int index = 0;
-		
-		while(index < stringBuf.length()) {
-			if(stringBuf.charAt(index) == character) {
-				stringBuf.deleteCharAt(index);
-			} else {
-				index++;
-			}
-		}
-		
-		return stringBuf.toString();
-	}
-}
+/*
+ * 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;
+
+/**
+ * Utility methods for string manipulation and testing.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class StringUtils {
+
+	/**
+	 * Compare the supplied strings, ignoring line break characters.
+	 * @param string1 The 1st string.
+	 * @param string2 The 2nd string.
+	 * @param ignorecase True if a case insensitive comparison is to
+	 * be performed, otherwise false. 
+	 * @return True if the strings are equal, otherwise false.
+	 */
+	public static boolean equalsIgnoreLinebreaks(String string1, String string2, boolean ignorecase) {
+		string1 = removeChar(string1, '\r');
+		string1 = removeChar(string1, '\n');
+		string2 = removeChar(string2, '\r');
+		string2 = removeChar(string2, '\n');
+
+		if(ignorecase) {
+			return string1.equalsIgnoreCase(string2);
+		} else {
+			return string1.equals(string2);
+		}
+	}
+	
+	/**
+	 * Delete all instances of the specified character from the supplied string.
+	 * @param string The string to be opperated on.
+	 * @param character The character to be removed.
+	 */
+	public static String removeChar(String string, char character) {
+		StringBuffer stringBuf = new StringBuffer(string);
+		int index = 0;
+		
+		while(index < stringBuf.length()) {
+			if(stringBuf.charAt(index) == character) {
+				stringBuf.deleteCharAt(index);
+			} else {
+				index++;
+			}
+		}
+		
+		return stringBuf.toString();
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/StringUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/W3CDomUtils.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/W3CDomUtils.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/W3CDomUtils.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,35 +1,35 @@
-package org.jboss.soa.esb;
-
-import java.io.ByteArrayOutputStream;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import junit.framework.TestCase;
-
-import org.w3c.dom.Document;
-
-public abstract class W3CDomUtils {
-
-	public static String serialize(Document document) {
-		DOMSource src = new DOMSource(document);
-
-		ByteArrayOutputStream byteBuf = new ByteArrayOutputStream(5000);
-		StreamResult res = new StreamResult(byteBuf);
-
-		try {
-			Transformer transformer = TransformerFactory.newInstance().newTransformer();
-			transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
-			transformer.setOutputProperty(OutputKeys.INDENT, "yes");
-			transformer.transform(src, res);
-		} catch (Exception e) {
-			e.printStackTrace();
-			TestCase.fail("Failed to serialise doc.  See above stack trace.");
-		}
-		
-		return byteBuf.toString();
-	}
-}
+package org.jboss.soa.esb;
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Document;
+
+public abstract class W3CDomUtils {
+
+	public static String serialize(Document document) {
+		DOMSource src = new DOMSource(document);
+
+		ByteArrayOutputStream byteBuf = new ByteArrayOutputStream(5000);
+		StreamResult res = new StreamResult(byteBuf);
+
+		try {
+			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+			transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+			transformer.transform(src, res);
+		} catch (Exception e) {
+			e.printStackTrace();
+			TestCase.fail("Failed to serialise doc.  See above stack trace.");
+		}
+		
+		return byteBuf.toString();
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/W3CDomUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/EmailUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/EmailUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/EmailUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,68 +1,68 @@
-/*
- * 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.addressing.helpers.tests;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-
-/**
- * Unit tests for the EPR class.
- * 
- * @author Mark Little
- */
-
-public class EmailUnitTest extends TestCase
-{
-
-	public void testConstructor ()
-	{
-		try
-		{
-			new EmailEpr(EmailEpr.SMTP_PROTOCOL, "myhost", "25", "foo", "bar");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGet ()
-	{
-		try
-		{
-			EmailEpr em = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "myhost", "25", "foo", "bar");
-			
-			assertEquals(em.getHost(), "myhost");
-			assertEquals(em.getProtocol(), EmailEpr.SMTP_PROTOCOL);
-			assertEquals(em.getPort(), 25);
-			assertEquals(em.getUserName(), "foo");
-			assertEquals(em.getPassword(), "bar");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-}
+/*
+ * 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.addressing.helpers.tests;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.addressing.eprs.EmailEpr;
+
+/**
+ * Unit tests for the EPR class.
+ * 
+ * @author Mark Little
+ */
+
+public class EmailUnitTest extends TestCase
+{
+
+	public void testConstructor ()
+	{
+		try
+		{
+			new EmailEpr(EmailEpr.SMTP_PROTOCOL, "myhost", "25", "foo", "bar");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGet ()
+	{
+		try
+		{
+			EmailEpr em = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "myhost", "25", "foo", "bar");
+			
+			assertEquals(em.getHost(), "myhost");
+			assertEquals(em.getProtocol(), EmailEpr.SMTP_PROTOCOL);
+			assertEquals(em.getPort(), 25);
+			assertEquals(em.getUserName(), "foo");
+			assertEquals(em.getPassword(), "bar");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/EmailUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/FTPUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/FTPUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/FTPUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,72 +1,72 @@
-/*
- * 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.addressing.helpers.tests;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-
-/**
- * Unit tests for the EPR class.
- * 
- * @author Mark Little
- */
-
-public class FTPUnitTest extends TestCase
-{
-
-	public void testConstructor ()
-	{
-		try
-		{
-			new FTPEpr("ftp://foo.com");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGet ()
-	{
-		try
-		{
-			FTPEpr ftp = new FTPEpr("ftp://foo.com");
-			
-			assertEquals(ftp.getURL().toString(), "ftp://foo.com");
-			assertEquals(ftp.getURL().getHost(), "foo.com");
-			assertEquals(ftp.getURL().getProtocol(), "ftp");
-			
-			ftp.setPassword("foobar");
-			assertEquals(ftp.getPassword(), "foobar");
-			
-			ftp.setUserName("barfoo");
-			assertEquals(ftp.getUserName(), "barfoo");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-}
+/*
+ * 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.addressing.helpers.tests;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.addressing.eprs.FTPEpr;
+
+/**
+ * Unit tests for the EPR class.
+ * 
+ * @author Mark Little
+ */
+
+public class FTPUnitTest extends TestCase
+{
+
+	public void testConstructor ()
+	{
+		try
+		{
+			new FTPEpr("ftp://foo.com");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGet ()
+	{
+		try
+		{
+			FTPEpr ftp = new FTPEpr("ftp://foo.com");
+			
+			assertEquals(ftp.getURL().toString(), "ftp://foo.com");
+			assertEquals(ftp.getURL().getHost(), "foo.com");
+			assertEquals(ftp.getURL().getProtocol(), "ftp");
+			
+			ftp.setPassword("foobar");
+			assertEquals(ftp.getPassword(), "foobar");
+			
+			ftp.setUserName("barfoo");
+			assertEquals(ftp.getUserName(), "barfoo");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/FTPUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/HTTPUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/HTTPUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/HTTPUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,73 +1,73 @@
-/*
- * 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.addressing.helpers.tests;
-
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
-
-/**
- * Unit tests for the EPR class.
- * 
- * @author Mark Little
- */
-
-public class HTTPUnitTest extends TestCase
-{
-
-	public void testConstructor ()
-	{
-		try
-		{
-			String url1 = "http://www.local.bar:8080";
-			new HTTPEpr(url1);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGet ()
-	{
-		try
-		{
-			String url1 = "http://www.local.bar:8080";
-			HTTPEpr epr = new HTTPEpr(url1);
-			
-			assertEquals(epr.getURL().toString(), url1);
-			
-			String url2 = "http://foo.com";
-			epr.setURL(new URL(url2));
-			
-			assertEquals(epr.getURL().toString(), url2);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-}
+/*
+ * 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.addressing.helpers.tests;
+
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
+
+/**
+ * Unit tests for the EPR class.
+ * 
+ * @author Mark Little
+ */
+
+public class HTTPUnitTest extends TestCase
+{
+
+	public void testConstructor ()
+	{
+		try
+		{
+			String url1 = "http://www.local.bar:8080";
+			new HTTPEpr(url1);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGet ()
+	{
+		try
+		{
+			String url1 = "http://www.local.bar:8080";
+			HTTPEpr epr = new HTTPEpr(url1);
+			
+			assertEquals(epr.getURL().toString(), url1);
+			
+			String url2 = "http://foo.com";
+			epr.setURL(new URL(url2));
+			
+			assertEquals(epr.getURL().toString(), url2);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/HTTPUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JDBCUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JDBCUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JDBCUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,91 +1,91 @@
-/*
- * 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.addressing.helpers.tests;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-
-/**
- * Unit tests for the EPR class.
- * 
- * @author Mark Little
- */
-
-public class JDBCUnitTest extends TestCase
-{
-
-	public void testConstructor ()
-	{
-		try
-		{
-			new JDBCEpr("jdbc:arjuna:oracle:thin", "CREATE TABLE foo");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGet ()
-	{
-		try
-		{
-			JDBCEpr em = new JDBCEpr("jdbc:arjuna:oracle:thin", "CREATE TABLE foo");
-			
-			assertEquals(em.getURL(), "jdbc:arjuna:oracle:thin");
-			assertEquals(em.getSQL(), "CREATE TABLE foo");
-			
-			em.setURL("jdbc:arjuna:oracle:thin");
-			assertEquals(em.getURL(), "jdbc:arjuna:oracle:thin");
-			
-			em.setUserName("me");
-			assertEquals(em.getUserName(), "me");
-			
-			em.setPassword("foobar");
-			assertEquals(em.getPassword(), "foobar");
-			
-			try
-			{
-				em.setSQL("INVALID");
-				
-				fail();
-			}
-			catch (IllegalStateException ex)
-			{
-			}
-			catch (Exception ex)
-			{
-				fail(ex.toString());
-			}
-			
-			em.setDriver("cloudscape");
-			assertEquals(em.getDriver(), "cloudscape");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-}
+/*
+ * 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.addressing.helpers.tests;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+
+/**
+ * Unit tests for the EPR class.
+ * 
+ * @author Mark Little
+ */
+
+public class JDBCUnitTest extends TestCase
+{
+
+	public void testConstructor ()
+	{
+		try
+		{
+			new JDBCEpr("jdbc:arjuna:oracle:thin", "CREATE TABLE foo");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGet ()
+	{
+		try
+		{
+			JDBCEpr em = new JDBCEpr("jdbc:arjuna:oracle:thin", "CREATE TABLE foo");
+			
+			assertEquals(em.getURL(), "jdbc:arjuna:oracle:thin");
+			assertEquals(em.getSQL(), "CREATE TABLE foo");
+			
+			em.setURL("jdbc:arjuna:oracle:thin");
+			assertEquals(em.getURL(), "jdbc:arjuna:oracle:thin");
+			
+			em.setUserName("me");
+			assertEquals(em.getUserName(), "me");
+			
+			em.setPassword("foobar");
+			assertEquals(em.getPassword(), "foobar");
+			
+			try
+			{
+				em.setSQL("INVALID");
+				
+				fail();
+			}
+			catch (IllegalStateException ex)
+			{
+			}
+			catch (Exception ex)
+			{
+				fail(ex.toString());
+			}
+			
+			em.setDriver("cloudscape");
+			assertEquals(em.getDriver(), "cloudscape");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JDBCUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,67 +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.addressing.helpers.tests;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-
-/**
- * Unit tests for the EPR class.
- * 
- * @author Mark Little
- */
-
-public class JMSUnitTest extends TestCase
-{
-
-	public void testConstructor ()
-	{
-		try
-		{
-			new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, JMSEpr.QUEUE_TYPE, "bar", "foobar",null,null,null,null);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGet ()
-	{
-		try
-		{
-			JMSEpr jms = new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, JMSEpr.QUEUE_TYPE, "bar", "foobar", null,null,null,null);
-			
-			assertEquals(jms.getVersion(), JMSEpr.ONE_ONE_PROTOCOL);
-			assertEquals(jms.getConnectionFactory(), "foobar");
-			assertEquals(jms.getDestinationType(), JMSEpr.QUEUE_TYPE);
-			assertEquals(jms.getDestinationName(), "bar");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-}
+/*
+ * 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.addressing.helpers.tests;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+
+/**
+ * Unit tests for the EPR class.
+ * 
+ * @author Mark Little
+ */
+
+public class JMSUnitTest extends TestCase
+{
+
+	public void testConstructor ()
+	{
+		try
+		{
+			new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, JMSEpr.QUEUE_TYPE, "bar", "foobar",null,null,null,null);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGet ()
+	{
+		try
+		{
+			JMSEpr jms = new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, JMSEpr.QUEUE_TYPE, "bar", "foobar", null,null,null,null);
+			
+			assertEquals(jms.getVersion(), JMSEpr.ONE_ONE_PROTOCOL);
+			assertEquals(jms.getConnectionFactory(), "foobar");
+			assertEquals(jms.getDestinationType(), JMSEpr.QUEUE_TYPE);
+			assertEquals(jms.getDestinationName(), "bar");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/CallUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/CallUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/CallUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,195 +1,195 @@
-/*
- * 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.addressing.tests;
-
-import java.net.URI;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class CallUnitTest extends TestCase
-{
-	public void testConstructor ()
-	{
-		Call call = new Call();
-		
-		try
-		{
-			assertEquals((call.getTo() == null), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testEPRConstructor ()
-	{
-		try
-		{
-			EPR epr = new EPR(new URI("http://localhost"));
-			Call call = new Call(epr);
-			
-			assertEquals(call.getTo().equals(epr), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGetTo ()
-	{
-		Call call = new Call();
-		
-		try
-		{
-			EPR epr = new EPR(new URI("http://localhost"));
-			
-			call.setTo(epr);
-			
-			assertEquals(call.getTo().equals(epr), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGetFrom ()
-	{
-		Call call = new Call();
-		
-		try
-		{
-			EPR epr = new EPR(new URI("http://localhost"));
-			
-			call.setFrom(epr);
-			
-			assertEquals(call.getFrom().equals(epr), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGetReplyTo ()
-	{
-		Call call = new Call();
-		
-		try
-		{
-			EPR epr = new EPR(new URI("http://localhost"));
-			
-			call.setReplyTo(epr);
-			
-			assertEquals(call.getReplyTo().equals(epr), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGetFaultTo ()
-	{
-		Call call = new Call();
-		
-		try
-		{
-			EPR epr = new EPR(new URI("http://localhost"));
-			
-			call.setFaultTo(epr);
-			
-			assertEquals(call.getFaultTo().equals(epr), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGetRelatesTo ()
-	{
-		Call call = new Call();
-		
-		try
-		{
-			URI uri = new URI("urn:1234");
-			
-			call.setRelatesTo(uri);
-			
-			assertEquals(call.getRelatesTo().equals(uri), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGetAction ()
-	{
-		Call call = new Call();
-		
-		try
-		{
-			URI uri = new URI("urn:1234");
-			
-			call.setAction(uri);
-			
-			assertEquals(call.getAction().equals(uri), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetGetMessageID ()
-	{
-		Call call = new Call();
-		
-		try
-		{
-			URI uri = new URI("urn:1234");
-			
-			call.setMessageID(uri);
-			
-			assertEquals(call.getMessageID().equals(uri), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-}
+/*
+ * 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.addressing.tests;
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class CallUnitTest extends TestCase
+{
+	public void testConstructor ()
+	{
+		Call call = new Call();
+		
+		try
+		{
+			assertEquals((call.getTo() == null), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testEPRConstructor ()
+	{
+		try
+		{
+			EPR epr = new EPR(new URI("http://localhost"));
+			Call call = new Call(epr);
+			
+			assertEquals(call.getTo().equals(epr), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGetTo ()
+	{
+		Call call = new Call();
+		
+		try
+		{
+			EPR epr = new EPR(new URI("http://localhost"));
+			
+			call.setTo(epr);
+			
+			assertEquals(call.getTo().equals(epr), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGetFrom ()
+	{
+		Call call = new Call();
+		
+		try
+		{
+			EPR epr = new EPR(new URI("http://localhost"));
+			
+			call.setFrom(epr);
+			
+			assertEquals(call.getFrom().equals(epr), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGetReplyTo ()
+	{
+		Call call = new Call();
+		
+		try
+		{
+			EPR epr = new EPR(new URI("http://localhost"));
+			
+			call.setReplyTo(epr);
+			
+			assertEquals(call.getReplyTo().equals(epr), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGetFaultTo ()
+	{
+		Call call = new Call();
+		
+		try
+		{
+			EPR epr = new EPR(new URI("http://localhost"));
+			
+			call.setFaultTo(epr);
+			
+			assertEquals(call.getFaultTo().equals(epr), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGetRelatesTo ()
+	{
+		Call call = new Call();
+		
+		try
+		{
+			URI uri = new URI("urn:1234");
+			
+			call.setRelatesTo(uri);
+			
+			assertEquals(call.getRelatesTo().equals(uri), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGetAction ()
+	{
+		Call call = new Call();
+		
+		try
+		{
+			URI uri = new URI("urn:1234");
+			
+			call.setAction(uri);
+			
+			assertEquals(call.getAction().equals(uri), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetGetMessageID ()
+	{
+		Call call = new Call();
+		
+		try
+		{
+			URI uri = new URI("urn:1234");
+			
+			call.setMessageID(uri);
+			
+			assertEquals(call.getMessageID().equals(uri), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/CallUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/EPRUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/EPRUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/EPRUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,168 +1,168 @@
-/*
- * 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.addressing.tests;
-
-import java.io.StringWriter;
-import java.net.URI;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.addressing.helpers.PortReferenceHelper;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.PortReference;
-import org.jboss.soa.esb.addressing.XMLUtil;
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
-
-/**
- * Unit tests for the EPR class.
- * 
- * @author Mark Little
- */
-
-public class EPRUnitTest extends TestCase
-{
-
-	public void testConstructor ()
-	{
-		EPR epr = new EPR();
-		
-		System.err.println("Default EPR: "+epr);
-	}
-	
-	public void testPortReferenceConstructor ()
-	{
-		EPR epr = new EPR(new PortReference("http://localhost:8080"));
-		
-		assertEquals(epr.toString(), "EPR: PortReference < http://localhost:8080 >");
-	}
-	
-	public void testURIConstructor ()
-	{
-		try
-		{
-			EPR epr = new EPR(new URI("urn:foo:bar"));
-			
-			assertEquals(epr.toString(), "EPR: PortReference < urn:foo:bar >");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testGetAddr ()
-	{
-		try
-		{
-			EPR epr = new EPR(new URI("urn:foo:bar"));
-		
-			assertEquals(epr.getAddr().getAddress(), "urn:foo:bar");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSetAddr ()
-	{
-		EPR epr = new EPR();
-		
-		epr.setAddr(new PortReference("http://localhost"));
-
-		try
-		{
-			assertEquals(epr.getAddr().getAddress(), "http://localhost");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testToFromXML ()
-	{
-		try
-		{
-			EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
-			
-			final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			final DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.newDocument();
-			Element header = doc.createElement("header");
-			Element fromElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.FROM_TAG);
-			
-			doc.appendChild(header);
-			header.appendChild(fromElement);
-			
-			PortReferenceHelper.toXML(header, doc, fromElement, email.getAddr(), false);
-
-			final StringWriter sWriter = new StringWriter() ;
-			final OutputFormat format = new OutputFormat() ;
-			format.setIndenting(true) ;
-
-			final XMLSerializer xmlS = new XMLSerializer(sWriter, format) ;
-
-			xmlS.asDOMSerializer() ;
-			xmlS.serialize(doc) ;
-
-			System.err.println("Exported XML: "+sWriter.toString());
-			
-			PortReference pr = PortReferenceHelper.fromXML(fromElement, false);			
-			
-			EPR basicEpr = new EPR(pr);
-			EmailEpr nEpr = new EmailEpr(basicEpr);
-
-			assertEquals(nEpr.getAddr().getAddress(), email.getAddr().getAddress());
-		}
-		catch (Exception ex)
-		{
-			fail();
-		}		
-	}
-	
-	public void testEquals ()
-	{
-		try
-		{
-			EPR epr1 = new EPR(new URI("http://localhost"));
-			EPR epr2 = new EPR(new URI("http://localhost"));
-			EPR epr3 = new EPR(new URI("http://localhost:8080"));
-			
-			assertEquals(epr1.equals(epr2), true);
-			assertEquals(epr1.equals(epr3), false);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-}
+/*
+ * 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.addressing.tests;
+
+import java.io.StringWriter;
+import java.net.URI;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.addressing.helpers.PortReferenceHelper;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.XMLUtil;
+import org.jboss.soa.esb.addressing.eprs.EmailEpr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+/**
+ * Unit tests for the EPR class.
+ * 
+ * @author Mark Little
+ */
+
+public class EPRUnitTest extends TestCase
+{
+
+	public void testConstructor ()
+	{
+		EPR epr = new EPR();
+		
+		System.err.println("Default EPR: "+epr);
+	}
+	
+	public void testPortReferenceConstructor ()
+	{
+		EPR epr = new EPR(new PortReference("http://localhost:8080"));
+		
+		assertEquals(epr.toString(), "EPR: PortReference < http://localhost:8080 >");
+	}
+	
+	public void testURIConstructor ()
+	{
+		try
+		{
+			EPR epr = new EPR(new URI("urn:foo:bar"));
+			
+			assertEquals(epr.toString(), "EPR: PortReference < urn:foo:bar >");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testGetAddr ()
+	{
+		try
+		{
+			EPR epr = new EPR(new URI("urn:foo:bar"));
+		
+			assertEquals(epr.getAddr().getAddress(), "urn:foo:bar");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSetAddr ()
+	{
+		EPR epr = new EPR();
+		
+		epr.setAddr(new PortReference("http://localhost"));
+
+		try
+		{
+			assertEquals(epr.getAddr().getAddress(), "http://localhost");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testToFromXML ()
+	{
+		try
+		{
+			EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
+			
+			final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+			final DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.newDocument();
+			Element header = doc.createElement("header");
+			Element fromElement = doc.createElementNS(XMLUtil.WSA_NAMESPACE_URI, XMLUtil.WSA_PREFIX+":"+XMLUtil.FROM_TAG);
+			
+			doc.appendChild(header);
+			header.appendChild(fromElement);
+			
+			PortReferenceHelper.toXML(header, doc, fromElement, email.getAddr(), false);
+
+			final StringWriter sWriter = new StringWriter() ;
+			final OutputFormat format = new OutputFormat() ;
+			format.setIndenting(true) ;
+
+			final XMLSerializer xmlS = new XMLSerializer(sWriter, format) ;
+
+			xmlS.asDOMSerializer() ;
+			xmlS.serialize(doc) ;
+
+			System.err.println("Exported XML: "+sWriter.toString());
+			
+			PortReference pr = PortReferenceHelper.fromXML(fromElement, false);			
+			
+			EPR basicEpr = new EPR(pr);
+			EmailEpr nEpr = new EmailEpr(basicEpr);
+
+			assertEquals(nEpr.getAddr().getAddress(), email.getAddr().getAddress());
+		}
+		catch (Exception ex)
+		{
+			fail();
+		}		
+	}
+	
+	public void testEquals ()
+	{
+		try
+		{
+			EPR epr1 = new EPR(new URI("http://localhost"));
+			EPR epr2 = new EPR(new URI("http://localhost"));
+			EPR epr3 = new EPR(new URI("http://localhost:8080"));
+			
+			assertEquals(epr1.equals(epr2), true);
+			assertEquals(epr1.equals(epr3), false);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/EPRUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRHelperUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRHelperUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRHelperUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,59 +1,59 @@
-/*
- * 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.addressing.util.tests;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
-import org.jboss.soa.esb.MarshalException;
-import org.jboss.soa.esb.UnmarshalException;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class EPRHelperUnitTest extends TestCase
-{
-	
-	public void testToFromXMLString () throws MarshalException, UnmarshalException
-	{
-		EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
-		
-		String xmlString = EPRHelper.toXMLString(email);
-		
-		System.err.println("xmlString is: "+xmlString);
-		
-		EPR epr = EPRHelper.fromXMLString(xmlString);
-		
-		if (epr instanceof EmailEpr)
-		{
-		}
-		else
-		    fail();
-	}
-	
-}
+/*
+ * 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.addressing.util.tests;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
+import org.jboss.soa.esb.MarshalException;
+import org.jboss.soa.esb.UnmarshalException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.eprs.EmailEpr;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class EPRHelperUnitTest extends TestCase
+{
+	
+	public void testToFromXMLString () throws MarshalException, UnmarshalException
+	{
+		EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
+		
+		String xmlString = EPRHelper.toXMLString(email);
+		
+		System.err.println("xmlString is: "+xmlString);
+		
+		EPR epr = EPRHelper.fromXMLString(xmlString);
+		
+		if (epr instanceof EmailEpr)
+		{
+		}
+		else
+		    fail();
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRHelperUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRManagerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRManagerUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRManagerUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,121 +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.addressing.util.tests;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-import org.jboss.soa.esb.addressing.util.EPRManager;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class EPRManagerUnitTest extends TestCase
-{
-	public void testCreate ()
-	{
-		EPRManager manager1 = EPRManager.getInstance(null);
-		EPRManager manager2 = EPRManager.getInstance("");
-		EPRManager manager3 = EPRManager.getInstance("/tmp");
-		
-		assertEquals(manager1.equals(manager2), true);
-		assertEquals(manager1.equals(manager3), false);
-	}
-	
-	public void testInputOutput ()
-	{
-		EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
-		
-		String tmpDir = System.getProperty("java.io.tmpdir");
-		EPRManager manager = EPRManager.getInstance(tmpDir);
-
-		try
-		{
-			manager.saveEPR("MyEmail", email);
-
-			EmailEpr loaded = new EmailEpr(manager.loadEPR("MyEmail"));
-		
-			assertEquals(loaded.getHost().equals("foobar"), true);
-			assertEquals(loaded.getPassword().equals("letmein"), true);
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-		finally
-		{
-			try
-			{
-				manager.removeEPR("MyEmail");
-			}
-			catch (Exception ex)
-			{
-			}
-		}
-	}
-	
-	public void testSpecificInputOutput ()
-	{
-		EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
-		
-		String tmpDir = System.getProperty("java.io.tmpdir");
-		EPRManager manager = EPRManager.getInstance(tmpDir);
-
-		try
-		{
-			manager.saveEPR("MyEmail", email);
-			
-			EPR epr = manager.loadEPR("MyEmail");
-			
-			if (epr instanceof EmailEpr)
-			{
-			    
-			}
-			else
-			    fail();
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-		finally
-		{
-			try
-			{
-				manager.removeEPR("MyEmail");
-			}
-			catch (Exception ex)
-			{
-			}
-		}
-	}
-
-}
+/*
+ * 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.addressing.util.tests;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.eprs.EmailEpr;
+import org.jboss.soa.esb.addressing.util.EPRManager;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class EPRManagerUnitTest extends TestCase
+{
+	public void testCreate ()
+	{
+		EPRManager manager1 = EPRManager.getInstance(null);
+		EPRManager manager2 = EPRManager.getInstance("");
+		EPRManager manager3 = EPRManager.getInstance("/tmp");
+		
+		assertEquals(manager1.equals(manager2), true);
+		assertEquals(manager1.equals(manager3), false);
+	}
+	
+	public void testInputOutput ()
+	{
+		EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
+		
+		String tmpDir = System.getProperty("java.io.tmpdir");
+		EPRManager manager = EPRManager.getInstance(tmpDir);
+
+		try
+		{
+			manager.saveEPR("MyEmail", email);
+
+			EmailEpr loaded = new EmailEpr(manager.loadEPR("MyEmail"));
+		
+			assertEquals(loaded.getHost().equals("foobar"), true);
+			assertEquals(loaded.getPassword().equals("letmein"), true);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+		finally
+		{
+			try
+			{
+				manager.removeEPR("MyEmail");
+			}
+			catch (Exception ex)
+			{
+			}
+		}
+	}
+	
+	public void testSpecificInputOutput ()
+	{
+		EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
+		
+		String tmpDir = System.getProperty("java.io.tmpdir");
+		EPRManager manager = EPRManager.getInstance(tmpDir);
+
+		try
+		{
+			manager.saveEPR("MyEmail", email);
+			
+			EPR epr = manager.loadEPR("MyEmail");
+			
+			if (epr instanceof EmailEpr)
+			{
+			    
+			}
+			else
+			    fail();
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+		finally
+		{
+			try
+			{
+				manager.removeEPR("MyEmail");
+			}
+			catch (Exception ex)
+			{
+			}
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRManagerUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/command/InMemoryCommandQueueUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/BaseTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/MockDataSource.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/propertymanager/PropertyManagerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/propertymanager/PropertyManagerUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/propertymanager/PropertyManagerUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,87 +1,87 @@
-/*
- * 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.common.tests.propertymanager;
-
-import junit.framework.ComparisonFailure;
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.common.Environment;
-
-import com.arjuna.common.internal.util.propertyservice.plugins.io.XMLFilePlugin;
-import com.arjuna.common.util.propertyservice.PropertyManager;
-import com.arjuna.common.util.propertyservice.PropertyManagerFactory;
-
-public class PropertyManagerUnitTest extends TestCase
-{
-
-	public void testPropertyManager ()
-	{
-		System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "ON");
-		
-		PropertyManager corepm = PropertyManagerFactory.getPropertyManager("test.core", "core");
-		
-		try
-        {
-            corepm.load(XMLFilePlugin.class.getName(), "jbossesb-test-properties.xml");
-        }
-        catch (Exception e)
-        {
-        	e.printStackTrace();
-        	
-            fail(e.toString());
-        }
-        
-		assertEquals(corepm.getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY), "foobar");		
-		assertEquals(corepm.getProperty(Environment.OBJECT_STORE_CONFIG_FILE), "file:config.xml");
-		
-		try
-		{
-			assertEquals(corepm.getProperty(Environment.SMTP_HOST), "thishost");
-			
-			fail();
-		}
-		catch (ComparisonFailure ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-		
-		PropertyManager transportpm = PropertyManagerFactory.getPropertyManager("test.transports", "transports");
-		
-		try
-        {
-            transportpm.load(XMLFilePlugin.class.getName(), "jbossesb-test-properties.xml");
-        }
-        catch (Exception e)
-        {
-        	e.printStackTrace();
-        	
-            fail(e.toString());
-        }
-        
-        assertEquals(transportpm.getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY), "foobar");
-        assertEquals(transportpm.getProperty(Environment.SMTP_HOST), "thishost");
-	}
-
-}
+/*
+ * 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.common.tests.propertymanager;
+
+import junit.framework.ComparisonFailure;
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.common.Environment;
+
+import com.arjuna.common.internal.util.propertyservice.plugins.io.XMLFilePlugin;
+import com.arjuna.common.util.propertyservice.PropertyManager;
+import com.arjuna.common.util.propertyservice.PropertyManagerFactory;
+
+public class PropertyManagerUnitTest extends TestCase
+{
+
+	public void testPropertyManager ()
+	{
+		System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "ON");
+		
+		PropertyManager corepm = PropertyManagerFactory.getPropertyManager("test.core", "core");
+		
+		try
+        {
+            corepm.load(XMLFilePlugin.class.getName(), "jbossesb-test-properties.xml");
+        }
+        catch (Exception e)
+        {
+        	e.printStackTrace();
+        	
+            fail(e.toString());
+        }
+        
+		assertEquals(corepm.getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY), "foobar");		
+		assertEquals(corepm.getProperty(Environment.OBJECT_STORE_CONFIG_FILE), "file:config.xml");
+		
+		try
+		{
+			assertEquals(corepm.getProperty(Environment.SMTP_HOST), "thishost");
+			
+			fail();
+		}
+		catch (ComparisonFailure ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+		
+		PropertyManager transportpm = PropertyManagerFactory.getPropertyManager("test.transports", "transports");
+		
+		try
+        {
+            transportpm.load(XMLFilePlugin.class.getName(), "jbossesb-test-properties.xml");
+        }
+        catch (Exception e)
+        {
+        	e.printStackTrace();
+        	
+            fail(e.toString());
+        }
+        
+        assertEquals(transportpm.getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY), "foobar");
+        assertEquals(transportpm.getProperty(Environment.SMTP_HOST), "thishost");
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/propertymanager/PropertyManagerUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/common/tests/utils/DrainQueuesAndTopics.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,48 +1,48 @@
-/*
- * 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.helpers;
-
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import junit.framework.TestCase;
-
-/**
- * AppServerContex unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class AppServerContextUnitTest extends TestCase {
-
-	public void test_AppServerContext() throws NamingException {
-		Context ctx = NamingContext.getServerContext("http://localhost:1234", 
-				NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY,
-				NamingContext.JBOSS_URL_PKG_PREFIX);
-		
-		Hashtable props = ctx.getEnvironment();
-		System.out.println(props);
-		assertEquals("org.jnp.interfaces.NamingContextFactory", props.get(Context.INITIAL_CONTEXT_FACTORY));
-		assertEquals("http://localhost:1234", props.get(Context.PROVIDER_URL));
-		assertEquals(null, props.get("java.naming.factory.url.pkgs"));
-	}
-}
+/*
+ * 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.helpers;
+
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+/**
+ * AppServerContex unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class AppServerContextUnitTest extends TestCase {
+
+	public void test_AppServerContext() throws NamingException {
+		Context ctx = NamingContext.getServerContext("http://localhost:1234", 
+				NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY,
+				NamingContext.JBOSS_URL_PKG_PREFIX);
+		
+		Hashtable props = ctx.getEnvironment();
+		System.out.println(props);
+		assertEquals("org.jnp.interfaces.NamingContextFactory", props.get(Context.INITIAL_CONTEXT_FACTORY));
+		assertEquals("http://localhost:1234", props.get(Context.PROVIDER_URL));
+		assertEquals(null, props.get("java.naming.factory.url.pkgs"));
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/ConfigTreeUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/ConfigTreeUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/ConfigTreeUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,261 +1,261 @@
-/*
- * 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.helpers;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-
-import org.jboss.internal.soa.esb.util.StreamUtils;
-import org.jboss.soa.esb.StringUtils;
-import org.jboss.soa.esb.common.tests.BaseTest;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Unit tests for the ConfigTree class.
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- */
-public class ConfigTreeUnitTest extends BaseTest {
-
-	public void test_fromInputStream_args() throws SAXException, IOException {
-		try {
-			ConfigTree.fromInputStream(null);
-			fail("Expected IllegalArgumentException on null stream.");
-		} catch(IllegalArgumentException e) {
-			// Expected
-		}
-	}
-	
-	private InputStream getStream(String sName)
-	{
-		InputStream oRet =getClass().getResourceAsStream(sName);
-		if (null==oRet)
-			try { oRet = new FileInputStream(sName); }
-			catch(IOException e) { /* OK  Just fall through */}
-		return oRet;
-	}
-	
-	public void test_fromInputStream_and_toXML() throws SAXException, IOException
-	{
-		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile1.xml"));
-		byte[] expected = StreamUtils.readStream(getStream("expected_01.xml"));
-		
-		// Create the ConfigTree from a Stream.  Then...
-		// Dump the XML to a buffer and compare it with the expected - checking that the
-		// Created ConfigTree DOM is the same as what was supplied in the stream.  Also
-		// tests the toXML method.  If this fails, either fromInputStream is not working correctly
-		// or the toXML method is not serialising correctly.
-		String output = null;
-		try { output = confTree.toXml(); }
-		catch (Exception e) 
-		{ 
-			e.printStackTrace();
-		}
-		assertTrue("ConfigTree creation from a stream failed, or, ConfigTree toXML failed - failed to produce the same XML.", 
-				StringUtils.equalsIgnoreLinebreaks(new String(expected), output, false));
-	}
-
-	public void test_fromXML_args() throws SAXException, IOException
-	{		
-		try {
-			ConfigTree.fromXml(null);
-			fail("Expected IllegalArgumentException on null String.");
-		} catch(IllegalArgumentException e) {
-			// Expected
-		}
-		try {
-			ConfigTree.fromXml(" ");
-			fail("Expected SAXParseException on null String.");
-		} catch(SAXParseException e) {
-			// Expected
-		}
-	}
-
-	public void test_fromXML_and_toXML() throws SAXException, IOException
-	{
-		byte[] source = StreamUtils.readStream(getStream("expected_01.xml"));
-		ConfigTree confTree = ConfigTree.fromXml(new String(source));
-		byte[] expected = source;
-		
-		// Create the ConfigTree from a String.  Then...
-		// Dump the XML to a buffer and compare it with the expected - checking that the
-		// Created ConfigTree DOM is the same as what was supplied in the stream.  Also
-		// tests the toXML method.  If this fails, either fromInputStream is not working correctly
-		// or the toXML method is not serialising correctly.
-		String output = confTree.toXml();
-		assertTrue("ConfigTree creation from a String failed, or, ConfigTree toXML failed - failed to produce the same XML.", 
-				StringUtils.equalsIgnoreLinebreaks(new String(expected), output, false));
-	}
-
-	public void test_Constructor_Clone() throws SAXException, IOException {
-		ConfigTree conf1 = ConfigTree.fromInputStream(getStream("testfile1.xml"));
-//		ByteArrayOutputStream output;
-		byte[] expected = StreamUtils.readStream(getStream("expected_01.xml"));	
-		// Create a new ConfigTree from an existing one and compare it with the expected.
-		ConfigTree conf2 = conf1.cloneObj();
-		assertTrue("ConfigTree creation from a stream failed, or, cloneObj failed - failed to produce the same XML.", 
-				StringUtils.equalsIgnoreLinebreaks(new String(expected), conf2.toXml(), false));
-	}
-
-	public void test_Constructor_String_withoutparent() throws SAXException, IOException {
-		// Create a new ConfigTree from without a parent ConfigTree.
-		ConfigTree confTree = new ConfigTree("newConfigTree",null);
-		
-		assertEquals("New ConfigTree invalid.", "<newConfigTree/>" , confTree.toXml());
-	}
-	
-	public void test_getName() {
-		ConfigTree confTree = new ConfigTree("newConfigTree",null);
-		assertEquals("getName returned invalid data.", "newConfigTree", confTree.getName());
-	}
-	
-	public void test_getAttrKeys_hasnokeys() throws SAXException, IOException {
-		ConfigTree confTree = new ConfigTree("newConfigTree",null);		
-		assertTrue("invalid attribute name list", confTree.attributeCount()== 0);
-	}
-	
-	public void test_getAttrKeys_haskeys() throws SAXException, IOException {
-		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile2.xml"));
-		String[] expected = new String[] {"attrib1", "attrib2", "attrib3"};
-		Arrays.sort(expected);
-		String[] actual = confTree.getAttributeNames().toArray(new String[confTree.attributeCount()]);
-		Arrays.sort(actual);
-		
-		assertTrue("invalid attribute name list", Arrays.equals(expected, actual));
-	}
-	
-	public void test_getAttr() throws SAXException, IOException {
-		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile2.xml"));
-		
-		assertEquals("invalid attribute value", "value2", confTree.getAttribute("attrib2"));
-		assertEquals("invalid attribute value", null, confTree.getAttribute("attribXX"));
-	}
-	
-	public void test_getTextChildren() throws SAXException, IOException {
-		// This test also tests the static method getTextValue. 
-		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile3.xml"));
-		
-		// REVIEW: These tests capture the current behavior of the getTextChildren method.  I'm not convinced this behavior is correct!!
-		// I think perhaps this method should not be depending on getTextValue because getTextValue
-		// concatentates the child text nodes.
-		assertTrue("invalid Text Children list", 
-				"Some root text... and some more root text...".equals(confTree.getWholeText()));
-		assertTrue("invalid Text Children list", 
-				Arrays.equals(new String[] {"", "Some nested text..."}, confTree.getTextChildren("el")));
-	}
-
-	public void test_getElementChildren() throws SAXException, IOException {
-		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile3.xml"));
-		ConfigTree[] confTrees;
-
-		String expected = new String(StreamUtils.readStream(getStream("expected_03.xml"))).trim();
-		assertEquals("Wrong ConfigTree ElementChild value.", expected, confTree.toString().trim());
-
-		// Test the nested <el> elements - of which there are 2...
-		confTrees = confTree.getChildren("el");
-		assertEquals("Wrong number of ConfigTree ElementChildren.", 2, confTrees.length);
-		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"1\"/>", confTrees[0].toString().trim());
-		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"2\">Some nested text...</el>", confTrees[1].toString().trim());
-
-		// Test for a non-existant element...
-		confTrees = confTree.getChildren("xxxx");
-		assertEquals("Wrong number of ConfigTree ElementChildren.", 0, confTrees.length);
-	}
-	
-	public void test_getFirstElementChild() throws SAXException, IOException {
-		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile3.xml"));
-		
-		String expected = new String(StreamUtils.readStream(getStream("expected_03.xml"))).trim();
-		assertEquals("Wrong ConfigTree ElementChild value.", expected, confTree.toString().trim());
-
-		// Test the nested <el> elements - of which there are 2...
-		confTree = confTree.getFirstChild("el");
-		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"1\"/>", confTree.toString().trim());
-
-		// Test for a non-existant element...
-		confTree = confTree.getFirstChild("xxxx");
-		assertEquals("Expected null ConfigTree ElementChildren for non-existant element.", null, confTree);
-	}
-
-	public void test_getAllElemChildren() throws SAXException, IOException {
-		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile3.xml"));
-		ConfigTree[] confTrees;
-
-		confTrees = confTree.getAllChildren();
-		assertEquals("Wrong number of ConfigTree ElementChildren.", 2, confTrees.length);
-		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"1\"/>", confTrees[0].toString().trim());
-		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"2\">Some nested text...</el>", confTrees[1].toString().trim());
-
-		// REVIEW: Note, this method only returns ConfigTree instances for the child elements
-		// of the document root node. Comparing this to the behaviour of getFirstElementChild
-		// would seem to demonstrate an inconsitency???  To be consistent, I would expect this method 
-		// to return a list of 3 ConfigTree instances - the <root> and 2 <el> elements.
-	}
-	
-	public void test_setAttr() throws SAXException, IOException {
-		ConfigTree confTree = new ConfigTree("newConfigTree");
-		
-		confTree.setAttribute("attrib1", "value1");
-		assertEquals("value1", confTree.getAttribute("attrib1"));
-
-		// A null value removes the attribute.
-		confTree.setAttribute("attrib1", null);
-		assertEquals(null, confTree.getAttribute("attrib1"));
-
-		try { confTree.setAttribute(null, null); }
-		catch (IllegalArgumentException e) {/* OK  we expect this */}
-		catch (Exception e2) {fail(e2.getMessage());}
-	}
-	
-	public void test_addElemChild() throws SAXException, IOException {
-		ConfigTree ConfigTree1 = new ConfigTree("newConfigTree");
-		ConfigTree ConfigTreeX = new ConfigTree("X",ConfigTree1);
-		new ConfigTree("Y1",ConfigTree1);
-		new ConfigTree("Y2",ConfigTreeX);
-		
-		assertEquals("<newConfigTree><X><Y2/></X><Y1/></newConfigTree>", ConfigTree1.toString().trim());
-	}
-	
-	public void test_rmvChildsByName() throws SAXException, IOException {
-		ConfigTree ConfigTree1 = new ConfigTree("newConfigTree");
-		ConfigTree ConfigTreeX = new ConfigTree("X",ConfigTree1);
-		new ConfigTree("Y1",ConfigTree1);
-		new ConfigTree("Y2",ConfigTreeX);
-		
-		assertEquals("<newConfigTree><X><Y2/></X><Y1/></newConfigTree>", ConfigTree1.toString().trim());
-		ConfigTree1.removeChildrenByName("Y1");
-		assertEquals("<newConfigTree><X><Y2/></X></newConfigTree>", ConfigTree1.toString().trim());
-	}
-	
-	public void test_cloneObj() throws SAXException, IOException {
-		ConfigTree ConfigTree1 = new ConfigTree("newConfigTree");
-		new ConfigTree("X",ConfigTree1);
-		new ConfigTree("Y",ConfigTree1);
-		
-		ConfigTree clone = ConfigTree1.cloneObj();
-		
-		assertTrue("Clone should produce a completely different object", (ConfigTree1 != clone));
-		assertEquals("Clone should produce the same XML", ConfigTree1.toString(), clone.toString());
-	}
-}
+/*
+ * 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.helpers;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+
+import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.soa.esb.StringUtils;
+import org.jboss.soa.esb.common.tests.BaseTest;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Unit tests for the ConfigTree class.
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ */
+public class ConfigTreeUnitTest extends BaseTest {
+
+	public void test_fromInputStream_args() throws SAXException, IOException {
+		try {
+			ConfigTree.fromInputStream(null);
+			fail("Expected IllegalArgumentException on null stream.");
+		} catch(IllegalArgumentException e) {
+			// Expected
+		}
+	}
+	
+	private InputStream getStream(String sName)
+	{
+		InputStream oRet =getClass().getResourceAsStream(sName);
+		if (null==oRet)
+			try { oRet = new FileInputStream(sName); }
+			catch(IOException e) { /* OK  Just fall through */}
+		return oRet;
+	}
+	
+	public void test_fromInputStream_and_toXML() throws SAXException, IOException
+	{
+		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile1.xml"));
+		byte[] expected = StreamUtils.readStream(getStream("expected_01.xml"));
+		
+		// Create the ConfigTree from a Stream.  Then...
+		// Dump the XML to a buffer and compare it with the expected - checking that the
+		// Created ConfigTree DOM is the same as what was supplied in the stream.  Also
+		// tests the toXML method.  If this fails, either fromInputStream is not working correctly
+		// or the toXML method is not serialising correctly.
+		String output = null;
+		try { output = confTree.toXml(); }
+		catch (Exception e) 
+		{ 
+			e.printStackTrace();
+		}
+		assertTrue("ConfigTree creation from a stream failed, or, ConfigTree toXML failed - failed to produce the same XML.", 
+				StringUtils.equalsIgnoreLinebreaks(new String(expected), output, false));
+	}
+
+	public void test_fromXML_args() throws SAXException, IOException
+	{		
+		try {
+			ConfigTree.fromXml(null);
+			fail("Expected IllegalArgumentException on null String.");
+		} catch(IllegalArgumentException e) {
+			// Expected
+		}
+		try {
+			ConfigTree.fromXml(" ");
+			fail("Expected SAXParseException on null String.");
+		} catch(SAXParseException e) {
+			// Expected
+		}
+	}
+
+	public void test_fromXML_and_toXML() throws SAXException, IOException
+	{
+		byte[] source = StreamUtils.readStream(getStream("expected_01.xml"));
+		ConfigTree confTree = ConfigTree.fromXml(new String(source));
+		byte[] expected = source;
+		
+		// Create the ConfigTree from a String.  Then...
+		// Dump the XML to a buffer and compare it with the expected - checking that the
+		// Created ConfigTree DOM is the same as what was supplied in the stream.  Also
+		// tests the toXML method.  If this fails, either fromInputStream is not working correctly
+		// or the toXML method is not serialising correctly.
+		String output = confTree.toXml();
+		assertTrue("ConfigTree creation from a String failed, or, ConfigTree toXML failed - failed to produce the same XML.", 
+				StringUtils.equalsIgnoreLinebreaks(new String(expected), output, false));
+	}
+
+	public void test_Constructor_Clone() throws SAXException, IOException {
+		ConfigTree conf1 = ConfigTree.fromInputStream(getStream("testfile1.xml"));
+//		ByteArrayOutputStream output;
+		byte[] expected = StreamUtils.readStream(getStream("expected_01.xml"));	
+		// Create a new ConfigTree from an existing one and compare it with the expected.
+		ConfigTree conf2 = conf1.cloneObj();
+		assertTrue("ConfigTree creation from a stream failed, or, cloneObj failed - failed to produce the same XML.", 
+				StringUtils.equalsIgnoreLinebreaks(new String(expected), conf2.toXml(), false));
+	}
+
+	public void test_Constructor_String_withoutparent() throws SAXException, IOException {
+		// Create a new ConfigTree from without a parent ConfigTree.
+		ConfigTree confTree = new ConfigTree("newConfigTree",null);
+		
+		assertEquals("New ConfigTree invalid.", "<newConfigTree/>" , confTree.toXml());
+	}
+	
+	public void test_getName() {
+		ConfigTree confTree = new ConfigTree("newConfigTree",null);
+		assertEquals("getName returned invalid data.", "newConfigTree", confTree.getName());
+	}
+	
+	public void test_getAttrKeys_hasnokeys() throws SAXException, IOException {
+		ConfigTree confTree = new ConfigTree("newConfigTree",null);		
+		assertTrue("invalid attribute name list", confTree.attributeCount()== 0);
+	}
+	
+	public void test_getAttrKeys_haskeys() throws SAXException, IOException {
+		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile2.xml"));
+		String[] expected = new String[] {"attrib1", "attrib2", "attrib3"};
+		Arrays.sort(expected);
+		String[] actual = confTree.getAttributeNames().toArray(new String[confTree.attributeCount()]);
+		Arrays.sort(actual);
+		
+		assertTrue("invalid attribute name list", Arrays.equals(expected, actual));
+	}
+	
+	public void test_getAttr() throws SAXException, IOException {
+		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile2.xml"));
+		
+		assertEquals("invalid attribute value", "value2", confTree.getAttribute("attrib2"));
+		assertEquals("invalid attribute value", null, confTree.getAttribute("attribXX"));
+	}
+	
+	public void test_getTextChildren() throws SAXException, IOException {
+		// This test also tests the static method getTextValue. 
+		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile3.xml"));
+		
+		// REVIEW: These tests capture the current behavior of the getTextChildren method.  I'm not convinced this behavior is correct!!
+		// I think perhaps this method should not be depending on getTextValue because getTextValue
+		// concatentates the child text nodes.
+		assertTrue("invalid Text Children list", 
+				"Some root text... and some more root text...".equals(confTree.getWholeText()));
+		assertTrue("invalid Text Children list", 
+				Arrays.equals(new String[] {"", "Some nested text..."}, confTree.getTextChildren("el")));
+	}
+
+	public void test_getElementChildren() throws SAXException, IOException {
+		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile3.xml"));
+		ConfigTree[] confTrees;
+
+		String expected = new String(StreamUtils.readStream(getStream("expected_03.xml"))).trim();
+		assertEquals("Wrong ConfigTree ElementChild value.", expected, confTree.toString().trim());
+
+		// Test the nested <el> elements - of which there are 2...
+		confTrees = confTree.getChildren("el");
+		assertEquals("Wrong number of ConfigTree ElementChildren.", 2, confTrees.length);
+		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"1\"/>", confTrees[0].toString().trim());
+		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"2\">Some nested text...</el>", confTrees[1].toString().trim());
+
+		// Test for a non-existant element...
+		confTrees = confTree.getChildren("xxxx");
+		assertEquals("Wrong number of ConfigTree ElementChildren.", 0, confTrees.length);
+	}
+	
+	public void test_getFirstElementChild() throws SAXException, IOException {
+		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile3.xml"));
+		
+		String expected = new String(StreamUtils.readStream(getStream("expected_03.xml"))).trim();
+		assertEquals("Wrong ConfigTree ElementChild value.", expected, confTree.toString().trim());
+
+		// Test the nested <el> elements - of which there are 2...
+		confTree = confTree.getFirstChild("el");
+		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"1\"/>", confTree.toString().trim());
+
+		// Test for a non-existant element...
+		confTree = confTree.getFirstChild("xxxx");
+		assertEquals("Expected null ConfigTree ElementChildren for non-existant element.", null, confTree);
+	}
+
+	public void test_getAllElemChildren() throws SAXException, IOException {
+		ConfigTree confTree = ConfigTree.fromInputStream(getStream("testfile3.xml"));
+		ConfigTree[] confTrees;
+
+		confTrees = confTree.getAllChildren();
+		assertEquals("Wrong number of ConfigTree ElementChildren.", 2, confTrees.length);
+		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"1\"/>", confTrees[0].toString().trim());
+		assertEquals("Wrong ConfigTree ElementChild value.", "<el index=\"2\">Some nested text...</el>", confTrees[1].toString().trim());
+
+		// REVIEW: Note, this method only returns ConfigTree instances for the child elements
+		// of the document root node. Comparing this to the behaviour of getFirstElementChild
+		// would seem to demonstrate an inconsitency???  To be consistent, I would expect this method 
+		// to return a list of 3 ConfigTree instances - the <root> and 2 <el> elements.
+	}
+	
+	public void test_setAttr() throws SAXException, IOException {
+		ConfigTree confTree = new ConfigTree("newConfigTree");
+		
+		confTree.setAttribute("attrib1", "value1");
+		assertEquals("value1", confTree.getAttribute("attrib1"));
+
+		// A null value removes the attribute.
+		confTree.setAttribute("attrib1", null);
+		assertEquals(null, confTree.getAttribute("attrib1"));
+
+		try { confTree.setAttribute(null, null); }
+		catch (IllegalArgumentException e) {/* OK  we expect this */}
+		catch (Exception e2) {fail(e2.getMessage());}
+	}
+	
+	public void test_addElemChild() throws SAXException, IOException {
+		ConfigTree ConfigTree1 = new ConfigTree("newConfigTree");
+		ConfigTree ConfigTreeX = new ConfigTree("X",ConfigTree1);
+		new ConfigTree("Y1",ConfigTree1);
+		new ConfigTree("Y2",ConfigTreeX);
+		
+		assertEquals("<newConfigTree><X><Y2/></X><Y1/></newConfigTree>", ConfigTree1.toString().trim());
+	}
+	
+	public void test_rmvChildsByName() throws SAXException, IOException {
+		ConfigTree ConfigTree1 = new ConfigTree("newConfigTree");
+		ConfigTree ConfigTreeX = new ConfigTree("X",ConfigTree1);
+		new ConfigTree("Y1",ConfigTree1);
+		new ConfigTree("Y2",ConfigTreeX);
+		
+		assertEquals("<newConfigTree><X><Y2/></X><Y1/></newConfigTree>", ConfigTree1.toString().trim());
+		ConfigTree1.removeChildrenByName("Y1");
+		assertEquals("<newConfigTree><X><Y2/></X></newConfigTree>", ConfigTree1.toString().trim());
+	}
+	
+	public void test_cloneObj() throws SAXException, IOException {
+		ConfigTree ConfigTree1 = new ConfigTree("newConfigTree");
+		new ConfigTree("X",ConfigTree1);
+		new ConfigTree("Y",ConfigTree1);
+		
+		ConfigTree clone = ConfigTree1.cloneObj();
+		
+		assertTrue("Clone should produce a completely different object", (ConfigTree1 != clone));
+		assertEquals("Clone should produce the same XML", ConfigTree1.toString(), clone.toString());
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/ConfigTreeUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,94 +1,94 @@
-/*
- * 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.helpers;
-
-import java.io.IOException;
-
-import javax.mail.Address;
-import javax.mail.MessagingException;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.MimeBodyPart;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for the EsbEmail class.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class EmailUnitTest extends TestCase {
-
-	private ConfigTree mailParams;
-	
-	@Override
-	protected void setUp() throws Exception {
-		mailParams = ConfigTree.fromInputStream(getClass().getResourceAsStream("testfile4.xml"));
-	}
-
-	public void test_Email() throws AddressException, MessagingException, IOException {
-		// Look at the source message in testfile4.xml before reading this test.
-		
-        Email esbMail = new Email();
-        esbMail.setSendTo(mailParams.getAttribute(Email.SENDTO));
-        esbMail.setFrom(mailParams.getAttribute(Email.FROM));
-        esbMail.setCopyTo(mailParams.getAttribute(Email.COPYTO));
-        esbMail.setSubject(mailParams.getAttribute(Email.SUBJECT));
-
-        esbMail.setAttachments(mailParams.getTextChildren(Email.ATTACH));
-        esbMail.setMessage(mailParams.getAttribute(Email.MESSAGE));
-		MimeMessage message = esbMail.getMailMessage();
-		Address[] addresses;
-
-		// Check the "from" address details...
-		addresses = message.getFrom();
-		assertEquals(1, addresses.length);
-		assertEquals("x.x at x.com", addresses[0].toString());
-		
-		// Check the "to" address details...
-		addresses = message.getRecipients(MimeMessage.RecipientType.TO); 
-		assertEquals(2, addresses.length);
-		assertEquals("b.b at b.com", addresses[0].toString());
-		assertEquals("c.c at c.com", addresses[1].toString());
-		
-		// Check the "cc" address details...
-		addresses = message.getRecipients(MimeMessage.RecipientType.CC); 
-		assertEquals(2, addresses.length);
-		assertEquals("d.d at c.com", addresses[0].toString());
-		assertEquals("e.e at e.com", addresses[1].toString());
-		
-		// Check the "subject"...
-		assertEquals("Unit Test - Subject", message.getSubject());
-		
-		// Check the message body, including attachments...
-		MimeMultipart content = (MimeMultipart) message.getContent(); // expect a cast exception if it's not the expected type!
-		assertEquals(3, content.getCount()); // the message and the 2 attachments - see testfile4.xml
-		MimeBodyPart part = (MimeBodyPart) content.getBodyPart(0); // the message
-		assertEquals("Unit Test - Message", ((String)part.getContent()).trim());
-		part = (MimeBodyPart) content.getBodyPart(1); // attachement 1
-		assertEquals("attachment1.txt", ((String)part.getFileName()).trim());
-		part = (MimeBodyPart) content.getBodyPart(2); // attachement 2
-		assertEquals("attachment2.txt", ((String)part.getFileName()).trim());
-	}
-	
-	// TODO: Add some negative tests!!!
-}
+/*
+ * 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.helpers;
+
+import java.io.IOException;
+
+import javax.mail.Address;
+import javax.mail.MessagingException;
+import javax.mail.internet.AddressException;
+import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.MimeMultipart;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for the EsbEmail class.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class EmailUnitTest extends TestCase {
+
+	private ConfigTree mailParams;
+	
+	@Override
+	protected void setUp() throws Exception {
+		mailParams = ConfigTree.fromInputStream(getClass().getResourceAsStream("testfile4.xml"));
+	}
+
+	public void test_Email() throws AddressException, MessagingException, IOException {
+		// Look at the source message in testfile4.xml before reading this test.
+		
+        Email esbMail = new Email();
+        esbMail.setSendTo(mailParams.getAttribute(Email.SENDTO));
+        esbMail.setFrom(mailParams.getAttribute(Email.FROM));
+        esbMail.setCopyTo(mailParams.getAttribute(Email.COPYTO));
+        esbMail.setSubject(mailParams.getAttribute(Email.SUBJECT));
+
+        esbMail.setAttachments(mailParams.getTextChildren(Email.ATTACH));
+        esbMail.setMessage(mailParams.getAttribute(Email.MESSAGE));
+		MimeMessage message = esbMail.getMailMessage();
+		Address[] addresses;
+
+		// Check the "from" address details...
+		addresses = message.getFrom();
+		assertEquals(1, addresses.length);
+		assertEquals("x.x at x.com", addresses[0].toString());
+		
+		// Check the "to" address details...
+		addresses = message.getRecipients(MimeMessage.RecipientType.TO); 
+		assertEquals(2, addresses.length);
+		assertEquals("b.b at b.com", addresses[0].toString());
+		assertEquals("c.c at c.com", addresses[1].toString());
+		
+		// Check the "cc" address details...
+		addresses = message.getRecipients(MimeMessage.RecipientType.CC); 
+		assertEquals(2, addresses.length);
+		assertEquals("d.d at c.com", addresses[0].toString());
+		assertEquals("e.e at e.com", addresses[1].toString());
+		
+		// Check the "subject"...
+		assertEquals("Unit Test - Subject", message.getSubject());
+		
+		// Check the message body, including attachments...
+		MimeMultipart content = (MimeMultipart) message.getContent(); // expect a cast exception if it's not the expected type!
+		assertEquals(3, content.getCount()); // the message and the 2 attachments - see testfile4.xml
+		MimeBodyPart part = (MimeBodyPart) content.getBodyPart(0); // the message
+		assertEquals("Unit Test - Message", ((String)part.getContent()).trim());
+		part = (MimeBodyPart) content.getBodyPart(1); // attachement 1
+		assertEquals("attachment1.txt", ((String)part.getFileName()).trim());
+		part = (MimeBodyPart) content.getBodyPart(2); // attachement 2
+		assertEquals("attachment2.txt", ((String)part.getFileName()).trim());
+	}
+	
+	// TODO: Add some negative tests!!!
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/EmailUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/KeyValuePairUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/KeyValuePairUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/KeyValuePairUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,84 +1,84 @@
-/*
- * 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.helpers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-/**
- * Unit tests for the KeyValuePair class.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class KeyValuePairUnitTest extends TestCase {
-
-	public void test_Constructor_args() {
-		try {
-			new KeyValuePair(null, "aaa");
-			fail("Expected IllegalArgumentException");
-		} catch(IllegalArgumentException e) {
-			// expected
-		}
-		try {
-			new KeyValuePair(" ", "aaa");
-			fail("Expected IllegalArgumentException");
-		} catch(IllegalArgumentException e) {
-			// expected
-		}
-		new KeyValuePair("a", "aaa");
-		new KeyValuePair("a", null);
-		new KeyValuePair("a", "");
-	}
-
-	public void test_methods() {
-		KeyValuePair kvp = new KeyValuePair("key", "value");
-		
-		assertEquals("key", kvp.getKey());
-		assertEquals("value", kvp.getValue());
-		assertEquals("value", kvp.toString());
-		assertEquals("KVpair[key=value]", kvp.dump());
-	}
-
-    public void test_list() {
-        List<KeyValuePair> list = new ArrayList<KeyValuePair>();
-        
-        list.add(new KeyValuePair("key1", "value1"));
-        list.add(new KeyValuePair("key2", "true"));
-        list.add(new KeyValuePair("key3", "false"));
-        list.add(new KeyValuePair("key4", "2"));
-        list.add(new KeyValuePair("key5", "10.8"));
-
-        assertEquals("value1", KeyValuePair.getValue("key1", list));
-        assertEquals("true", KeyValuePair.getValue("key2", list));
-        assertEquals("false", KeyValuePair.getValue("key3", list));
-        assertEquals("2", KeyValuePair.getValue("key4", list));
-
-        assertEquals(true, KeyValuePair.getBooleanValue("key2", list, false));
-        assertEquals(false, KeyValuePair.getBooleanValue("key3", list, true));
-        assertEquals(true, KeyValuePair.getBooleanValue("key1", list, true));
-
-        assertEquals(2.0, KeyValuePair.getDoubleValue("key4", list, 10.0));
-        assertEquals(10.8, KeyValuePair.getDoubleValue("key5", list, 2.0));
-        assertEquals(100.0, KeyValuePair.getDoubleValue("key1", list, 100.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.helpers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests for the KeyValuePair class.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class KeyValuePairUnitTest extends TestCase {
+
+	public void test_Constructor_args() {
+		try {
+			new KeyValuePair(null, "aaa");
+			fail("Expected IllegalArgumentException");
+		} catch(IllegalArgumentException e) {
+			// expected
+		}
+		try {
+			new KeyValuePair(" ", "aaa");
+			fail("Expected IllegalArgumentException");
+		} catch(IllegalArgumentException e) {
+			// expected
+		}
+		new KeyValuePair("a", "aaa");
+		new KeyValuePair("a", null);
+		new KeyValuePair("a", "");
+	}
+
+	public void test_methods() {
+		KeyValuePair kvp = new KeyValuePair("key", "value");
+		
+		assertEquals("key", kvp.getKey());
+		assertEquals("value", kvp.getValue());
+		assertEquals("value", kvp.toString());
+		assertEquals("KVpair[key=value]", kvp.dump());
+	}
+
+    public void test_list() {
+        List<KeyValuePair> list = new ArrayList<KeyValuePair>();
+        
+        list.add(new KeyValuePair("key1", "value1"));
+        list.add(new KeyValuePair("key2", "true"));
+        list.add(new KeyValuePair("key3", "false"));
+        list.add(new KeyValuePair("key4", "2"));
+        list.add(new KeyValuePair("key5", "10.8"));
+
+        assertEquals("value1", KeyValuePair.getValue("key1", list));
+        assertEquals("true", KeyValuePair.getValue("key2", list));
+        assertEquals("false", KeyValuePair.getValue("key3", list));
+        assertEquals("2", KeyValuePair.getValue("key4", list));
+
+        assertEquals(true, KeyValuePair.getBooleanValue("key2", list, false));
+        assertEquals(false, KeyValuePair.getBooleanValue("key3", list, true));
+        assertEquals(true, KeyValuePair.getBooleanValue("key1", list, true));
+
+        assertEquals(2.0, KeyValuePair.getDoubleValue("key4", list, 10.0));
+        assertEquals(10.8, KeyValuePair.getDoubleValue("key5", list, 2.0));
+        assertEquals(100.0, KeyValuePair.getDoubleValue("key1", list, 100.0));
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/KeyValuePairUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_01.xml
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_01.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_01.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-<test>
-	<el index="1"/>
-	<el index="2">
-		<el index="2.1"/>
-		And some text...
-	</el>
-</test>
+<test>
+	<el index="1"/>
+	<el index="2">
+		<el index="2.1"/>
+		And some text...
+	</el>
+</test>


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_01.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_02.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/expected_03.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConnUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/persist/SimpleDataSourceUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile1.xml
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile1.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile1.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-<test>
-	<el index="1"/>
-	<el index="2">
-		<el index="2.1"/>
-		And some text...
-	</el>
+<test>
+	<el index="1"/>
+	<el index="2">
+		<el index="2.1"/>
+		And some text...
+	</el>
 </test>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile1.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile2.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile3.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile4.xml
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile4.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile4.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,9 +1,9 @@
-<mailParams	from="x.x at x.com" 
-			sendTo="b.b at b.com,c.c at c.com" 
-			ccTo="d.d at c.com,e.e at e.com" 
-			subject="Unit Test - Subject" message="Unit Test - Message">
-			
-	<attachment>attachment1.txt</attachment>
-	<attachment>attachment2.txt</attachment>
-	
+<mailParams	from="x.x at x.com" 
+			sendTo="b.b at b.com,c.c at c.com" 
+			ccTo="d.d at c.com,e.e at e.com" 
+			subject="Unit Test - Subject" message="Unit Test - Message">
+			
+	<attachment>attachment1.txt</attachment>
+	<attachment>attachment2.txt</attachment>
+	
 </mailParams>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/testfile4.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessageImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessageImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessageImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,117 +1,117 @@
-package org.jboss.soa.esb.message.format.tests;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.message.Attachment;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.message.Context;
-import org.jboss.soa.esb.message.Fault;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Properties;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Used to plug in new message formats dynamically. Each plugin is responsible for
- * returning a message implementation that knows how to serialize its state in a
- * specific manner, e.g., XML or ASN.1.
- *  
- * @author Mark Little
- *
- */
-
-public class ExampleMessageImpl implements Message
-{
-	
-	/**
-	 * @return get the header component of the message.
-	 */
-	
-	public Header getHeader ()
-	{
-		return null;
-	}
-
-	/**
-	 * @return get the context component of the message.
-	 */
-	
-	public Context getContext ()
-	{
-		return null;
-	}
-	
-	/**
-	 * @return get the body component of the message.
-	 */
-	
-	public Body getBody ()
-	{
-		return null;
-	}
-
-	/**
-	 * @return get any faults associated with the message. These should not
-	 * be application level faults, but comms level.
-	 */
-	
-	public Fault getFault ()
-	{
-		return null;
-	}
-	
-	/**
-	 * @return get any message attachments.
-	 */
-	
-	public Attachment getAttachment ()
-	{
-		return null;
-	}
-	/**
-	 * @return get any message properties 
-	 */	
-	public Properties getProperties() 
-	{
-		return null;
-	}
-	
-	/**
-	 * @return the type of this message.
-	 */
-	
-	public URI getType ()
-	{
-		try
-		{
-			return new URI(ExampleMessagePlugin.URN);
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			return null;
-		}
-	}
-
-}
+package org.jboss.soa.esb.message.format.tests;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.message.Attachment;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Context;
+import org.jboss.soa.esb.message.Fault;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Properties;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Used to plug in new message formats dynamically. Each plugin is responsible for
+ * returning a message implementation that knows how to serialize its state in a
+ * specific manner, e.g., XML or ASN.1.
+ *  
+ * @author Mark Little
+ *
+ */
+
+public class ExampleMessageImpl implements Message
+{
+	
+	/**
+	 * @return get the header component of the message.
+	 */
+	
+	public Header getHeader ()
+	{
+		return null;
+	}
+
+	/**
+	 * @return get the context component of the message.
+	 */
+	
+	public Context getContext ()
+	{
+		return null;
+	}
+	
+	/**
+	 * @return get the body component of the message.
+	 */
+	
+	public Body getBody ()
+	{
+		return null;
+	}
+
+	/**
+	 * @return get any faults associated with the message. These should not
+	 * be application level faults, but comms level.
+	 */
+	
+	public Fault getFault ()
+	{
+		return null;
+	}
+	
+	/**
+	 * @return get any message attachments.
+	 */
+	
+	public Attachment getAttachment ()
+	{
+		return null;
+	}
+	/**
+	 * @return get any message properties 
+	 */	
+	public Properties getProperties() 
+	{
+		return null;
+	}
+	
+	/**
+	 * @return the type of this message.
+	 */
+	
+	public URI getType ()
+	{
+		try
+		{
+			return new URI(ExampleMessagePlugin.URN);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			return null;
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessageImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessagePlugin.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessagePlugin.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessagePlugin.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-package org.jboss.soa.esb.message.format.tests;
-
-import java.net.URI;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessagePlugin;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-/**
- * Used to plug in new message formats dynamically. Each plugin is responsible for
- * returning a message implementation that knows how to serialize its state in a
- * specific manner, e.g., XML or ASN.1.
- *  
- * @author Mark Little
- *
- */
-
-public class ExampleMessagePlugin implements MessagePlugin
-{
-	
-	public static final String URN = "foobar";
-	
-	/**
-	 * @return the message instance.
-	 */
-	
-	public Message getMessage ()
-	{
-		return new ExampleMessageImpl();
-	}
-	
-	/**
-	 * @return the unique identifier for this message plugin.
-	 */
-	
-	public URI getType ()
-	{
-		try
-		{
-			return new URI(URN);
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			return null;
-		}
-	}
-}
+package org.jboss.soa.esb.message.format.tests;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessagePlugin;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+/**
+ * Used to plug in new message formats dynamically. Each plugin is responsible for
+ * returning a message implementation that knows how to serialize its state in a
+ * specific manner, e.g., XML or ASN.1.
+ *  
+ * @author Mark Little
+ *
+ */
+
+public class ExampleMessagePlugin implements MessagePlugin
+{
+	
+	public static final String URN = "foobar";
+	
+	/**
+	 * @return the message instance.
+	 */
+	
+	public Message getMessage ()
+	{
+		return new ExampleMessageImpl();
+	}
+	
+	/**
+	 * @return the unique identifier for this message plugin.
+	 */
+	
+	public URI getType ()
+	{
+		try
+		{
+			return new URI(URN);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			return null;
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/ExampleMessagePlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/MessageFactoryUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/MessageFactoryUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/MessageFactoryUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,131 +1,131 @@
-/*
- * 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.message.format.tests;
-
-import java.net.URI;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessagePlugin;
-import org.jboss.soa.esb.message.format.MessageType;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class MessageFactoryUnitTest extends TestCase
-{
-	public void testDefaultMessage ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage();
-		
-		assertEquals((msg != null), true);
-	}
-	
-	public void testURIMessage ()
-	{
-		Message msg1 = MessageFactory.getInstance().getMessage(MessageType.DEFAULT_TYPE);
-		Message msg2 = MessageFactory.getInstance().getMessage();
-		
-		assertEquals(msg1.getType().equals(msg2.getType()), true);
-		
-		Message msg3 = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-		
-		assertEquals(msg1.getType().equals(msg3.getType()), false);
-	}
-	
-	public void testInvalidURIMessage ()
-	{
-		try
-		{
-			Message msg = MessageFactory.getInstance().getMessage(new URI("urn:foo"));
-			
-			assertEquals((msg == null), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testNullURIMessage ()
-	{
-		try
-		{
-			@SuppressWarnings("unused")
-			Message msg = MessageFactory.getInstance().getMessage(null);
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-			// success
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testNullURIConvertMessage ()
-	{
-		try
-		{
-			@SuppressWarnings("unused")
-			Message msg = MessageFactory.getInstance().getMessage(null, null);
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-			// success
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testPlugin ()
-	{
-		System.setProperty(MessagePlugin.MESSAGE_PLUGIN+"1", ExampleMessagePlugin.class.getName());
-		
-		MessageFactory.getInstance().reset();
-		
-		try
-		{
-			URI uri = new URI(ExampleMessagePlugin.URN);
-			Message msg = MessageFactory.getInstance().getMessage(uri);
-
-			assertEquals(msg.getType().equals(uri), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-}
+/*
+ * 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.message.format.tests;
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessagePlugin;
+import org.jboss.soa.esb.message.format.MessageType;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class MessageFactoryUnitTest extends TestCase
+{
+	public void testDefaultMessage ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage();
+		
+		assertEquals((msg != null), true);
+	}
+	
+	public void testURIMessage ()
+	{
+		Message msg1 = MessageFactory.getInstance().getMessage(MessageType.DEFAULT_TYPE);
+		Message msg2 = MessageFactory.getInstance().getMessage();
+		
+		assertEquals(msg1.getType().equals(msg2.getType()), true);
+		
+		Message msg3 = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+		
+		assertEquals(msg1.getType().equals(msg3.getType()), false);
+	}
+	
+	public void testInvalidURIMessage ()
+	{
+		try
+		{
+			Message msg = MessageFactory.getInstance().getMessage(new URI("urn:foo"));
+			
+			assertEquals((msg == null), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testNullURIMessage ()
+	{
+		try
+		{
+			@SuppressWarnings("unused")
+			Message msg = MessageFactory.getInstance().getMessage(null);
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+			// success
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testNullURIConvertMessage ()
+	{
+		try
+		{
+			@SuppressWarnings("unused")
+			Message msg = MessageFactory.getInstance().getMessage(null, null);
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+			// success
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testPlugin ()
+	{
+		System.setProperty(MessagePlugin.MESSAGE_PLUGIN+"1", ExampleMessagePlugin.class.getName());
+		
+		MessageFactory.getInstance().reset();
+		
+		try
+		{
+			URI uri = new URI(ExampleMessagePlugin.URN);
+			Message msg = MessageFactory.getInstance().getMessage(uri);
+
+			assertEquals(msg.getType().equals(uri), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/format/tests/MessageFactoryUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/AttachmentUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/AttachmentUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/AttachmentUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,207 +1,207 @@
-/*
- * 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.message.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.StringWriter;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
-import org.jboss.soa.esb.message.Attachment;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.w3c.dom.Document;
-
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class AttachmentUnitTest extends TestCase
-{
-
-	public void testSerializeAttachment()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		Attachment at = msg.getAttachment();
-
-		assertEquals((msg != null), true);
-
-		at.addItem(new ExampleObject(0)); // un-named
-		at.addItemAt(0, new ExampleObject(0)); // un-named;
-
-		try
-		{
-			at.addItem(new Object());
-
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-
-		assertEquals(at.getUnnamedCount(), 2);
-
-		assertEquals(at.get("foo"), null);
-
-		at.put("foobar", new ExampleObject(1));
-
-		assertEquals(at.getNamedCount(), 1);
-
-		at.addItem(new ExampleObject(1));
-		at.addItem(new ExampleObject(2));
-
-		assertEquals((at.getNames() != null), true);
-
-		assertEquals((at.removeItemAt(0) != null), true);
-
-		at.replaceItemAt(0, new ExampleObject(2));
-
-		int count = at.getUnnamedCount();
-
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-
-			o.writeObject(msg);
-			o.close();
-
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-
-			assertEquals(nImpl.getAttachment().getUnnamedCount(), count);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-	public void testXMLAttachment()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertEquals((msg != null), true);
-
-		Attachment at = msg.getAttachment();
-
-		assertEquals((msg != null), true);
-
-		at.addItem(new ExampleObject(0)); // un-named
-		at.addItemAt(0, new ExampleObject(0)); // un-named;
-
-		try
-		{
-			at.addItem(new Object());
-
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-
-		assertEquals(at.getUnnamedCount(), 2);
-
-		assertEquals(at.get("foo"), null);
-
-		at.put("foobar", new ExampleObject(1));
-
-		assertEquals(at.getNamedCount(), 1);
-
-		at.addItem(new ExampleObject(1));
-		at.addItem(new ExampleObject(2));
-
-		assertEquals((at.getNames() != null), true);
-
-		assertEquals((at.removeItemAt(0) != null), true);
-
-		at.replaceItemAt(0, new ExampleObject(2));
-
-		int count = at.getUnnamedCount();
-
-		try
-		{
-			DocumentBuilderFactory factory = DocumentBuilderFactory
-					.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.newDocument();
-			org.jboss.internal.soa.esb.message.format.xml.MessageImpl theImpl = (org.jboss.internal.soa.esb.message.format.xml.MessageImpl) msg;
-
-			doc = theImpl.toXML(doc);
-
-			StringWriter sWriter = new StringWriter();
-			OutputFormat format = new OutputFormat();
-			format.setIndenting(true);
-
-			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
-
-			xmlS.asDOMSerializer();
-			xmlS.serialize(doc);
-
-			String documentAsString = sWriter.toString();
-
-			System.err.println("Message looks like: " + documentAsString);
-
-			org.jboss.internal.soa.esb.message.format.xml.MessageImpl nImpl = new org.jboss.internal.soa.esb.message.format.xml.MessageImpl();
-
-			nImpl.fromXML(doc);
-
-			assertEquals(nImpl.getAttachment().getUnnamedCount(), count);
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-	}
-
-}
+/*
+ * 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.message.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.StringWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
+import org.jboss.soa.esb.message.Attachment;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.w3c.dom.Document;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class AttachmentUnitTest extends TestCase
+{
+
+	public void testSerializeAttachment()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		Attachment at = msg.getAttachment();
+
+		assertEquals((msg != null), true);
+
+		at.addItem(new ExampleObject(0)); // un-named
+		at.addItemAt(0, new ExampleObject(0)); // un-named;
+
+		try
+		{
+			at.addItem(new Object());
+
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+
+		assertEquals(at.getUnnamedCount(), 2);
+
+		assertEquals(at.get("foo"), null);
+
+		at.put("foobar", new ExampleObject(1));
+
+		assertEquals(at.getNamedCount(), 1);
+
+		at.addItem(new ExampleObject(1));
+		at.addItem(new ExampleObject(2));
+
+		assertEquals((at.getNames() != null), true);
+
+		assertEquals((at.removeItemAt(0) != null), true);
+
+		at.replaceItemAt(0, new ExampleObject(2));
+
+		int count = at.getUnnamedCount();
+
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+
+			o.writeObject(msg);
+			o.close();
+
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+
+			assertEquals(nImpl.getAttachment().getUnnamedCount(), count);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+	public void testXMLAttachment()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertEquals((msg != null), true);
+
+		Attachment at = msg.getAttachment();
+
+		assertEquals((msg != null), true);
+
+		at.addItem(new ExampleObject(0)); // un-named
+		at.addItemAt(0, new ExampleObject(0)); // un-named;
+
+		try
+		{
+			at.addItem(new Object());
+
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+
+		assertEquals(at.getUnnamedCount(), 2);
+
+		assertEquals(at.get("foo"), null);
+
+		at.put("foobar", new ExampleObject(1));
+
+		assertEquals(at.getNamedCount(), 1);
+
+		at.addItem(new ExampleObject(1));
+		at.addItem(new ExampleObject(2));
+
+		assertEquals((at.getNames() != null), true);
+
+		assertEquals((at.removeItemAt(0) != null), true);
+
+		at.replaceItemAt(0, new ExampleObject(2));
+
+		int count = at.getUnnamedCount();
+
+		try
+		{
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.newDocument();
+			org.jboss.internal.soa.esb.message.format.xml.MessageImpl theImpl = (org.jboss.internal.soa.esb.message.format.xml.MessageImpl) msg;
+
+			doc = theImpl.toXML(doc);
+
+			StringWriter sWriter = new StringWriter();
+			OutputFormat format = new OutputFormat();
+			format.setIndenting(true);
+
+			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
+
+			xmlS.asDOMSerializer();
+			xmlS.serialize(doc);
+
+			String documentAsString = sWriter.toString();
+
+			System.err.println("Message looks like: " + documentAsString);
+
+			org.jboss.internal.soa.esb.message.format.xml.MessageImpl nImpl = new org.jboss.internal.soa.esb.message.format.xml.MessageImpl();
+
+			nImpl.fromXML(doc);
+
+			assertEquals(nImpl.getAttachment().getUnnamedCount(), count);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/AttachmentUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/BodyUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/BodyUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/BodyUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,220 +1,220 @@
-/*
- * 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.message.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.StringWriter;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.message.format.xml.MessageImpl;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.w3c.dom.Document;
-
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class BodyUnitTest extends TestCase
-{
-
-	public void testXMLAddString ()
-	{
-		// get XML message
-
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			msg.getBody().add("foo", "bar");
-			
-			assertEquals(msg.getBody().get("foo"), "bar");
-			
-			DocumentBuilderFactory factory = DocumentBuilderFactory
-					.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.newDocument();
-			MessageImpl theImpl = (MessageImpl) msg;
-
-			doc = theImpl.toXML(doc);
-
-			StringWriter sWriter = new StringWriter();
-			OutputFormat format = new OutputFormat();
-			format.setIndenting(true);
-
-			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
-
-			xmlS.asDOMSerializer();
-			xmlS.serialize(doc);
-
-			String documentAsString = sWriter.toString();
-
-			MessageImpl nImpl = new MessageImpl();
-
-			System.err.println("Document is "+documentAsString);
-			
-			nImpl.fromXML(doc);
-			
-			assertEquals(nImpl.getBody().get("foo"), "bar");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testXMLAddBoolean ()
-	{
-		// get XML message
-
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			msg.getBody().add("foo", new Boolean(true));
-			
-			assertEquals(msg.getBody().get("foo"), new Boolean(true));
-			
-			DocumentBuilderFactory factory = DocumentBuilderFactory
-					.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.newDocument();
-			MessageImpl theImpl = (MessageImpl) msg;
-
-			doc = theImpl.toXML(doc);
-
-			StringWriter sWriter = new StringWriter();
-			OutputFormat format = new OutputFormat();
-			format.setIndenting(true);
-
-			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
-
-			xmlS.asDOMSerializer();
-			xmlS.serialize(doc);
-
-			String documentAsString = sWriter.toString();
-
-			MessageImpl nImpl = new MessageImpl();
-
-			System.err.println("Document is "+documentAsString);
-			
-			nImpl.fromXML(doc);
-			
-			assertEquals(nImpl.getBody().get("foo"), new Boolean(true));
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSerializedAddString ()
-	{
-		// get XML message
-
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			msg.getBody().add("foo", "bar");
-			
-			assertEquals(msg.getBody().get("foo"), "bar");
-			
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-			
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			org.jboss.internal.soa.esb.message.format.serialized.MessageImpl nImpl = (org.jboss.internal.soa.esb.message.format.serialized.MessageImpl) io.readObject();
-			
-			o.close();
-
-			assertEquals(nImpl.getBody().get("foo"), "bar");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSerializedAddBoolean ()
-	{
-		// get XML message
-
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			msg.getBody().add("foo", new Boolean(true));
-			
-			assertEquals(msg.getBody().get("foo"), new Boolean(true));
-			
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-			
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			org.jboss.internal.soa.esb.message.format.serialized.MessageImpl nImpl = (org.jboss.internal.soa.esb.message.format.serialized.MessageImpl) io.readObject();
-			
-			assertEquals(nImpl.getBody().get("foo"), new Boolean(true));
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-}
+/*
+ * 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.message.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.StringWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.message.format.xml.MessageImpl;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.w3c.dom.Document;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class BodyUnitTest extends TestCase
+{
+
+	public void testXMLAddString ()
+	{
+		// get XML message
+
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			msg.getBody().add("foo", "bar");
+			
+			assertEquals(msg.getBody().get("foo"), "bar");
+			
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.newDocument();
+			MessageImpl theImpl = (MessageImpl) msg;
+
+			doc = theImpl.toXML(doc);
+
+			StringWriter sWriter = new StringWriter();
+			OutputFormat format = new OutputFormat();
+			format.setIndenting(true);
+
+			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
+
+			xmlS.asDOMSerializer();
+			xmlS.serialize(doc);
+
+			String documentAsString = sWriter.toString();
+
+			MessageImpl nImpl = new MessageImpl();
+
+			System.err.println("Document is "+documentAsString);
+			
+			nImpl.fromXML(doc);
+			
+			assertEquals(nImpl.getBody().get("foo"), "bar");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testXMLAddBoolean ()
+	{
+		// get XML message
+
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			msg.getBody().add("foo", new Boolean(true));
+			
+			assertEquals(msg.getBody().get("foo"), new Boolean(true));
+			
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.newDocument();
+			MessageImpl theImpl = (MessageImpl) msg;
+
+			doc = theImpl.toXML(doc);
+
+			StringWriter sWriter = new StringWriter();
+			OutputFormat format = new OutputFormat();
+			format.setIndenting(true);
+
+			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
+
+			xmlS.asDOMSerializer();
+			xmlS.serialize(doc);
+
+			String documentAsString = sWriter.toString();
+
+			MessageImpl nImpl = new MessageImpl();
+
+			System.err.println("Document is "+documentAsString);
+			
+			nImpl.fromXML(doc);
+			
+			assertEquals(nImpl.getBody().get("foo"), new Boolean(true));
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSerializedAddString ()
+	{
+		// get XML message
+
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			msg.getBody().add("foo", "bar");
+			
+			assertEquals(msg.getBody().get("foo"), "bar");
+			
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+			
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			org.jboss.internal.soa.esb.message.format.serialized.MessageImpl nImpl = (org.jboss.internal.soa.esb.message.format.serialized.MessageImpl) io.readObject();
+			
+			o.close();
+
+			assertEquals(nImpl.getBody().get("foo"), "bar");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSerializedAddBoolean ()
+	{
+		// get XML message
+
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			msg.getBody().add("foo", new Boolean(true));
+			
+			assertEquals(msg.getBody().get("foo"), new Boolean(true));
+			
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+			
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			org.jboss.internal.soa.esb.message.format.serialized.MessageImpl nImpl = (org.jboss.internal.soa.esb.message.format.serialized.MessageImpl) io.readObject();
+			
+			assertEquals(nImpl.getBody().get("foo"), new Boolean(true));
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/BodyUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/ExampleObject.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/ExampleObject.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/ExampleObject.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,49 +1,49 @@
-/*
- * 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.message.tests;
-
-import java.io.Serializable;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class ExampleObject implements Serializable
-{
-	private static final long serialVersionUID = 0x0;
-
-	public ExampleObject (long val)
-	{
-		value = val;
-	}
-	
-	public long getValue ()
-	{
-		return value;
-	}
-	
-	private long value;
-	
-}
+/*
+ * 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.message.tests;
+
+import java.io.Serializable;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class ExampleObject implements Serializable
+{
+	private static final long serialVersionUID = 0x0;
+
+	public ExampleObject (long val)
+	{
+		value = val;
+	}
+	
+	public long getValue ()
+	{
+		return value;
+	}
+	
+	private long value;
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/ExampleObject.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,143 +1,143 @@
-/*
- * 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.message.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.StringWriter;
-import java.net.URI;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.w3c.dom.Document;
-
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class FaultUnitTest extends TestCase
-{
-
-	public void testSerializeFault ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			URI code = new URI("urn:code");
-		
-			msg.getFault().setCode(code);
-			msg.getFault().setReason("because");
-			
-			assertEquals(msg.getFault().getCode(), code);
-			assertEquals(msg.getFault().getReason(), "because");
-
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-
-			o.writeObject(msg);
-			o.close();
-
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-
-			assertEquals(nImpl.getFault().getReason(), "because");
-			
-			o.close();
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-	public void testXMLFault ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			URI code = new URI("urn:code");
-			
-			msg.getFault().setCode(code);
-			msg.getFault().setReason("because");
-			
-			assertEquals(msg.getFault().getCode(), code);
-			assertEquals(msg.getFault().getReason(), "because");
-		
-			DocumentBuilderFactory factory = DocumentBuilderFactory
-					.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.newDocument();
-			org.jboss.internal.soa.esb.message.format.xml.MessageImpl theImpl = (org.jboss.internal.soa.esb.message.format.xml.MessageImpl) msg;
-
-			doc = theImpl.toXML(doc);
-
-			StringWriter sWriter = new StringWriter();
-			OutputFormat format = new OutputFormat();
-			format.setIndenting(true);
-
-			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
-
-			xmlS.asDOMSerializer();
-			xmlS.serialize(doc);
-
-			String documentAsString = sWriter.toString();
-
-			System.err.println("Message looks like: " + documentAsString);
-			
-			org.jboss.internal.soa.esb.message.format.xml.MessageImpl nImpl = new org.jboss.internal.soa.esb.message.format.xml.MessageImpl();
-			
-			nImpl.fromXML(doc);
-
-			assertEquals(nImpl.getFault().getReason(), "because");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-}
+/*
+ * 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.message.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.StringWriter;
+import java.net.URI;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.w3c.dom.Document;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class FaultUnitTest extends TestCase
+{
+
+	public void testSerializeFault ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			URI code = new URI("urn:code");
+		
+			msg.getFault().setCode(code);
+			msg.getFault().setReason("because");
+			
+			assertEquals(msg.getFault().getCode(), code);
+			assertEquals(msg.getFault().getReason(), "because");
+
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+
+			o.writeObject(msg);
+			o.close();
+
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+
+			assertEquals(nImpl.getFault().getReason(), "because");
+			
+			o.close();
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+	public void testXMLFault ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			URI code = new URI("urn:code");
+			
+			msg.getFault().setCode(code);
+			msg.getFault().setReason("because");
+			
+			assertEquals(msg.getFault().getCode(), code);
+			assertEquals(msg.getFault().getReason(), "because");
+		
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.newDocument();
+			org.jboss.internal.soa.esb.message.format.xml.MessageImpl theImpl = (org.jboss.internal.soa.esb.message.format.xml.MessageImpl) msg;
+
+			doc = theImpl.toXML(doc);
+
+			StringWriter sWriter = new StringWriter();
+			OutputFormat format = new OutputFormat();
+			format.setIndenting(true);
+
+			XMLSerializer xmlS = new XMLSerializer(sWriter, format);
+
+			xmlS.asDOMSerializer();
+			xmlS.serialize(doc);
+
+			String documentAsString = sWriter.toString();
+
+			System.err.println("Message looks like: " + documentAsString);
+			
+			org.jboss.internal.soa.esb.message.format.xml.MessageImpl nImpl = new org.jboss.internal.soa.esb.message.format.xml.MessageImpl();
+			
+			nImpl.fromXML(doc);
+
+			assertEquals(nImpl.getFault().getReason(), "because");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/MessageUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/MessageUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/MessageUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,76 +1,76 @@
-/*
- * 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.message.tests;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class MessageUnitTest extends TestCase
-{
-	
-	public void testDefaultMessageFields ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage();
-		
-		assertEquals((msg.getBody() != null), true);
-		assertEquals((msg.getHeader() != null), true);
-		assertEquals((msg.getContext() != null), true);
-		assertEquals((msg.getAttachment() != null), true);
-		assertEquals((msg.getFault() != null), true);
-		assertEquals((msg.getProperties() != null), true);
-	}
-	
-	public void testXMLMessageFields ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-		
-		assertEquals((msg.getBody() != null), true);
-		assertEquals((msg.getHeader() != null), true);
-		assertEquals((msg.getContext() != null), true);
-		assertEquals((msg.getAttachment() != null), true);
-		assertEquals((msg.getFault() != null), true);
-		assertEquals((msg.getProperties() != null), true);
-	}
-	
-	public void testSerializedMessageFields ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-		
-		assertEquals((msg.getBody() != null), true);
-		assertEquals((msg.getHeader() != null), true);
-		assertEquals((msg.getContext() != null), true);
-		assertEquals((msg.getAttachment() != null), true);
-		assertEquals((msg.getFault() != null), true);
-		assertEquals((msg.getProperties() != null), true);
-	}
-	
-}
+/*
+ * 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.message.tests;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class MessageUnitTest extends TestCase
+{
+	
+	public void testDefaultMessageFields ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage();
+		
+		assertEquals((msg.getBody() != null), true);
+		assertEquals((msg.getHeader() != null), true);
+		assertEquals((msg.getContext() != null), true);
+		assertEquals((msg.getAttachment() != null), true);
+		assertEquals((msg.getFault() != null), true);
+		assertEquals((msg.getProperties() != null), true);
+	}
+	
+	public void testXMLMessageFields ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+		
+		assertEquals((msg.getBody() != null), true);
+		assertEquals((msg.getHeader() != null), true);
+		assertEquals((msg.getContext() != null), true);
+		assertEquals((msg.getAttachment() != null), true);
+		assertEquals((msg.getFault() != null), true);
+		assertEquals((msg.getProperties() != null), true);
+	}
+	
+	public void testSerializedMessageFields ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+		
+		assertEquals((msg.getBody() != null), true);
+		assertEquals((msg.getHeader() != null), true);
+		assertEquals((msg.getContext() != null), true);
+		assertEquals((msg.getAttachment() != null), true);
+		assertEquals((msg.getFault() != null), true);
+		assertEquals((msg.getProperties() != null), true);
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/MessageUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/PropertiesUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/PropertiesUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/PropertiesUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,161 +1,161 @@
-/*
- * 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.message.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.w3c.dom.Document;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class PropertiesUnitTest extends TestCase
-{
-
-	public void testSerializeProperties()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		msg.getProperties().setProperty("foo", "bar");
-
-		assertEquals(msg.getProperties().getProperty("foo"), "bar");
-		assertEquals((msg.getProperties().getProperty("foobar") == null), true);
-
-		assertEquals(msg.getProperties().getProperty("foobar", "barfoo"),
-				"barfoo");
-
-		try
-		{
-			msg.getProperties().setProperty("1234", new Object());
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-		
-		msg.getProperties().getNames();
-		
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-
-			o.writeObject(msg);
-			o.close();
-
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-
-			assertEquals(nImpl.getProperties().getProperty("foo"), "bar");
-
-			o.close();
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-
-		assertEquals(msg.getProperties().remove("foo"), "bar");
-	}
-
-	public void testXMLProperties()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertEquals((msg != null), true);
-
-		msg.getProperties().setProperty("foo", "bar");
-
-		assertEquals(msg.getProperties().getProperty("foo"), "bar");
-		assertEquals((msg.getProperties().getProperty("foobar") == null), true);
-
-		assertEquals(msg.getProperties().getProperty("foobar", "barfoo"),
-				"barfoo");
-
-		try
-		{
-			msg.getProperties().setProperty("1234", new Object());
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-		
-		msg.getProperties().getNames();
-		
-		try
-		{
-			DocumentBuilderFactory factory = DocumentBuilderFactory
-					.newInstance();
-			DocumentBuilder builder = factory.newDocumentBuilder();
-			Document doc = builder.newDocument();
-			org.jboss.internal.soa.esb.message.format.xml.MessageImpl theImpl = (org.jboss.internal.soa.esb.message.format.xml.MessageImpl) msg;
-
-			doc = theImpl.toXML(doc);
-
-			org.jboss.internal.soa.esb.message.format.xml.MessageImpl nImpl = new org.jboss.internal.soa.esb.message.format.xml.MessageImpl();
-			
-			nImpl.fromXML(doc);
-
-			assertEquals(nImpl.getProperties().getProperty("foo"), "bar");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-
-		assertEquals(msg.getProperties().remove("foo"), "bar");
-	}
-
-}
+/*
+ * 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.message.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.w3c.dom.Document;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class PropertiesUnitTest extends TestCase
+{
+
+	public void testSerializeProperties()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		msg.getProperties().setProperty("foo", "bar");
+
+		assertEquals(msg.getProperties().getProperty("foo"), "bar");
+		assertEquals((msg.getProperties().getProperty("foobar") == null), true);
+
+		assertEquals(msg.getProperties().getProperty("foobar", "barfoo"),
+				"barfoo");
+
+		try
+		{
+			msg.getProperties().setProperty("1234", new Object());
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+		
+		msg.getProperties().getNames();
+		
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+
+			o.writeObject(msg);
+			o.close();
+
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+
+			assertEquals(nImpl.getProperties().getProperty("foo"), "bar");
+
+			o.close();
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+
+		assertEquals(msg.getProperties().remove("foo"), "bar");
+	}
+
+	public void testXMLProperties()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertEquals((msg != null), true);
+
+		msg.getProperties().setProperty("foo", "bar");
+
+		assertEquals(msg.getProperties().getProperty("foo"), "bar");
+		assertEquals((msg.getProperties().getProperty("foobar") == null), true);
+
+		assertEquals(msg.getProperties().getProperty("foobar", "barfoo"),
+				"barfoo");
+
+		try
+		{
+			msg.getProperties().setProperty("1234", new Object());
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+		
+		msg.getProperties().getNames();
+		
+		try
+		{
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			Document doc = builder.newDocument();
+			org.jboss.internal.soa.esb.message.format.xml.MessageImpl theImpl = (org.jboss.internal.soa.esb.message.format.xml.MessageImpl) msg;
+
+			doc = theImpl.toXML(doc);
+
+			org.jboss.internal.soa.esb.message.format.xml.MessageImpl nImpl = new org.jboss.internal.soa.esb.message.format.xml.MessageImpl();
+			
+			nImpl.fromXML(doc);
+
+			assertEquals(nImpl.getProperties().getProperty("foo"), "bar");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+
+		assertEquals(msg.getProperties().remove("foo"), "bar");
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/PropertiesUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/SerializedMessageUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/SerializedMessageUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/SerializedMessageUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,667 +1,667 @@
-/*
- * 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.message.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class SerializedMessageUnitTest extends TestCase
-{
-
-	public void testSerialize()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-		
-	}
-
-	public void testDeserialize()
-	{
-		// get XML message
-
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-			
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			@SuppressWarnings("unused")
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testHeader ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		Call call = new Call();
-
-		msg.getHeader().setCall(call);
-		
-		call = msg.getHeader().getCall();
-		
-		assertEquals((call != null), true);
-		
-		try
-		{
-			msg.getHeader().setCall(null);
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testInvalidAdd ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-		
-		try
-		{
-			msg.getBody().add(null, null);
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-	public void testAddBytes ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-		
-		String testString = "test";
-		
-		msg.getBody().setContents(testString.getBytes());
-		
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-			
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			String val = new String(nImpl.getBody().getContents());
-			
-			assertEquals(val, testString);
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testReplace ()
-	{
-		Message msg1 = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg1 != null), true);
-		
-		String foo = "foo";
-		
-		Message msg2 = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg2 != null), true);
-		
-		String bar = "bar";
-		
-		msg1.getBody().setContents(foo.getBytes());
-		msg2.getBody().setContents(bar.getBytes());
-		
-		msg1.getBody().replace(msg2.getBody());
-		
-		String foobar = new String(msg1.getBody().getContents());
-		
-		assertEquals(foobar.equals("bar"), true);
-	}
-	
-	public void testMerge ()
-	{
-		Message msg1 = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg1 != null), true);
-		
-		String foo = "foo";
-		
-		Message msg2 = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg2 != null), true);
-		
-		String bar = "bar";
-		
-		msg1.getBody().setContents(foo.getBytes());
-		msg2.getBody().setContents(bar.getBytes());
-		
-		msg1.getBody().merge(msg2.getBody());
-		
-		String foobar = new String(msg1.getBody().getContents());
-		
-		assertEquals(foobar, "foobar");
-	}
-	
-	public void testAddObjects ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-		
-		ExampleObject value = new ExampleObject(1234);
-		
-		msg.getBody().add("foo", value);
-		
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-			
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
-			
-			assertEquals((foo.getValue() == value.getValue()), true);
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testGetNames ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-		
-		ExampleObject value = new ExampleObject(1234);
-		
-		msg.getBody().add("foo", value);
-		msg.getBody().add("bar", value);
-		
-		String[] names = msg.getBody().getNames();
-		
-		assertNotNull(names);
-		
-		assertEquals(names.length, 2);
-		
-		/*
-		 * The array comes back ordered alphabetically.
-		 */
-		
-		assertEquals(names[0], "bar");
-		assertEquals(names[1], "foo");
-		
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-			
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
-			
-			assertEquals((foo.getValue() == value.getValue()), true);
-			
-			names = nImpl.getBody().getNames();
-			
-			assertNotNull(names);
-			
-			assertEquals(names.length, 2);
-			assertEquals(names[0], "foo");
-			assertEquals(names[1], "bar");
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testAddInvalidObject ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-
-		try
-		{
-			msg.getBody().add("foo", new Object());
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testRemoveObjects ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JAVA_SERIALIZED);
-
-		assertEquals((msg != null), true);
-		
-		ExampleObject value = new ExampleObject(1234);
-		
-		msg.getBody().add("bar", value);
-		
-		msg.getBody().remove("bar");
-		
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-			
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			ExampleObject foo = (ExampleObject) nImpl.getBody().get("bar");
-			
-			assertEquals((foo == null), true);
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}	
-	}
-	
-	public void testJmsEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-		JMSEpr epr = new JMSEpr(JMSEpr.TOPIC_TYPE, "foo", "bar");
-		
-		msg.getHeader().getCall().setTo(epr);
-		
-		try
-		{
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-		
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-
-			assertEquals(theEpr instanceof JMSEpr, true);
-			
-			assertEquals(((JMSEpr) theEpr).getConnectionFactory(), "bar");
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testHttpEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-
-		try
-		{
-			HTTPEpr epr = new HTTPEpr("http://www.foo.bar");
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-		
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-
-			assertEquals(theEpr instanceof HTTPEpr, true);
-			
-			assertEquals(((HTTPEpr) theEpr).getURL().toString(), "http://www.foo.bar");
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testEmailEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-
-		try
-		{
-			EmailEpr epr = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foo.bar", "25", "me", "password");
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-		
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-
-			assertEquals(theEpr instanceof EmailEpr, true);
-			
-			assertEquals(((EmailEpr) theEpr).getPassword(), "password");
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testFtpEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-
-		try
-		{
-			FTPEpr epr = new FTPEpr("http://www.foo.bar");
-			
-			epr.setPassive(true);
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-		
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-
-			assertEquals(theEpr instanceof FTPEpr, true);
-			
-			assertEquals(((FTPEpr) theEpr).getPassive(), true);
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testJdbcEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-
-		try
-		{
-			JDBCEpr epr = new JDBCEpr("http://www.foo.bar", "SOME FAKE SQL");
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-		
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-
-			assertEquals(theEpr instanceof JDBCEpr, true);
-			
-			assertEquals(((JDBCEpr) theEpr).getSQL(), "SOME FAKE SQL");
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testFileEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-
-		try
-		{
-			FileEpr epr = new FileEpr("file://tmp/bar.txt");
-			
-			epr.setErrorDelete(true);
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-		
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-
-			assertEquals(theEpr instanceof FileEpr, true);
-			
-			assertEquals(((FileEpr) theEpr).getErrorDelete(), true);
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSFtpEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-
-		try
-		{
-			SFTPEpr epr = new SFTPEpr(new URL("http://www.foo.bar"), new URL("http://www.bar.foo"));
-
-			assertEquals(epr.getCertificateURL().toString(), "http://www.bar.foo");
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			ByteArrayOutputStream s = new ByteArrayOutputStream();
-			ObjectOutputStream o = new ObjectOutputStream(s);
-	
-			o.writeObject(msg);
-			o.close();
-		
-			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
-			ObjectInputStream io = new ObjectInputStream(is);
-
-			MessageImpl nImpl = (MessageImpl) io.readObject();
-			
-			o.close();
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-
-			assertEquals(theEpr instanceof SFTPEpr, true);
-			
-			assertEquals(((SFTPEpr) theEpr).getCertificateURL().toString(), "http://www.bar.foo");
-		}
-		catch (Exception ex)
-		{
-			ex.printStackTrace();
-			
-			fail(ex.toString());
-		}
-	}
-	
-}
+/*
+ * 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.message.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.eprs.EmailEpr;
+import org.jboss.soa.esb.addressing.eprs.FTPEpr;
+import org.jboss.soa.esb.addressing.eprs.FileEpr;
+import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
+import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class SerializedMessageUnitTest extends TestCase
+{
+
+	public void testSerialize()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+		
+	}
+
+	public void testDeserialize()
+	{
+		// get XML message
+
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+			
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			@SuppressWarnings("unused")
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testHeader ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		Call call = new Call();
+
+		msg.getHeader().setCall(call);
+		
+		call = msg.getHeader().getCall();
+		
+		assertEquals((call != null), true);
+		
+		try
+		{
+			msg.getHeader().setCall(null);
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testInvalidAdd ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+		
+		try
+		{
+			msg.getBody().add(null, null);
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+	public void testAddBytes ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+		
+		String testString = "test";
+		
+		msg.getBody().setContents(testString.getBytes());
+		
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+			
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			String val = new String(nImpl.getBody().getContents());
+			
+			assertEquals(val, testString);
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testReplace ()
+	{
+		Message msg1 = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg1 != null), true);
+		
+		String foo = "foo";
+		
+		Message msg2 = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg2 != null), true);
+		
+		String bar = "bar";
+		
+		msg1.getBody().setContents(foo.getBytes());
+		msg2.getBody().setContents(bar.getBytes());
+		
+		msg1.getBody().replace(msg2.getBody());
+		
+		String foobar = new String(msg1.getBody().getContents());
+		
+		assertEquals(foobar.equals("bar"), true);
+	}
+	
+	public void testMerge ()
+	{
+		Message msg1 = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg1 != null), true);
+		
+		String foo = "foo";
+		
+		Message msg2 = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg2 != null), true);
+		
+		String bar = "bar";
+		
+		msg1.getBody().setContents(foo.getBytes());
+		msg2.getBody().setContents(bar.getBytes());
+		
+		msg1.getBody().merge(msg2.getBody());
+		
+		String foobar = new String(msg1.getBody().getContents());
+		
+		assertEquals(foobar, "foobar");
+	}
+	
+	public void testAddObjects ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+		
+		ExampleObject value = new ExampleObject(1234);
+		
+		msg.getBody().add("foo", value);
+		
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+			
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
+			
+			assertEquals((foo.getValue() == value.getValue()), true);
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testGetNames ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+		
+		ExampleObject value = new ExampleObject(1234);
+		
+		msg.getBody().add("foo", value);
+		msg.getBody().add("bar", value);
+		
+		String[] names = msg.getBody().getNames();
+		
+		assertNotNull(names);
+		
+		assertEquals(names.length, 2);
+		
+		/*
+		 * The array comes back ordered alphabetically.
+		 */
+		
+		assertEquals(names[0], "bar");
+		assertEquals(names[1], "foo");
+		
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+			
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
+			
+			assertEquals((foo.getValue() == value.getValue()), true);
+			
+			names = nImpl.getBody().getNames();
+			
+			assertNotNull(names);
+			
+			assertEquals(names.length, 2);
+			assertEquals(names[0], "foo");
+			assertEquals(names[1], "bar");
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testAddInvalidObject ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+
+		try
+		{
+			msg.getBody().add("foo", new Object());
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testRemoveObjects ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JAVA_SERIALIZED);
+
+		assertEquals((msg != null), true);
+		
+		ExampleObject value = new ExampleObject(1234);
+		
+		msg.getBody().add("bar", value);
+		
+		msg.getBody().remove("bar");
+		
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+			
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			ExampleObject foo = (ExampleObject) nImpl.getBody().get("bar");
+			
+			assertEquals((foo == null), true);
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}	
+	}
+	
+	public void testJmsEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+		JMSEpr epr = new JMSEpr(JMSEpr.TOPIC_TYPE, "foo", "bar");
+		
+		msg.getHeader().getCall().setTo(epr);
+		
+		try
+		{
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+		
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+
+			assertEquals(theEpr instanceof JMSEpr, true);
+			
+			assertEquals(((JMSEpr) theEpr).getConnectionFactory(), "bar");
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testHttpEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+
+		try
+		{
+			HTTPEpr epr = new HTTPEpr("http://www.foo.bar");
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+		
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+
+			assertEquals(theEpr instanceof HTTPEpr, true);
+			
+			assertEquals(((HTTPEpr) theEpr).getURL().toString(), "http://www.foo.bar");
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testEmailEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+
+		try
+		{
+			EmailEpr epr = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foo.bar", "25", "me", "password");
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+		
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+
+			assertEquals(theEpr instanceof EmailEpr, true);
+			
+			assertEquals(((EmailEpr) theEpr).getPassword(), "password");
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testFtpEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+
+		try
+		{
+			FTPEpr epr = new FTPEpr("http://www.foo.bar");
+			
+			epr.setPassive(true);
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+		
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+
+			assertEquals(theEpr instanceof FTPEpr, true);
+			
+			assertEquals(((FTPEpr) theEpr).getPassive(), true);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testJdbcEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+
+		try
+		{
+			JDBCEpr epr = new JDBCEpr("http://www.foo.bar", "SOME FAKE SQL");
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+		
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+
+			assertEquals(theEpr instanceof JDBCEpr, true);
+			
+			assertEquals(((JDBCEpr) theEpr).getSQL(), "SOME FAKE SQL");
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testFileEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+
+		try
+		{
+			FileEpr epr = new FileEpr("file://tmp/bar.txt");
+			
+			epr.setErrorDelete(true);
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+		
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+
+			assertEquals(theEpr instanceof FileEpr, true);
+			
+			assertEquals(((FileEpr) theEpr).getErrorDelete(), true);
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSFtpEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+
+		try
+		{
+			SFTPEpr epr = new SFTPEpr(new URL("http://www.foo.bar"), new URL("http://www.bar.foo"));
+
+			assertEquals(epr.getCertificateURL().toString(), "http://www.bar.foo");
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			ByteArrayOutputStream s = new ByteArrayOutputStream();
+			ObjectOutputStream o = new ObjectOutputStream(s);
+	
+			o.writeObject(msg);
+			o.close();
+		
+			ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
+			ObjectInputStream io = new ObjectInputStream(is);
+
+			MessageImpl nImpl = (MessageImpl) io.readObject();
+			
+			o.close();
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+
+			assertEquals(theEpr instanceof SFTPEpr, true);
+			
+			assertEquals(((SFTPEpr) theEpr).getCertificateURL().toString(), "http://www.bar.foo");
+		}
+		catch (Exception ex)
+		{
+			ex.printStackTrace();
+			
+			fail(ex.toString());
+		}
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/SerializedMessageUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,582 +1,582 @@
-/*
- * 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.message.tests;
-
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.URL;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.message.format.xml.MessageImpl;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.w3c.dom.Document;
-import org.xml.sax.InputSource;
-
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
-
-/**
- * Unit tests for the Class class.
- * 
- * @author Mark Little
- */
-
-public class XMLMessageUnitTest extends TestCase
-{
-
-	public void testToXML()
-	{
-		// get XML message
-
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg);
-
-		try
-		{
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-
-			System.err.println("Message looks like: " + xmlRepresentation);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-	public void testFromXML()
-	{
-		// get XML message
-
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg);
-
-		try
-		{
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			@SuppressWarnings("unused")
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-	public void testHeader ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg);
-
-		Call call = new Call();
-
-		msg.getHeader().setCall(call);
-		
-		call = msg.getHeader().getCall();
-		
-		assertNotNull("message call", call);
-		
-		try
-		{
-			msg.getHeader().setCall(null);
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-
-	public void testInvalidAdd ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg);
-		
-		try
-		{
-			msg.getBody().add(null, null);
-			
-			fail();
-		}
-		catch (IllegalArgumentException ex)
-		{
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testAddBytes ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg);
-		
-		String testString = "test";
-		
-		msg.getBody().setContents(testString.getBytes());
-		
-		try
-		{
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			String val = new String(nImpl.getBody().getContents());
-			
-			assertEquals(val, testString);
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testReplace ()
-	{
-		Message msg1 = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg1);
-		
-		String foo = "foo";
-		
-		Message msg2 = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("second created message", msg2);
-		
-		String bar = "bar";
-		
-		msg1.getBody().setContents(foo.getBytes());
-		msg2.getBody().setContents(bar.getBytes());
-		
-		msg1.getBody().replace(msg2.getBody());
-		
-		String foobar = new String(msg1.getBody().getContents());
-		
-		assertEquals(foobar, "bar");
-	}
-	
-	public void testMerge ()
-	{
-		Message msg1 = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg1);
-		
-		String foo = "foo";
-		
-		Message msg2 = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("second created message", msg2);
-		
-		String bar = "bar";
-		
-		msg1.getBody().setContents(foo.getBytes());
-		msg2.getBody().setContents(bar.getBytes());
-		
-		msg1.getBody().merge(msg2.getBody());
-		
-		String foobar = new String(msg1.getBody().getContents());
-		
-		assertEquals(foobar, "foobar");
-	}
-	
-	public void testAddObjects ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg);
-		
-		ExampleObject value = new ExampleObject(1234);
-		
-		msg.getBody().add("foo", value);
-		
-		try
-		{
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
-			
-			assertNotNull("deserialised example object", foo) ;
-			
-			assertEquals((foo.getValue() == value.getValue()), true);
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testGetNames ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg);
-		
-		ExampleObject value = new ExampleObject(1234);
-		
-		msg.getBody().add("foo", value);
-		msg.getBody().add("bar", value);
-		
-		String[] names = msg.getBody().getNames();
-		
-		assertNotNull(names);
-		
-		assertEquals(names.length, 2);
-		
-		/*
-		 * The array comes back ordered alphabetically.
-		 */
-		
-		assertEquals(names[0], "bar");
-		assertEquals(names[1], "foo");
-		
-		try
-		{
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
-			
-			assertNotNull("deserialised example object", foo) ;
-			
-			assertEquals((foo.getValue() == value.getValue()), true);
-			
-			names = nImpl.getBody().getNames();
-			
-			assertNotNull(names);
-			
-			assertEquals(names.length, 2);	
-			
-			/*
-			 * The array comes back ordered alphabetically.
-			 */
-			
-			assertEquals(names[0], "bar");
-			assertEquals(names[1], "foo");
-		}
-		catch (Exception ex)
-		{
-			fail(ex.toString());
-		}
-	}
-	
-	public void testRemoveObjects ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(
-				MessageType.JBOSS_XML);
-
-		assertNotNull("created message", msg);
-		
-		ExampleObject value = new ExampleObject(1234);
-		
-		msg.getBody().add("bar", value);
-		
-		msg.getBody().remove("bar");
-		
-		try
-		{
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			ExampleObject foo = (ExampleObject) nImpl.getBody().get("bar");
-			
-			assertNull("deserialised example object", foo);
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}	
-	}
-	
-	public void testJmsEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-		JMSEpr epr = new JMSEpr(JMSEpr.TOPIC_TYPE, "foo", "bar");
-		
-		msg.getHeader().getCall().setTo(epr);
-		
-		try
-		{
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-			
-			assertEquals(theEpr instanceof JMSEpr, true);
-			
-			assertEquals(((JMSEpr) theEpr).getConnectionFactory(), "bar");
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testHttpEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-
-		try
-		{
-			HTTPEpr epr = new HTTPEpr("http://www.foo.bar");
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-			
-			assertEquals(theEpr instanceof HTTPEpr, true);
-			
-			assertEquals(((HTTPEpr) theEpr).getURL().toString(), "http://www.foo.bar");
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testEmailEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-
-		try
-		{
-			EmailEpr epr = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foo.bar", "25", "me", "password");
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-			
-			assertEquals(theEpr instanceof EmailEpr, true);
-			
-			assertEquals(((EmailEpr) theEpr).getPassword(), "password");
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testFtpEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-
-		try
-		{
-			FTPEpr epr = new FTPEpr("http://www.foo.bar");
-			
-			epr.setPassive(true);
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-			
-			assertEquals(theEpr instanceof FTPEpr, true);
-			
-			assertEquals(((FTPEpr) theEpr).getPassive(), true);
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testJdbcEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-
-		try
-		{
-			JDBCEpr epr = new JDBCEpr("http://www.foo.bar", "SOME FAKE SQL");
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-			
-			assertEquals(theEpr instanceof JDBCEpr, true);
-			
-			assertEquals(((JDBCEpr) theEpr).getSQL(), "SOME FAKE SQL");
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testFileEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-
-		try
-		{
-			FileEpr epr = new FileEpr("file://tmp/bar.txt");
-			
-			epr.setErrorDelete(true);
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-			
-			assertEquals(theEpr instanceof FileEpr, true);
-			
-			assertEquals(((FileEpr) theEpr).getErrorDelete(), true);
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	public void testSFtpEPRType ()
-	{
-		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-
-		try
-		{
-			SFTPEpr epr = new SFTPEpr(new URL("http://www.foo.bar"), new URL("http://www.bar.foo"));
-
-			assertEquals(epr.getCertificateURL().toString(), "http://www.bar.foo");
-			
-			msg.getHeader().getCall().setTo(epr);
-			
-			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
-			System.err.println("Document is "+xmlRepresentation);
-			
-			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
-			
-			EPR theEpr = nImpl.getHeader().getCall().getTo();
-			
-			assertEquals(theEpr instanceof SFTPEpr, true);
-			
-			assertEquals(((SFTPEpr) theEpr).getCertificateURL().toString(), "http://www.bar.foo");
-		}
-		catch (Exception ex)
-		{			
-			fail(ex.toString());
-		}
-	}
-	
-	private String msgToXML(final MessageImpl msg)
-		throws Exception
-	{
-		final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
-		final DocumentBuilder builder = factory.newDocumentBuilder() ;
-		Document doc = builder.newDocument() ;
-		
-		doc = msg.toXML(doc) ;
-		
-		final StringWriter sWriter = new StringWriter() ;
-		final OutputFormat format = new OutputFormat() ;
-		format.setIndenting(true) ;
-
-		final XMLSerializer xmlS = new XMLSerializer(sWriter, format) ;
-
-		xmlS.asDOMSerializer() ;
-		xmlS.serialize(doc) ;
-
-		return sWriter.toString() ;
-	}
-	
-	private MessageImpl msgFromXML(final String xmlRepresentation)
-		throws Exception
-	{
-		final StringReader stringReader = new StringReader(xmlRepresentation) ;
-		final InputSource inputSource = new InputSource(stringReader) ;
-		
-		final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
-		final DocumentBuilder builder = factory.newDocumentBuilder() ;
-		final Document doc = builder.parse(inputSource) ;
-
-		final MessageImpl message = new MessageImpl() ;
-		message.fromXML(doc) ;
-		return message ;
-	}
-}
+/*
+ * 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.message.tests;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.message.format.xml.MessageImpl;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.eprs.EmailEpr;
+import org.jboss.soa.esb.addressing.eprs.FTPEpr;
+import org.jboss.soa.esb.addressing.eprs.FileEpr;
+import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
+import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+/**
+ * Unit tests for the Class class.
+ * 
+ * @author Mark Little
+ */
+
+public class XMLMessageUnitTest extends TestCase
+{
+
+	public void testToXML()
+	{
+		// get XML message
+
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg);
+
+		try
+		{
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+
+			System.err.println("Message looks like: " + xmlRepresentation);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+	public void testFromXML()
+	{
+		// get XML message
+
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg);
+
+		try
+		{
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			@SuppressWarnings("unused")
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+	public void testHeader ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg);
+
+		Call call = new Call();
+
+		msg.getHeader().setCall(call);
+		
+		call = msg.getHeader().getCall();
+		
+		assertNotNull("message call", call);
+		
+		try
+		{
+			msg.getHeader().setCall(null);
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+
+	public void testInvalidAdd ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg);
+		
+		try
+		{
+			msg.getBody().add(null, null);
+			
+			fail();
+		}
+		catch (IllegalArgumentException ex)
+		{
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testAddBytes ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg);
+		
+		String testString = "test";
+		
+		msg.getBody().setContents(testString.getBytes());
+		
+		try
+		{
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			String val = new String(nImpl.getBody().getContents());
+			
+			assertEquals(val, testString);
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testReplace ()
+	{
+		Message msg1 = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg1);
+		
+		String foo = "foo";
+		
+		Message msg2 = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("second created message", msg2);
+		
+		String bar = "bar";
+		
+		msg1.getBody().setContents(foo.getBytes());
+		msg2.getBody().setContents(bar.getBytes());
+		
+		msg1.getBody().replace(msg2.getBody());
+		
+		String foobar = new String(msg1.getBody().getContents());
+		
+		assertEquals(foobar, "bar");
+	}
+	
+	public void testMerge ()
+	{
+		Message msg1 = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg1);
+		
+		String foo = "foo";
+		
+		Message msg2 = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("second created message", msg2);
+		
+		String bar = "bar";
+		
+		msg1.getBody().setContents(foo.getBytes());
+		msg2.getBody().setContents(bar.getBytes());
+		
+		msg1.getBody().merge(msg2.getBody());
+		
+		String foobar = new String(msg1.getBody().getContents());
+		
+		assertEquals(foobar, "foobar");
+	}
+	
+	public void testAddObjects ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg);
+		
+		ExampleObject value = new ExampleObject(1234);
+		
+		msg.getBody().add("foo", value);
+		
+		try
+		{
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
+			
+			assertNotNull("deserialised example object", foo) ;
+			
+			assertEquals((foo.getValue() == value.getValue()), true);
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testGetNames ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg);
+		
+		ExampleObject value = new ExampleObject(1234);
+		
+		msg.getBody().add("foo", value);
+		msg.getBody().add("bar", value);
+		
+		String[] names = msg.getBody().getNames();
+		
+		assertNotNull(names);
+		
+		assertEquals(names.length, 2);
+		
+		/*
+		 * The array comes back ordered alphabetically.
+		 */
+		
+		assertEquals(names[0], "bar");
+		assertEquals(names[1], "foo");
+		
+		try
+		{
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
+			
+			assertNotNull("deserialised example object", foo) ;
+			
+			assertEquals((foo.getValue() == value.getValue()), true);
+			
+			names = nImpl.getBody().getNames();
+			
+			assertNotNull(names);
+			
+			assertEquals(names.length, 2);	
+			
+			/*
+			 * The array comes back ordered alphabetically.
+			 */
+			
+			assertEquals(names[0], "bar");
+			assertEquals(names[1], "foo");
+		}
+		catch (Exception ex)
+		{
+			fail(ex.toString());
+		}
+	}
+	
+	public void testRemoveObjects ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(
+				MessageType.JBOSS_XML);
+
+		assertNotNull("created message", msg);
+		
+		ExampleObject value = new ExampleObject(1234);
+		
+		msg.getBody().add("bar", value);
+		
+		msg.getBody().remove("bar");
+		
+		try
+		{
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			ExampleObject foo = (ExampleObject) nImpl.getBody().get("bar");
+			
+			assertNull("deserialised example object", foo);
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}	
+	}
+	
+	public void testJmsEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+		JMSEpr epr = new JMSEpr(JMSEpr.TOPIC_TYPE, "foo", "bar");
+		
+		msg.getHeader().getCall().setTo(epr);
+		
+		try
+		{
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+			
+			assertEquals(theEpr instanceof JMSEpr, true);
+			
+			assertEquals(((JMSEpr) theEpr).getConnectionFactory(), "bar");
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testHttpEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+
+		try
+		{
+			HTTPEpr epr = new HTTPEpr("http://www.foo.bar");
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+			
+			assertEquals(theEpr instanceof HTTPEpr, true);
+			
+			assertEquals(((HTTPEpr) theEpr).getURL().toString(), "http://www.foo.bar");
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testEmailEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+
+		try
+		{
+			EmailEpr epr = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foo.bar", "25", "me", "password");
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+			
+			assertEquals(theEpr instanceof EmailEpr, true);
+			
+			assertEquals(((EmailEpr) theEpr).getPassword(), "password");
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testFtpEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+
+		try
+		{
+			FTPEpr epr = new FTPEpr("http://www.foo.bar");
+			
+			epr.setPassive(true);
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+			
+			assertEquals(theEpr instanceof FTPEpr, true);
+			
+			assertEquals(((FTPEpr) theEpr).getPassive(), true);
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testJdbcEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+
+		try
+		{
+			JDBCEpr epr = new JDBCEpr("http://www.foo.bar", "SOME FAKE SQL");
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+			
+			assertEquals(theEpr instanceof JDBCEpr, true);
+			
+			assertEquals(((JDBCEpr) theEpr).getSQL(), "SOME FAKE SQL");
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testFileEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+
+		try
+		{
+			FileEpr epr = new FileEpr("file://tmp/bar.txt");
+			
+			epr.setErrorDelete(true);
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+			
+			assertEquals(theEpr instanceof FileEpr, true);
+			
+			assertEquals(((FileEpr) theEpr).getErrorDelete(), true);
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	public void testSFtpEPRType ()
+	{
+		Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+
+		try
+		{
+			SFTPEpr epr = new SFTPEpr(new URL("http://www.foo.bar"), new URL("http://www.bar.foo"));
+
+			assertEquals(epr.getCertificateURL().toString(), "http://www.bar.foo");
+			
+			msg.getHeader().getCall().setTo(epr);
+			
+			final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
+			System.err.println("Document is "+xmlRepresentation);
+			
+			final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
+			
+			EPR theEpr = nImpl.getHeader().getCall().getTo();
+			
+			assertEquals(theEpr instanceof SFTPEpr, true);
+			
+			assertEquals(((SFTPEpr) theEpr).getCertificateURL().toString(), "http://www.bar.foo");
+		}
+		catch (Exception ex)
+		{			
+			fail(ex.toString());
+		}
+	}
+	
+	private String msgToXML(final MessageImpl msg)
+		throws Exception
+	{
+		final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
+		final DocumentBuilder builder = factory.newDocumentBuilder() ;
+		Document doc = builder.newDocument() ;
+		
+		doc = msg.toXML(doc) ;
+		
+		final StringWriter sWriter = new StringWriter() ;
+		final OutputFormat format = new OutputFormat() ;
+		format.setIndenting(true) ;
+
+		final XMLSerializer xmlS = new XMLSerializer(sWriter, format) ;
+
+		xmlS.asDOMSerializer() ;
+		xmlS.serialize(doc) ;
+
+		return sWriter.toString() ;
+	}
+	
+	private MessageImpl msgFromXML(final String xmlRepresentation)
+		throws Exception
+	{
+		final StringReader stringReader = new StringReader(xmlRepresentation) ;
+		final InputSource inputSource = new InputSource(stringReader) ;
+		
+		final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
+		final DocumentBuilder builder = factory.newDocumentBuilder() ;
+		final Document doc = builder.parse(inputSource) ;
+
+		final MessageImpl message = new MessageImpl() ;
+		message.fromXML(doc) ;
+		return message ;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,53 +1,53 @@
-/*
- * 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.notification;
-
-import java.util.HashMap;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.notification.MacroExpander;
-import org.jboss.internal.soa.esb.util.StreamUtils;
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * MacroExpander unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class MacroExpanderUnitTest extends TestCase {
-
-	public void testReplaceMacros() {
-		ConfigTree rootDomEl = new ConfigTree("rootEl");
-		HashMap<String, String> map = new HashMap<String, String>();
-		
-		ConfigTree childDomEl = new ConfigTree("childEl",rootDomEl);
-		rootDomEl.setAttribute("attrb1", "value1");
-		rootDomEl.setAttribute("attrb2", MacroExpander.CTX_BATCH_NUM + "BatchNumValue");
-		childDomEl.setAttribute("attrb1", MacroExpander.CTX_BATCH_UID + "UIDValue");
-		map.put(MacroExpander.CTX_BATCH_NUM, "ReplacementBNV!");
-		map.put(MacroExpander.CTX_BATCH_UID, "ReplacementUIDV!");
-		
-		MacroExpander.replaceMacros(rootDomEl, map);
-		String expected = new String(StreamUtils.readStream(getClass().getResourceAsStream("MacroExpanderUnitTest_expected1.xml")));
-		assertEquals(expected.trim(), rootDomEl.toString().trim());
-	}	
-}
+/*
+ * 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.notification;
+
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.notification.MacroExpander;
+import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * MacroExpander unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MacroExpanderUnitTest extends TestCase {
+
+	public void testReplaceMacros() {
+		ConfigTree rootDomEl = new ConfigTree("rootEl");
+		HashMap<String, String> map = new HashMap<String, String>();
+		
+		ConfigTree childDomEl = new ConfigTree("childEl",rootDomEl);
+		rootDomEl.setAttribute("attrb1", "value1");
+		rootDomEl.setAttribute("attrb2", MacroExpander.CTX_BATCH_NUM + "BatchNumValue");
+		childDomEl.setAttribute("attrb1", MacroExpander.CTX_BATCH_UID + "UIDValue");
+		map.put(MacroExpander.CTX_BATCH_NUM, "ReplacementBNV!");
+		map.put(MacroExpander.CTX_BATCH_UID, "ReplacementUIDV!");
+		
+		MacroExpander.replaceMacros(rootDomEl, map);
+		String expected = new String(StreamUtils.readStream(getClass().getResourceAsStream("MacroExpanderUnitTest_expected1.xml")));
+		assertEquals(expected.trim(), rootDomEl.toString().trim());
+	}	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest_expected1.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,75 +1,75 @@
-/*
- * 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.notification;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * NotificationList unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class NotificationListUnitTest extends TestCase {
-
-	public void test_NotificationList() throws Exception {
-		ConfigTree domEl = ConfigTree.fromInputStream(getClass().getResourceAsStream("NotificationListUnitTest_testfile1.xml"));
-		NotificationList nList = new NotificationList(domEl);
-		
-		List<String> messageList = new ArrayList<String>();
-		TestNotificationTarget1.messageList = messageList; 
-		TestNotificationTarget2.messageList = messageList;
-		
-		nList.sendNotification("tom");
-		assertEquals(4, messageList.size());
-		assertEquals("message 1-tom", messageList.get(0));
-		assertEquals("message 2-tom", messageList.get(1));
-		assertEquals("message 3-tom", messageList.get(2));
-		assertEquals("message 4-tom", messageList.get(3));
-	}
-	
-	public void test_assertionMethods() throws Exception {
-		ConfigTree domEl;
-		NotificationList nList;
-		
-		domEl = new ConfigTree("notif");
-		nList = new NotificationList(domEl);
-		assertTrue(nList.isOK());
-		assertTrue(nList.isErr());
-		// REVIEW: Is this behavior OK??  Can be OK and Err at the same time!!
-		
-		domEl = new ConfigTree("notif");
-		domEl.setAttribute(NotificationList.TYPE, "ok");
-		nList = new NotificationList(domEl);
-		assertTrue(nList.isOK());
-		assertTrue(!nList.isErr());
-
-		domEl = new ConfigTree("notif");
-		domEl.setAttribute(NotificationList.TYPE, "err");
-		nList = new NotificationList(domEl);
-		assertTrue(!nList.isOK());
-		assertTrue(nList.isErr());
-	}
-}
+/*
+ * 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.notification;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * NotificationList unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class NotificationListUnitTest extends TestCase {
+
+	public void test_NotificationList() throws Exception {
+		ConfigTree domEl = ConfigTree.fromInputStream(getClass().getResourceAsStream("NotificationListUnitTest_testfile1.xml"));
+		NotificationList nList = new NotificationList(domEl);
+		
+		List<String> messageList = new ArrayList<String>();
+		TestNotificationTarget1.messageList = messageList; 
+		TestNotificationTarget2.messageList = messageList;
+		
+		nList.sendNotification("tom");
+		assertEquals(4, messageList.size());
+		assertEquals("message 1-tom", messageList.get(0));
+		assertEquals("message 2-tom", messageList.get(1));
+		assertEquals("message 3-tom", messageList.get(2));
+		assertEquals("message 4-tom", messageList.get(3));
+	}
+	
+	public void test_assertionMethods() throws Exception {
+		ConfigTree domEl;
+		NotificationList nList;
+		
+		domEl = new ConfigTree("notif");
+		nList = new NotificationList(domEl);
+		assertTrue(nList.isOK());
+		assertTrue(nList.isErr());
+		// REVIEW: Is this behavior OK??  Can be OK and Err at the same time!!
+		
+		domEl = new ConfigTree("notif");
+		domEl.setAttribute(NotificationList.TYPE, "ok");
+		nList = new NotificationList(domEl);
+		assertTrue(nList.isOK());
+		assertTrue(!nList.isErr());
+
+		domEl = new ConfigTree("notif");
+		domEl.setAttribute(NotificationList.TYPE, "err");
+		nList = new NotificationList(domEl);
+		assertTrue(!nList.isOK());
+		assertTrue(nList.isErr());
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest_testfile1.xml
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest_testfile1.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest_testfile1.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,6 +1,6 @@
-<notif type="ok">
-	<target class="TestNotificationTarget1" message="message 1" />
-	<target class="TestNotificationTarget1" message="message 2" />
-	<target class="TestNotificationTarget2" message="message 3" />
-	<target class="TestNotificationTarget2" message="message 4" />
+<notif type="ok">
+	<target class="TestNotificationTarget1" message="message 1" />
+	<target class="TestNotificationTarget1" message="message 2" />
+	<target class="TestNotificationTarget2" message="message 3" />
+	<target class="TestNotificationTarget2" message="message 4" />
 </notif>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotificationListUnitTest_testfile1.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyEmailUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyEmailUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyEmailUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,58 +1,58 @@
-/*
- * 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.notification;
-
-import javax.mail.MessagingException;
-import javax.mail.internet.AddressException;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.Email;
-
-/**
- * NotifyEmail unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class NotifyEmailUnitTest extends TestCase {
-
-	public void test_NotifyEmail() throws Exception {
-		ConfigTree emailMessageEl = new ConfigTree("email");
-		
-		emailMessageEl.setAttribute(Email.FROM, "a.b at c.com");
-		emailMessageEl.setAttribute(Email.SENDTO, "d.e at f.com");
-		emailMessageEl.setAttribute(Email.COPYTO, "g.h at i.com");
-		emailMessageEl.setAttribute(Email.MESSAGE, "Hi there!!!");
-		
-		NotifyEmail ne = new TestNotifyEmail(emailMessageEl);
-		ne.sendNotification("Hello");
-	}
-	
-	private class TestNotifyEmail extends NotifyEmail {
-		public TestNotifyEmail(ConfigTree p_oP) throws Exception {
-			super(p_oP);
-		}
-		protected void sendEmailNotification(ConfigTree messageParams) throws AddressException, MessagingException {
-			assertEquals("Hi there!!!\nHello", messageParams.getAttribute(Email.MESSAGE));
-		}		
-	}
-}
+/*
+ * 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.notification;
+
+import javax.mail.MessagingException;
+import javax.mail.internet.AddressException;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.Email;
+
+/**
+ * NotifyEmail unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class NotifyEmailUnitTest extends TestCase {
+
+	public void test_NotifyEmail() throws Exception {
+		ConfigTree emailMessageEl = new ConfigTree("email");
+		
+		emailMessageEl.setAttribute(Email.FROM, "a.b at c.com");
+		emailMessageEl.setAttribute(Email.SENDTO, "d.e at f.com");
+		emailMessageEl.setAttribute(Email.COPYTO, "g.h at i.com");
+		emailMessageEl.setAttribute(Email.MESSAGE, "Hi there!!!");
+		
+		NotifyEmail ne = new TestNotifyEmail(emailMessageEl);
+		ne.sendNotification("Hello");
+	}
+	
+	private class TestNotifyEmail extends NotifyEmail {
+		public TestNotifyEmail(ConfigTree p_oP) throws Exception {
+			super(p_oP);
+		}
+		protected void sendEmailNotification(ConfigTree messageParams) throws AddressException, MessagingException {
+			assertEquals("Hi there!!!\nHello", messageParams.getAttribute(Email.MESSAGE));
+		}		
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyEmailUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyFilesUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyFilesUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyFilesUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,124 +1,124 @@
-/*
- * 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.notification;
-
-import java.io.File;
-import java.io.Serializable;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * NotifyFiles unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class NotifyFilesUnitTest extends TestCase {
-	
-	public void test_BadFolderInfo() throws Exception {
-		ConfigTree rootEl = new ConfigTree("notif");
-		ConfigTree fileEl = new ConfigTree("file",rootEl);
-			
-		// No file attribute defined on the ConfigTree
-		try {
-			new NotifyFiles(rootEl);
-			fail("Expected IllegalArgumentException");
-		} catch(IllegalArgumentException e) {
-			// Expected
-		}
-		// File attribute defined on the ConfigTree, but parent folder doesn't exist...
-		fileEl.setAttribute("URI", new File("./").toURI().toString() + "/xyzzyx/a.txt");
-		try {
-			new NotifyFiles(rootEl);
-			fail("Expected IllegalArgumentException");
-		} catch(IllegalArgumentException e) {
-			// Expected
-		}
-	}
-	
-	public void test_StringObj() throws Exception {
-		sendNotification("Hello");
-	}
-
-	public void test_NonStringObj() throws Exception {
-		sendNotification(new Integer(1234));
-	}
-	
-	public void sendNotification(Serializable obj) throws Exception {
-		ConfigTree rootEl = new ConfigTree("notif");
-		NotifyFiles notifyFiles;
-		
-		// Add the file configs to the config DOM for 4 files...
-		addFileConfig(rootEl, "file1.notif", true);
-		addFileConfig(rootEl, "file2.notif", true);
-		addFileConfig(rootEl, "file3.notif", false);
-		addFileConfig(rootEl, "file4.notif", null);
-		
-		// Create the class and call the sendNotification method twice...
-		notifyFiles = new NotifyFiles(rootEl);		
-		notifyFiles.sendNotification(obj);
-		notifyFiles.sendNotification(obj);
-
-		// Test the files. Files 1 and 2 should be the same size. Files 3 and 4 should be the
-		// same size. Files 1 and 2 should be twice as big as files 3 and 4 because append was set
-		// "true" on 1 and 2 and sendNotification() was called twice... 
-		File file1Obj = getFileObject("file1.notif");
-		File file2Obj = getFileObject("file2.notif");
-		File file3Obj = getFileObject("file3.notif");
-		File file4Obj = getFileObject("file4.notif");
-		assertEquals(file1Obj.length(), file2Obj.length());
-		assertEquals(file3Obj.length(), file4Obj.length());
-		assertEquals(file1Obj.length(), file3Obj.length() * 2);
-	}
-	
-	private void addFileConfig(ConfigTree rootEl, String file, Boolean append) {
-		File fileObj = getFileObject(file);
-		ConfigTree fileEl = new ConfigTree("file",rootEl);
-		
-		fileEl.setAttribute("URI", fileObj.toURI().toString());
-		fileEl.setAttribute("append", (append != null?append.toString():null));
-		
-		// Also want to delete the file incase the tests are being rerun...
-		fileObj.delete();
-	}
-
-	private File getFileObject(String file) {
-		// TF: Excuse this hack!!!  It's the safest way of calculating a 
-		// relative URI within the test structure.  It will prob cause
-		// Maven some issues i.e. getting it to work for both Ant and Maven :-(
-		// This code assumes that the working dir is the "product" folder.
-		
-		File fileObj = new File("build/tests/" + getPKg() + "/" + file);
-		if(!fileObj.getParentFile().exists()) {
-			// The build folder may not exist e.g. if running this test from
-			// inside your IDE.
-			fileObj.getParentFile().mkdirs();
-		}
-		
-		return fileObj;
-	}
-
-	private String getPKg() {
-		String javaPackage = NotifyFilesUnitTest.class.getPackage().getName();
-		return javaPackage.replace('.', '/');
-	}
-}
+/*
+ * 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.notification;
+
+import java.io.File;
+import java.io.Serializable;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * NotifyFiles unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class NotifyFilesUnitTest extends TestCase {
+	
+	public void test_BadFolderInfo() throws Exception {
+		ConfigTree rootEl = new ConfigTree("notif");
+		ConfigTree fileEl = new ConfigTree("file",rootEl);
+			
+		// No file attribute defined on the ConfigTree
+		try {
+			new NotifyFiles(rootEl);
+			fail("Expected IllegalArgumentException");
+		} catch(IllegalArgumentException e) {
+			// Expected
+		}
+		// File attribute defined on the ConfigTree, but parent folder doesn't exist...
+		fileEl.setAttribute("URI", new File("./").toURI().toString() + "/xyzzyx/a.txt");
+		try {
+			new NotifyFiles(rootEl);
+			fail("Expected IllegalArgumentException");
+		} catch(IllegalArgumentException e) {
+			// Expected
+		}
+	}
+	
+	public void test_StringObj() throws Exception {
+		sendNotification("Hello");
+	}
+
+	public void test_NonStringObj() throws Exception {
+		sendNotification(new Integer(1234));
+	}
+	
+	public void sendNotification(Serializable obj) throws Exception {
+		ConfigTree rootEl = new ConfigTree("notif");
+		NotifyFiles notifyFiles;
+		
+		// Add the file configs to the config DOM for 4 files...
+		addFileConfig(rootEl, "file1.notif", true);
+		addFileConfig(rootEl, "file2.notif", true);
+		addFileConfig(rootEl, "file3.notif", false);
+		addFileConfig(rootEl, "file4.notif", null);
+		
+		// Create the class and call the sendNotification method twice...
+		notifyFiles = new NotifyFiles(rootEl);		
+		notifyFiles.sendNotification(obj);
+		notifyFiles.sendNotification(obj);
+
+		// Test the files. Files 1 and 2 should be the same size. Files 3 and 4 should be the
+		// same size. Files 1 and 2 should be twice as big as files 3 and 4 because append was set
+		// "true" on 1 and 2 and sendNotification() was called twice... 
+		File file1Obj = getFileObject("file1.notif");
+		File file2Obj = getFileObject("file2.notif");
+		File file3Obj = getFileObject("file3.notif");
+		File file4Obj = getFileObject("file4.notif");
+		assertEquals(file1Obj.length(), file2Obj.length());
+		assertEquals(file3Obj.length(), file4Obj.length());
+		assertEquals(file1Obj.length(), file3Obj.length() * 2);
+	}
+	
+	private void addFileConfig(ConfigTree rootEl, String file, Boolean append) {
+		File fileObj = getFileObject(file);
+		ConfigTree fileEl = new ConfigTree("file",rootEl);
+		
+		fileEl.setAttribute("URI", fileObj.toURI().toString());
+		fileEl.setAttribute("append", (append != null?append.toString():null));
+		
+		// Also want to delete the file incase the tests are being rerun...
+		fileObj.delete();
+	}
+
+	private File getFileObject(String file) {
+		// TF: Excuse this hack!!!  It's the safest way of calculating a 
+		// relative URI within the test structure.  It will prob cause
+		// Maven some issues i.e. getting it to work for both Ant and Maven :-(
+		// This code assumes that the working dir is the "product" folder.
+		
+		File fileObj = new File("build/tests/" + getPKg() + "/" + file);
+		if(!fileObj.getParentFile().exists()) {
+			// The build folder may not exist e.g. if running this test from
+			// inside your IDE.
+			fileObj.getParentFile().mkdirs();
+		}
+		
+		return fileObj;
+	}
+
+	private String getPKg() {
+		String javaPackage = NotifyFilesUnitTest.class.getPackage().getName();
+		return javaPackage.replace('.', '/');
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyFilesUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,138 +1,138 @@
-/*
- * 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.notification;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.ObjectMessage;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.mockejb.jms.MockQueue;
-import org.mockejb.jms.MockTopic;
-import org.mockejb.jms.QueueConnectionFactoryImpl;
-import org.mockejb.jndi.MockContextFactory;
-
-/**
- * NotifyQueues unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class NotifyQueuesUnitTest extends TestCase {
-
-	private MockQueue mockQueue1;;
-	private MockQueue mockQueue2;
-	private NotifyQueues notifyQueues;
-	
-	protected void setUp() throws Exception {
-		MockContextFactory.setAsInitial();		
-		Context ctx = new InitialContext();
-		ctx.rebind(NotifyQueues.CONNECTION_FACTORY, new QueueConnectionFactoryImpl());
-
-		ConfigTree rootEl = new ConfigTree("rootEl");
-
-		addMessagePropertyConfigs(rootEl);
-		addQueueConfig(rootEl, "queue1");
-		addQueueConfig(rootEl, "queue2");
-		mockQueue1 = createAndBindQueue("queue1");
-		mockQueue2 = createAndBindQueue("queue2");
-		
-		notifyQueues = new NotifyQueues(rootEl);
-	}
-
-	protected void tearDown() throws Exception {
-		notifyQueues.release();
-		MockContextFactory.revertSetAsInitial();		
-	}
-
-	public void test_StringObj() throws Exception {
-		notifyQueues.sendNotification("Hello");
-		
-		checkQueueTextMessage(mockQueue1, 0, "Hello");
-		checkQueueTextMessage(mockQueue2, 0, "Hello");
-	}
-	
-	public void test_NonStringObj() throws Exception {
-		notifyQueues.sendNotification(new Integer(123));
-		
-		checkQueueObjectMessage(mockQueue1, 0, new Integer(123));
-		checkQueueObjectMessage(mockQueue2, 0, new Integer(123));
-	}
-
-	private void checkQueueTextMessage(MockQueue mockQueue, int messageIdx, String expectedText) throws JMSException {
-		assertTrue(mockQueue.getMessages().size() > messageIdx);		
-		Message message = mockQueue.getMessageAt(0);
-		assertTrue(message instanceof TextMessage);
-		assertEquals(expectedText, ((TextMessage)message).getText());
-		assertEquals("testpropvalue", message.getStringProperty("testpropname"));
-	}
-
-	private void checkQueueObjectMessage(MockQueue mockQueue, int messageIdx, Object expectedObj) throws JMSException {
-		assertTrue(mockQueue.getMessages().size() > messageIdx);		
-		Message message = mockQueue.getMessageAt(0);
-		assertTrue(message instanceof ObjectMessage);
-		assertEquals(expectedObj, ((ObjectMessage)message).getObject());
-		
-		// Note that the property bindings don't seem to work in this test i.e.
-		// it's returning null but should be returning the same as for a 
-		// TextMessage (See above).  This is most likely a mockejb lib issue
-		// and so we're ignoring it :-)
-		assertEquals(null, message.getStringProperty("testpropname"));
-	}
-	
-	private void addMessagePropertyConfigs(ConfigTree rootEl) {
-
-		ConfigTree propEl = new ConfigTree(NotifyQueues.CHILD_MSG_PROP,rootEl);
-		
-		propEl.setAttribute(NotifyJMS.ATT_PROP_NAME, "testpropname");
-		propEl.setAttribute(NotifyJMS.ATT_PROP_VALUE, "testpropvalue");
-	}
-
-	private void addQueueConfig(ConfigTree rootEl, String queueName) {
-		ConfigTree queueEl = new ConfigTree(NotifyQueues.CHILD_QUEUE,rootEl);
-		
-		queueEl.setAttribute(NotifyJMS.ATT_DEST_NAME, queueName);
-	}
-
-	private MockQueue createAndBindQueue(String queueName) throws NamingException {
-		MockQueue mockQueue = new MockQueue(queueName);
-				
-		Context ctx = new InitialContext();
-		ctx.rebind(queueName, mockQueue);
-		
-		return mockQueue;
-	}
-
-	@SuppressWarnings("unused")
-	private MockTopic createAndBindTopic(String topicName) throws NamingException {
-		MockTopic mockTopic = new MockTopic(topicName);
-		
-		Context ctx = new InitialContext();
-		ctx.rebind(topicName, mockTopic);
-		
-		return mockTopic;
-	}
-}
+/*
+ * 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.notification;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.mockejb.jms.MockQueue;
+import org.mockejb.jms.MockTopic;
+import org.mockejb.jms.QueueConnectionFactoryImpl;
+import org.mockejb.jndi.MockContextFactory;
+
+/**
+ * NotifyQueues unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class NotifyQueuesUnitTest extends TestCase {
+
+	private MockQueue mockQueue1;;
+	private MockQueue mockQueue2;
+	private NotifyQueues notifyQueues;
+	
+	protected void setUp() throws Exception {
+		MockContextFactory.setAsInitial();		
+		Context ctx = new InitialContext();
+		ctx.rebind(NotifyQueues.CONNECTION_FACTORY, new QueueConnectionFactoryImpl());
+
+		ConfigTree rootEl = new ConfigTree("rootEl");
+
+		addMessagePropertyConfigs(rootEl);
+		addQueueConfig(rootEl, "queue1");
+		addQueueConfig(rootEl, "queue2");
+		mockQueue1 = createAndBindQueue("queue1");
+		mockQueue2 = createAndBindQueue("queue2");
+		
+		notifyQueues = new NotifyQueues(rootEl);
+	}
+
+	protected void tearDown() throws Exception {
+		notifyQueues.release();
+		MockContextFactory.revertSetAsInitial();		
+	}
+
+	public void test_StringObj() throws Exception {
+		notifyQueues.sendNotification("Hello");
+		
+		checkQueueTextMessage(mockQueue1, 0, "Hello");
+		checkQueueTextMessage(mockQueue2, 0, "Hello");
+	}
+	
+	public void test_NonStringObj() throws Exception {
+		notifyQueues.sendNotification(new Integer(123));
+		
+		checkQueueObjectMessage(mockQueue1, 0, new Integer(123));
+		checkQueueObjectMessage(mockQueue2, 0, new Integer(123));
+	}
+
+	private void checkQueueTextMessage(MockQueue mockQueue, int messageIdx, String expectedText) throws JMSException {
+		assertTrue(mockQueue.getMessages().size() > messageIdx);		
+		Message message = mockQueue.getMessageAt(0);
+		assertTrue(message instanceof TextMessage);
+		assertEquals(expectedText, ((TextMessage)message).getText());
+		assertEquals("testpropvalue", message.getStringProperty("testpropname"));
+	}
+
+	private void checkQueueObjectMessage(MockQueue mockQueue, int messageIdx, Object expectedObj) throws JMSException {
+		assertTrue(mockQueue.getMessages().size() > messageIdx);		
+		Message message = mockQueue.getMessageAt(0);
+		assertTrue(message instanceof ObjectMessage);
+		assertEquals(expectedObj, ((ObjectMessage)message).getObject());
+		
+		// Note that the property bindings don't seem to work in this test i.e.
+		// it's returning null but should be returning the same as for a 
+		// TextMessage (See above).  This is most likely a mockejb lib issue
+		// and so we're ignoring it :-)
+		assertEquals(null, message.getStringProperty("testpropname"));
+	}
+	
+	private void addMessagePropertyConfigs(ConfigTree rootEl) {
+
+		ConfigTree propEl = new ConfigTree(NotifyQueues.CHILD_MSG_PROP,rootEl);
+		
+		propEl.setAttribute(NotifyJMS.ATT_PROP_NAME, "testpropname");
+		propEl.setAttribute(NotifyJMS.ATT_PROP_VALUE, "testpropvalue");
+	}
+
+	private void addQueueConfig(ConfigTree rootEl, String queueName) {
+		ConfigTree queueEl = new ConfigTree(NotifyQueues.CHILD_QUEUE,rootEl);
+		
+		queueEl.setAttribute(NotifyJMS.ATT_DEST_NAME, queueName);
+	}
+
+	private MockQueue createAndBindQueue(String queueName) throws NamingException {
+		MockQueue mockQueue = new MockQueue(queueName);
+				
+		Context ctx = new InitialContext();
+		ctx.rebind(queueName, mockQueue);
+		
+		return mockQueue;
+	}
+
+	@SuppressWarnings("unused")
+	private MockTopic createAndBindTopic(String topicName) throws NamingException {
+		MockTopic mockTopic = new MockTopic(topicName);
+		
+		Context ctx = new InitialContext();
+		ctx.rebind(topicName, mockTopic);
+		
+		return mockTopic;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,52 +1,52 @@
-/*
- * 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.notification;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-/**
- * NotifySqlTable unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class NotifySqlTableUnitTest extends TestCase {
-
-	public void test_NotifySqlTable() throws Exception {
-		ConfigTree domEl = ConfigTree.fromInputStream(getClass().getResourceAsStream("NotifySqlTable_testfile1.xml"));
-		NotifySqlTable nst = new NotifySqlTable(domEl);
-		
-		assertEquals("driver-class", nst.m_sDriver);
-		assertEquals("connection-url", nst.m_sURL);
-		assertEquals("user-name", nst.m_sUser);
-		assertEquals("password", nst.m_sPwd);
-		assertEquals("table", nst.m_sTable);
-		assertEquals("dataColumn", nst.m_sDataCol);
-		
-		assertEquals(3, nst.m_oCols.size());
-		assertEquals("colvalue1", nst.m_oCols.getProperty("colname1"));
-		assertEquals("colvalue2", nst.m_oCols.getProperty("colname2"));
-		assertEquals("colvalue3", nst.m_oCols.getProperty("colname3"));
-
-		assertEquals("insert into table (\"colname3\",\"colname2\",\"colname1\") values ('colvalue3','colvalue2','colvalue1')", nst.getInsertStmt());
-	}
-}
+/*
+ * 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.notification;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * NotifySqlTable unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class NotifySqlTableUnitTest extends TestCase {
+
+	public void test_NotifySqlTable() throws Exception {
+		ConfigTree domEl = ConfigTree.fromInputStream(getClass().getResourceAsStream("NotifySqlTable_testfile1.xml"));
+		NotifySqlTable nst = new NotifySqlTable(domEl);
+		
+		assertEquals("driver-class", nst.m_sDriver);
+		assertEquals("connection-url", nst.m_sURL);
+		assertEquals("user-name", nst.m_sUser);
+		assertEquals("password", nst.m_sPwd);
+		assertEquals("table", nst.m_sTable);
+		assertEquals("dataColumn", nst.m_sDataCol);
+		
+		assertEquals(3, nst.m_oCols.size());
+		assertEquals("colvalue1", nst.m_oCols.getProperty("colname1"));
+		assertEquals("colvalue2", nst.m_oCols.getProperty("colname2"));
+		assertEquals("colvalue3", nst.m_oCols.getProperty("colname3"));
+
+		assertEquals("insert into table (\"colname3\",\"colname2\",\"colname1\") values ('colvalue3','colvalue2','colvalue1')", nst.getInsertStmt());
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTableUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTable_testfile1.xml
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTable_testfile1.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTable_testfile1.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,12 +1,12 @@
-<notif	driver-class="driver-class" 
-		connection-url="connection-url" 
-		user-name="user-name" 
-		password="password" 
-		table="table"
-		dataColumn="dataColumn">
-		
-		<column name="colname1" value="colvalue1"/>
-		<column name="colname2" value="colvalue2"/>
-		<column name="colname3" value="colvalue3"/>
-		
+<notif	driver-class="driver-class" 
+		connection-url="connection-url" 
+		user-name="user-name" 
+		password="password" 
+		table="table"
+		dataColumn="dataColumn">
+		
+		<column name="colname1" value="colvalue1"/>
+		<column name="colname2" value="colvalue2"/>
+		<column name="colname3" value="colvalue3"/>
+		
 </notif>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifySqlTable_testfile1.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,126 +1,126 @@
-/*
- * 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.notification;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.ObjectMessage;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.mockejb.jms.MockTopic;
-import org.mockejb.jms.TopicConnectionFactoryImpl;
-import org.mockejb.jndi.MockContextFactory;
-
-/**
- * NotifyTopics unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class NotifyTopicsUnitTest extends TestCase {
-
-	private MockTopic mockTopic1;;
-	private MockTopic mockTopic2;
-	private NotifyTopics notifyTopics;
-	
-	protected void setUp() throws Exception {
-		MockContextFactory.setAsInitial();		
-		Context ctx = new InitialContext();
-		ctx.rebind(NotifyTopics.CONNECTION_FACTORY, new TopicConnectionFactoryImpl());
-
-		ConfigTree rootEl = new ConfigTree("rootEl");
-
-		addMessagePropertyConfigs(rootEl);
-		addTopicConfig(rootEl, "topic1");
-		addTopicConfig(rootEl, "topic2");
-		mockTopic1 = createAndBindTopic("topic1");
-		mockTopic2 = createAndBindTopic("topic2");
-		
-		notifyTopics = new NotifyTopics(rootEl);
-	}
-
-	protected void tearDown() throws Exception {
-		notifyTopics.release();
-		MockContextFactory.revertSetAsInitial();		
-	}
-
-	public void test_StringObj() throws Exception {
-		notifyTopics.sendNotification("Hello");
-		
-		checkTopicTextMessage(mockTopic1, 0, "Hello");
-		checkTopicTextMessage(mockTopic2, 0, "Hello");
-	}
-	
-	public void test_NonStringObj() throws Exception {
-		notifyTopics.sendNotification(new Integer(123));
-		
-		checkTopicObjectMessage(mockTopic1, 0, new Integer(123));
-		checkTopicObjectMessage(mockTopic2, 0, new Integer(123));
-	}
-
-	private void checkTopicTextMessage(MockTopic mockTopic, int messageIdx, String expectedText) throws JMSException {
-		assertTrue(mockTopic.getMessages().size() > messageIdx);		
-		Message message = mockTopic.getMessageAt(0);
-		assertTrue(message instanceof TextMessage);
-		assertEquals(expectedText, ((TextMessage)message).getText());
-		assertEquals("testpropvalue", message.getStringProperty("testpropname"));
-	}
-
-	private void checkTopicObjectMessage(MockTopic mockTopic, int messageIdx, Object expectedObj) throws JMSException {
-		assertTrue(mockTopic.getMessages().size() > messageIdx);		
-		Message message = mockTopic.getMessageAt(0);
-		assertTrue(message instanceof ObjectMessage);
-		assertEquals(expectedObj, ((ObjectMessage)message).getObject());
-		
-		// Note that the property bindings don't seem to work in this test i.e.
-		// it's returning null but should be returning the same as for a 
-		// TextMessage (See above).  This is most likely a mockejb lib issue
-		// and so we're ignoring it :-)
-		assertEquals(null, message.getStringProperty("testpropname"));
-	}
-	
-	private void addMessagePropertyConfigs(ConfigTree rootEl) {
-		ConfigTree propEl = new ConfigTree(NotifyTopics.CHILD_MSG_PROP,rootEl);
-		
-		propEl.setAttribute(NotifyJMS.ATT_PROP_NAME, "testpropname");
-		propEl.setAttribute(NotifyJMS.ATT_PROP_VALUE, "testpropvalue");
-	}
-
-	private void addTopicConfig(ConfigTree rootEl, String topicName) {
-		ConfigTree topicEl = new ConfigTree(NotifyTopics.CHILD_TOPIC,rootEl);
-		
-		topicEl.setAttribute(NotifyJMS.ATT_DEST_NAME, topicName);
-	}
-
-	private MockTopic createAndBindTopic(String topicName) throws NamingException {
-		MockTopic mockTopic = new MockTopic(topicName);
-		
-		Context ctx = new InitialContext();
-		ctx.rebind(topicName, mockTopic);
-		
-		return mockTopic;
-	}
-}
+/*
+ * 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.notification;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.mockejb.jms.MockTopic;
+import org.mockejb.jms.TopicConnectionFactoryImpl;
+import org.mockejb.jndi.MockContextFactory;
+
+/**
+ * NotifyTopics unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class NotifyTopicsUnitTest extends TestCase {
+
+	private MockTopic mockTopic1;;
+	private MockTopic mockTopic2;
+	private NotifyTopics notifyTopics;
+	
+	protected void setUp() throws Exception {
+		MockContextFactory.setAsInitial();		
+		Context ctx = new InitialContext();
+		ctx.rebind(NotifyTopics.CONNECTION_FACTORY, new TopicConnectionFactoryImpl());
+
+		ConfigTree rootEl = new ConfigTree("rootEl");
+
+		addMessagePropertyConfigs(rootEl);
+		addTopicConfig(rootEl, "topic1");
+		addTopicConfig(rootEl, "topic2");
+		mockTopic1 = createAndBindTopic("topic1");
+		mockTopic2 = createAndBindTopic("topic2");
+		
+		notifyTopics = new NotifyTopics(rootEl);
+	}
+
+	protected void tearDown() throws Exception {
+		notifyTopics.release();
+		MockContextFactory.revertSetAsInitial();		
+	}
+
+	public void test_StringObj() throws Exception {
+		notifyTopics.sendNotification("Hello");
+		
+		checkTopicTextMessage(mockTopic1, 0, "Hello");
+		checkTopicTextMessage(mockTopic2, 0, "Hello");
+	}
+	
+	public void test_NonStringObj() throws Exception {
+		notifyTopics.sendNotification(new Integer(123));
+		
+		checkTopicObjectMessage(mockTopic1, 0, new Integer(123));
+		checkTopicObjectMessage(mockTopic2, 0, new Integer(123));
+	}
+
+	private void checkTopicTextMessage(MockTopic mockTopic, int messageIdx, String expectedText) throws JMSException {
+		assertTrue(mockTopic.getMessages().size() > messageIdx);		
+		Message message = mockTopic.getMessageAt(0);
+		assertTrue(message instanceof TextMessage);
+		assertEquals(expectedText, ((TextMessage)message).getText());
+		assertEquals("testpropvalue", message.getStringProperty("testpropname"));
+	}
+
+	private void checkTopicObjectMessage(MockTopic mockTopic, int messageIdx, Object expectedObj) throws JMSException {
+		assertTrue(mockTopic.getMessages().size() > messageIdx);		
+		Message message = mockTopic.getMessageAt(0);
+		assertTrue(message instanceof ObjectMessage);
+		assertEquals(expectedObj, ((ObjectMessage)message).getObject());
+		
+		// Note that the property bindings don't seem to work in this test i.e.
+		// it's returning null but should be returning the same as for a 
+		// TextMessage (See above).  This is most likely a mockejb lib issue
+		// and so we're ignoring it :-)
+		assertEquals(null, message.getStringProperty("testpropname"));
+	}
+	
+	private void addMessagePropertyConfigs(ConfigTree rootEl) {
+		ConfigTree propEl = new ConfigTree(NotifyTopics.CHILD_MSG_PROP,rootEl);
+		
+		propEl.setAttribute(NotifyJMS.ATT_PROP_NAME, "testpropname");
+		propEl.setAttribute(NotifyJMS.ATT_PROP_VALUE, "testpropvalue");
+	}
+
+	private void addTopicConfig(ConfigTree rootEl, String topicName) {
+		ConfigTree topicEl = new ConfigTree(NotifyTopics.CHILD_TOPIC,rootEl);
+		
+		topicEl.setAttribute(NotifyJMS.ATT_DEST_NAME, topicName);
+	}
+
+	private MockTopic createAndBindTopic(String topicName) throws NamingException {
+		MockTopic mockTopic = new MockTopic(topicName);
+		
+		Context ctx = new InitialContext();
+		ctx.rebind(topicName, mockTopic);
+		
+		return mockTopic;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyUtilUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyUtilUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyUtilUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,89 +1,89 @@
-/*
- * 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.notification;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.services.NotificationManager;
-
-/**
- * NotifyUtil unit tests.
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class NotifyUtilUnitTest extends TestCase
-{
-
-	public void test_NotifyUtil ()
-	{
-		ConfigTree rootEl = new ConfigTree("rootEl");
-
-		addNotificationConfig(rootEl, "message1", "ok");
-		addNotificationConfig(rootEl, "message2", "err");
-		addNotificationConfig(rootEl, "message3", "ok");
-		addNotificationConfig(rootEl, "message4", "err");
-
-		TestNotificationHandler handler = new TestNotificationHandler();
-		NotifyUtil.notifyOK(handler, rootEl, "somemessage", new HashMap());
-		assertEquals(2, handler.messages.size());
-		assertEquals("message1 - somemessage", handler.messages.get(0));
-		assertEquals("message3 - somemessage", handler.messages.get(1));
-
-		handler.messages.clear();
-		NotifyUtil.notifyError(handler, rootEl, "somemessage", new HashMap(),
-				new Exception("test"));
-		assertEquals(3, handler.messages.size());
-		assertTrue(handler.messages.get(0).startsWith("somemessage"));
-		assertTrue(handler.messages.get(1).startsWith("message2 - somemessage"));
-		assertTrue(handler.messages.get(2).startsWith("message4 - somemessage"));
-	}
-
-	private void addNotificationConfig (ConfigTree rootEl, String message,
-			String type)
-	{
-		ConfigTree notifEl = new ConfigTree(NotificationList.ELEMENT, rootEl);
-		notifEl.setAttribute("message", message);
-		notifEl.setAttribute(NotificationList.TYPE, type);
-	}
-
-	private class TestNotificationHandler implements NotificationManager
-	{
-		private List<String> messages = new ArrayList<String>();
-
-		public void sendNotifications (ConfigTree p_oP, Serializable p_o)
-				throws NotificationException
-		{
-			messages.add(p_oP.getAttribute("message") + " - " + p_o);
-		}
-
-		public void sendNotifications (Serializable p_o) throws NotificationException
-		{
-			messages.add(p_o.toString());
-		}
-	}
-}
+/*
+ * 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.notification;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.services.NotificationManager;
+
+/**
+ * NotifyUtil unit tests.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class NotifyUtilUnitTest extends TestCase
+{
+
+	public void test_NotifyUtil ()
+	{
+		ConfigTree rootEl = new ConfigTree("rootEl");
+
+		addNotificationConfig(rootEl, "message1", "ok");
+		addNotificationConfig(rootEl, "message2", "err");
+		addNotificationConfig(rootEl, "message3", "ok");
+		addNotificationConfig(rootEl, "message4", "err");
+
+		TestNotificationHandler handler = new TestNotificationHandler();
+		NotifyUtil.notifyOK(handler, rootEl, "somemessage", new HashMap());
+		assertEquals(2, handler.messages.size());
+		assertEquals("message1 - somemessage", handler.messages.get(0));
+		assertEquals("message3 - somemessage", handler.messages.get(1));
+
+		handler.messages.clear();
+		NotifyUtil.notifyError(handler, rootEl, "somemessage", new HashMap(),
+				new Exception("test"));
+		assertEquals(3, handler.messages.size());
+		assertTrue(handler.messages.get(0).startsWith("somemessage"));
+		assertTrue(handler.messages.get(1).startsWith("message2 - somemessage"));
+		assertTrue(handler.messages.get(2).startsWith("message4 - somemessage"));
+	}
+
+	private void addNotificationConfig (ConfigTree rootEl, String message,
+			String type)
+	{
+		ConfigTree notifEl = new ConfigTree(NotificationList.ELEMENT, rootEl);
+		notifEl.setAttribute("message", message);
+		notifEl.setAttribute(NotificationList.TYPE, type);
+	}
+
+	private class TestNotificationHandler implements NotificationManager
+	{
+		private List<String> messages = new ArrayList<String>();
+
+		public void sendNotifications (ConfigTree p_oP, Serializable p_o)
+				throws NotificationException
+		{
+			messages.add(p_oP.getAttribute("message") + " - " + p_o);
+		}
+
+		public void sendNotifications (Serializable p_o) throws NotificationException
+		{
+			messages.add(p_o.toString());
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyUtilUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget1.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget1.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget1.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,27 +1,27 @@
-package org.jboss.soa.esb.notification;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-public class TestNotificationTarget1 extends NotificationTarget
-{
-
-	private ConfigTree config;
-
-	public static List<String> messageList;
-
-	public TestNotificationTarget1 (ConfigTree targetConf)
-	{
-		super(targetConf);
-		config = targetConf;
-	}
-
-	@Override
-	public void sendNotification (Serializable obj)
-			throws NotificationException
-	{
-		messageList.add(config.getAttribute("message") + "-" + obj);
-	}
-}
+package org.jboss.soa.esb.notification;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+public class TestNotificationTarget1 extends NotificationTarget
+{
+
+	private ConfigTree config;
+
+	public static List<String> messageList;
+
+	public TestNotificationTarget1 (ConfigTree targetConf)
+	{
+		super(targetConf);
+		config = targetConf;
+	}
+
+	@Override
+	public void sendNotification (Serializable obj)
+			throws NotificationException
+	{
+		messageList.add(config.getAttribute("message") + "-" + obj);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget1.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget2.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget2.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget2.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,10 +1,10 @@
-package org.jboss.soa.esb.notification;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-
-public class TestNotificationTarget2 extends TestNotificationTarget1 {
-
-	public TestNotificationTarget2(ConfigTree targetConf) {
-		super(targetConf);
-	}
-}
+package org.jboss.soa.esb.notification;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+public class TestNotificationTarget2 extends TestNotificationTarget1 {
+
+	public TestNotificationTarget2(ConfigTree targetConf) {
+		super(targetConf);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/TestNotificationTarget2.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,53 +1,53 @@
-/*
- * 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.parameters;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-
-/**
- * ParamRepositoryFactory unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ParamRepositoryFactoryUnitTest extends TestCase {
-
-	public void test_ParamRepositoryFactory() {
-		ParamRepository repo;
-		
-		repo = ParamRepositoryFactory.getInstance();
-		assertTrue(repo instanceof ParamFileRepository);
-		
-		ParamRepositoryFactory.reset();
-		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(Environment.PARAMS_REPOS_IMPL_CLASS, TestParamRepo.class.getName());
-		repo = ParamRepositoryFactory.getInstance();
-		assertTrue(repo instanceof TestParamRepo);
-	}
-	
-	public void test_ParamRepositoryException() {
-		// for the coverage results ;-)
-		new ParamRepositoryException("message");
-		new ParamRepositoryException("message", new Exception());
-	}
-}
+/*
+ * 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.parameters;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+
+/**
+ * ParamRepositoryFactory unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ParamRepositoryFactoryUnitTest extends TestCase {
+
+	public void test_ParamRepositoryFactory() {
+		ParamRepository repo;
+		
+		repo = ParamRepositoryFactory.getInstance();
+		assertTrue(repo instanceof ParamFileRepository);
+		
+		ParamRepositoryFactory.reset();
+		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(Environment.PARAMS_REPOS_IMPL_CLASS, TestParamRepo.class.getName());
+		repo = ParamRepositoryFactory.getInstance();
+		assertTrue(repo instanceof TestParamRepo);
+	}
+	
+	public void test_ParamRepositoryException() {
+		// for the coverage results ;-)
+		new ParamRepositoryException("message");
+		new ParamRepositoryException("message", new Exception());
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,142 +1,142 @@
-/*
- * 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.parameters;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-
-/**
- * ParamFileRepository unit tests.
- * 
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ParamsFileRepositoryUnitTest extends TestCase
-{
-
-	public void test_ParamsFileRepository() throws Exception
-	{
-		File root;
-		ParamFileRepository fileRepo;
-
-		// Check it defaults to the working dir...
-		root = new File("./");
-		fileRepo = new ParamFileRepository();
-		assertEquals(root, fileRepo.getRoot());
-
-		// Check it can pick up from the System prop...
-		root = new File("build/tests/");
-		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
-				ParamFileRepository.FILE_PARAMS_REPOS_ROOT, root.getPath());
-		fileRepo = new ParamFileRepository();
-		assertEquals(root, fileRepo.getRoot());
-
-		// Check for error on invalid System prop...
-		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
-				ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "blah/blah");
-		try
-		{
-			new ParamFileRepository();
-			fail("expected IllegalStateException");
-		} catch (IllegalStateException e)
-		{
-			// expected
-		}
-	}
-
-	public void test_add_get_remove_badargs() throws Exception
-	{
-		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
-				ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "build/tests/");
-		ParamFileRepository fileRepo = new ParamFileRepository();
-
-		test_add_badargs(fileRepo, null, "val");
-		test_add_badargs(fileRepo, "", "val");
-		test_add_badargs(fileRepo, "", "val");
-		test_add_badargs(fileRepo, "xxx/yyy", null);
-
-		test_get_badargs(fileRepo, null);
-		test_get_badargs(fileRepo, "");
-
-		test_remove_badargs(fileRepo, null);
-		test_remove_badargs(fileRepo, "");
-	}
-
-	private void test_add_badargs(ParamFileRepository fileRepo, String name,
-			String value) throws ParamRepositoryException
-	{
-		try
-		{
-			fileRepo.add(name, value);
-			fail("expected IllegalArgumentException");
-		} catch (IllegalArgumentException e)
-		{
-			// expected
-		}
-	}
-
-	private void test_get_badargs(ParamFileRepository fileRepo, String name)
-			throws ParamRepositoryException
-	{
-		try
-		{
-			fileRepo.get(name);
-			fail("expected IllegalArgumentException");
-		} catch (IllegalArgumentException e)
-		{
-			// expected
-		}
-	}
-
-	private void test_remove_badargs(ParamFileRepository fileRepo, String name)
-	{
-		try
-		{
-			fileRepo.remove(name);
-			fail("expected IllegalArgumentException");
-		} catch (IllegalArgumentException e)
-		{
-			// expected
-		}
-	}
-
-	public void test_add_get_remove() throws Exception
-	{
-		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
-				ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "build/tests/");
-		ParamFileRepository fileRepo = new ParamFileRepository();
-		String name = "repostests/jboss/testparam";
-
-		// Make sure the parameter doesn't already exist...
-		assertEquals(null, fileRepo.get(name));
-
-		// Now the tests...
-		assertEquals(null, fileRepo.get(name));
-		fileRepo.add(name, "tomtestvalue");
-		assertEquals("tomtestvalue", fileRepo.get(name));
-		fileRepo.remove(name);
-		assertEquals(null, fileRepo.get(name));
-	}
-}
+/*
+ * 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.parameters;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+
+/**
+ * ParamFileRepository unit tests.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ParamsFileRepositoryUnitTest extends TestCase
+{
+
+	public void test_ParamsFileRepository() throws Exception
+	{
+		File root;
+		ParamFileRepository fileRepo;
+
+		// Check it defaults to the working dir...
+		root = new File("./");
+		fileRepo = new ParamFileRepository();
+		assertEquals(root, fileRepo.getRoot());
+
+		// Check it can pick up from the System prop...
+		root = new File("build/tests/");
+		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
+				ParamFileRepository.FILE_PARAMS_REPOS_ROOT, root.getPath());
+		fileRepo = new ParamFileRepository();
+		assertEquals(root, fileRepo.getRoot());
+
+		// Check for error on invalid System prop...
+		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
+				ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "blah/blah");
+		try
+		{
+			new ParamFileRepository();
+			fail("expected IllegalStateException");
+		} catch (IllegalStateException e)
+		{
+			// expected
+		}
+	}
+
+	public void test_add_get_remove_badargs() throws Exception
+	{
+		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
+				ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "build/tests/");
+		ParamFileRepository fileRepo = new ParamFileRepository();
+
+		test_add_badargs(fileRepo, null, "val");
+		test_add_badargs(fileRepo, "", "val");
+		test_add_badargs(fileRepo, "", "val");
+		test_add_badargs(fileRepo, "xxx/yyy", null);
+
+		test_get_badargs(fileRepo, null);
+		test_get_badargs(fileRepo, "");
+
+		test_remove_badargs(fileRepo, null);
+		test_remove_badargs(fileRepo, "");
+	}
+
+	private void test_add_badargs(ParamFileRepository fileRepo, String name,
+			String value) throws ParamRepositoryException
+	{
+		try
+		{
+			fileRepo.add(name, value);
+			fail("expected IllegalArgumentException");
+		} catch (IllegalArgumentException e)
+		{
+			// expected
+		}
+	}
+
+	private void test_get_badargs(ParamFileRepository fileRepo, String name)
+			throws ParamRepositoryException
+	{
+		try
+		{
+			fileRepo.get(name);
+			fail("expected IllegalArgumentException");
+		} catch (IllegalArgumentException e)
+		{
+			// expected
+		}
+	}
+
+	private void test_remove_badargs(ParamFileRepository fileRepo, String name)
+	{
+		try
+		{
+			fileRepo.remove(name);
+			fail("expected IllegalArgumentException");
+		} catch (IllegalArgumentException e)
+		{
+			// expected
+		}
+	}
+
+	public void test_add_get_remove() throws Exception
+	{
+		ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).setProperty(
+				ParamFileRepository.FILE_PARAMS_REPOS_ROOT, "build/tests/");
+		ParamFileRepository fileRepo = new ParamFileRepository();
+		String name = "repostests/jboss/testparam";
+
+		// Make sure the parameter doesn't already exist...
+		assertEquals(null, fileRepo.get(name));
+
+		// Now the tests...
+		assertEquals(null, fileRepo.get(name));
+		fileRepo.add(name, "tomtestvalue");
+		assertEquals("tomtestvalue", fileRepo.get(name));
+		fileRepo.remove(name);
+		assertEquals(null, fileRepo.get(name));
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,26 +1,26 @@
-package org.jboss.soa.esb.parameters;
-
-public class TestParamRepo implements ParamRepository {
-
-	public TestParamRepo() {
-		super();
-		// TODO Auto-generated constructor stub
-	}
-
-	public void add(String name, String value)
-			throws ParamRepositoryException {
-		// TODO Auto-generated method stub
-
-	}
-
-	public String get(String name) throws ParamRepositoryException {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public void remove(String name) throws ParamRepositoryException {
-		// TODO Auto-generated method stub
-
-	}
-
-}
+package org.jboss.soa.esb.parameters;
+
+public class TestParamRepo implements ParamRepository {
+
+	public TestParamRepo() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	public void add(String name, String value)
+			throws ParamRepositoryException {
+		// TODO Auto-generated method stub
+
+	}
+
+	public String get(String name) throws ParamRepositoryException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void remove(String name) throws ParamRepositoryException {
+		// TODO Auto-generated method stub
+
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/TestParamRepo.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,83 +1,83 @@
-/*
-* 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.testutils;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-/**
- * Utility class for reading a file into a String and back.
- * @author kstam
- */
-public class FileUtil {
-    /**
-     * Read the file into a String.
-     * @param file - the file to be read
-     * @return String with the content of the file
-     * @throws IOException - when we can't read the file
-     */
-    public static String readTextFile(File file) throws IOException 
-    {
-        StringBuffer sb = new StringBuffer(1024);
-        BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
-        char[] chars = new char[1];
-        while( (reader.read(chars)) > -1){
-            sb.append(String.valueOf(chars)); 
-            chars = new char[1];
-        }
-        reader.close();
-        return sb.toString();
-    }
-    /**
-     * 
-     */
-    public static String readStream(InputStream inputStream) throws IOException
-    {
-    	StringBuffer sb = new StringBuffer(1024);
-        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
-        char[] chars = new char[1];
-        while( (reader.read(chars)) > -1){
-            sb.append(String.valueOf(chars)); 
-            chars = new char[1];
-        }
-        reader.close();
-        return sb.toString();
-    }
-    /**
-     * Write a String into a file.
-     * @param file - File to which we write the String
-     * @param str - string which will be written
-     * @throws IOException - when we can't write to the file
-     */
-    public static void writeTextFile(File file, String str) throws IOException 
-    {
-        BufferedWriter writer = new BufferedWriter(new FileWriter(file.getPath()));
-        writer.write(str);
-        writer.close();
-    }
-
-}
+/*
+* 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.testutils;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+/**
+ * Utility class for reading a file into a String and back.
+ * @author kstam
+ */
+public class FileUtil {
+    /**
+     * Read the file into a String.
+     * @param file - the file to be read
+     * @return String with the content of the file
+     * @throws IOException - when we can't read the file
+     */
+    public static String readTextFile(File file) throws IOException 
+    {
+        StringBuffer sb = new StringBuffer(1024);
+        BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
+        char[] chars = new char[1];
+        while( (reader.read(chars)) > -1){
+            sb.append(String.valueOf(chars)); 
+            chars = new char[1];
+        }
+        reader.close();
+        return sb.toString();
+    }
+    /**
+     * 
+     */
+    public static String readStream(InputStream inputStream) throws IOException
+    {
+    	StringBuffer sb = new StringBuffer(1024);
+        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+        char[] chars = new char[1];
+        while( (reader.read(chars)) > -1){
+            sb.append(String.valueOf(chars)); 
+            chars = new char[1];
+        }
+        reader.close();
+        return sb.toString();
+    }
+    /**
+     * Write a String into a file.
+     * @param file - File to which we write the String
+     * @param str - string which will be written
+     * @throws IOException - when we can't write to the file
+     */
+    public static void writeTextFile(File file, String str) throws IOException 
+    {
+        BufferedWriter writer = new BufferedWriter(new FileWriter(file.getPath()));
+        writer.write(str);
+        writer.close();
+    }
+
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/FileUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/HsqldbUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/HsqldbUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/HsqldbUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,64 +1,64 @@
-package org.jboss.soa.esb.testutils;
-
-import java.sql.DriverManager;
-import java.sql.Statement;
-
-import org.hsqldb.Server;
-/**
- * Utility to start and stop a hsql Database.
- * 
- * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
- *
- */
-public class HsqldbUtil 
-{
-	final private static String THREAD_NAME = "hypersonic-unittest";
-	/**
-	 * Starts the hsql database in it's own thread. 
-	 * Don't forget to shut it down when you're done.
-	 * 
-	 * @param databaseFile - i.e. build/hsqltestdb
-	 * @param databaseName - i.e. jbossesb
-	 * @throws Exception
-	 */
-	public static void startHsqldb(final String databaseFile,
-			final String databaseName) throws Exception 
-	{
-		// Start DB in new thread, or else it will block us
-		Thread serverThread = new Thread(THREAD_NAME) {
-			public void run() {
-				try {
-					// Create startup arguments
-					final String[] args = {
-							"-database.0", databaseFile,
-							"-dbname.0", databaseName,
-							"-no_system_exit", "true"
-						} ;
-
-					// Start server
-					Server.main(args);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-				//log.error("Failed to start database", e);
-			}
-		};
-		serverThread.run();
-	}
-	/**
-	 * 
-	 * @param url
-	 * @param username
-	 * @param password
-	 * @throws Exception
-	 */
-	public static void stopHsqldb(String url, String username, String password) throws Exception {
-		java.sql.Connection connection = DriverManager.getConnection(
-				url, username, password);
-		Statement statement = connection.createStatement();
-		String shutdownCommand = "SHUTDOWN COMPACT";
-		statement.executeQuery(shutdownCommand);
-	}
-
-	
-}
+package org.jboss.soa.esb.testutils;
+
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import org.hsqldb.Server;
+/**
+ * Utility to start and stop a hsql Database.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
+ *
+ */
+public class HsqldbUtil 
+{
+	final private static String THREAD_NAME = "hypersonic-unittest";
+	/**
+	 * Starts the hsql database in it's own thread. 
+	 * Don't forget to shut it down when you're done.
+	 * 
+	 * @param databaseFile - i.e. build/hsqltestdb
+	 * @param databaseName - i.e. jbossesb
+	 * @throws Exception
+	 */
+	public static void startHsqldb(final String databaseFile,
+			final String databaseName) throws Exception 
+	{
+		// Start DB in new thread, or else it will block us
+		Thread serverThread = new Thread(THREAD_NAME) {
+			public void run() {
+				try {
+					// Create startup arguments
+					final String[] args = {
+							"-database.0", databaseFile,
+							"-dbname.0", databaseName,
+							"-no_system_exit", "true"
+						} ;
+
+					// Start server
+					Server.main(args);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+				//log.error("Failed to start database", e);
+			}
+		};
+		serverThread.run();
+	}
+	/**
+	 * 
+	 * @param url
+	 * @param username
+	 * @param password
+	 * @throws Exception
+	 */
+	public static void stopHsqldb(String url, String username, String password) throws Exception {
+		java.sql.Connection connection = DriverManager.getConnection(
+				url, username, password);
+		Statement statement = connection.createStatement();
+		String shutdownCommand = "SHUTDOWN COMPACT";
+		statement.executeQuery(shutdownCommand);
+	}
+
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/HsqldbUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/TestEnvironmentUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/TestEnvironmentUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/TestEnvironmentUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,95 +1,95 @@
-package org.jboss.soa.esb.testutils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-
-public class TestEnvironmentUtil 
-{
-	private static Logger log = Logger.getLogger(TestEnvironmentUtil.class);
-	
-	public static String getUserDir()
-	{
-		return getUserDir("product");
-	}
-	/**
-	 * When performing file system interaction, the user.dir may differ (i.e. running the
-	 * tests from within eclipse).
-	 */
-	public static String getUserDir(String dir)
-	{
-		String userDir="";
-		String baseDir = System.getProperty("user.dir");
-		log.log(Priority.INFO, baseDir);
-		if (!baseDir.endsWith(dir)) {
-			userDir = dir + "/";
-		}
-		return userDir;
-	}
-	
-	/**
-	 * When performing file system interaction, the user.dir may differ (i.e. running the
-	 * tests from within eclipse).
-	 */
-	public static String getUserDir(String eclipseDir, String antDir)
-	{
-		String userDir="";
-		String baseDir = System.getProperty("user.dir");
-		log.log(Priority.INFO, baseDir);
-		if (!baseDir.endsWith(eclipseDir)) {
-			if (baseDir.endsWith("qa")) {
-				userDir = antDir + "/";
-			} else {
-				userDir = eclipseDir + "/";
-			}
-		} else {
-			userDir = antDir;
-		}
-		log.log(Priority.INFO, userDir);
-		return userDir;
-	}
-	
-	public static void setESBPropertiesFileToUse()
-	{
-		//Set the jbossesb properties file in System, so we can pick up the one for testing
-		String jbossesbPropertiesFile = getUserDir() + "/etc/test/resources/jbossesb-unittest-properties.xml";
-		System.setProperty("org.jboss.soa.esb.propertyFile", jbossesbPropertiesFile);
-	}
-	/**
-	 * Sets the jbossesb-properties.xml to use for test
-	 */
-	public static void setESBPropertiesFileToUse(String dir)
-	{
-		//Set the jbossesb properties file in System, so we can pick up the one for testing
-		String jbossesbPropertiesFile = getUserDir(dir) + "/etc/test/resources/jbossesb-unittest-properties.xml";
-		System.setProperty("org.jboss.soa.esb.propertyFile", jbossesbPropertiesFile);
-	}
-	
-	/**
-	 * Sets the jbossesb-properties.xml to use for test
-	 */
-	public static void setESBPropertiesFileToUse(String eclipseDir, String antDir)
-	{
-		//Set the jbossesb properties file in System, so we can pick up the one for testing
-		String jbossesbPropertiesFile = getUserDir(eclipseDir, antDir) + "/etc/test/resources/jbossesb-unittest-properties.xml";
-		System.setProperty("org.jboss.soa.esb.propertyFile", jbossesbPropertiesFile);
-	}
-	
-	public static String readTextFile(File file) throws IOException 
-    {
-        StringBuffer sb = new StringBuffer(1024);
-        BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
-        char[] chars = new char[1];
-        while( (reader.read(chars)) > -1){
-            sb.append(String.valueOf(chars)); 
-            chars = new char[1];
-        }
-        reader.close();
-        return sb.toString();
-    }
-	
-}
+package org.jboss.soa.esb.testutils;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+
+public class TestEnvironmentUtil 
+{
+	private static Logger log = Logger.getLogger(TestEnvironmentUtil.class);
+	
+	public static String getUserDir()
+	{
+		return getUserDir("product");
+	}
+	/**
+	 * When performing file system interaction, the user.dir may differ (i.e. running the
+	 * tests from within eclipse).
+	 */
+	public static String getUserDir(String dir)
+	{
+		String userDir="";
+		String baseDir = System.getProperty("user.dir");
+		log.log(Priority.INFO, baseDir);
+		if (!baseDir.endsWith(dir)) {
+			userDir = dir + "/";
+		}
+		return userDir;
+	}
+	
+	/**
+	 * When performing file system interaction, the user.dir may differ (i.e. running the
+	 * tests from within eclipse).
+	 */
+	public static String getUserDir(String eclipseDir, String antDir)
+	{
+		String userDir="";
+		String baseDir = System.getProperty("user.dir");
+		log.log(Priority.INFO, baseDir);
+		if (!baseDir.endsWith(eclipseDir)) {
+			if (baseDir.endsWith("qa")) {
+				userDir = antDir + "/";
+			} else {
+				userDir = eclipseDir + "/";
+			}
+		} else {
+			userDir = antDir;
+		}
+		log.log(Priority.INFO, userDir);
+		return userDir;
+	}
+	
+	public static void setESBPropertiesFileToUse()
+	{
+		//Set the jbossesb properties file in System, so we can pick up the one for testing
+		String jbossesbPropertiesFile = getUserDir() + "/etc/test/resources/jbossesb-unittest-properties.xml";
+		System.setProperty("org.jboss.soa.esb.propertyFile", jbossesbPropertiesFile);
+	}
+	/**
+	 * Sets the jbossesb-properties.xml to use for test
+	 */
+	public static void setESBPropertiesFileToUse(String dir)
+	{
+		//Set the jbossesb properties file in System, so we can pick up the one for testing
+		String jbossesbPropertiesFile = getUserDir(dir) + "/etc/test/resources/jbossesb-unittest-properties.xml";
+		System.setProperty("org.jboss.soa.esb.propertyFile", jbossesbPropertiesFile);
+	}
+	
+	/**
+	 * Sets the jbossesb-properties.xml to use for test
+	 */
+	public static void setESBPropertiesFileToUse(String eclipseDir, String antDir)
+	{
+		//Set the jbossesb properties file in System, so we can pick up the one for testing
+		String jbossesbPropertiesFile = getUserDir(eclipseDir, antDir) + "/etc/test/resources/jbossesb-unittest-properties.xml";
+		System.setProperty("org.jboss.soa.esb.propertyFile", jbossesbPropertiesFile);
+	}
+	
+	public static String readTextFile(File file) throws IOException 
+    {
+        StringBuffer sb = new StringBuffer(1024);
+        BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
+        char[] chars = new char[1];
+        while( (reader.read(chars)) > -1){
+            sb.append(String.valueOf(chars)); 
+            chars = new char[1];
+        }
+        reader.close();
+        return sb.toString();
+    }
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/testutils/TestEnvironmentUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,59 +1,59 @@
-/*
- * 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.util;
-
-import java.io.ByteArrayInputStream;
-
-import junit.framework.TestCase;
-
-import org.jboss.internal.soa.esb.util.StreamUtils;
-
-/**
- * StreamUtils unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class StreamUtilsUnitTest extends TestCase {
-
-	public void test_readStream_badargs() {
-		try {
-			StreamUtils.readStream(null);
-			fail("expected IllegalArgumentException");
-		} catch(IllegalArgumentException e) {
-			// expected
-		}
-	}
-	
-	public void test_readStream() {
-		StringBuffer testBuf = new StringBuffer(500);
-		@SuppressWarnings("unused")
-		byte[] resStream;
-		
-		while(testBuf.length() < 500) {
-			testBuf.append("12121212121212121212121212121212121212121212121212");
-		}
-
-		String testString = testBuf.toString();
-		String resString = new String(StreamUtils.readStream(new ByteArrayInputStream(testString.getBytes())));
-		
-		assertEquals(testString, resString);
-	}
-}
+/*
+ * 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.util;
+
+import java.io.ByteArrayInputStream;
+
+import junit.framework.TestCase;
+
+import org.jboss.internal.soa.esb.util.StreamUtils;
+
+/**
+ * StreamUtils unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class StreamUtilsUnitTest extends TestCase {
+
+	public void test_readStream_badargs() {
+		try {
+			StreamUtils.readStream(null);
+			fail("expected IllegalArgumentException");
+		} catch(IllegalArgumentException e) {
+			// expected
+		}
+	}
+	
+	public void test_readStream() {
+		StringBuffer testBuf = new StringBuffer(500);
+		@SuppressWarnings("unused")
+		byte[] resStream;
+		
+		while(testBuf.length() < 500) {
+			testBuf.append("12121212121212121212121212121212121212121212121212");
+		}
+
+		String testString = testBuf.toString();
+		String resString = new String(StreamUtils.readStream(new ByteArrayInputStream(testString.getBytes())));
+		
+		assertEquals(testString, resString);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,113 +1,113 @@
-/*
- * 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.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Properties;
-
-import junit.framework.TestCase;
-
-/**
- * Util unit tests.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class UtilUnitTest extends TestCase {
-
-	public void testDumpSysProps() throws IOException 
-	{
-		ByteArrayOutputStream buf = new ByteArrayOutputStream();
-		
-		Util.dumpSysProps(new PrintStream(buf));
-		
-		Properties props = new Properties();
-		String env = buf.toString();
-		//escape backslashes to fix running under cygwin
-		env = env.replaceAll("\\\\", "\\\\\\\\");
-		props.load(new ByteArrayInputStream(env.getBytes()));
-		
-		// Just make sure that something was dumped to the printstream
-		// by checking for a property we know will be in the System...
-		assertTrue(props.containsKey("file.separator"));
-	}
-
-	public void testIsNullString() {
-		assertTrue(Util.isNullString(null));
-		assertTrue(Util.isNullString(""));
-		assertTrue(Util.isNullString(" "));
-		assertTrue(!Util.isNullString("a"));
-	}
-
-	public void testIsLong() {
-		assertTrue(!Util.isLong(null));
-		assertTrue(!Util.isLong(""));
-		assertTrue(!Util.isLong(" "));
-		assertTrue(!Util.isLong("a"));
-		assertTrue(!Util.isLong(" 1"));
-		assertTrue(!Util.isLong("1 "));
-		assertTrue(!Util.isLong("1.1"));
-		assertTrue(Util.isLong("1"));
-		assertTrue(Util.isLong("-1"));
-	}
-
-	public void testIsPositiveLong() {
-		assertTrue(!Util.isPositiveLong(null));
-		assertTrue(!Util.isPositiveLong(""));
-		assertTrue(!Util.isPositiveLong(" "));
-		assertTrue(!Util.isPositiveLong("a"));
-		assertTrue(!Util.isPositiveLong(" 1"));
-		assertTrue(!Util.isPositiveLong("1 "));
-		assertTrue(!Util.isPositiveLong("1.1"));
-		assertTrue(Util.isPositiveLong("1"));
-		assertTrue(!Util.isPositiveLong("0"));
-		assertTrue(!Util.isPositiveLong("-1"));
-	}
-
-	public void testParseInt() {
-		assertEquals(0, Util.parseInt("a"));
-		assertEquals(0, Util.parseInt(""));
-		assertEquals(0, Util.parseInt(" "));
-		assertEquals(0, Util.parseInt(" 1"));
-		assertEquals(0, Util.parseInt("1 "));
-		assertEquals(0, Util.parseInt("0"));
-		assertEquals(1, Util.parseInt("1"));
-		assertEquals(-1, Util.parseInt("-1"));
-	}
-
-	public void testParseLong() {
-		assertEquals(0L, Util.parseLong("a"));
-		assertEquals(0L, Util.parseLong(""));
-		assertEquals(0L, Util.parseLong(" "));
-		assertEquals(0L, Util.parseLong(" 1"));
-		assertEquals(0L, Util.parseLong("1 "));
-		assertEquals(0L, Util.parseLong("0"));
-		assertEquals(1L, Util.parseLong("1"));
-		assertEquals(-1L, Util.parseLong("-1"));
-	}
-
-	public void testGetDefaultLogger() {
-		// Cheating here - just getting the coverage results up a little more :-)
-		Util.getDefaultLogger(Util.class);
-	}
-}
+/*
+ * 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.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+/**
+ * Util unit tests.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class UtilUnitTest extends TestCase {
+
+	public void testDumpSysProps() throws IOException 
+	{
+		ByteArrayOutputStream buf = new ByteArrayOutputStream();
+		
+		Util.dumpSysProps(new PrintStream(buf));
+		
+		Properties props = new Properties();
+		String env = buf.toString();
+		//escape backslashes to fix running under cygwin
+		env = env.replaceAll("\\\\", "\\\\\\\\");
+		props.load(new ByteArrayInputStream(env.getBytes()));
+		
+		// Just make sure that something was dumped to the printstream
+		// by checking for a property we know will be in the System...
+		assertTrue(props.containsKey("file.separator"));
+	}
+
+	public void testIsNullString() {
+		assertTrue(Util.isNullString(null));
+		assertTrue(Util.isNullString(""));
+		assertTrue(Util.isNullString(" "));
+		assertTrue(!Util.isNullString("a"));
+	}
+
+	public void testIsLong() {
+		assertTrue(!Util.isLong(null));
+		assertTrue(!Util.isLong(""));
+		assertTrue(!Util.isLong(" "));
+		assertTrue(!Util.isLong("a"));
+		assertTrue(!Util.isLong(" 1"));
+		assertTrue(!Util.isLong("1 "));
+		assertTrue(!Util.isLong("1.1"));
+		assertTrue(Util.isLong("1"));
+		assertTrue(Util.isLong("-1"));
+	}
+
+	public void testIsPositiveLong() {
+		assertTrue(!Util.isPositiveLong(null));
+		assertTrue(!Util.isPositiveLong(""));
+		assertTrue(!Util.isPositiveLong(" "));
+		assertTrue(!Util.isPositiveLong("a"));
+		assertTrue(!Util.isPositiveLong(" 1"));
+		assertTrue(!Util.isPositiveLong("1 "));
+		assertTrue(!Util.isPositiveLong("1.1"));
+		assertTrue(Util.isPositiveLong("1"));
+		assertTrue(!Util.isPositiveLong("0"));
+		assertTrue(!Util.isPositiveLong("-1"));
+	}
+
+	public void testParseInt() {
+		assertEquals(0, Util.parseInt("a"));
+		assertEquals(0, Util.parseInt(""));
+		assertEquals(0, Util.parseInt(" "));
+		assertEquals(0, Util.parseInt(" 1"));
+		assertEquals(0, Util.parseInt("1 "));
+		assertEquals(0, Util.parseInt("0"));
+		assertEquals(1, Util.parseInt("1"));
+		assertEquals(-1, Util.parseInt("-1"));
+	}
+
+	public void testParseLong() {
+		assertEquals(0L, Util.parseLong("a"));
+		assertEquals(0L, Util.parseLong(""));
+		assertEquals(0L, Util.parseLong(" "));
+		assertEquals(0L, Util.parseLong(" 1"));
+		assertEquals(0L, Util.parseLong("1 "));
+		assertEquals(0L, Util.parseLong("0"));
+		assertEquals(1L, Util.parseLong("1"));
+		assertEquals(-1L, Util.parseLong("-1"));
+	}
+
+	public void testGetDefaultLogger() {
+		// Cheating here - just getting the coverage results up a little more :-)
+		Util.getDefaultLogger(Util.class);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/services/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,129 +1,129 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<project name="JbossEsbServices" default="org.jboss.esb.services.compile" basedir=".">
-
-	<property name="org.jboss.esb.internal.dest" location="../../build"/>
-		
-    <property name="org.jboss.esb.services.name.jar" value="${ant.project.name}.jar"/>
-	<property name="org.jboss.esb.services.dist.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
-    <property name="org.jboss.esb.services.appl.dir" location="../.."/>
-    <property name="org.jboss.esb.services.metainf.dir" location="src/META-INF"/>
-
-	<property name="org.jboss.esb.services.classes.dir" location="${org.jboss.esb.internal.dest}/classes/services"/>
-	<property name="org.jboss.esb.services.src.dir" location="src"/>
-	<property name="org.jboss.esb.services.rules.dir" location="rules"/>
-	<property name="org.jboss.esb.root.dir" location="../.."/>
-	<property environment="env"/>
-
-	<property name="org.jboss.esb.ext.serverlib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
-	<condition property="org.jboss.esb.ext.serverlib.dir" value="${org.jboss.esb.jboss.home}/server/all/lib">
-		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
-	</condition>
-	
-	<property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
-	<condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/lib">
-		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
-	</condition>
-	
-	    <!-- =================================================================== -->
-	    <!-- Define the class path                                               -->
-	    <!-- =================================================================== -->
-	    <path id="org.jboss.esb.services.base.classpath">
-	        <fileset dir="${org.jboss.esb.ext.lib.dir}"  includes="*.jar" excludes="jbossall-client.jar"/>
-	    	<pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
-	    </path>
-
-	    <!-- =================================================================== -->
-	    <!-- Initialize                                                          -->
-	    <!-- =================================================================== -->
-	    <target name="org.jboss.esb.services.init">
-	        <tstamp>
-	            <format property="TODAY" pattern="dd-MM-yy"/>
-	        </tstamp>
-	    </target>
-
-	    <!-- =================================================================== -->
-	    <!-- Prepares the directory structure                                    -->
-	    <!-- =================================================================== -->
-	    <target name="org.jboss.esb.services.prepare" depends="org.jboss.esb.services.init">
-	        <mkdir dir="${org.jboss.esb.services.classes.dir}"/>
-	    </target>
-
-	    <!-- =================================================================== -->
-	    <!-- Compiles all the classes                                            -->
-	    <!-- =================================================================== -->
-
-        <target name="org.jboss.esb.services.compile">
-            <!-- Compile services -->
-            <antcall target="org.jboss.esb.services.internal.compile"/>
-            <!-- Compile services tests -->
-            <ant inheritAll="true" dir="tests" target="org.jboss.esb.services.tests.compile"/>
-        </target>
-
-        <target name="org.jboss.esb.services.internal.compile" depends="org.jboss.esb.services.prepare"
-	        description="Compile all classes">
-
-	        <javac
-	            destdir="${org.jboss.esb.services.classes.dir}"
-	            classpathref="org.jboss.esb.services.default.classpath"
-	            debug="${org.jboss.esb.debug}"
-	            optimize="${org.jboss.esb.optimize}"
-	            >
-	            <src path="${org.jboss.esb.services.src.dir}"/>
-	        </javac>
-
-	    </target>
-
-	    <!-- =================================================================== -->
-	    <!-- Recompiles all the classes                                            -->
-	    <!-- =================================================================== -->
-
-	    <target name="recompile" depends="clean,org.jboss.esb.services.compile"
-	        description="Clean and compile"/>
-
-	    <!-- =================================================================== -->
-	    <!-- Clean                                                               -->
-	    <!-- =================================================================== -->
-	    <target name="clean" description="Remove classes directory">
-			<ant dir="tests" target="clean"/>
-			<delete dir="${org.jboss.esb.services.classes.dir}"/>
-	    </target>
-	
-	    <!-- =================================================================== -->
-	    <!-- Rebuild everything from scratch                                     -->
-	    <!-- =================================================================== -->
-	    <target name="all" depends="recompile,jar" />
-	
-    <path id="org.jboss.esb.services.default.classpath">
-        <path refid="org.jboss.esb.services.base.classpath"/>
-		<pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
-    	<pathelement location="${org.jboss.esb.internal.dest}/classes/listeners"/>
-    </path>
-
-    <!-- =================================================================== -->
-    <!-- Jar                                                               -->
-    <!-- =================================================================== -->
-    <target name="jar" description="Assemble jar files"
-    	depends="org.jboss.esb.services.compile"
-	>
-        <jar    destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-services.jar"
-                basedir="${org.jboss.esb.services.classes.dir}"
-                includes="**/*.class"
-                />
-    	<jar    destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-rules.jar"
-    	                basedir="${org.jboss.esb.services.rules.dir}"
-    	                includes="**/*.drl,**/*.dsl"
-    	                />
-
-    </target>
-
-    <!-- =================================================================== -->
-    <!-- Test                                                               -->
-    <!-- =================================================================== -->
-    <target name="org.jboss.esb.services.test" description="Run tests for this module, excluding integration">
-        <!-- Compile tests -->
-        <ant dir="tests" target="org.jboss.esb.services.internal.test"/>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project name="JbossEsbServices" default="org.jboss.esb.services.compile" basedir=".">
+
+	<property name="org.jboss.esb.internal.dest" location="../../build"/>
+		
+    <property name="org.jboss.esb.services.name.jar" value="${ant.project.name}.jar"/>
+	<property name="org.jboss.esb.services.dist.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
+    <property name="org.jboss.esb.services.appl.dir" location="../.."/>
+    <property name="org.jboss.esb.services.metainf.dir" location="src/META-INF"/>
+
+	<property name="org.jboss.esb.services.classes.dir" location="${org.jboss.esb.internal.dest}/classes/services"/>
+	<property name="org.jboss.esb.services.src.dir" location="src"/>
+	<property name="org.jboss.esb.services.rules.dir" location="rules"/>
+	<property name="org.jboss.esb.root.dir" location="../.."/>
+	<property environment="env"/>
+
+	<property name="org.jboss.esb.ext.serverlib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
+	<condition property="org.jboss.esb.ext.serverlib.dir" value="${org.jboss.esb.jboss.home}/server/all/lib">
+		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+	</condition>
+	
+	<property name="org.jboss.esb.ext.lib.dir" location="${org.jboss.esb.root.dir}/lib/ext"/>
+	<condition property="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.jboss.home}/lib">
+		<equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+	</condition>
+	
+	    <!-- =================================================================== -->
+	    <!-- Define the class path                                               -->
+	    <!-- =================================================================== -->
+	    <path id="org.jboss.esb.services.base.classpath">
+	        <fileset dir="${org.jboss.esb.ext.lib.dir}"  includes="*.jar" excludes="jbossall-client.jar"/>
+	    	<pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
+	    </path>
+
+	    <!-- =================================================================== -->
+	    <!-- Initialize                                                          -->
+	    <!-- =================================================================== -->
+	    <target name="org.jboss.esb.services.init">
+	        <tstamp>
+	            <format property="TODAY" pattern="dd-MM-yy"/>
+	        </tstamp>
+	    </target>
+
+	    <!-- =================================================================== -->
+	    <!-- Prepares the directory structure                                    -->
+	    <!-- =================================================================== -->
+	    <target name="org.jboss.esb.services.prepare" depends="org.jboss.esb.services.init">
+	        <mkdir dir="${org.jboss.esb.services.classes.dir}"/>
+	    </target>
+
+	    <!-- =================================================================== -->
+	    <!-- Compiles all the classes                                            -->
+	    <!-- =================================================================== -->
+
+        <target name="org.jboss.esb.services.compile">
+            <!-- Compile services -->
+            <antcall target="org.jboss.esb.services.internal.compile"/>
+            <!-- Compile services tests -->
+            <ant inheritAll="true" dir="tests" target="org.jboss.esb.services.tests.compile"/>
+        </target>
+
+        <target name="org.jboss.esb.services.internal.compile" depends="org.jboss.esb.services.prepare"
+	        description="Compile all classes">
+
+	        <javac
+	            destdir="${org.jboss.esb.services.classes.dir}"
+	            classpathref="org.jboss.esb.services.default.classpath"
+	            debug="${org.jboss.esb.debug}"
+	            optimize="${org.jboss.esb.optimize}"
+	            >
+	            <src path="${org.jboss.esb.services.src.dir}"/>
+	        </javac>
+
+	    </target>
+
+	    <!-- =================================================================== -->
+	    <!-- Recompiles all the classes                                            -->
+	    <!-- =================================================================== -->
+
+	    <target name="recompile" depends="clean,org.jboss.esb.services.compile"
+	        description="Clean and compile"/>
+
+	    <!-- =================================================================== -->
+	    <!-- Clean                                                               -->
+	    <!-- =================================================================== -->
+	    <target name="clean" description="Remove classes directory">
+			<ant dir="tests" target="clean"/>
+			<delete dir="${org.jboss.esb.services.classes.dir}"/>
+	    </target>
+	
+	    <!-- =================================================================== -->
+	    <!-- Rebuild everything from scratch                                     -->
+	    <!-- =================================================================== -->
+	    <target name="all" depends="recompile,jar" />
+	
+    <path id="org.jboss.esb.services.default.classpath">
+        <path refid="org.jboss.esb.services.base.classpath"/>
+		<pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
+    	<pathelement location="${org.jboss.esb.internal.dest}/classes/listeners"/>
+    </path>
+
+    <!-- =================================================================== -->
+    <!-- Jar                                                               -->
+    <!-- =================================================================== -->
+    <target name="jar" description="Assemble jar files"
+    	depends="org.jboss.esb.services.compile"
+	>
+        <jar    destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-services.jar"
+                basedir="${org.jboss.esb.services.classes.dir}"
+                includes="**/*.class"
+                />
+    	<jar    destfile="${org.jboss.esb.services.dist.dir}/lib/jbossesb-rules.jar"
+    	                basedir="${org.jboss.esb.services.rules.dir}"
+    	                includes="**/*.drl,**/*.dsl"
+    	                />
+
     </target>
+
+    <!-- =================================================================== -->
+    <!-- Test                                                               -->
+    <!-- =================================================================== -->
+    <target name="org.jboss.esb.services.test" description="Run tests for this module, excluding integration">
+        <!-- Compile tests -->
+        <ant dir="tests" target="org.jboss.esb.services.internal.test"/>
+    </target>
 	
 	<!-- =================================================================== -->
 	    <!-- Integration Test                                                               -->
@@ -131,6 +131,6 @@
 	    <target name="org.jboss.esb.services.integration.test" description="Run all tests for this module">
 	        <!-- Compile tests -->
 	        <ant dir="tests" target="org.jboss.esb.services.internal.integration.test"/>
-	    </target>
-
-</project>
+	    </target>
+
+</project>


Property changes on: labs/jbossesb/trunk/product/core/services/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/MessageStoreFactoryImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/MessageStorePlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/db/DBConnectionManager.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/db/DBConnectionManagerDBCP.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStorePlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,671 +1,671 @@
-/*
-* 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.internal.soa.esb.services.registry;
-
-import java.net.PasswordAuthentication;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.xml.registry.BulkResponse;
-import javax.xml.registry.BusinessLifeCycleManager;
-import javax.xml.registry.BusinessQueryManager;
-import javax.xml.registry.Connection;
-import javax.xml.registry.ConnectionFactory;
-import javax.xml.registry.FindQualifier;
-import javax.xml.registry.JAXRException;
-import javax.xml.registry.JAXRResponse;
-import javax.xml.registry.RegistryService;
-import javax.xml.registry.infomodel.EmailAddress;
-import javax.xml.registry.infomodel.Key;
-import javax.xml.registry.infomodel.Organization;
-import javax.xml.registry.infomodel.PersonName;
-import javax.xml.registry.infomodel.PostalAddress;
-import javax.xml.registry.infomodel.RegistryObject;
-import javax.xml.registry.infomodel.Service;
-import javax.xml.registry.infomodel.ServiceBinding;
-import javax.xml.registry.infomodel.TelephoneNumber;
-import javax.xml.registry.infomodel.User;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.services.registry.Registry;
-import org.jboss.soa.esb.services.registry.RegistryException;
-/**
- * Utility class for the Registry.
- * If need be we can extract the interface from here, add a factory and have JAXR as a plugin, allowing
- * for other RegistryAPIs.
- *
- * @author Kurt Stam
- */
-public class JAXRRegistryImpl implements Registry
-{
-	private static Logger logger = Logger.getLogger(JAXRRegistryImpl.class);
-	public static Set<PasswordAuthentication> creds = new HashSet<PasswordAuthentication>();
-	private static Properties props = new Properties();
-	private static Organization jbossESBOrganization;
-	
-	private synchronized static void init() 
-	{
-	    props = new Properties();
-	    props.setProperty("javax.xml.registry.queryManagerURL", Configuration.getRegistryQueryManageURI());
-	    props.setProperty("javax.xml.registry.lifeCycleManagerURL", Configuration.getRegistryLifecycleManagerURI());
-	    props.setProperty("javax.xml.registry.factoryClass", Configuration.getRegistryFactoryClass());
-	    props.setProperty("scout.proxy.transportClass", Configuration.getRegistryScoutTransportClass());
-	    String user = Configuration.getRegistryUser();
-	    String password = Configuration.getRegistryPassword();
-	    PasswordAuthentication passwdAuth = new PasswordAuthentication(user, password.toCharArray());
-        creds.add(passwdAuth);
-	}
-
-	/** 
-	 * Creates a connecton to a JAXR capable registy.
-	 * 
-	 * @return Connection to a Registry using JAXR. 
-	 */
-	protected synchronized static Connection getConnection() 
-	{
-		Connection connection = null;
-		init();
-	    try
-	    {   // Create the connection, passing it the configuration properties
-	        ConnectionFactory factory = ConnectionFactory.newInstance();
-	        factory.setProperties(props);
-	        connection = factory.createConnection();
-	    } catch (JAXRException e) {
-	        logger.log(Priority.ERROR, "Could not set up a connection to the Registry. " + e.getMessage(), e);
-	    }
-	    return connection;
-	}
-	/**
-	 * Closes the connection to the Registry
-	 */
-	protected synchronized static void closeConnection(Connection connection)
-	{
-		try {
-			if (connection!=null && !connection.isClosed()) {
-				connection.close();
-			}
-		} catch (JAXRException je) {
-			logger.log(Priority.ERROR, je.getMessage(), je);
-		}
-	}
-	/** 
-	 * Publish an EPR to the Registry
-	 */
-	protected Service registerService(String category, String serviceName, String serviceDescription) throws JAXRException 
-	{
-		Service service =null;
-		Organization organization = getJBossESBOrganization();
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			connection.setCredentials(JAXRRegistryImpl.creds);
-			RegistryService rs = connection.getRegistryService();
-			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
-		    //Adding the category as prefix for the name
-			service = blm.createService(blm.createInternationalString(category + ":" + serviceName));
-			service.setDescription(blm.createInternationalString(serviceDescription));
-//			ClassificationScheme cScheme = getClassificationScheme(blm, "uddi-org:general_keywords", "");
-//			Classification classification = blm.createClassification(cScheme, "JBossESB" + category, category);
-//			service.addClassification(classification);
-			organization.addService(service);
-			saveRegistryObject(service);
-		} finally {
-			closeConnection(connection);
-		}
-		return service;
-	}
-	/** 
-	 * Remove an EPR from the Registry
-	 */
-	public void unRegisterService(String category, String serviceName) throws RegistryException{
-		try {
-			Organization organization = getJBossESBOrganization();
-			for (Iterator i=organization.getServices().iterator(); i.hasNext();) {
-				Service service = (Service) i.next();
-				if (service.getName().getValue().equals(category + ":" + serviceName)) {
-					organization.removeService(service);
-					saveRegistryObject(organization);
-					return;
-				}
-			}
-		} catch (JAXRException je) {
-			throw new RegistryException(je.getLocalizedMessage(), je);
-		}
-	}
-	/** 
-	 * Publish an EPR to the Registry
-	 */
-	public void registerEPR(String category, String serviceName, String serviceDescription, EPR epr, String eprDescription) 
-		throws RegistryException
-	{
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			//Find the service
-
-			Service service = findService(category,serviceName);
-			if (service==null) {
-				logger.log(Priority.DEBUG, "Service " + serviceName + " does not yet exist, creating now..");
-				service = registerService(category, serviceName, serviceDescription);
-			}
-
-			connection.setCredentials(JAXRRegistryImpl.creds);
-			RegistryService rs = connection.getRegistryService();
-			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
-//			BusinessQueryManager bqm = rs.getBusinessQueryManager();
-			ServiceBinding serviceBinding = blm.createServiceBinding();
-			serviceBinding.setDescription(blm.createInternationalString(eprDescription));
-			String xml = EPRHelper.toXMLString(epr);
-			serviceBinding.setAccessURI(URLEncoder.encode(xml,"UTF-8"));
-
-//			The following code would store the EPR xml as an ExtrinsicObject, but scout does not
-//          have an implementation for it.
-//			DataHandler repositoryItem = new DataHandler(xml,"text/xml");
-//			ExtrinsicObject eo = blm.createExtrinsicObject(repositoryItem);
-//			eo.setName(blm.createInternationalString("EPR"));
-//			eo.setMimeType("text/xml");
-//			String conceptId = "urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExtrinsicObject:XML";
-//			Concept objectTypeConcept = (Concept) bqm.getRegistryObject(conceptId);
-//				((ExtrinsicObjectImpl)eo).setObjectType(objectTypeConcept); 
-			
-//			Concept specConcept = blm.createConcept(null, "HelloConcept", "");
-//			String schemeName = "uddi-org:types";
-//			ClassificationScheme uddiOrgTypes =
-//			     bqm.findClassificationSchemeByName(null, schemeName);
-//			Classification wsdlSpecClassification = 
-//			     blm.createClassification(uddiOrgTypes,
-//			       "eprSpec", xml);
-//			   specConcept.addClassification(wsdlSpecClassification);
-//			Collection<Concept> concepts = new ArrayList<Concept>();
-//			concepts.add(specConcept);
-//			BulkResponse br=blm.saveConcepts(concepts);
-//			Key conceptKey = null;
-//			if (br.getStatus() == JAXRResponse.STATUS_SUCCESS) {
-//				Collection keys = br.getCollection();
-//				for (Iterator i=keys.iterator();i.hasNext();){
-//					conceptKey = (Key) i.next();
-//					break;
-//				}
-//			} else {
-//				throw new RegistryException("Could not save the EPR as Concept");
-//			}
-//			//now adding this concept to the binding
-//			Concept specificationConcept = (Concept) bqm.getRegistryObject(conceptKey.getId(), LifeCycleManager.CONCEPT);
-//			SpecificationLink specificationLink = blm.createSpecificationLink();
-//			specificationLink.setSpecificationObject(specificationConcept);
-//			serviceBinding.addSpecificationLink(specificationLink);
-		
-		    ArrayList<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
-		    serviceBindings.add(serviceBinding);
-		    service.addServiceBindings(serviceBindings);
-			saveRegistryObject(serviceBinding);
-		} catch (Exception je) {
-			throw new RegistryException(je.getLocalizedMessage(), je);
-		} finally {
-			closeConnection(connection);
-		}
-	}
-	/** 
-	 * Remove an EPR from the Registry
-	 */
-	public void unRegisterEPR(String category, String serviceName, EPR toBeDeletedEPR) throws RegistryException{
-		//first find the ServiceBindings for this service
-		try {
-			Service service = findService(category, serviceName);
-			Collection serviceBindings = findServiceBindings(service);
-			service.addServiceBindings(serviceBindings);
-			for (Iterator i=serviceBindings.iterator();i.hasNext();){
-				ServiceBinding serviceBinding = (ServiceBinding) i.next();
-				String xml = URLDecoder.decode(serviceBinding.getAccessURI(), "UTF-8");
-				if (xml.equals(EPRHelper.toXMLString(toBeDeletedEPR))) {
-					service.removeServiceBinding(serviceBinding);
-					i.remove();
-					service.setProvidingOrganization(getJBossESBOrganization());
-					saveRegistryObject(service);
-					//adding the other bindings back in. Workaround for this scout bug.
-					for (Iterator j=service.getServiceBindings().iterator();j.hasNext();){
-						serviceBinding = (ServiceBinding) j.next();
-						serviceBinding.setKey(null);
-						saveRegistryObject(serviceBinding);
-					}
-					return;
-				}
-			}
-			//We should not end up here or else we did not match any EPRs
-			throw new RegistryException("No such EPR found for service with name = " 
-					+ serviceName + " and EPR=" + toBeDeletedEPR);
-		} catch (Exception je) {
-			throw new RegistryException(je.getLocalizedMessage(), je);
-		}
-	}
-	
-	/** 
-	 * {@inheritDoc}
-	 * @return collection services
-	 */
-	public Collection<String> findAllServices() throws RegistryException
-	{
-		Collection<String> serviceNames = new ArrayList<String>();
-		try {
-			Collection services = getJBossESBOrganization().getServices();
-			for (Iterator i=services.iterator();i.hasNext();) {
-				String serviceName = ((Service)i.next()).getName().getValue();
-				serviceNames.add(serviceName);
-			}
-		} catch (JAXRException je) {
-			throw new RegistryException(je.getLocalizedMessage(), je);
-		}
-		return serviceNames;
-	}
-	/**
-	 * Find Services based on a category ("transformation").
-	 * 
-	 * @param serviceType
-	 * @return collection services
-	 */
-	public Collection<String> findServices(String category) throws RegistryException
-	{
-		Collection<String>serviceNames = new ArrayList<String>();
-		try {
-			Collection<Service>services = findServicesForCategory(category);
-			for (Iterator<Service> i=services.iterator();i.hasNext();) {
-				String serviceName = i.next().getName().getValue();
-				serviceNames.add(serviceName);
-			}
-		} catch (JAXRException je) {
-			throw new RegistryException(je.getLocalizedMessage(), je);
-		}
-		return serviceNames;
-	}
-	/**
-	 * 
-	 * @param service
-	 * @return
-	 */
-	public Collection<EPR> findEPRs(String category, String serviceName) throws RegistryException
-	{
-		Collection<EPR> eprs = new ArrayList<EPR>();
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			Service service = findService(category, serviceName);
-			if (service==null){
-				throw new RegistryException("Could not find service with category=" + category + " and serviceName=" + serviceName);
-			}
-			// Get registry service and business query manager
-			Collection<ServiceBinding> serviceBindings = findServiceBindings(service);
-			//Converting them to EPRs
-			for (Iterator i=serviceBindings.iterator();i.hasNext();) {
-				ServiceBinding serviceBinding = (ServiceBinding) i.next();
-				@SuppressWarnings("unused")
-				String eprXML = URLDecoder.decode(serviceBinding.getAccessURI(),"UTF-8");
-				EPR epr = EPRHelper.fromXMLString(eprXML);
-				eprs.add(epr);
-			}
-		} catch (Exception je) {
-			throw new RegistryException(je.getLocalizedMessage(), je);
-		} finally {
-			closeConnection(connection);
-		}
-		return eprs;
-	}
-	/**
-	 * 
-	 * @param service
-	 * @return
-	 */
-	public EPR findEPR(String category, String serviceName) throws RegistryException
-	{
-		EPR epr = null;
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			Service service = findService(category, serviceName);
-			if (service==null){
-				throw new RegistryException("Could not find service with category=" + category + " and serviceName=" + serviceName);
-			}
-			// Get registry service and business query manager
-			Collection<ServiceBinding> serviceBindings = findServiceBindings(service);
-			if (serviceBindings.iterator().hasNext()) {
-				ServiceBinding serviceBinding = (ServiceBinding) serviceBindings.iterator().next();
-				String eprXML = URLDecoder.decode(serviceBinding.getAccessURI(),"UTF-8");
-				epr = EPRHelper.fromXMLString(eprXML);
-			}
-		} catch (Exception je) {
-			throw new RegistryException(je.getLocalizedMessage(), je);
-		} finally {
-			closeConnection(connection);
-		}
-		return epr;
-	}
-	/**
-	 * Find all Organizations with a name mathing the queryString parameter.
-	 * 
-	 * @param organizationName used to match with the name of the organization.
-	 * @return the Organization.
-	 */
-	protected synchronized static Organization findOrganization(String organizationName) throws JAXRException
-	{
-	    if (organizationName==null) {
-	    	organizationName="";
-	    }
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			// Get registry service and business query manager
-			RegistryService rs = connection.getRegistryService();
-			BusinessQueryManager bqm = rs.getBusinessQueryManager();
-			// Define find qualifiers and name patterns
-			Collection<String> findQualifiers = new ArrayList<String>();
-			findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
-			Collection<String> namePatterns = new ArrayList<String>();
-			namePatterns.add("%" + organizationName + "%");
-	        //Find based upon qualifier type and values
-			logger.log(Priority.DEBUG,"Going to query the registry for name pattern " + namePatterns);
-			BulkResponse response = bqm.findOrganizations(findQualifiers,
-					namePatterns, null, null, null, null);
-			if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
-				for (Iterator orgIter = response.getCollection().iterator(); orgIter.hasNext();) 
-				{
-					Organization org = (Organization) orgIter.next();
-					logger.log(Priority.DEBUG, "Organization name: " + org.getName().getValue());
-					logger.log(Priority.DEBUG, "Description: " + org.getDescription().getValue());
-					logger.log(Priority.DEBUG, "Key id: " + org.getKey().getId());
-					User primaryContact = org.getPrimaryContact();
-					logger.log(Priority.DEBUG, "Primary Contact: " + primaryContact.getPersonName().getFullName());
-					if (orgIter.hasNext()) {
-						logger.log(Priority.ERROR, "Found " + response.getCollection().size() 
-								+ " Organization, while expecting only one of name " + organizationName);
-					}
-					return org;
-				}
-			}
-			return null;
-		} finally {
-			closeConnection(connection);
-		}
-	}
-	/**
-	 * 
-	 * @param category
-	 * @param serviceName
-	 * @return Service
-	 */
-	protected synchronized static Service findService(String category, String serviceName) throws JAXRException
-	{
-		if (category==null) {
-			category="";
-		}
-		if (serviceName==null) {
-			serviceName="";
-		}
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			// Get registry service and business query manager
-			RegistryService rs = connection.getRegistryService();
-			BusinessQueryManager bqm = rs.getBusinessQueryManager();
-			// Define find qualifiers and name patterns
-			Collection<String> findQualifiers = new ArrayList<String>();
-			findQualifiers.add(FindQualifier.AND_ALL_KEYS);
-			findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
-			Collection<String> namePatterns = new ArrayList<String>();
-			namePatterns.add(category);
-			namePatterns.add(serviceName);
-	        //Find based upon qualifier type and values
-			logger.log(Priority.DEBUG, "Going to query the registry for name pattern " + namePatterns);
-			BulkResponse response = bqm.findServices(null, findQualifiers,
-					namePatterns, null, null);
-			if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
-				for (Iterator servIter = response.getCollection().iterator(); servIter.hasNext();) 
-				{
-					Service service = (Service) servIter.next();
-					logger.log(Priority.DEBUG, "Service name: " + service.getName().getValue());
-					if (service.getDescription()!=null) {
-						logger.log(Priority.DEBUG, "Description: " + service.getDescription().getValue());
-					}
-					logger.log(Priority.DEBUG, "Key id: " + service.getKey().getId());
-					if (servIter.hasNext()) {
-						logger.log(Priority.ERROR, "Found " + response.getCollection().size() 
-								+ " Services, while expecting only one by the name of " 
-								+ serviceName + " in category " + category);
-					}
-					return service;
-				}
-			}
-			return null;
-		} finally {
-			closeConnection(connection);
-		}
-	}
-	/**
-	 * Finds all services for a given category.
-	 * @param category
-	 * @param serviceName
-	 * @return Service
-	 */
-	@SuppressWarnings("unchecked")
-	protected synchronized static Collection<Service> findServicesForCategory(String category) throws JAXRException
-	{
-		Collection<Service> services = new ArrayList<Service>();
-		if (category==null) {
-			category="";
-		}
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			// Get registry service and business query manager
-			RegistryService rs = connection.getRegistryService();
-			BusinessQueryManager bqm = rs.getBusinessQueryManager();
-			// Define find qualifiers and name patterns
-			Collection<String> findQualifiers = new ArrayList<String>();
-			findQualifiers.add(FindQualifier.AND_ALL_KEYS);
-			findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
-			Collection<String> namePatterns = new ArrayList<String>();
-			namePatterns.add(category);
-	        //Find based upon qualifier type and values
-			logger.log(Priority.DEBUG, "Going to query the registry for name pattern " + namePatterns);
-			BulkResponse response = bqm.findServices(null, findQualifiers,
-					namePatterns, null, null);
-			if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
-				services = response.getCollection();
-			}
-			return services;
-		} finally {
-			closeConnection(connection);
-		}
-	}
-	/**
-	 * Create a jbossesb organization under which we will register all our services.
-	 * 
-	 * @param blm
-	 * @return
-	 * @throws JAXRException
-	 */
-	protected synchronized static Organization createJBossESBOrganization()
-			throws JAXRException 
-	{
-//		Getting the connection to the Registry (reading config)
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			//Logging in
-			connection.setCredentials(JAXRRegistryImpl.creds);
-			RegistryService rs = connection.getRegistryService();
-			//Building organization
-			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
-			Organization organization = blm.createOrganization(blm.createInternationalString("Red Hat/JBossESB"));
-				organization.setDescription(blm.createInternationalString("Red Hat/JBoss Professional Open Source, Services for the JBossESB"));
-
-			User user = blm.createUser();
-			organization.setPrimaryContact(user);
-			PersonName personName = blm.createPersonName("JBossESB");
-			TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
-			telephoneNumber.setNumber("404 467-8555");
-			telephoneNumber.setType(null);
-			PostalAddress address = blm.createPostalAddress("3340",
-					"Peachtree Road, NE, Suite 1200", "Atlanta", "GA", "USA",
-					"30326", "");
-			Collection<PostalAddress> postalAddresses = new ArrayList<PostalAddress>();
-			postalAddresses.add(address);
-			Collection<EmailAddress> emailAddresses = new ArrayList<EmailAddress>();
-			EmailAddress emailAddress = blm
-					.createEmailAddress("jbossesb at jboss.com");
-			emailAddresses.add(emailAddress);
-	
-			Collection<TelephoneNumber> numbers = new ArrayList<TelephoneNumber>();
-			numbers.add(telephoneNumber);
-			user.setPersonName(personName);
-			user.setPostalAddresses(postalAddresses);
-			user.setEmailAddresses(emailAddresses);
-			user.setTelephoneNumbers(numbers);
-	
-	//		Scout does not support this (yet), so leaving it out for now.
-	//		ClassificationScheme cScheme = getClassificationScheme(blm,
-	//				blm.createInternationalString("uddi-org:general_keywords"), blm.createInternationalString(""));
-	//		Classification classification = blm.createClassification(cScheme,
-	//				blm..createInternationalString("JBoss ESB"), blm..createInternationalString("JBESB"));
-	//		org.addClassification(classification);
-			
-			saveRegistryObject(organization);
-			return organization;
-		} finally {
-			closeConnection(connection);
-		}	
-	}
-	/**
-	 * Save Registry Object
-	 */
-	protected synchronized static void saveRegistryObject(RegistryObject registryObject) throws JAXRException
-	{
-//		Getting the connection to the Registry (reading config)
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			Collection<RegistryObject> registryObjects = new ArrayList<RegistryObject>();
-			BulkResponse br = null;
-			//Logging in
-			connection.setCredentials(JAXRRegistryImpl.creds);
-			RegistryService rs = connection.getRegistryService();
-			//Building organization
-			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
-			registryObjects.add(registryObject);
-			Class[] interfaces = registryObject.getClass().getInterfaces();
-			String interfaceName ="";
-			for (int i=0; i<interfaces.length; i++) {
-				interfaceName = interfaces[i].getName();
-				if (interfaceName.equals("javax.xml.registry.infomodel.Organization")) {
-					br = blm.saveOrganizations(registryObjects);
-					break;
-				} else if (interfaceName.equals("javax.xml.registry.infomodel.Service")) {
-					br = blm.saveServices(registryObjects);
-					break;
-				} else if (interfaceName.equals("javax.xml.registry.infomodel.ServiceBinding")) {
-					br = blm.saveServiceBindings(registryObjects);
-					break;
-				} else {
-					logger.log(Priority.ERROR, "Trying to save an unsupported RegistryObject");
-					throw new JAXRException("Trying to save an unsupported RegistryObject");
-				}
-			}
-            //Verify the return
-			if (br!=null && br.getStatus() == JAXRResponse.STATUS_SUCCESS) {
-				logger.log(Priority.DEBUG, interfaceName + " successfully saved");
-				Collection coll = br.getCollection();
-				Iterator iter = coll.iterator();
-				while (iter.hasNext()) {
-					Key key = (Key) iter.next();
-					registryObject.setKey(key);
-					logger.log(Priority.DEBUG, "Saved Key=" + key.getId());
-				}
-			} else {
-				logger.log(Priority.ERROR, "Errors occurred during save.");
-				if (br!=null) {
-					Collection exceptions = br.getExceptions();
-					Iterator iter = exceptions.iterator();
-					String errors = "";
-					JAXRException je = new JAXRException("JAXRExceptions occurred during save");
-					while (iter.hasNext()) {
-						Exception e = (Exception) iter.next();
-						errors += e.getLocalizedMessage() + "\n";
-						je.setStackTrace(e.getStackTrace());
-						logger.log(Priority.ERROR, e.getLocalizedMessage(), e);
-						//if it's the last error, throw it now and set the current stacktrace
-						if (!iter.hasNext()) {
-							throw new JAXRException(errors, e);
-						}
-					}
-					throw new JAXRException("Errors occurred during save. Response status=" + br.getStatus());
-				}
-				throw new JAXRException("Errors occurred during save");
-			}
-		} finally {
-			JAXRRegistryImpl.closeConnection(connection);
-		}	
-	}
-	/**
-	 * finds the JBossESB Organizationa and creates one if it is not there.
-	 * @return JBossESB Organization
-	 * @throws JAXRException
-	 */
-	private Organization getJBossESBOrganization() throws JAXRException
-	{
-		if (jbossESBOrganization==null) {
-			jbossESBOrganization = findOrganization("Red Hat/JBossESB");
-			if (jbossESBOrganization==null) {
-				jbossESBOrganization = createJBossESBOrganization();
-			}
-		}
-		return jbossESBOrganization;
-	}
-	/**
-	 * Find the ServiceBindings for a given Service
-	 * @param service
-	 * @return
-	 * @throws RegistryException
-	 */
-	@SuppressWarnings("unchecked")
-	private Collection<ServiceBinding> findServiceBindings(Service service) throws RegistryException
-	{
-		Collection<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			RegistryService rs = connection.getRegistryService();
-			BusinessQueryManager bqm = rs.getBusinessQueryManager();
-			Collection<String> findQualifiers = new ArrayList<String>();
-			findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
-			BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),findQualifiers,null,null);
-			if (bulkResponse.getStatus()==JAXRResponse.STATUS_SUCCESS){
-				serviceBindings = bulkResponse.getCollection();
-			}
-			return serviceBindings;
-		} catch (Exception je) {
-			throw new RegistryException(je.getLocalizedMessage(), je);
-		} finally {
-			closeConnection(connection);
-		}
-	}
-	
-}
-
-	
+/*
+* 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.internal.soa.esb.services.registry;
+
+import java.net.PasswordAuthentication;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.xml.registry.BulkResponse;
+import javax.xml.registry.BusinessLifeCycleManager;
+import javax.xml.registry.BusinessQueryManager;
+import javax.xml.registry.Connection;
+import javax.xml.registry.ConnectionFactory;
+import javax.xml.registry.FindQualifier;
+import javax.xml.registry.JAXRException;
+import javax.xml.registry.JAXRResponse;
+import javax.xml.registry.RegistryService;
+import javax.xml.registry.infomodel.EmailAddress;
+import javax.xml.registry.infomodel.Key;
+import javax.xml.registry.infomodel.Organization;
+import javax.xml.registry.infomodel.PersonName;
+import javax.xml.registry.infomodel.PostalAddress;
+import javax.xml.registry.infomodel.RegistryObject;
+import javax.xml.registry.infomodel.Service;
+import javax.xml.registry.infomodel.ServiceBinding;
+import javax.xml.registry.infomodel.TelephoneNumber;
+import javax.xml.registry.infomodel.User;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryException;
+/**
+ * Utility class for the Registry.
+ * If need be we can extract the interface from here, add a factory and have JAXR as a plugin, allowing
+ * for other RegistryAPIs.
+ *
+ * @author Kurt Stam
+ */
+public class JAXRRegistryImpl implements Registry
+{
+	private static Logger logger = Logger.getLogger(JAXRRegistryImpl.class);
+	public static Set<PasswordAuthentication> creds = new HashSet<PasswordAuthentication>();
+	private static Properties props = new Properties();
+	private static Organization jbossESBOrganization;
+	
+	private synchronized static void init() 
+	{
+	    props = new Properties();
+	    props.setProperty("javax.xml.registry.queryManagerURL", Configuration.getRegistryQueryManageURI());
+	    props.setProperty("javax.xml.registry.lifeCycleManagerURL", Configuration.getRegistryLifecycleManagerURI());
+	    props.setProperty("javax.xml.registry.factoryClass", Configuration.getRegistryFactoryClass());
+	    props.setProperty("scout.proxy.transportClass", Configuration.getRegistryScoutTransportClass());
+	    String user = Configuration.getRegistryUser();
+	    String password = Configuration.getRegistryPassword();
+	    PasswordAuthentication passwdAuth = new PasswordAuthentication(user, password.toCharArray());
+        creds.add(passwdAuth);
+	}
+
+	/** 
+	 * Creates a connecton to a JAXR capable registy.
+	 * 
+	 * @return Connection to a Registry using JAXR. 
+	 */
+	protected synchronized static Connection getConnection() 
+	{
+		Connection connection = null;
+		init();
+	    try
+	    {   // Create the connection, passing it the configuration properties
+	        ConnectionFactory factory = ConnectionFactory.newInstance();
+	        factory.setProperties(props);
+	        connection = factory.createConnection();
+	    } catch (JAXRException e) {
+	        logger.log(Priority.ERROR, "Could not set up a connection to the Registry. " + e.getMessage(), e);
+	    }
+	    return connection;
+	}
+	/**
+	 * Closes the connection to the Registry
+	 */
+	protected synchronized static void closeConnection(Connection connection)
+	{
+		try {
+			if (connection!=null && !connection.isClosed()) {
+				connection.close();
+			}
+		} catch (JAXRException je) {
+			logger.log(Priority.ERROR, je.getMessage(), je);
+		}
+	}
+	/** 
+	 * Publish an EPR to the Registry
+	 */
+	protected Service registerService(String category, String serviceName, String serviceDescription) throws JAXRException 
+	{
+		Service service =null;
+		Organization organization = getJBossESBOrganization();
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			connection.setCredentials(JAXRRegistryImpl.creds);
+			RegistryService rs = connection.getRegistryService();
+			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
+		    //Adding the category as prefix for the name
+			service = blm.createService(blm.createInternationalString(category + ":" + serviceName));
+			service.setDescription(blm.createInternationalString(serviceDescription));
+//			ClassificationScheme cScheme = getClassificationScheme(blm, "uddi-org:general_keywords", "");
+//			Classification classification = blm.createClassification(cScheme, "JBossESB" + category, category);
+//			service.addClassification(classification);
+			organization.addService(service);
+			saveRegistryObject(service);
+		} finally {
+			closeConnection(connection);
+		}
+		return service;
+	}
+	/** 
+	 * Remove an EPR from the Registry
+	 */
+	public void unRegisterService(String category, String serviceName) throws RegistryException{
+		try {
+			Organization organization = getJBossESBOrganization();
+			for (Iterator i=organization.getServices().iterator(); i.hasNext();) {
+				Service service = (Service) i.next();
+				if (service.getName().getValue().equals(category + ":" + serviceName)) {
+					organization.removeService(service);
+					saveRegistryObject(organization);
+					return;
+				}
+			}
+		} catch (JAXRException je) {
+			throw new RegistryException(je.getLocalizedMessage(), je);
+		}
+	}
+	/** 
+	 * Publish an EPR to the Registry
+	 */
+	public void registerEPR(String category, String serviceName, String serviceDescription, EPR epr, String eprDescription) 
+		throws RegistryException
+	{
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			//Find the service
+
+			Service service = findService(category,serviceName);
+			if (service==null) {
+				logger.log(Priority.DEBUG, "Service " + serviceName + " does not yet exist, creating now..");
+				service = registerService(category, serviceName, serviceDescription);
+			}
+
+			connection.setCredentials(JAXRRegistryImpl.creds);
+			RegistryService rs = connection.getRegistryService();
+			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
+//			BusinessQueryManager bqm = rs.getBusinessQueryManager();
+			ServiceBinding serviceBinding = blm.createServiceBinding();
+			serviceBinding.setDescription(blm.createInternationalString(eprDescription));
+			String xml = EPRHelper.toXMLString(epr);
+			serviceBinding.setAccessURI(URLEncoder.encode(xml,"UTF-8"));
+
+//			The following code would store the EPR xml as an ExtrinsicObject, but scout does not
+//          have an implementation for it.
+//			DataHandler repositoryItem = new DataHandler(xml,"text/xml");
+//			ExtrinsicObject eo = blm.createExtrinsicObject(repositoryItem);
+//			eo.setName(blm.createInternationalString("EPR"));
+//			eo.setMimeType("text/xml");
+//			String conceptId = "urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExtrinsicObject:XML";
+//			Concept objectTypeConcept = (Concept) bqm.getRegistryObject(conceptId);
+//				((ExtrinsicObjectImpl)eo).setObjectType(objectTypeConcept); 
+			
+//			Concept specConcept = blm.createConcept(null, "HelloConcept", "");
+//			String schemeName = "uddi-org:types";
+//			ClassificationScheme uddiOrgTypes =
+//			     bqm.findClassificationSchemeByName(null, schemeName);
+//			Classification wsdlSpecClassification = 
+//			     blm.createClassification(uddiOrgTypes,
+//			       "eprSpec", xml);
+//			   specConcept.addClassification(wsdlSpecClassification);
+//			Collection<Concept> concepts = new ArrayList<Concept>();
+//			concepts.add(specConcept);
+//			BulkResponse br=blm.saveConcepts(concepts);
+//			Key conceptKey = null;
+//			if (br.getStatus() == JAXRResponse.STATUS_SUCCESS) {
+//				Collection keys = br.getCollection();
+//				for (Iterator i=keys.iterator();i.hasNext();){
+//					conceptKey = (Key) i.next();
+//					break;
+//				}
+//			} else {
+//				throw new RegistryException("Could not save the EPR as Concept");
+//			}
+//			//now adding this concept to the binding
+//			Concept specificationConcept = (Concept) bqm.getRegistryObject(conceptKey.getId(), LifeCycleManager.CONCEPT);
+//			SpecificationLink specificationLink = blm.createSpecificationLink();
+//			specificationLink.setSpecificationObject(specificationConcept);
+//			serviceBinding.addSpecificationLink(specificationLink);
+		
+		    ArrayList<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
+		    serviceBindings.add(serviceBinding);
+		    service.addServiceBindings(serviceBindings);
+			saveRegistryObject(serviceBinding);
+		} catch (Exception je) {
+			throw new RegistryException(je.getLocalizedMessage(), je);
+		} finally {
+			closeConnection(connection);
+		}
+	}
+	/** 
+	 * Remove an EPR from the Registry
+	 */
+	public void unRegisterEPR(String category, String serviceName, EPR toBeDeletedEPR) throws RegistryException{
+		//first find the ServiceBindings for this service
+		try {
+			Service service = findService(category, serviceName);
+			Collection serviceBindings = findServiceBindings(service);
+			service.addServiceBindings(serviceBindings);
+			for (Iterator i=serviceBindings.iterator();i.hasNext();){
+				ServiceBinding serviceBinding = (ServiceBinding) i.next();
+				String xml = URLDecoder.decode(serviceBinding.getAccessURI(), "UTF-8");
+				if (xml.equals(EPRHelper.toXMLString(toBeDeletedEPR))) {
+					service.removeServiceBinding(serviceBinding);
+					i.remove();
+					service.setProvidingOrganization(getJBossESBOrganization());
+					saveRegistryObject(service);
+					//adding the other bindings back in. Workaround for this scout bug.
+					for (Iterator j=service.getServiceBindings().iterator();j.hasNext();){
+						serviceBinding = (ServiceBinding) j.next();
+						serviceBinding.setKey(null);
+						saveRegistryObject(serviceBinding);
+					}
+					return;
+				}
+			}
+			//We should not end up here or else we did not match any EPRs
+			throw new RegistryException("No such EPR found for service with name = " 
+					+ serviceName + " and EPR=" + toBeDeletedEPR);
+		} catch (Exception je) {
+			throw new RegistryException(je.getLocalizedMessage(), je);
+		}
+	}
+	
+	/** 
+	 * {@inheritDoc}
+	 * @return collection services
+	 */
+	public Collection<String> findAllServices() throws RegistryException
+	{
+		Collection<String> serviceNames = new ArrayList<String>();
+		try {
+			Collection services = getJBossESBOrganization().getServices();
+			for (Iterator i=services.iterator();i.hasNext();) {
+				String serviceName = ((Service)i.next()).getName().getValue();
+				serviceNames.add(serviceName);
+			}
+		} catch (JAXRException je) {
+			throw new RegistryException(je.getLocalizedMessage(), je);
+		}
+		return serviceNames;
+	}
+	/**
+	 * Find Services based on a category ("transformation").
+	 * 
+	 * @param serviceType
+	 * @return collection services
+	 */
+	public Collection<String> findServices(String category) throws RegistryException
+	{
+		Collection<String>serviceNames = new ArrayList<String>();
+		try {
+			Collection<Service>services = findServicesForCategory(category);
+			for (Iterator<Service> i=services.iterator();i.hasNext();) {
+				String serviceName = i.next().getName().getValue();
+				serviceNames.add(serviceName);
+			}
+		} catch (JAXRException je) {
+			throw new RegistryException(je.getLocalizedMessage(), je);
+		}
+		return serviceNames;
+	}
+	/**
+	 * 
+	 * @param service
+	 * @return
+	 */
+	public Collection<EPR> findEPRs(String category, String serviceName) throws RegistryException
+	{
+		Collection<EPR> eprs = new ArrayList<EPR>();
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			Service service = findService(category, serviceName);
+			if (service==null){
+				throw new RegistryException("Could not find service with category=" + category + " and serviceName=" + serviceName);
+			}
+			// Get registry service and business query manager
+			Collection<ServiceBinding> serviceBindings = findServiceBindings(service);
+			//Converting them to EPRs
+			for (Iterator i=serviceBindings.iterator();i.hasNext();) {
+				ServiceBinding serviceBinding = (ServiceBinding) i.next();
+				@SuppressWarnings("unused")
+				String eprXML = URLDecoder.decode(serviceBinding.getAccessURI(),"UTF-8");
+				EPR epr = EPRHelper.fromXMLString(eprXML);
+				eprs.add(epr);
+			}
+		} catch (Exception je) {
+			throw new RegistryException(je.getLocalizedMessage(), je);
+		} finally {
+			closeConnection(connection);
+		}
+		return eprs;
+	}
+	/**
+	 * 
+	 * @param service
+	 * @return
+	 */
+	public EPR findEPR(String category, String serviceName) throws RegistryException
+	{
+		EPR epr = null;
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			Service service = findService(category, serviceName);
+			if (service==null){
+				throw new RegistryException("Could not find service with category=" + category + " and serviceName=" + serviceName);
+			}
+			// Get registry service and business query manager
+			Collection<ServiceBinding> serviceBindings = findServiceBindings(service);
+			if (serviceBindings.iterator().hasNext()) {
+				ServiceBinding serviceBinding = (ServiceBinding) serviceBindings.iterator().next();
+				String eprXML = URLDecoder.decode(serviceBinding.getAccessURI(),"UTF-8");
+				epr = EPRHelper.fromXMLString(eprXML);
+			}
+		} catch (Exception je) {
+			throw new RegistryException(je.getLocalizedMessage(), je);
+		} finally {
+			closeConnection(connection);
+		}
+		return epr;
+	}
+	/**
+	 * Find all Organizations with a name mathing the queryString parameter.
+	 * 
+	 * @param organizationName used to match with the name of the organization.
+	 * @return the Organization.
+	 */
+	protected synchronized static Organization findOrganization(String organizationName) throws JAXRException
+	{
+	    if (organizationName==null) {
+	    	organizationName="";
+	    }
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			// Get registry service and business query manager
+			RegistryService rs = connection.getRegistryService();
+			BusinessQueryManager bqm = rs.getBusinessQueryManager();
+			// Define find qualifiers and name patterns
+			Collection<String> findQualifiers = new ArrayList<String>();
+			findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
+			Collection<String> namePatterns = new ArrayList<String>();
+			namePatterns.add("%" + organizationName + "%");
+	        //Find based upon qualifier type and values
+			logger.log(Priority.DEBUG,"Going to query the registry for name pattern " + namePatterns);
+			BulkResponse response = bqm.findOrganizations(findQualifiers,
+					namePatterns, null, null, null, null);
+			if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
+				for (Iterator orgIter = response.getCollection().iterator(); orgIter.hasNext();) 
+				{
+					Organization org = (Organization) orgIter.next();
+					logger.log(Priority.DEBUG, "Organization name: " + org.getName().getValue());
+					logger.log(Priority.DEBUG, "Description: " + org.getDescription().getValue());
+					logger.log(Priority.DEBUG, "Key id: " + org.getKey().getId());
+					User primaryContact = org.getPrimaryContact();
+					logger.log(Priority.DEBUG, "Primary Contact: " + primaryContact.getPersonName().getFullName());
+					if (orgIter.hasNext()) {
+						logger.log(Priority.ERROR, "Found " + response.getCollection().size() 
+								+ " Organization, while expecting only one of name " + organizationName);
+					}
+					return org;
+				}
+			}
+			return null;
+		} finally {
+			closeConnection(connection);
+		}
+	}
+	/**
+	 * 
+	 * @param category
+	 * @param serviceName
+	 * @return Service
+	 */
+	protected synchronized static Service findService(String category, String serviceName) throws JAXRException
+	{
+		if (category==null) {
+			category="";
+		}
+		if (serviceName==null) {
+			serviceName="";
+		}
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			// Get registry service and business query manager
+			RegistryService rs = connection.getRegistryService();
+			BusinessQueryManager bqm = rs.getBusinessQueryManager();
+			// Define find qualifiers and name patterns
+			Collection<String> findQualifiers = new ArrayList<String>();
+			findQualifiers.add(FindQualifier.AND_ALL_KEYS);
+			findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+			Collection<String> namePatterns = new ArrayList<String>();
+			namePatterns.add(category);
+			namePatterns.add(serviceName);
+	        //Find based upon qualifier type and values
+			logger.log(Priority.DEBUG, "Going to query the registry for name pattern " + namePatterns);
+			BulkResponse response = bqm.findServices(null, findQualifiers,
+					namePatterns, null, null);
+			if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
+				for (Iterator servIter = response.getCollection().iterator(); servIter.hasNext();) 
+				{
+					Service service = (Service) servIter.next();
+					logger.log(Priority.DEBUG, "Service name: " + service.getName().getValue());
+					if (service.getDescription()!=null) {
+						logger.log(Priority.DEBUG, "Description: " + service.getDescription().getValue());
+					}
+					logger.log(Priority.DEBUG, "Key id: " + service.getKey().getId());
+					if (servIter.hasNext()) {
+						logger.log(Priority.ERROR, "Found " + response.getCollection().size() 
+								+ " Services, while expecting only one by the name of " 
+								+ serviceName + " in category " + category);
+					}
+					return service;
+				}
+			}
+			return null;
+		} finally {
+			closeConnection(connection);
+		}
+	}
+	/**
+	 * Finds all services for a given category.
+	 * @param category
+	 * @param serviceName
+	 * @return Service
+	 */
+	@SuppressWarnings("unchecked")
+	protected synchronized static Collection<Service> findServicesForCategory(String category) throws JAXRException
+	{
+		Collection<Service> services = new ArrayList<Service>();
+		if (category==null) {
+			category="";
+		}
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			// Get registry service and business query manager
+			RegistryService rs = connection.getRegistryService();
+			BusinessQueryManager bqm = rs.getBusinessQueryManager();
+			// Define find qualifiers and name patterns
+			Collection<String> findQualifiers = new ArrayList<String>();
+			findQualifiers.add(FindQualifier.AND_ALL_KEYS);
+			findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+			Collection<String> namePatterns = new ArrayList<String>();
+			namePatterns.add(category);
+	        //Find based upon qualifier type and values
+			logger.log(Priority.DEBUG, "Going to query the registry for name pattern " + namePatterns);
+			BulkResponse response = bqm.findServices(null, findQualifiers,
+					namePatterns, null, null);
+			if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
+				services = response.getCollection();
+			}
+			return services;
+		} finally {
+			closeConnection(connection);
+		}
+	}
+	/**
+	 * Create a jbossesb organization under which we will register all our services.
+	 * 
+	 * @param blm
+	 * @return
+	 * @throws JAXRException
+	 */
+	protected synchronized static Organization createJBossESBOrganization()
+			throws JAXRException 
+	{
+//		Getting the connection to the Registry (reading config)
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			//Logging in
+			connection.setCredentials(JAXRRegistryImpl.creds);
+			RegistryService rs = connection.getRegistryService();
+			//Building organization
+			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
+			Organization organization = blm.createOrganization(blm.createInternationalString("Red Hat/JBossESB"));
+				organization.setDescription(blm.createInternationalString("Red Hat/JBoss Professional Open Source, Services for the JBossESB"));
+
+			User user = blm.createUser();
+			organization.setPrimaryContact(user);
+			PersonName personName = blm.createPersonName("JBossESB");
+			TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
+			telephoneNumber.setNumber("404 467-8555");
+			telephoneNumber.setType(null);
+			PostalAddress address = blm.createPostalAddress("3340",
+					"Peachtree Road, NE, Suite 1200", "Atlanta", "GA", "USA",
+					"30326", "");
+			Collection<PostalAddress> postalAddresses = new ArrayList<PostalAddress>();
+			postalAddresses.add(address);
+			Collection<EmailAddress> emailAddresses = new ArrayList<EmailAddress>();
+			EmailAddress emailAddress = blm
+					.createEmailAddress("jbossesb at jboss.com");
+			emailAddresses.add(emailAddress);
+	
+			Collection<TelephoneNumber> numbers = new ArrayList<TelephoneNumber>();
+			numbers.add(telephoneNumber);
+			user.setPersonName(personName);
+			user.setPostalAddresses(postalAddresses);
+			user.setEmailAddresses(emailAddresses);
+			user.setTelephoneNumbers(numbers);
+	
+	//		Scout does not support this (yet), so leaving it out for now.
+	//		ClassificationScheme cScheme = getClassificationScheme(blm,
+	//				blm.createInternationalString("uddi-org:general_keywords"), blm.createInternationalString(""));
+	//		Classification classification = blm.createClassification(cScheme,
+	//				blm..createInternationalString("JBoss ESB"), blm..createInternationalString("JBESB"));
+	//		org.addClassification(classification);
+			
+			saveRegistryObject(organization);
+			return organization;
+		} finally {
+			closeConnection(connection);
+		}	
+	}
+	/**
+	 * Save Registry Object
+	 */
+	protected synchronized static void saveRegistryObject(RegistryObject registryObject) throws JAXRException
+	{
+//		Getting the connection to the Registry (reading config)
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			Collection<RegistryObject> registryObjects = new ArrayList<RegistryObject>();
+			BulkResponse br = null;
+			//Logging in
+			connection.setCredentials(JAXRRegistryImpl.creds);
+			RegistryService rs = connection.getRegistryService();
+			//Building organization
+			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
+			registryObjects.add(registryObject);
+			Class[] interfaces = registryObject.getClass().getInterfaces();
+			String interfaceName ="";
+			for (int i=0; i<interfaces.length; i++) {
+				interfaceName = interfaces[i].getName();
+				if (interfaceName.equals("javax.xml.registry.infomodel.Organization")) {
+					br = blm.saveOrganizations(registryObjects);
+					break;
+				} else if (interfaceName.equals("javax.xml.registry.infomodel.Service")) {
+					br = blm.saveServices(registryObjects);
+					break;
+				} else if (interfaceName.equals("javax.xml.registry.infomodel.ServiceBinding")) {
+					br = blm.saveServiceBindings(registryObjects);
+					break;
+				} else {
+					logger.log(Priority.ERROR, "Trying to save an unsupported RegistryObject");
+					throw new JAXRException("Trying to save an unsupported RegistryObject");
+				}
+			}
+            //Verify the return
+			if (br!=null && br.getStatus() == JAXRResponse.STATUS_SUCCESS) {
+				logger.log(Priority.DEBUG, interfaceName + " successfully saved");
+				Collection coll = br.getCollection();
+				Iterator iter = coll.iterator();
+				while (iter.hasNext()) {
+					Key key = (Key) iter.next();
+					registryObject.setKey(key);
+					logger.log(Priority.DEBUG, "Saved Key=" + key.getId());
+				}
+			} else {
+				logger.log(Priority.ERROR, "Errors occurred during save.");
+				if (br!=null) {
+					Collection exceptions = br.getExceptions();
+					Iterator iter = exceptions.iterator();
+					String errors = "";
+					JAXRException je = new JAXRException("JAXRExceptions occurred during save");
+					while (iter.hasNext()) {
+						Exception e = (Exception) iter.next();
+						errors += e.getLocalizedMessage() + "\n";
+						je.setStackTrace(e.getStackTrace());
+						logger.log(Priority.ERROR, e.getLocalizedMessage(), e);
+						//if it's the last error, throw it now and set the current stacktrace
+						if (!iter.hasNext()) {
+							throw new JAXRException(errors, e);
+						}
+					}
+					throw new JAXRException("Errors occurred during save. Response status=" + br.getStatus());
+				}
+				throw new JAXRException("Errors occurred during save");
+			}
+		} finally {
+			JAXRRegistryImpl.closeConnection(connection);
+		}	
+	}
+	/**
+	 * finds the JBossESB Organizationa and creates one if it is not there.
+	 * @return JBossESB Organization
+	 * @throws JAXRException
+	 */
+	private Organization getJBossESBOrganization() throws JAXRException
+	{
+		if (jbossESBOrganization==null) {
+			jbossESBOrganization = findOrganization("Red Hat/JBossESB");
+			if (jbossESBOrganization==null) {
+				jbossESBOrganization = createJBossESBOrganization();
+			}
+		}
+		return jbossESBOrganization;
+	}
+	/**
+	 * Find the ServiceBindings for a given Service
+	 * @param service
+	 * @return
+	 * @throws RegistryException
+	 */
+	@SuppressWarnings("unchecked")
+	private Collection<ServiceBinding> findServiceBindings(Service service) throws RegistryException
+	{
+		Collection<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			RegistryService rs = connection.getRegistryService();
+			BusinessQueryManager bqm = rs.getBusinessQueryManager();
+			Collection<String> findQualifiers = new ArrayList<String>();
+			findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
+			BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),findQualifiers,null,null);
+			if (bulkResponse.getStatus()==JAXRResponse.STATUS_SUCCESS){
+				serviceBindings = bulkResponse.getCollection();
+			}
+			return serviceBindings;
+		} catch (Exception je) {
+			throw new RegistryException(je.getLocalizedMessage(), je);
+		} finally {
+			closeConnection(connection);
+		}
+	}
+	
+}
+
+	


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/DslHelper.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/DslHelper.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/DslHelper.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,175 +1,175 @@
-/*
- * 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.internal.soa.esb.services.routing.cbr;
-
-import java.io.ByteArrayInputStream;
-
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.message.Message;
-import org.xml.sax.InputSource;
-
-/**
- * Domain Specific Language helper. Right now this supports the use of XPath, but this class can
- * be beefed up upo to use other technologies as well.
- * 
- * @author kstam at redhat.com
- *
- */
-public class DslHelper 
-{
-	private static Logger log = Logger.getLogger(DslHelper.class);
-	/** XPath instance */
-	private static XPathFactory xpf = XPathFactory.newInstance();
-	/** 
-	 * Uses XPath to look for the occurence of a certain tag, specific in the xpath expression.
-	 * 
-	 * @param message - the ESB Message which body content will be used.
-	 * @param xpathExp - XPath expression to find a node.
-	 * @return true if the node is found and false in all other cases.
-	 * @throws XPathExpressionException
-	 */
-	public static boolean xmlContentMatches(Message message, String xpathExp) throws XPathExpressionException 
-	{
-		if (log.isDebugEnabled()) {
-			log.debug("Trying to match xpath: '" + xpathExp +  "' in message=" + message);
-		}
-		XPath xpath = xpf.newXPath();
-		InputSource inputSource = new InputSource(new ByteArrayInputStream(message.getBody().getContents()));
-		Object node = xpath.evaluate(xpathExp, inputSource, XPathConstants.NODE);
-		if (log.isDebugEnabled()) {
-			log.debug("Found node=" + node);
-		}
-		return node != null;
-	}
-	/** 
-	 * Uses XPath to look for the occurence of a certain tag, specific in the xpath expression.
-	 * 
-	 * @param message - the ESB Message which body content will be used.
-	 * @param xpathExp - XPath expression to find a node.
-	 * @param value - used to compare against the result found using the XPath expression.
-	 * @return true if equal, false in all other cases.
-	 * @throws XPathExpressionException
-	 */
-	public static boolean xmlContentEquals(Message message, String xpathExp, String value) throws XPathExpressionException 
-	{
-		if (log.isDebugEnabled()) {
-			log.debug("Trying to match xpath: '" + xpathExp +  "' in message=" + message.getBody().getContents());
-		}
-		XPath xpath = xpf.newXPath();
-		InputSource inputSource = new InputSource(new ByteArrayInputStream(message.getBody().getContents()));
-		String nodeValue = (String) xpath.evaluate(xpathExp, inputSource, XPathConstants.STRING);
-		if (log.isDebugEnabled()) {
-			log.debug("Found nodeValue=" + nodeValue + " which is matched to given value=" + value);
-		}
-		return value.equals(nodeValue);
-	}
-
-	/** 
-	 * Uses XPath to look for the occurence of a certain tag, specific in the xpath expression.
-	 * 
-	 * @param message - the ESB Message which body content will be used.
-	 * @param xpathExp - XPath expression to find a node.
-	 * @param value - used to compare against the result found using the XPath expression.
-	 * @return true if node (returned by the xpath expression) is greater than the current value, false in all other cases.
-	 * @throws XPathExpressionException
-	 */
-	public static boolean xmlContentGreaterThan(Message message, String xpathExp, String value) throws XPathExpressionException 
-	{
-		String nodeValue=null;
-		double doubleValue=0;
-		double doubleNodeValue=0;
-		
-		if (log.isDebugEnabled()) {
-			log.debug("Trying to match xpath: '" + xpathExp +  "' in message=" + message.getBody().getContents());
-		}
-		XPath xpath = xpf.newXPath();
-		InputSource inputSource = new InputSource(new ByteArrayInputStream(message.getBody().getContents()));	
-		nodeValue = (String) xpath.evaluate(xpathExp, inputSource, XPathConstants.STRING);if (log.isDebugEnabled()) {
-			log.debug("Found nodeValue=" + nodeValue + " which is matched to given value=" + value);
-		}
-		if (nodeValue!=null && !"".equals(nodeValue)) {
-			
-			try {
-				doubleValue = Double.parseDouble(value);
-			} catch (NumberFormatException ne) {
-				log.equals("Could not parse value=" + doubleValue + " to double");
-			}
-			try {
-				doubleNodeValue = Double.parseDouble(nodeValue);
-			} catch (NumberFormatException ne) {
-				log.equals("Could not parse nodeValue=" + doubleNodeValue + " to double");
-			}
-			if (doubleNodeValue > doubleValue) {
-				return true;
-			}
-		}
-		return false;
-	}
-	
-	/** 
-	 * Uses XPath to look for the occurence of a certain tag, specific in the xpath expression.
-	 * 
-	 * @param message - the ESB Message which body content will be used.
-	 * @param xpathExp - XPath expression to find a node.
-	 * @param value - used to compare against the result found using the XPath expression.
-	 * @return true if node (returned by the xpath expression) is less than the current value, false in all other cases.
-	 * @throws XPathExpressionException
-	 */
-	public static boolean xmlContentLessThan(Message message, String xpathExp, String value) throws XPathExpressionException 
-	{
-		String nodeValue=null;
-		double doubleValue=0;
-		double doubleNodeValue=0;
-		
-		if (log.isDebugEnabled()) {
-			log.debug("Trying to match xpath: '" + xpathExp +  "' in message=" + message.getBody().getContents());
-		}
-		XPath xpath = xpf.newXPath();
-		InputSource inputSource = new InputSource(new ByteArrayInputStream(message.getBody().getContents()));	
-		nodeValue = (String) xpath.evaluate(xpathExp, inputSource, XPathConstants.STRING);if (log.isDebugEnabled()) {
-			log.debug("Found nodeValue=" + nodeValue + " which is matched to given value=" + value);
-		}
-		if (nodeValue!=null && !"".equals(nodeValue)) {
-			
-			try {
-				doubleValue = Double.parseDouble(value);
-			} catch (NumberFormatException ne) {
-				log.equals("Could not parse value=" + doubleValue + " to double");
-			}
-			try {
-				doubleNodeValue = Double.parseDouble(nodeValue);
-			} catch (NumberFormatException ne) {
-				log.equals("Could not parse nodeValue=" + doubleNodeValue + " to double");
-			}
-			if (doubleNodeValue < doubleValue) {
-				return true;
-			}
-		}
-		return false;
-	}
-}
-	
+/*
+ * 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.internal.soa.esb.services.routing.cbr;
+
+import java.io.ByteArrayInputStream;
+
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.message.Message;
+import org.xml.sax.InputSource;
+
+/**
+ * Domain Specific Language helper. Right now this supports the use of XPath, but this class can
+ * be beefed up upo to use other technologies as well.
+ * 
+ * @author kstam at redhat.com
+ *
+ */
+public class DslHelper 
+{
+	private static Logger log = Logger.getLogger(DslHelper.class);
+	/** XPath instance */
+	private static XPathFactory xpf = XPathFactory.newInstance();
+	/** 
+	 * Uses XPath to look for the occurence of a certain tag, specific in the xpath expression.
+	 * 
+	 * @param message - the ESB Message which body content will be used.
+	 * @param xpathExp - XPath expression to find a node.
+	 * @return true if the node is found and false in all other cases.
+	 * @throws XPathExpressionException
+	 */
+	public static boolean xmlContentMatches(Message message, String xpathExp) throws XPathExpressionException 
+	{
+		if (log.isDebugEnabled()) {
+			log.debug("Trying to match xpath: '" + xpathExp +  "' in message=" + message);
+		}
+		XPath xpath = xpf.newXPath();
+		InputSource inputSource = new InputSource(new ByteArrayInputStream(message.getBody().getContents()));
+		Object node = xpath.evaluate(xpathExp, inputSource, XPathConstants.NODE);
+		if (log.isDebugEnabled()) {
+			log.debug("Found node=" + node);
+		}
+		return node != null;
+	}
+	/** 
+	 * Uses XPath to look for the occurence of a certain tag, specific in the xpath expression.
+	 * 
+	 * @param message - the ESB Message which body content will be used.
+	 * @param xpathExp - XPath expression to find a node.
+	 * @param value - used to compare against the result found using the XPath expression.
+	 * @return true if equal, false in all other cases.
+	 * @throws XPathExpressionException
+	 */
+	public static boolean xmlContentEquals(Message message, String xpathExp, String value) throws XPathExpressionException 
+	{
+		if (log.isDebugEnabled()) {
+			log.debug("Trying to match xpath: '" + xpathExp +  "' in message=" + message.getBody().getContents());
+		}
+		XPath xpath = xpf.newXPath();
+		InputSource inputSource = new InputSource(new ByteArrayInputStream(message.getBody().getContents()));
+		String nodeValue = (String) xpath.evaluate(xpathExp, inputSource, XPathConstants.STRING);
+		if (log.isDebugEnabled()) {
+			log.debug("Found nodeValue=" + nodeValue + " which is matched to given value=" + value);
+		}
+		return value.equals(nodeValue);
+	}
+
+	/** 
+	 * Uses XPath to look for the occurence of a certain tag, specific in the xpath expression.
+	 * 
+	 * @param message - the ESB Message which body content will be used.
+	 * @param xpathExp - XPath expression to find a node.
+	 * @param value - used to compare against the result found using the XPath expression.
+	 * @return true if node (returned by the xpath expression) is greater than the current value, false in all other cases.
+	 * @throws XPathExpressionException
+	 */
+	public static boolean xmlContentGreaterThan(Message message, String xpathExp, String value) throws XPathExpressionException 
+	{
+		String nodeValue=null;
+		double doubleValue=0;
+		double doubleNodeValue=0;
+		
+		if (log.isDebugEnabled()) {
+			log.debug("Trying to match xpath: '" + xpathExp +  "' in message=" + message.getBody().getContents());
+		}
+		XPath xpath = xpf.newXPath();
+		InputSource inputSource = new InputSource(new ByteArrayInputStream(message.getBody().getContents()));	
+		nodeValue = (String) xpath.evaluate(xpathExp, inputSource, XPathConstants.STRING);if (log.isDebugEnabled()) {
+			log.debug("Found nodeValue=" + nodeValue + " which is matched to given value=" + value);
+		}
+		if (nodeValue!=null && !"".equals(nodeValue)) {
+			
+			try {
+				doubleValue = Double.parseDouble(value);
+			} catch (NumberFormatException ne) {
+				log.equals("Could not parse value=" + doubleValue + " to double");
+			}
+			try {
+				doubleNodeValue = Double.parseDouble(nodeValue);
+			} catch (NumberFormatException ne) {
+				log.equals("Could not parse nodeValue=" + doubleNodeValue + " to double");
+			}
+			if (doubleNodeValue > doubleValue) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/** 
+	 * Uses XPath to look for the occurence of a certain tag, specific in the xpath expression.
+	 * 
+	 * @param message - the ESB Message which body content will be used.
+	 * @param xpathExp - XPath expression to find a node.
+	 * @param value - used to compare against the result found using the XPath expression.
+	 * @return true if node (returned by the xpath expression) is less than the current value, false in all other cases.
+	 * @throws XPathExpressionException
+	 */
+	public static boolean xmlContentLessThan(Message message, String xpathExp, String value) throws XPathExpressionException 
+	{
+		String nodeValue=null;
+		double doubleValue=0;
+		double doubleNodeValue=0;
+		
+		if (log.isDebugEnabled()) {
+			log.debug("Trying to match xpath: '" + xpathExp +  "' in message=" + message.getBody().getContents());
+		}
+		XPath xpath = xpf.newXPath();
+		InputSource inputSource = new InputSource(new ByteArrayInputStream(message.getBody().getContents()));	
+		nodeValue = (String) xpath.evaluate(xpathExp, inputSource, XPathConstants.STRING);if (log.isDebugEnabled()) {
+			log.debug("Found nodeValue=" + nodeValue + " which is matched to given value=" + value);
+		}
+		if (nodeValue!=null && !"".equals(nodeValue)) {
+			
+			try {
+				doubleValue = Double.parseDouble(value);
+			} catch (NumberFormatException ne) {
+				log.equals("Could not parse value=" + doubleValue + " to double");
+			}
+			try {
+				doubleNodeValue = Double.parseDouble(nodeValue);
+			} catch (NumberFormatException ne) {
+				log.equals("Could not parse nodeValue=" + doubleNodeValue + " to double");
+			}
+			if (doubleNodeValue < doubleValue) {
+				return true;
+			}
+		}
+		return false;
+	}
+}
+	


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/DslHelper.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,269 +1,269 @@
-/*
- * 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.internal.soa.esb.services.routing.cbr;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.drools.RuleBase;
-import org.drools.RuleBaseFactory;
-import org.drools.WorkingMemory;
-import org.drools.compiler.DroolsParserException;
-import org.drools.compiler.PackageBuilder;
-import org.drools.rule.Package;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.services.routing.MessageRouter;
-import org.jboss.soa.esb.services.routing.cbr.CBRException;
-import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter;
-
-/**
- * The Implementation of a rule based Content Router. Here we use JBossRules. We
- * keep a HashMap of so called working memories for performance reasons.
- * 
- * @author kstam at redhat.com
- * 
- */
-public class JBossRulesRouter extends ContentBasedRouter
-{
-	private static Map<String, RuleBase> ruleBases = new ConcurrentHashMap<String, RuleBase>();
-
-	private static Map<String, String> ruleSets = new ConcurrentHashMap<String, String>();
-
-	private static Logger logger = Logger.getLogger(JBossRulesRouter.class);
-
-	/**
-	 * Route the message, where the routing rules are supplied as part of the
-	 * message itself. We don't support this yet, as I don't see the need right
-	 * now. However when the need arises, this is were it goes.
-	 * 
-	 * @param message -
-	 *            Message that needs routing.
-	 */
-	public List<String> route (Message message)
-	{
-		logger.log(Priority.ERROR, "Do not use, this is not implemented");
-		// Route to /dev/null?
-		return null;
-	}
-
-	/**
-	 * Route the message, using the given ruleSet (drl).
-	 * 
-	 * @param ruleSet -
-	 *            Filename of the drl that will be used.
-	 * @param message -
-	 *            Message that needs routing.
-	 */
-	public List<String> route (String ruleSet, boolean ruleReload,
-			Message message)
-	{
-		return route(ruleSet, null, ruleReload, message);
-	}
-
-	/**
-	 * Route the message, where the routing rules are supplied as part of the
-	 * message itself. We don't support this yet, as I don't see the need right
-	 * now. However when the need arises, this is were it goes.
-	 * 
-	 * @param ruleSet -
-	 *            Filename of the drl that will be used.
-	 * @param ruleLanguage -
-	 *            Filename of the dsl that will be used.
-	 * @param message -
-	 *            Message that needs routing.
-	 */
-	@SuppressWarnings("unchecked")
-	public List<String> route (String ruleSet, String ruleLanguage,
-			boolean ruleReload, Message message)
-	{
-		List<String> destinationServices = new ArrayList<String>();
-		try
-		{
-			String newRuleSet = null;
-			boolean isRulesChanged = false;
-
-			if (ruleReload)
-			{
-				String currentRuleSet = ruleSets.get(ruleSet);
-				newRuleSet = getRules(ruleSet, ruleLanguage);
-				if (currentRuleSet == null || !currentRuleSet
-						.equals(newRuleSet))
-				{
-					isRulesChanged = true;
-				}
-			}
-			RuleBase ruleBase = ruleBases.get(ruleSet);
-			if (ruleBase == null || isRulesChanged)
-			{
-				logger.log(Priority.INFO,
-						"Reading ruleSet from file=" + ruleSet);
-				ruleBase = readRuleBase(ruleSet, ruleLanguage);
-				if (ruleBase != null) ruleBases.put(ruleSet, ruleBase);
-				if (newRuleSet == null)
-				{
-					newRuleSet = getRules(ruleSet, ruleLanguage);
-				}
-				if (ruleSet != null) ruleSets.put(ruleSet, newRuleSet);
-			}
-			WorkingMemory workingMemory = ruleBase.newWorkingMemory();
-			logger.log(Priority.DEBUG,
-					"Obtained message=" + message + " with ruleSet=" + ruleSet);
-			workingMemory.setGlobal("destinationServices", destinationServices);
-			workingMemory.assertObject(message);
-			logger.log(Priority.INFO, "Fire the JBossRules Engine");
-			workingMemory.fireAllRules();
-			destinationServices = (List) workingMemory
-					.getGlobal("destinationServices"); // is this needed?
-			logger.log(Priority.DEBUG,
-					"Destination Services List: " + destinationServices);
-			Boolean isDeliverMessages = (Boolean) message.getProperties()
-					.getProperty(MessageRouter.DELIVER_MESSAGES);
-			// Deliver the message to their desitinations unless told not to.
-			if (!Boolean.FALSE.equals(isDeliverMessages))
-			{
-				deliverMessages(destinationServices, message);
-			}
-		}
-		catch (Exception e)
-		{
-			logger.log(Priority.ERROR,
-					e.toString() + ". Message is not routed.", e);
-			// Route to /dev/null?
-		}
-		return destinationServices;
-	}
-
-	/**
-	 * Reading the rules and dsl from files. Note that we may want to allow
-	 * other ways to set the rule, but for now it's just files.
-	 */
-	private static RuleBase readRuleBase (String rulesFile, String ruleLanguage)
-			throws DroolsParserException, IOException, CBRException
-	{
-		// read in the rules
-		logger.debug("Going to read the rule: " + rulesFile);
-		InputStream inputStreamDrl = JBossRulesRouter.class
-				.getResourceAsStream("/" + rulesFile);
-		if (inputStreamDrl == null)
-		{
-			logger.error("Could not find rulesFile: " + rulesFile);
-			return null;
-		}
-		else
-		{
-			Reader rules = new InputStreamReader(inputStreamDrl);
-			PackageBuilder builder = new PackageBuilder();
-			// this wil parse and compile in one step
-			if (ruleLanguage == null)
-			{
-				builder.addPackageFromDrl(rules);
-			}
-			else
-			{
-				logger.debug("Going to read the language: " + ruleLanguage);
-				InputStream inputStreamDsl = JBossRulesRouter.class
-						.getResourceAsStream("/" + ruleLanguage);
-				if (inputStreamDsl == null)
-				{
-					logger.error("Could not find ruleLanguage: " + rulesFile);
-				}
-				else
-				{
-					Reader dsl = new InputStreamReader(inputStreamDsl);
-					builder.addPackageFromDrl(rules, dsl);
-				}
-			}
-			// get the compiled package (which is serializable)
-			Package pkg = builder.getPackage();
-			// add the package to a rulebase (deploy the rule package).
-			
-			try
-			{
-				RuleBase ruleBase = RuleBaseFactory.newRuleBase();
-				ruleBase.addPackage(pkg);
-				
-				return ruleBase;
-			}
-			catch (Exception ex)
-			{
-				throw new CBRException(ex);
-			}
-		}
-	}
-
-	/**
-	 * Reading the rules and dsl from files. Note that we may want to allow
-	 * other ways to set the rule, but for now it's just files.
-	 */
-	private static String getRules (String rulesFile, String ruleLanguage)
-			throws IOException
-	{
-		logger.debug("Going to hash the rule: " + rulesFile);
-		InputStream inputStreamDrl = JBossRulesRouter.class
-				.getResourceAsStream("/" + rulesFile);
-		if (inputStreamDrl == null)
-		{
-			logger.error("Could not find rulesFile: " + rulesFile);
-			return null;
-		}
-		else
-		{
-			String rules = getString(inputStreamDrl);
-			String language = "";
-			if (ruleLanguage != null)
-			{
-				logger.debug("Going to hash the language: " + ruleLanguage);
-				InputStream inputStreamDsl = JBossRulesRouter.class
-						.getResourceAsStream("/" + ruleLanguage);
-				if (inputStreamDrl == null)
-				{
-					logger.error("Could not find language: " + ruleLanguage);
-				}
-				else
-				{
-					language = getString(inputStreamDsl);
-				}
-			}
-			return rules + language;
-		}
-
-	}
-
-	private static String getString (InputStream in) throws IOException
-	{
-		StringBuffer stringBuffer = new StringBuffer();
-		byte[] b = new byte[4096];
-		for (int i; (i = in.read(b)) != -1;)
-		{
-			stringBuffer.append(new String(b, 0, i));
-		}
-		return stringBuffer.toString();
-	}
-}
+/*
+ * 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.internal.soa.esb.services.routing.cbr;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.drools.RuleBase;
+import org.drools.RuleBaseFactory;
+import org.drools.WorkingMemory;
+import org.drools.compiler.DroolsParserException;
+import org.drools.compiler.PackageBuilder;
+import org.drools.rule.Package;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+import org.jboss.soa.esb.services.routing.cbr.CBRException;
+import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter;
+
+/**
+ * The Implementation of a rule based Content Router. Here we use JBossRules. We
+ * keep a HashMap of so called working memories for performance reasons.
+ * 
+ * @author kstam at redhat.com
+ * 
+ */
+public class JBossRulesRouter extends ContentBasedRouter
+{
+	private static Map<String, RuleBase> ruleBases = new ConcurrentHashMap<String, RuleBase>();
+
+	private static Map<String, String> ruleSets = new ConcurrentHashMap<String, String>();
+
+	private static Logger logger = Logger.getLogger(JBossRulesRouter.class);
+
+	/**
+	 * Route the message, where the routing rules are supplied as part of the
+	 * message itself. We don't support this yet, as I don't see the need right
+	 * now. However when the need arises, this is were it goes.
+	 * 
+	 * @param message -
+	 *            Message that needs routing.
+	 */
+	public List<String> route (Message message)
+	{
+		logger.log(Priority.ERROR, "Do not use, this is not implemented");
+		// Route to /dev/null?
+		return null;
+	}
+
+	/**
+	 * Route the message, using the given ruleSet (drl).
+	 * 
+	 * @param ruleSet -
+	 *            Filename of the drl that will be used.
+	 * @param message -
+	 *            Message that needs routing.
+	 */
+	public List<String> route (String ruleSet, boolean ruleReload,
+			Message message)
+	{
+		return route(ruleSet, null, ruleReload, message);
+	}
+
+	/**
+	 * Route the message, where the routing rules are supplied as part of the
+	 * message itself. We don't support this yet, as I don't see the need right
+	 * now. However when the need arises, this is were it goes.
+	 * 
+	 * @param ruleSet -
+	 *            Filename of the drl that will be used.
+	 * @param ruleLanguage -
+	 *            Filename of the dsl that will be used.
+	 * @param message -
+	 *            Message that needs routing.
+	 */
+	@SuppressWarnings("unchecked")
+	public List<String> route (String ruleSet, String ruleLanguage,
+			boolean ruleReload, Message message)
+	{
+		List<String> destinationServices = new ArrayList<String>();
+		try
+		{
+			String newRuleSet = null;
+			boolean isRulesChanged = false;
+
+			if (ruleReload)
+			{
+				String currentRuleSet = ruleSets.get(ruleSet);
+				newRuleSet = getRules(ruleSet, ruleLanguage);
+				if (currentRuleSet == null || !currentRuleSet
+						.equals(newRuleSet))
+				{
+					isRulesChanged = true;
+				}
+			}
+			RuleBase ruleBase = ruleBases.get(ruleSet);
+			if (ruleBase == null || isRulesChanged)
+			{
+				logger.log(Priority.INFO,
+						"Reading ruleSet from file=" + ruleSet);
+				ruleBase = readRuleBase(ruleSet, ruleLanguage);
+				if (ruleBase != null) ruleBases.put(ruleSet, ruleBase);
+				if (newRuleSet == null)
+				{
+					newRuleSet = getRules(ruleSet, ruleLanguage);
+				}
+				if (ruleSet != null) ruleSets.put(ruleSet, newRuleSet);
+			}
+			WorkingMemory workingMemory = ruleBase.newWorkingMemory();
+			logger.log(Priority.DEBUG,
+					"Obtained message=" + message + " with ruleSet=" + ruleSet);
+			workingMemory.setGlobal("destinationServices", destinationServices);
+			workingMemory.assertObject(message);
+			logger.log(Priority.INFO, "Fire the JBossRules Engine");
+			workingMemory.fireAllRules();
+			destinationServices = (List) workingMemory
+					.getGlobal("destinationServices"); // is this needed?
+			logger.log(Priority.DEBUG,
+					"Destination Services List: " + destinationServices);
+			Boolean isDeliverMessages = (Boolean) message.getProperties()
+					.getProperty(MessageRouter.DELIVER_MESSAGES);
+			// Deliver the message to their desitinations unless told not to.
+			if (!Boolean.FALSE.equals(isDeliverMessages))
+			{
+				deliverMessages(destinationServices, message);
+			}
+		}
+		catch (Exception e)
+		{
+			logger.log(Priority.ERROR,
+					e.toString() + ". Message is not routed.", e);
+			// Route to /dev/null?
+		}
+		return destinationServices;
+	}
+
+	/**
+	 * Reading the rules and dsl from files. Note that we may want to allow
+	 * other ways to set the rule, but for now it's just files.
+	 */
+	private static RuleBase readRuleBase (String rulesFile, String ruleLanguage)
+			throws DroolsParserException, IOException, CBRException
+	{
+		// read in the rules
+		logger.debug("Going to read the rule: " + rulesFile);
+		InputStream inputStreamDrl = JBossRulesRouter.class
+				.getResourceAsStream("/" + rulesFile);
+		if (inputStreamDrl == null)
+		{
+			logger.error("Could not find rulesFile: " + rulesFile);
+			return null;
+		}
+		else
+		{
+			Reader rules = new InputStreamReader(inputStreamDrl);
+			PackageBuilder builder = new PackageBuilder();
+			// this wil parse and compile in one step
+			if (ruleLanguage == null)
+			{
+				builder.addPackageFromDrl(rules);
+			}
+			else
+			{
+				logger.debug("Going to read the language: " + ruleLanguage);
+				InputStream inputStreamDsl = JBossRulesRouter.class
+						.getResourceAsStream("/" + ruleLanguage);
+				if (inputStreamDsl == null)
+				{
+					logger.error("Could not find ruleLanguage: " + rulesFile);
+				}
+				else
+				{
+					Reader dsl = new InputStreamReader(inputStreamDsl);
+					builder.addPackageFromDrl(rules, dsl);
+				}
+			}
+			// get the compiled package (which is serializable)
+			Package pkg = builder.getPackage();
+			// add the package to a rulebase (deploy the rule package).
+			
+			try
+			{
+				RuleBase ruleBase = RuleBaseFactory.newRuleBase();
+				ruleBase.addPackage(pkg);
+				
+				return ruleBase;
+			}
+			catch (Exception ex)
+			{
+				throw new CBRException(ex);
+			}
+		}
+	}
+
+	/**
+	 * Reading the rules and dsl from files. Note that we may want to allow
+	 * other ways to set the rule, but for now it's just files.
+	 */
+	private static String getRules (String rulesFile, String ruleLanguage)
+			throws IOException
+	{
+		logger.debug("Going to hash the rule: " + rulesFile);
+		InputStream inputStreamDrl = JBossRulesRouter.class
+				.getResourceAsStream("/" + rulesFile);
+		if (inputStreamDrl == null)
+		{
+			logger.error("Could not find rulesFile: " + rulesFile);
+			return null;
+		}
+		else
+		{
+			String rules = getString(inputStreamDrl);
+			String language = "";
+			if (ruleLanguage != null)
+			{
+				logger.debug("Going to hash the language: " + ruleLanguage);
+				InputStream inputStreamDsl = JBossRulesRouter.class
+						.getResourceAsStream("/" + ruleLanguage);
+				if (inputStreamDrl == null)
+				{
+					logger.error("Could not find language: " + ruleLanguage);
+				}
+				else
+				{
+					language = getString(inputStreamDsl);
+				}
+			}
+			return rules + language;
+		}
+
+	}
+
+	private static String getString (InputStream in) throws IOException
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		byte[] b = new byte[4096];
+		for (int i; (i = in.read(b)) != -1;)
+		{
+			stringBuffer.append(new String(b, 0, i));
+		}
+		return stringBuffer.toString();
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/persistence/MessageStoreType.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,96 +1,96 @@
-/*
-* 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.services.registry;
-
-import java.util.Collection;
-
-import org.jboss.soa.esb.addressing.EPR;
-/**
- * Registry interface for the ESB.
- *
- * @author Kurt Stam
- */
-public interface Registry 
-{
-	/**
-	 * Removes a service from the Registry along with all the ServiceBindings underneath it.
-	 *
-	 * @param category           - name of the service category, for example 'transformation'.
-	 * @param serviceName        - name of the service, for example 'smooks'.
-	 * @throws RegistryException
-	 */
-	public void unRegisterService(String category, String serviceName) throws RegistryException;
-	/**
-	 * Registers an EPR under the specified category and service. If the specified service does
-	 * not exist, it will be created at the same time.
-	 * 
-	 * @param serviceCategoryName - name of the category to which the service belongs.
-	 * @param serviceName         - name of the service to which the EPS belongs.
-	 * @param serviceDescription  - human readable description of the service, 
-	 * 							   only used when it the service does not yet exist.
-	 * @param epr				  - the EndPointReference (EPR) that needs to be registered.
-	 * @param eprDescription	  - human readable description of the EPR
-	 * @throws RegistryException
-	 */
-	public void registerEPR(String serviceCategoryName, String serviceName, String serviceDescription, EPR epr, String eprDescription) 
-	throws RegistryException;
-	/**
-	 * Removes an EPR from the Registry. 
-	 * @param serviceCategoryName - name of the category to which the service belongs.
-	 * @param serviceName         - name of the service to which the EPS belongs.
-	 * @param epr                 - the EndPointReference (EPR) that needs to be unregistered.
-	 * @throws RegistryException
-	 */
-	public void unRegisterEPR(String serviceCategoryName, String serviceName, EPR epr) throws RegistryException;
-	/** 
-	 * Find all Services assigned to the Red Hat/JBossESB organization.
-	 * @return Collection of Strings containing the service names.
-	 * @throws RegistryException
-	 */
-	public Collection<String> findAllServices() throws RegistryException;
-	/**
-	 * Find all services that belong to the supplied category. 
-	 * 
-	 * @param serviceCategoryName - name of the category to which the service belongs.
-	 * @return Collection of Strings containing the service names
-	 * @throws RegistryException
-	 */
-	public Collection<String> findServices(String serviceCategoryName) throws RegistryException;
-	/**
-	 * Finds all the EPRs that belong to a specific category and service combination.
-	 * 
-	 * @param serviceCategoryName - name of the category to which the service belongs.
-	 * @param serviceName         - name of the service to which the EPS belongs.
-	 * @return Collection of EPRs.
-	 * @throws RegistryException
-	 */
-	public Collection<EPR> findEPRs(String serviceCategoryName, String serviceName) throws RegistryException;
-	/**
-	 * Returns the first EPR in the list that belong to a specific category and service combination.
-	 * 
-	 * @param serviceCategoryName - name of the category to which the service belongs.
-	 * @param serviceName         - name of the service to which the EPS belongs.
-	 * @return EPR.
-	 * @throws RegistryException
-	 */
-	public EPR findEPR(String serviceCategoryName, String serviceName) throws RegistryException;
-}
+/*
+* 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.services.registry;
+
+import java.util.Collection;
+
+import org.jboss.soa.esb.addressing.EPR;
+/**
+ * Registry interface for the ESB.
+ *
+ * @author Kurt Stam
+ */
+public interface Registry 
+{
+	/**
+	 * Removes a service from the Registry along with all the ServiceBindings underneath it.
+	 *
+	 * @param category           - name of the service category, for example 'transformation'.
+	 * @param serviceName        - name of the service, for example 'smooks'.
+	 * @throws RegistryException
+	 */
+	public void unRegisterService(String category, String serviceName) throws RegistryException;
+	/**
+	 * Registers an EPR under the specified category and service. If the specified service does
+	 * not exist, it will be created at the same time.
+	 * 
+	 * @param serviceCategoryName - name of the category to which the service belongs.
+	 * @param serviceName         - name of the service to which the EPS belongs.
+	 * @param serviceDescription  - human readable description of the service, 
+	 * 							   only used when it the service does not yet exist.
+	 * @param epr				  - the EndPointReference (EPR) that needs to be registered.
+	 * @param eprDescription	  - human readable description of the EPR
+	 * @throws RegistryException
+	 */
+	public void registerEPR(String serviceCategoryName, String serviceName, String serviceDescription, EPR epr, String eprDescription) 
+	throws RegistryException;
+	/**
+	 * Removes an EPR from the Registry. 
+	 * @param serviceCategoryName - name of the category to which the service belongs.
+	 * @param serviceName         - name of the service to which the EPS belongs.
+	 * @param epr                 - the EndPointReference (EPR) that needs to be unregistered.
+	 * @throws RegistryException
+	 */
+	public void unRegisterEPR(String serviceCategoryName, String serviceName, EPR epr) throws RegistryException;
+	/** 
+	 * Find all Services assigned to the Red Hat/JBossESB organization.
+	 * @return Collection of Strings containing the service names.
+	 * @throws RegistryException
+	 */
+	public Collection<String> findAllServices() throws RegistryException;
+	/**
+	 * Find all services that belong to the supplied category. 
+	 * 
+	 * @param serviceCategoryName - name of the category to which the service belongs.
+	 * @return Collection of Strings containing the service names
+	 * @throws RegistryException
+	 */
+	public Collection<String> findServices(String serviceCategoryName) throws RegistryException;
+	/**
+	 * Finds all the EPRs that belong to a specific category and service combination.
+	 * 
+	 * @param serviceCategoryName - name of the category to which the service belongs.
+	 * @param serviceName         - name of the service to which the EPS belongs.
+	 * @return Collection of EPRs.
+	 * @throws RegistryException
+	 */
+	public Collection<EPR> findEPRs(String serviceCategoryName, String serviceName) throws RegistryException;
+	/**
+	 * Returns the first EPR in the list that belong to a specific category and service combination.
+	 * 
+	 * @param serviceCategoryName - name of the category to which the service belongs.
+	 * @param serviceName         - name of the service to which the EPS belongs.
+	 * @return EPR.
+	 * @throws RegistryException
+	 */
+	public EPR findEPR(String serviceCategoryName, String serviceName) throws RegistryException;
+}


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/Registry.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryException.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,42 +1,42 @@
-/*
- * 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.services.registry;
-
-/**
- * @author kstam
- * 
- */
-public class RegistryException extends Exception {
-    private static final long serialVersionUID = 1L;
-    
-    public RegistryException(){
-        super();
-    }
-    
-    public RegistryException (String msg){
-        super(msg);
-    }
-    
-    public RegistryException (String msg, Throwable cause){
-        super (msg, cause);
-    }
-}
+/*
+ * 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.services.registry;
+
+/**
+ * @author kstam
+ * 
+ */
+public class RegistryException extends Exception {
+    private static final long serialVersionUID = 1L;
+    
+    public RegistryException(){
+        super();
+    }
+    
+    public RegistryException (String msg){
+        super(msg);
+    }
+    
+    public RegistryException (String msg, Throwable cause){
+        super (msg, cause);
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,67 +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.services.registry;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.common.Factory;
-
-/**
- * Returns an Instance of the Registry.
- * 
- * @author kstam
- * 
- */
-public class RegistryFactory extends Factory
-{
-	private static Logger logger = Logger.getLogger(RegistryFactory.class);
-
-	public static Registry getRegistry() throws RegistryException
-	{
-		Registry registry = null;
-		String className = Configuration.getRegistryImplementationClass();
-		logger.log(Priority.DEBUG, "Going to load " + className);
-		
-		try
-		{
-			// instruct class loader to load the Registry Implementation
-			Class registryClass = getClassForName(className);
-			// Try to instance the Registry
-			registry = (Registry) registryClass.newInstance();
-		}
-		catch (ClassNotFoundException cnfex)
-		{
-			throw new RegistryException("Registry Implementation=" + className
-					+ " not found", cnfex);
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			
-			throw new RegistryException("Invocation exception. "
-					+ e.getLocalizedMessage(), e);
-		}
-		
-		return registry;
-	}
-}
+/*
+ * 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.services.registry;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.Factory;
+
+/**
+ * Returns an Instance of the Registry.
+ * 
+ * @author kstam
+ * 
+ */
+public class RegistryFactory extends Factory
+{
+	private static Logger logger = Logger.getLogger(RegistryFactory.class);
+
+	public static Registry getRegistry() throws RegistryException
+	{
+		Registry registry = null;
+		String className = Configuration.getRegistryImplementationClass();
+		logger.log(Priority.DEBUG, "Going to load " + className);
+		
+		try
+		{
+			// instruct class loader to load the Registry Implementation
+			Class registryClass = getClassForName(className);
+			// Try to instance the Registry
+			registry = (Registry) registryClass.newInstance();
+		}
+		catch (ClassNotFoundException cnfex)
+		{
+			throw new RegistryException("Registry Implementation=" + className
+					+ " not found", cnfex);
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+			
+			throw new RegistryException("Invocation exception. "
+					+ e.getLocalizedMessage(), e);
+		}
+		
+		return registry;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/registry/RegistryFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouter.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouter.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouter.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,135 +1,135 @@
-/*
- * 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.services.routing;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.couriers.Courier;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierFactory;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.services.registry.Registry;
-import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.registry.RegistryFactory;
-
-/**
- * Generic Message Router Interface.
- * 
- * @author kurt.stam at redhat.com
- * 
- */
-public abstract class MessageRouter
-{
-	private static Logger logger = Logger.getLogger(MessageRouter.class);
-
-	public static String ROUTING_DESTINATION_SERVICE_LIST = "routing.destinationServiceList";
-
-	public static String DELIVER_MESSAGES = "routing.deliverMessages";
-
-	/**
-	 * Routes the message to the next destination.
-	 * 
-	 * @param message
-	 * @return List of Strings containing the services to which the message was
-	 *         routed.
-	 */
-	public abstract List<String> route(Message message);
-
-	/**
-	 * Sends the message on to the service with the name(s) we just obtained
-	 * from the routing.
-	 * 
-	 * @param destinationServices -
-	 *            Collection with the name of the destination services.
-	 * @param message -
-	 *            the message that needs routing and delivery
-	 */
-	
-	// TODO handle failures?
-	
-	public synchronized static void deliverMessages(
-			Collection<String> destinationServices, Message message)
-	{
-		for (Iterator<String> i = destinationServices.iterator(); i.hasNext();)
-		{
-			String destinationService = i.next();
-			String[] strArray = destinationService.split(":");
-			String category = strArray[0];
-			String serviceName = strArray[1];
-			boolean isSent = false;
-			try
-			{
-				Registry registry = RegistryFactory.getRegistry();
-				logger.log(Priority.INFO, "Looking for EPRs for category="
-						+ category + " and serviceName=" + serviceName);
-				Collection<EPR> eprs = registry.findEPRs(category, serviceName);
-				for (Iterator<EPR> eprIter = eprs.iterator(); eprIter.hasNext();)
-				{
-					EPR epr = eprs.iterator().next();
-					logger.log(Priority.INFO, "Message=" + message
-							+ " -> Destination=" + destinationService);
-					try
-					{
-						// Give the message to the courier
-						Courier courier = CourierFactory.getCourier(epr);
-						courier.deliver(message);
-						isSent = true;
-						break;
-					}
-					catch (MalformedEPRException ex)
-					{
-						logger.log(Priority.ERROR, "Malformed epr:"
-								+ epr);
-					}
-					catch (CourierException ce)
-					{
-						logger.log(Priority.ERROR, "Could not send using epr:"
-								+ epr);
-						// if there are more eprs in the collection is will try
-						// the next one.
-					}
-				}
-				if (isSent == false)
-				{
-					logger
-							.log(Priority.ERROR,
-									"Could not find any valid EPRs. Message is not routed.");
-					// Route to /dev/null?
-				}
-			}
-			catch (RegistryException re)
-			{
-				logger.log(Priority.ERROR,
-						"Could not obtain an EPR from the Registry. Message is not routed. "
-								+ re.getLocalizedMessage(), re);
-				// Route to /dev/null?
-			}
-		}
-	}
-
-}
+/*
+ * 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.services.routing;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.couriers.Courier;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierFactory;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.registry.RegistryFactory;
+
+/**
+ * Generic Message Router Interface.
+ * 
+ * @author kurt.stam at redhat.com
+ * 
+ */
+public abstract class MessageRouter
+{
+	private static Logger logger = Logger.getLogger(MessageRouter.class);
+
+	public static String ROUTING_DESTINATION_SERVICE_LIST = "routing.destinationServiceList";
+
+	public static String DELIVER_MESSAGES = "routing.deliverMessages";
+
+	/**
+	 * Routes the message to the next destination.
+	 * 
+	 * @param message
+	 * @return List of Strings containing the services to which the message was
+	 *         routed.
+	 */
+	public abstract List<String> route(Message message);
+
+	/**
+	 * Sends the message on to the service with the name(s) we just obtained
+	 * from the routing.
+	 * 
+	 * @param destinationServices -
+	 *            Collection with the name of the destination services.
+	 * @param message -
+	 *            the message that needs routing and delivery
+	 */
+	
+	// TODO handle failures?
+	
+	public synchronized static void deliverMessages(
+			Collection<String> destinationServices, Message message)
+	{
+		for (Iterator<String> i = destinationServices.iterator(); i.hasNext();)
+		{
+			String destinationService = i.next();
+			String[] strArray = destinationService.split(":");
+			String category = strArray[0];
+			String serviceName = strArray[1];
+			boolean isSent = false;
+			try
+			{
+				Registry registry = RegistryFactory.getRegistry();
+				logger.log(Priority.INFO, "Looking for EPRs for category="
+						+ category + " and serviceName=" + serviceName);
+				Collection<EPR> eprs = registry.findEPRs(category, serviceName);
+				for (Iterator<EPR> eprIter = eprs.iterator(); eprIter.hasNext();)
+				{
+					EPR epr = eprs.iterator().next();
+					logger.log(Priority.INFO, "Message=" + message
+							+ " -> Destination=" + destinationService);
+					try
+					{
+						// Give the message to the courier
+						Courier courier = CourierFactory.getCourier(epr);
+						courier.deliver(message);
+						isSent = true;
+						break;
+					}
+					catch (MalformedEPRException ex)
+					{
+						logger.log(Priority.ERROR, "Malformed epr:"
+								+ epr);
+					}
+					catch (CourierException ce)
+					{
+						logger.log(Priority.ERROR, "Could not send using epr:"
+								+ epr);
+						// if there are more eprs in the collection is will try
+						// the next one.
+					}
+				}
+				if (isSent == false)
+				{
+					logger
+							.log(Priority.ERROR,
+									"Could not find any valid EPRs. Message is not routed.");
+					// Route to /dev/null?
+				}
+			}
+			catch (RegistryException re)
+			{
+				logger.log(Priority.ERROR,
+						"Could not obtain an EPR from the Registry. Message is not routed. "
+								+ re.getLocalizedMessage(), re);
+				// Route to /dev/null?
+			}
+		}
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouterException.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouterException.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouterException.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,51 +1,51 @@
-/*
- * 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.services.routing;
-
-/**
- * @author kstam
- * 
- */
-public class MessageRouterException extends Exception
-{
-	private static final long serialVersionUID = 1L;
-
-	public MessageRouterException()
-	{
-		super();
-	}
-
-	public MessageRouterException(String msg)
-	{
-		super(msg);
-	}
-
-	public MessageRouterException (Throwable cause)
-	{
-		super(cause);
-	}
-	
-	public MessageRouterException(String msg, Throwable cause)
-	{
-		super(msg, cause);
-	}
-}
+/*
+ * 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.services.routing;
+
+/**
+ * @author kstam
+ * 
+ */
+public class MessageRouterException extends Exception
+{
+	private static final long serialVersionUID = 1L;
+
+	public MessageRouterException()
+	{
+		super();
+	}
+
+	public MessageRouterException(String msg)
+	{
+		super(msg);
+	}
+
+	public MessageRouterException (Throwable cause)
+	{
+		super(cause);
+	}
+	
+	public MessageRouterException(String msg, Throwable cause)
+	{
+		super(msg, cause);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/MessageRouterException.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/CBRException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,70 +1,70 @@
-/*
- * 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.services.routing.cbr;
-
-import java.util.List;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.services.routing.MessageRouter;
-
-/**
- * Content Based Router Interface.
- * 
- * @author kurt.stam at redhat.com
- * 
- */
-public abstract class ContentBasedRouter extends MessageRouter
-{
-	/**
-	 * Route a message using a certain ruleSet wich and reference a custom
-	 * Domain Specific Language (DSL).
-	 * 
-	 * @param ruleSet -
-	 *            String reference to a file which contains a ruleSet.
-	 * @param ruleLanguage -
-	 *            String reference to a file which contais a custom rule
-	 *            language definition
-	 * @param ruleReload -
-	 *            if set to true, a ruleSet update should result in reloading
-	 *            the ruleSet.
-	 * @param message -
-	 *            Message that needs routing.
-	 * @return List of routing destinations.
-	 */
-	public abstract List<String> route (String ruleSet, String ruleLanguage,
-			boolean ruleReload, Message message);
-
-	/**
-	 * Route a message using a certain ruleSet.
-	 * 
-	 * @param ruleSet -
-	 *            String reference to a file which contains a ruleSet.
-	 * @param ruleReload -
-	 *            if set to true, a ruleSet update should result in reloading
-	 *            the ruleSet.
-	 * @param message -
-	 *            Message that needs routing.
-	 * @return List of routing destinations.
-	 */
-	public abstract List<String> route (String ruleSet, boolean ruleReload,
-			Message message);
-}
+/*
+ * 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.services.routing.cbr;
+
+import java.util.List;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+
+/**
+ * Content Based Router Interface.
+ * 
+ * @author kurt.stam at redhat.com
+ * 
+ */
+public abstract class ContentBasedRouter extends MessageRouter
+{
+	/**
+	 * Route a message using a certain ruleSet wich and reference a custom
+	 * Domain Specific Language (DSL).
+	 * 
+	 * @param ruleSet -
+	 *            String reference to a file which contains a ruleSet.
+	 * @param ruleLanguage -
+	 *            String reference to a file which contais a custom rule
+	 *            language definition
+	 * @param ruleReload -
+	 *            if set to true, a ruleSet update should result in reloading
+	 *            the ruleSet.
+	 * @param message -
+	 *            Message that needs routing.
+	 * @return List of routing destinations.
+	 */
+	public abstract List<String> route (String ruleSet, String ruleLanguage,
+			boolean ruleReload, Message message);
+
+	/**
+	 * Route a message using a certain ruleSet.
+	 * 
+	 * @param ruleSet -
+	 *            String reference to a file which contains a ruleSet.
+	 * @param ruleReload -
+	 *            if set to true, a ruleSet update should result in reloading
+	 *            the ruleSet.
+	 * @param message -
+	 *            Message that needs routing.
+	 * @return List of routing destinations.
+	 */
+	public abstract List<String> route (String ruleSet, boolean ruleReload,
+			Message message);
+}


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouterFactory.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouterFactory.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouterFactory.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,56 +1,56 @@
-/*
-* 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.services.routing.cbr;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.common.Factory;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-/**
- * Returns an instance of the Registry.
- *
- * @author kurt.stam at redhat.com
- *
- */
-public class ContentBasedRouterFactory extends Factory {
-    private static Logger logger = Logger.getLogger(ContentBasedRouterFactory.class);
-
-    public static ContentBasedRouter getRouter() throws MessageRouterException
-    {
-	ContentBasedRouter cbr = null;
-        String className = Configuration
-                .getContentBasedRouterImplementationClass();
-        logger.log(Priority.DEBUG, "Going to load " + className);
-    try {
-        // instruct class loader to load the Content Based  Router Implementation
-        Class cbrClass = getClassForName(className);
-        // Try to get an instance of the CBR
-        cbr = (ContentBasedRouter) cbrClass.newInstance();
-    } catch (ClassNotFoundException cnfex) {
-        throw new MessageRouterException("Content Based Router Implementation=" + className + " not found", cnfex);
-    } catch (Exception e) {
-    	throw new MessageRouterException(className + " invokation problem. " + e.getLocalizedMessage(), e);
-    		}
-    		return cbr;
-    	}
-    }
+/*
+* 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.services.routing.cbr;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.Factory;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+/**
+ * Returns an instance of the Registry.
+ *
+ * @author kurt.stam at redhat.com
+ *
+ */
+public class ContentBasedRouterFactory extends Factory {
+    private static Logger logger = Logger.getLogger(ContentBasedRouterFactory.class);
+
+    public static ContentBasedRouter getRouter() throws MessageRouterException
+    {
+	ContentBasedRouter cbr = null;
+        String className = Configuration
+                .getContentBasedRouterImplementationClass();
+        logger.log(Priority.DEBUG, "Going to load " + className);
+    try {
+        // instruct class loader to load the Content Based  Router Implementation
+        Class cbrClass = getClassForName(className);
+        // Try to get an instance of the CBR
+        cbr = (ContentBasedRouter) cbrClass.newInstance();
+    } catch (ClassNotFoundException cnfex) {
+        throw new MessageRouterException("Content Based Router Implementation=" + className + " not found", cnfex);
+    } catch (Exception e) {
+    	throw new MessageRouterException(className + " invokation problem. " + e.getLocalizedMessage(), e);
+    		}
+    		return cbr;
+    	}
+    }


Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRouterFactory.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/tests/application.xml
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/application.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/tests/application.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -7,8 +7,8 @@
     <display-name>JbossEsb AppServer basic services</display-name>
 	<module>
 		<ejb>jbossesb-instr-all.jar</ejb>
-	</module>
-	<module>
-		<java>jbossts-common.jar</java>
 	</module>
+	<module>
+		<java>jbossts-common.jar</java>
+	</module>
 </application>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/core/services/tests/application.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/tests/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/tests/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -19,11 +19,11 @@
         <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
     </condition>
 
-    <path id="org.jboss.esb.tests.base.classpath">
-    	<fileset dir="${org.jboss.esb.ext.lib.dir}"
+    <path id="org.jboss.esb.tests.base.classpath">
+    	<fileset dir="${org.jboss.esb.ext.lib.dir}"
     		excludes="*.jar" includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
         <fileset dir="${org.jboss.esb.ext.lib.dir}"
-                 includes="*.jar"/>
+                 includes="*.jar"/>
     	<pathelement location="../rules"/>
         <pathelement location="${org.jboss.esb.module.classes.dir}"/>
         <pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>


Property changes on: labs/jbossesb/trunk/product/core/services/tests/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,285 +1,285 @@
-/*
-* 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.internal.soa.esb.services.registry;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.InputStream;
-import java.net.URLDecoder;
-import java.sql.DriverManager;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-
-import javax.xml.registry.BulkResponse;
-import javax.xml.registry.BusinessLifeCycleManager;
-import javax.xml.registry.BusinessQueryManager;
-import javax.xml.registry.Connection;
-import javax.xml.registry.JAXRException;
-import javax.xml.registry.RegistryService;
-import javax.xml.registry.infomodel.Classification;
-import javax.xml.registry.infomodel.ClassificationScheme;
-import javax.xml.registry.infomodel.Organization;
-import javax.xml.registry.infomodel.Service;
-import javax.xml.registry.infomodel.ServiceBinding;
-import javax.xml.registry.infomodel.User;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.apache.log4j.xml.DOMConfigurator;
-import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.testutils.FileUtil;
-import org.jboss.soa.esb.testutils.HsqldbUtil;
-import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Testing the registry.
- * 
- * @author kstam
- *
- */
-public class JAXRRegistryUnitTest
-{
-	private static Logger logger = Logger.getLogger(JAXRRegistryUnitTest.class);
-    private static String mDbDriver;
-	private static String mDbUrl;
-	private static String mDbUsername;
-	private static String mDbPassword;
-	/**
-	 * Tests the successful creation of the RED HAT/JBossESB Organization.
-	 */
-	@Test
-	public void publishOrganization() 
-	{
-		try {
-			Organization org = JAXRRegistryImpl.createJBossESBOrganization();
-			logger.log(Priority.INFO, "Succesfully created organization: " + org.getName().getValue());
-			assertEquals("Red Hat/JBossESB", org.getName().getValue());
-		} catch (JAXRException je) {
-			logger.log(Priority.ERROR, je.getLocalizedMessage(), je);
-			assertTrue(false);
-		}
-	}
-	@Test
-	public void findOrganization() 
-	{
-		try {
-			Organization org = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB");
-			logger.log(Priority.INFO, "Succesfully created organization: " + org.getName().getValue());
-			assertEquals("Red Hat/JBossESB", org.getName().getValue());
-		} catch (JAXRException je) {
-			logger.log(Priority.ERROR, je.getLocalizedMessage(), je);
-			assertTrue(false);
-		}
-		try {
-			Organization org = JAXRRegistryImpl.findOrganization("Not Existing Org");
-			logger.log(Priority.INFO, "Could not find non-existing organization.");
-			assertEquals(null, org);
-		} catch (JAXRException je) {
-			logger.log(Priority.ERROR, je.getLocalizedMessage(), je);
-			assertTrue(false);
-		}
-	}
-	/**
-	 * Tests the successful registration of a Service.
-	 *
-	 */
-	@Test
-	public void publishService()
-	{
-		try {
-			JAXRRegistryImpl registry = new JAXRRegistryImpl();
-			registry.registerService("registry", "Registry Test ServiceName", "Registry Test Service Description");
-		} catch (JAXRException je) {
-			logger.log(Priority.ERROR, je.getLocalizedMessage(), je);
-			assertTrue(false);
-		}
-	}
-	@Test
-	public void publishServiceBinding()
-	{
-		try {
-			EPR epr = new EPR();
-			JAXRRegistryImpl registry = new JAXRRegistryImpl();
-			registry.registerEPR("registry", "Registry Test ServiceName", "Registry Test Service Description",
-					epr, "EPR description");
-			registry.registerEPR("registry", "Registry Test ServiceName", "Registry Test Service Description",
-					epr, "EPR description");
-			registry.unRegisterEPR("registry", "Registry Test ServiceName", epr);
-		} catch (RegistryException re) {
-			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
-			assertTrue(false);
-		}
-	}
-	/**
-	 * Queries the newly added information
-	 * @throws Exception
-	 */
-	@Test
-	public void findServicesForAnOrganization()
-    {
-		try {
-			Organization org = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB");
-			//Listing out the services and their Bindings
-			logger.log(Priority.INFO, "-------------------------------------------------");
-			logger.log(Priority.INFO, "Organization name: " + org.getName().getValue());
-			logger.log(Priority.INFO, "Description: " + org.getDescription().getValue());
-			logger.log(Priority.INFO, "Key id: " + org.getKey().getId());
-			User primaryContact = org.getPrimaryContact();
-			logger.log(Priority.INFO, "Primary Contact: " + primaryContact.getPersonName().getFullName());
-			Collection services = org.getServices();
-			for (Iterator serviceIter = services.iterator();serviceIter.hasNext();) {
-				Service service = (Service) serviceIter.next();
-				logger.log(Priority.INFO, "- Service Name: " + service.getName().getValue());
-				logger.log(Priority.INFO, "  Service Key : " + service.getKey().getId());
-				Collection serviceBindings = service.getServiceBindings();
-				for (Iterator serviceBindingIter = serviceBindings.iterator();serviceBindingIter.hasNext();){
-					ServiceBinding serviceBinding = (ServiceBinding) serviceBindingIter.next();
-					logger.log(Priority.INFO, "  ServiceBinding Description: " + serviceBinding.getDescription().getValue());
-					String xml = URLDecoder.decode(serviceBinding.getAccessURI(),"UTF-8");
-					logger.log(Priority.INFO, "  ServiceBinding URI: " + xml);
-					assertEquals(EPRHelper.toXMLString(new EPR()),xml);
-				}
-			}
-			logger.log(Priority.INFO, "-------------------------------------------------");
-	    } catch (Exception je) {
-			je.printStackTrace();
-			assertTrue(false);
-		}
-    }
-	/**
-	 * This doesn't work because scout drops the classifications on the floor.
-	 * We're ignoring this test until I come up with a patch.
-	 *
-	 */
-	public void findServicesByClassification()
-	{
-		Connection connection = JAXRRegistryImpl.getConnection();
-		try {
-			// Get registry service and business query manager
-			RegistryService rs = connection.getRegistryService();
-			BusinessQueryManager bqm = rs.getBusinessQueryManager();
-			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
-			ClassificationScheme classificationScheme = bqm.findClassificationSchemeByName(null, "uddi-org:general_keywords");
-			Classification classification = blm.createClassification(classificationScheme,
-					"Test transformation service", "transformation");
-			Collection<Classification> classifications = new ArrayList<Classification>();
-			classifications.add(classification);
-			//Here I'd like to test filtering by this classification, but scout ignored the classification
-			String name=classificationScheme.getName().getValue();
-			System.out.println("Name=" + name);
-			Collection<String> nameParams = new ArrayList<String>();
-			//The name of the service is wild
-			nameParams.add("%");
-			BulkResponse bs = bqm.findServices(null, null,nameParams,classifications, null);
-			int status = bs.getStatus();
-			System.out.println("status=" + status);
-		} catch (JAXRException je) {
-			je.printStackTrace();
-		}
-		finally{}
-	}
-	/**
-	 * Setup the database.
-	 * @throws Exception
-	 */
-	@BeforeClass
-	public static void runBeforeAllTests() throws Exception {
-		try {
-			DOMConfigurator.configure(TestEnvironmentUtil.getUserDir() + "etc/test/resources/log4j.xml");
-			TestEnvironmentUtil.setESBPropertiesFileToUse();
-			//Set the juddi properties file in System so juddi will pick it up later and use the test values.
-			String juddiPropertiesFile = "/org/jboss/soa/esb/services/registry/juddi-unittest.properties";
-			System.setProperty("juddi.propertiesFile", juddiPropertiesFile);
-			//Read this properties file to get the db connection string
-			Properties props = new Properties();
-			InputStream inStream = Class.class.getResourceAsStream(juddiPropertiesFile);
-			props.load(inStream);
-			mDbDriver    = props.getProperty("juddi.jdbcDriver");
-			mDbUrl       = props.getProperty("juddi.jdbcUrl");
-			mDbUsername  = props.getProperty("juddi.jdbcUsername");
-			mDbPassword  = props.getProperty("juddi.jdbcPassword");
-			
-			String database="not tested yet";
-			if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
-				database = "hsqldb";
-				//Bring up hsql on default port 9001
-				HsqldbUtil.startHsqldb(TestEnvironmentUtil.getUserDir() + "build/hsqltestdb", "juddi");
-			} else if ("com.mysql.jdbc.Driver".equals(mDbDriver)) {
-				database = "mysql";
-			} //add and test your own database..
-			
-			//Get the registry-schema create scripts
-			String sqlDir = TestEnvironmentUtil.getUserDir() + "install/jUDDI-registry/sql/" + database + "/";
-			//Drop what is there now, if exists. We want to start fresh.
-			String sqlDropCmd      = FileUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
-			String sqlCreateCmd    = FileUtil.readTextFile(new File(sqlDir + "create_database.sql"));
-			String sqlInsertPubCmd = FileUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
-			
-			try {
-				Class.forName(mDbDriver);
-			} catch (Exception e) {
-				System.out.println("ERROR: failed to load " + database + " JDBC driver.");
-				e.printStackTrace();
-				return;
-			}
-			java.sql.Connection con = DriverManager.getConnection(mDbUrl, mDbUsername, mDbPassword);
-			Statement stmnt = con.createStatement();
-			System.out.println("Dropping the schema if exist");
-			stmnt.execute(sqlDropCmd);
-			System.out.println("Creating the juddi-schema");
-			stmnt.execute(sqlCreateCmd);
-			System.out.println("Adding the jbossesb publisher");
-			stmnt.execute(sqlInsertPubCmd);
-		} catch (Exception e) {
-			e.printStackTrace();
-			System.out.println("We should stop testing, since we don't have a db.");
-			assertTrue(false);
-		}
-	}
-	/**
-	 * Shutdown the database
-	 * @throws Exception
-	 */
-	@AfterClass
-	public static void runAfterAllTests() throws Exception {
-		if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
-			HsqldbUtil.stopHsqldb(mDbUrl, mDbUsername, mDbPassword);
-		}
-	}
-
-	public static junit.framework.Test suite() {
-		return new JUnit4TestAdapter(JAXRRegistryUnitTest.class);
-	}
-
-}
+/*
+* 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.internal.soa.esb.services.registry;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.InputStream;
+import java.net.URLDecoder;
+import java.sql.DriverManager;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Properties;
+
+import javax.xml.registry.BulkResponse;
+import javax.xml.registry.BusinessLifeCycleManager;
+import javax.xml.registry.BusinessQueryManager;
+import javax.xml.registry.Connection;
+import javax.xml.registry.JAXRException;
+import javax.xml.registry.RegistryService;
+import javax.xml.registry.infomodel.Classification;
+import javax.xml.registry.infomodel.ClassificationScheme;
+import javax.xml.registry.infomodel.Organization;
+import javax.xml.registry.infomodel.Service;
+import javax.xml.registry.infomodel.ServiceBinding;
+import javax.xml.registry.infomodel.User;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.apache.log4j.xml.DOMConfigurator;
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.testutils.FileUtil;
+import org.jboss.soa.esb.testutils.HsqldbUtil;
+import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Testing the registry.
+ * 
+ * @author kstam
+ *
+ */
+public class JAXRRegistryUnitTest
+{
+	private static Logger logger = Logger.getLogger(JAXRRegistryUnitTest.class);
+    private static String mDbDriver;
+	private static String mDbUrl;
+	private static String mDbUsername;
+	private static String mDbPassword;
+	/**
+	 * Tests the successful creation of the RED HAT/JBossESB Organization.
+	 */
+	@Test
+	public void publishOrganization() 
+	{
+		try {
+			Organization org = JAXRRegistryImpl.createJBossESBOrganization();
+			logger.log(Priority.INFO, "Succesfully created organization: " + org.getName().getValue());
+			assertEquals("Red Hat/JBossESB", org.getName().getValue());
+		} catch (JAXRException je) {
+			logger.log(Priority.ERROR, je.getLocalizedMessage(), je);
+			assertTrue(false);
+		}
+	}
+	@Test
+	public void findOrganization() 
+	{
+		try {
+			Organization org = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB");
+			logger.log(Priority.INFO, "Succesfully created organization: " + org.getName().getValue());
+			assertEquals("Red Hat/JBossESB", org.getName().getValue());
+		} catch (JAXRException je) {
+			logger.log(Priority.ERROR, je.getLocalizedMessage(), je);
+			assertTrue(false);
+		}
+		try {
+			Organization org = JAXRRegistryImpl.findOrganization("Not Existing Org");
+			logger.log(Priority.INFO, "Could not find non-existing organization.");
+			assertEquals(null, org);
+		} catch (JAXRException je) {
+			logger.log(Priority.ERROR, je.getLocalizedMessage(), je);
+			assertTrue(false);
+		}
+	}
+	/**
+	 * Tests the successful registration of a Service.
+	 *
+	 */
+	@Test
+	public void publishService()
+	{
+		try {
+			JAXRRegistryImpl registry = new JAXRRegistryImpl();
+			registry.registerService("registry", "Registry Test ServiceName", "Registry Test Service Description");
+		} catch (JAXRException je) {
+			logger.log(Priority.ERROR, je.getLocalizedMessage(), je);
+			assertTrue(false);
+		}
+	}
+	@Test
+	public void publishServiceBinding()
+	{
+		try {
+			EPR epr = new EPR();
+			JAXRRegistryImpl registry = new JAXRRegistryImpl();
+			registry.registerEPR("registry", "Registry Test ServiceName", "Registry Test Service Description",
+					epr, "EPR description");
+			registry.registerEPR("registry", "Registry Test ServiceName", "Registry Test Service Description",
+					epr, "EPR description");
+			registry.unRegisterEPR("registry", "Registry Test ServiceName", epr);
+		} catch (RegistryException re) {
+			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
+			assertTrue(false);
+		}
+	}
+	/**
+	 * Queries the newly added information
+	 * @throws Exception
+	 */
+	@Test
+	public void findServicesForAnOrganization()
+    {
+		try {
+			Organization org = JAXRRegistryImpl.findOrganization("Red Hat/JBossESB");
+			//Listing out the services and their Bindings
+			logger.log(Priority.INFO, "-------------------------------------------------");
+			logger.log(Priority.INFO, "Organization name: " + org.getName().getValue());
+			logger.log(Priority.INFO, "Description: " + org.getDescription().getValue());
+			logger.log(Priority.INFO, "Key id: " + org.getKey().getId());
+			User primaryContact = org.getPrimaryContact();
+			logger.log(Priority.INFO, "Primary Contact: " + primaryContact.getPersonName().getFullName());
+			Collection services = org.getServices();
+			for (Iterator serviceIter = services.iterator();serviceIter.hasNext();) {
+				Service service = (Service) serviceIter.next();
+				logger.log(Priority.INFO, "- Service Name: " + service.getName().getValue());
+				logger.log(Priority.INFO, "  Service Key : " + service.getKey().getId());
+				Collection serviceBindings = service.getServiceBindings();
+				for (Iterator serviceBindingIter = serviceBindings.iterator();serviceBindingIter.hasNext();){
+					ServiceBinding serviceBinding = (ServiceBinding) serviceBindingIter.next();
+					logger.log(Priority.INFO, "  ServiceBinding Description: " + serviceBinding.getDescription().getValue());
+					String xml = URLDecoder.decode(serviceBinding.getAccessURI(),"UTF-8");
+					logger.log(Priority.INFO, "  ServiceBinding URI: " + xml);
+					assertEquals(EPRHelper.toXMLString(new EPR()),xml);
+				}
+			}
+			logger.log(Priority.INFO, "-------------------------------------------------");
+	    } catch (Exception je) {
+			je.printStackTrace();
+			assertTrue(false);
+		}
+    }
+	/**
+	 * This doesn't work because scout drops the classifications on the floor.
+	 * We're ignoring this test until I come up with a patch.
+	 *
+	 */
+	public void findServicesByClassification()
+	{
+		Connection connection = JAXRRegistryImpl.getConnection();
+		try {
+			// Get registry service and business query manager
+			RegistryService rs = connection.getRegistryService();
+			BusinessQueryManager bqm = rs.getBusinessQueryManager();
+			BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
+			ClassificationScheme classificationScheme = bqm.findClassificationSchemeByName(null, "uddi-org:general_keywords");
+			Classification classification = blm.createClassification(classificationScheme,
+					"Test transformation service", "transformation");
+			Collection<Classification> classifications = new ArrayList<Classification>();
+			classifications.add(classification);
+			//Here I'd like to test filtering by this classification, but scout ignored the classification
+			String name=classificationScheme.getName().getValue();
+			System.out.println("Name=" + name);
+			Collection<String> nameParams = new ArrayList<String>();
+			//The name of the service is wild
+			nameParams.add("%");
+			BulkResponse bs = bqm.findServices(null, null,nameParams,classifications, null);
+			int status = bs.getStatus();
+			System.out.println("status=" + status);
+		} catch (JAXRException je) {
+			je.printStackTrace();
+		}
+		finally{}
+	}
+	/**
+	 * Setup the database.
+	 * @throws Exception
+	 */
+	@BeforeClass
+	public static void runBeforeAllTests() throws Exception {
+		try {
+			DOMConfigurator.configure(TestEnvironmentUtil.getUserDir() + "etc/test/resources/log4j.xml");
+			TestEnvironmentUtil.setESBPropertiesFileToUse();
+			//Set the juddi properties file in System so juddi will pick it up later and use the test values.
+			String juddiPropertiesFile = "/org/jboss/soa/esb/services/registry/juddi-unittest.properties";
+			System.setProperty("juddi.propertiesFile", juddiPropertiesFile);
+			//Read this properties file to get the db connection string
+			Properties props = new Properties();
+			InputStream inStream = Class.class.getResourceAsStream(juddiPropertiesFile);
+			props.load(inStream);
+			mDbDriver    = props.getProperty("juddi.jdbcDriver");
+			mDbUrl       = props.getProperty("juddi.jdbcUrl");
+			mDbUsername  = props.getProperty("juddi.jdbcUsername");
+			mDbPassword  = props.getProperty("juddi.jdbcPassword");
+			
+			String database="not tested yet";
+			if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
+				database = "hsqldb";
+				//Bring up hsql on default port 9001
+				HsqldbUtil.startHsqldb(TestEnvironmentUtil.getUserDir() + "build/hsqltestdb", "juddi");
+			} else if ("com.mysql.jdbc.Driver".equals(mDbDriver)) {
+				database = "mysql";
+			} //add and test your own database..
+			
+			//Get the registry-schema create scripts
+			String sqlDir = TestEnvironmentUtil.getUserDir() + "install/jUDDI-registry/sql/" + database + "/";
+			//Drop what is there now, if exists. We want to start fresh.
+			String sqlDropCmd      = FileUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
+			String sqlCreateCmd    = FileUtil.readTextFile(new File(sqlDir + "create_database.sql"));
+			String sqlInsertPubCmd = FileUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
+			
+			try {
+				Class.forName(mDbDriver);
+			} catch (Exception e) {
+				System.out.println("ERROR: failed to load " + database + " JDBC driver.");
+				e.printStackTrace();
+				return;
+			}
+			java.sql.Connection con = DriverManager.getConnection(mDbUrl, mDbUsername, mDbPassword);
+			Statement stmnt = con.createStatement();
+			System.out.println("Dropping the schema if exist");
+			stmnt.execute(sqlDropCmd);
+			System.out.println("Creating the juddi-schema");
+			stmnt.execute(sqlCreateCmd);
+			System.out.println("Adding the jbossesb publisher");
+			stmnt.execute(sqlInsertPubCmd);
+		} catch (Exception e) {
+			e.printStackTrace();
+			System.out.println("We should stop testing, since we don't have a db.");
+			assertTrue(false);
+		}
+	}
+	/**
+	 * Shutdown the database
+	 * @throws Exception
+	 */
+	@AfterClass
+	public static void runAfterAllTests() throws Exception {
+		if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
+			HsqldbUtil.stopHsqldb(mDbUrl, mDbUsername, mDbPassword);
+		}
+	}
+
+	public static junit.framework.Test suite() {
+		return new JUnit4TestAdapter(JAXRRegistryUnitTest.class);
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/MockRegistry.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/registry/MockRegistryUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouterUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouterUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouterUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,96 +1,96 @@
-/*
- * 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.internal.soa.esb.services.routing.cbr;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.List;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.xml.DOMConfigurator;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.jboss.soa.esb.services.routing.MessageRouter;
-import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * 
- * @author kurt.stam at redhat.com
- *
- */
-public class JBossRulesRouterUnitTest
-{
-	@Test
-	public void routeSerializedMessage()
-	{
-        //new messages
-		Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-		//set some properties inside the Message
-		message.getProperties().setProperty("prop1", "val1");
-		message.getProperties().setProperty("prop2", "val2");
-		//set the body inside the Message
-		message.getBody().setContents(("TEST BODY").getBytes());
-		//set some object attachments inside the Message
-		message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
-		message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
-		
-		JBossRulesRouter jbossRulesRouter = new JBossRulesRouter();
-		message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
-		List<String> destinationServices = jbossRulesRouter.route("JBossESBRules.drl", false, message);
-		assertEquals(destinationServices.iterator().next(),"test_category:Serialized_ServiceDestination");
-	}
-	
-	@Test
-	public void routeXMLMessage()
-	{
-		//add new messages
-		Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-		//set some properties inside the Message
-		message.getProperties().setProperty("prop1", "val1");
-		message.getProperties().setProperty("prop2", "val2");
-		//set the body inside the Message
-		message.getBody().setContents(("TEST BODY").getBytes());
-		//set some object attachments inside the Message
-		message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
-		message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
-	
-		JBossRulesRouter jbossRulesRouter = new JBossRulesRouter();
-		message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
-		List<String> destinationServices = jbossRulesRouter.route("JBossESBRules.drl", false, message);
-		assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XMLDestination");
-	}
-	
-	@BeforeClass
-	public static void runBeforeAllTests() throws Exception 
-	{
-		DOMConfigurator.configure(TestEnvironmentUtil.getUserDir() + "etc/test/resources/log4j.xml");
-	}
-	
-	public static junit.framework.Test suite() {
-		return new JUnit4TestAdapter(JBossRulesRouterUnitTest.class);
-	}
-
-}
+/*
+ * 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.internal.soa.esb.services.routing.cbr;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.List;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.xml.DOMConfigurator;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * 
+ * @author kurt.stam at redhat.com
+ *
+ */
+public class JBossRulesRouterUnitTest
+{
+	@Test
+	public void routeSerializedMessage()
+	{
+        //new messages
+		Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+		//set some properties inside the Message
+		message.getProperties().setProperty("prop1", "val1");
+		message.getProperties().setProperty("prop2", "val2");
+		//set the body inside the Message
+		message.getBody().setContents(("TEST BODY").getBytes());
+		//set some object attachments inside the Message
+		message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
+		message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
+		
+		JBossRulesRouter jbossRulesRouter = new JBossRulesRouter();
+		message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
+		List<String> destinationServices = jbossRulesRouter.route("JBossESBRules.drl", false, message);
+		assertEquals(destinationServices.iterator().next(),"test_category:Serialized_ServiceDestination");
+	}
+	
+	@Test
+	public void routeXMLMessage()
+	{
+		//add new messages
+		Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+		//set some properties inside the Message
+		message.getProperties().setProperty("prop1", "val1");
+		message.getProperties().setProperty("prop2", "val2");
+		//set the body inside the Message
+		message.getBody().setContents(("TEST BODY").getBytes());
+		//set some object attachments inside the Message
+		message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
+		message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
+	
+		JBossRulesRouter jbossRulesRouter = new JBossRulesRouter();
+		message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
+		List<String> destinationServices = jbossRulesRouter.route("JBossESBRules.drl", false, message);
+		assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XMLDestination");
+	}
+	
+	@BeforeClass
+	public static void runBeforeAllTests() throws Exception 
+	{
+		DOMConfigurator.configure(TestEnvironmentUtil.getUserDir() + "etc/test/resources/log4j.xml");
+	}
+	
+	public static junit.framework.Test suite() {
+		return new JUnit4TestAdapter(JBossRulesRouterUnitTest.class);
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouterUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/esb/persistence/tests/MessageStoreUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/DummyUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/RegistryUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/RegistryUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/RegistryUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,232 +1,232 @@
-/*
-* 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.services.registry;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.InputStream;
-import java.sql.DriverManager;
-import java.sql.Statement;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.apache.log4j.xml.DOMConfigurator;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.testutils.FileUtil;
-import org.jboss.soa.esb.testutils.HsqldbUtil;
-import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-/**
- * Testing the registry.
- * 
- * @author kstam
- *
- */
-public class RegistryUnitTest
-{
-    private static String mDbDriver;
-	private static String mDbUrl;
-	private static String mDbUsername;
-	private static String mDbPassword;
-	private static final String SERVICE_NAME = "Kurts Travel Agency";
-	private static final String CATEGORY = "travel";
-	
-	private Logger logger = Logger.getLogger(this.getClass());
-	
-	/**
-	 * Testing the registering of an EPR.
-	 */
-	@Test
-	public void publishEPR() 
-	{
-		EPR epr = new EPR();
-		try {
-			Registry registry = RegistryFactory.getRegistry();
-			registry.registerEPR(CATEGORY, SERVICE_NAME, "Service for traveling", 
-					epr, "Specific Service Binding for traveling");
-		} catch (RegistryException re) {
-			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
-			assertTrue(false);
-		}
-		try {
-			Registry registry = RegistryFactory.getRegistry();
-			registry.registerEPR(null, SERVICE_NAME, null, 
-					epr, null);
-		} catch (RegistryException re) {
-			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
-			assertTrue(false);
-		}
-		//make sure we can handle some null arguments
-		
-	}
-	/**
-	 * This test will try to find all services in the "travel" category.
-	 */
-	@Test
-	public void findService() 
-	{
-		try {
-			Registry registry = RegistryFactory.getRegistry();
-			Collection<String> services = registry.findServices(CATEGORY);
-			for (Iterator i=services.iterator();i.hasNext();) {
-				String serviceName = (String) i.next();
-				logger.log(Priority.INFO, "Found service: " + serviceName);
-				assertEquals(CATEGORY + ":" + SERVICE_NAME, serviceName);
-			}
-		} catch (RegistryException re) {
-			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
-			assertTrue(false);
-		}
-	}
-	/**
-	 * Find the EPRs for this service.
-	 */
-	@Test
-	public void findEPRs() 
-	{
-		try {
-			Registry registry = RegistryFactory.getRegistry();
-			Collection<EPR> eprs = registry.findEPRs(CATEGORY, SERVICE_NAME);
-			for (Iterator i=eprs.iterator();i.hasNext();) {
-				EPR epr = (EPR) i.next();
-				logger.log(Priority.INFO, "Found epr: " + epr);
-			}
-		} catch (RegistryException re) {
-			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
-			assertTrue(false);
-		}
-	}
-	@Test
-	public void unregisterEPR() 
-	{
-		try {
-			Registry registry = RegistryFactory.getRegistry();
-			EPR eprToBeRemoved = new EPR();
-			registry.unRegisterEPR(CATEGORY, SERVICE_NAME, eprToBeRemoved);
-//			Now make sure this EPR is really gone
-			Collection<EPR> eprs = registry.findEPRs(CATEGORY, SERVICE_NAME);
-			logger.log(Priority.INFO, "Number of Bindings left should be 0, and is: " + eprs.size());
-			assertEquals(eprs.size(),0);
-		} catch (Exception re) {
-			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
-			assertTrue(false);
-		}
-	}
-	@Test
-	public void unregisterService() 
-	{
-		try {
-			Registry registry = RegistryFactory.getRegistry();
-			registry.unRegisterService(CATEGORY, SERVICE_NAME);
-			registry.unRegisterService(null, SERVICE_NAME);
-			//Make sure it's really gone
-			Collection<String> services = registry.findAllServices();
-			logger.log(Priority.INFO, "Number of Services left should be 0, and is: " + services.size());
-			assertEquals(services.size(),0);
-		} catch (Exception re) {
-			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
-			assertTrue(false);
-		}
-	}
-	/**
-	 * Setup the database.
-	 * @throws Exception
-	 */
-	@BeforeClass
-	public static void runBeforeAllTests() {
-		try {
-			DOMConfigurator.configure(TestEnvironmentUtil.getUserDir() + "etc/test/resources/log4j.xml");
-			TestEnvironmentUtil.setESBPropertiesFileToUse();
-			//Set the juddi properties file in System so juddi will pick it up later and use the test values.
-			String juddiPropertiesFile = "/org/jboss/soa/esb/services/registry/juddi-unittest.properties";
-			System.setProperty("juddi.propertiesFile", juddiPropertiesFile);
-			//Read this properties file to get the db connection string
-			Properties props = new Properties();
-			InputStream inStream = Class.class.getResourceAsStream(juddiPropertiesFile);
-			props.load(inStream);
-			mDbDriver    = props.getProperty("juddi.jdbcDriver");
-			mDbUrl       = props.getProperty("juddi.jdbcUrl");
-			mDbUsername  = props.getProperty("juddi.jdbcUsername");
-			mDbPassword  = props.getProperty("juddi.jdbcPassword");
-			
-			String database="not tested yet";
-			if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
-				database = "hsqldb";
-				//Bring up hsql on default port 9001
-				HsqldbUtil.startHsqldb(TestEnvironmentUtil.getUserDir() + "build/hsqltestdb", "juddi");
-			} else if ("com.mysql.jdbc.Driver".equals(mDbDriver)) {
-				database = "mysql";
-			} //add and test your own database..
-			
-			//Get the registry-schema create scripts
-			String sqlDir = TestEnvironmentUtil.getUserDir() + "install/jUDDI-registry/sql/" + database + "/";
-			//Drop what is there now, if exists. We want to start fresh.
-			String sqlDropCmd      = FileUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
-			String sqlCreateCmd    = FileUtil.readTextFile(new File(sqlDir + "create_database.sql"));
-			String sqlInsertPubCmd = FileUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
-			
-			try {
-				Class.forName(mDbDriver);
-			} catch (Exception e) {
-				System.out.println("ERROR: failed to load " + database + " JDBC driver.");
-				e.printStackTrace();
-				return;
-			}
-			java.sql.Connection con = DriverManager.getConnection(mDbUrl, mDbUsername, mDbPassword);
-			Statement stmnt = con.createStatement();
-			System.out.println("Dropping the schema if exist");
-			stmnt.execute(sqlDropCmd);
-			System.out.println("Creating the juddi-schema");
-			stmnt.execute(sqlCreateCmd);
-			System.out.println("Adding the jbossesb publisher");
-			stmnt.execute(sqlInsertPubCmd);
-		} catch (Exception e) {
-			e.printStackTrace();
-			System.out.println("We should stop testing, since we don't have a db.");
-			assertTrue(false);
-		}
-	}
-	/**
-	 * Shutdown the database
-	 * @throws Exception
-	 */
-	@AfterClass
-	public static void runAfterAllTests() throws Exception {
-		if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
-			HsqldbUtil.stopHsqldb(mDbUrl, mDbUsername, mDbPassword);
-		}
-	}
-
-	public static junit.framework.Test suite() {
-		return new JUnit4TestAdapter(RegistryUnitTest.class);
-	}
-
-}
+/*
+* 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.services.registry;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.InputStream;
+import java.sql.DriverManager;
+import java.sql.Statement;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Properties;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.apache.log4j.xml.DOMConfigurator;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.testutils.FileUtil;
+import org.jboss.soa.esb.testutils.HsqldbUtil;
+import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+/**
+ * Testing the registry.
+ * 
+ * @author kstam
+ *
+ */
+public class RegistryUnitTest
+{
+    private static String mDbDriver;
+	private static String mDbUrl;
+	private static String mDbUsername;
+	private static String mDbPassword;
+	private static final String SERVICE_NAME = "Kurts Travel Agency";
+	private static final String CATEGORY = "travel";
+	
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	/**
+	 * Testing the registering of an EPR.
+	 */
+	@Test
+	public void publishEPR() 
+	{
+		EPR epr = new EPR();
+		try {
+			Registry registry = RegistryFactory.getRegistry();
+			registry.registerEPR(CATEGORY, SERVICE_NAME, "Service for traveling", 
+					epr, "Specific Service Binding for traveling");
+		} catch (RegistryException re) {
+			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
+			assertTrue(false);
+		}
+		try {
+			Registry registry = RegistryFactory.getRegistry();
+			registry.registerEPR(null, SERVICE_NAME, null, 
+					epr, null);
+		} catch (RegistryException re) {
+			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
+			assertTrue(false);
+		}
+		//make sure we can handle some null arguments
+		
+	}
+	/**
+	 * This test will try to find all services in the "travel" category.
+	 */
+	@Test
+	public void findService() 
+	{
+		try {
+			Registry registry = RegistryFactory.getRegistry();
+			Collection<String> services = registry.findServices(CATEGORY);
+			for (Iterator i=services.iterator();i.hasNext();) {
+				String serviceName = (String) i.next();
+				logger.log(Priority.INFO, "Found service: " + serviceName);
+				assertEquals(CATEGORY + ":" + SERVICE_NAME, serviceName);
+			}
+		} catch (RegistryException re) {
+			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
+			assertTrue(false);
+		}
+	}
+	/**
+	 * Find the EPRs for this service.
+	 */
+	@Test
+	public void findEPRs() 
+	{
+		try {
+			Registry registry = RegistryFactory.getRegistry();
+			Collection<EPR> eprs = registry.findEPRs(CATEGORY, SERVICE_NAME);
+			for (Iterator i=eprs.iterator();i.hasNext();) {
+				EPR epr = (EPR) i.next();
+				logger.log(Priority.INFO, "Found epr: " + epr);
+			}
+		} catch (RegistryException re) {
+			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
+			assertTrue(false);
+		}
+	}
+	@Test
+	public void unregisterEPR() 
+	{
+		try {
+			Registry registry = RegistryFactory.getRegistry();
+			EPR eprToBeRemoved = new EPR();
+			registry.unRegisterEPR(CATEGORY, SERVICE_NAME, eprToBeRemoved);
+//			Now make sure this EPR is really gone
+			Collection<EPR> eprs = registry.findEPRs(CATEGORY, SERVICE_NAME);
+			logger.log(Priority.INFO, "Number of Bindings left should be 0, and is: " + eprs.size());
+			assertEquals(eprs.size(),0);
+		} catch (Exception re) {
+			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
+			assertTrue(false);
+		}
+	}
+	@Test
+	public void unregisterService() 
+	{
+		try {
+			Registry registry = RegistryFactory.getRegistry();
+			registry.unRegisterService(CATEGORY, SERVICE_NAME);
+			registry.unRegisterService(null, SERVICE_NAME);
+			//Make sure it's really gone
+			Collection<String> services = registry.findAllServices();
+			logger.log(Priority.INFO, "Number of Services left should be 0, and is: " + services.size());
+			assertEquals(services.size(),0);
+		} catch (Exception re) {
+			logger.log(Priority.ERROR, re.getLocalizedMessage(), re);
+			assertTrue(false);
+		}
+	}
+	/**
+	 * Setup the database.
+	 * @throws Exception
+	 */
+	@BeforeClass
+	public static void runBeforeAllTests() {
+		try {
+			DOMConfigurator.configure(TestEnvironmentUtil.getUserDir() + "etc/test/resources/log4j.xml");
+			TestEnvironmentUtil.setESBPropertiesFileToUse();
+			//Set the juddi properties file in System so juddi will pick it up later and use the test values.
+			String juddiPropertiesFile = "/org/jboss/soa/esb/services/registry/juddi-unittest.properties";
+			System.setProperty("juddi.propertiesFile", juddiPropertiesFile);
+			//Read this properties file to get the db connection string
+			Properties props = new Properties();
+			InputStream inStream = Class.class.getResourceAsStream(juddiPropertiesFile);
+			props.load(inStream);
+			mDbDriver    = props.getProperty("juddi.jdbcDriver");
+			mDbUrl       = props.getProperty("juddi.jdbcUrl");
+			mDbUsername  = props.getProperty("juddi.jdbcUsername");
+			mDbPassword  = props.getProperty("juddi.jdbcPassword");
+			
+			String database="not tested yet";
+			if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
+				database = "hsqldb";
+				//Bring up hsql on default port 9001
+				HsqldbUtil.startHsqldb(TestEnvironmentUtil.getUserDir() + "build/hsqltestdb", "juddi");
+			} else if ("com.mysql.jdbc.Driver".equals(mDbDriver)) {
+				database = "mysql";
+			} //add and test your own database..
+			
+			//Get the registry-schema create scripts
+			String sqlDir = TestEnvironmentUtil.getUserDir() + "install/jUDDI-registry/sql/" + database + "/";
+			//Drop what is there now, if exists. We want to start fresh.
+			String sqlDropCmd      = FileUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
+			String sqlCreateCmd    = FileUtil.readTextFile(new File(sqlDir + "create_database.sql"));
+			String sqlInsertPubCmd = FileUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
+			
+			try {
+				Class.forName(mDbDriver);
+			} catch (Exception e) {
+				System.out.println("ERROR: failed to load " + database + " JDBC driver.");
+				e.printStackTrace();
+				return;
+			}
+			java.sql.Connection con = DriverManager.getConnection(mDbUrl, mDbUsername, mDbPassword);
+			Statement stmnt = con.createStatement();
+			System.out.println("Dropping the schema if exist");
+			stmnt.execute(sqlDropCmd);
+			System.out.println("Creating the juddi-schema");
+			stmnt.execute(sqlCreateCmd);
+			System.out.println("Adding the jbossesb publisher");
+			stmnt.execute(sqlInsertPubCmd);
+		} catch (Exception e) {
+			e.printStackTrace();
+			System.out.println("We should stop testing, since we don't have a db.");
+			assertTrue(false);
+		}
+	}
+	/**
+	 * Shutdown the database
+	 * @throws Exception
+	 */
+	@AfterClass
+	public static void runAfterAllTests() throws Exception {
+		if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
+			HsqldbUtil.stopHsqldb(mDbUrl, mDbUsername, mDbPassword);
+		}
+	}
+
+	public static junit.framework.Test suite() {
+		return new JUnit4TestAdapter(RegistryUnitTest.class);
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/RegistryUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/juddi-unittest.properties
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/juddi-unittest.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/juddi-unittest.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=org.hsqldb.jdbcDriver
-juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/juddi
-juddi.jdbcUsername=sa
-juddi.jdbcPassword=
-# jUDDI DataSource to use
-juddi.dataSource=java:comp/env/jdbc/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=org.hsqldb.jdbcDriver
+juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/juddi
+juddi.jdbcUsername=sa
+juddi.jdbcPassword=
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/registry/juddi-unittest.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRoutingUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRoutingUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRoutingUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,191 +1,191 @@
-/*
- * 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.services.routing.cbr;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.xml.DOMConfigurator;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.jboss.soa.esb.services.routing.MessageRouter;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
-import org.junit.BeforeClass;
-import org.junit.Test;
-/**
- * 
- * @author kurt.stam at redhat.com
- *
- */
-public class ContentBasedRoutingUnitTest
-{
-	@Test
-	public void routeSerializedMessage()
-	{
-		try {
-            //new messages
-			Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-			//set some properties inside the Message
-			message.getProperties().setProperty("prop1", "val1");
-			message.getProperties().setProperty("prop2", "val2");
-			//set the body inside the Message
-			message.getBody().setContents(("TEST BODY").getBytes());
-			//set some object attachments inside the Message
-			message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
-			message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
-			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
-			
-			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
-			List<String> destinationServices = cbr.route("JBossESBRules.drl",false,message);
-			assertEquals(destinationServices.iterator().next(),"test_category:Serialized_ServiceDestination");
-		} catch (MessageRouterException e) {
-			e.printStackTrace();
-			assertTrue(false);
-		}
-	}
-	
-	@Test
-	public void routeXMLMessage()
-	{
-		try {
-			//add new messages
-			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-			//set some properties inside the Message
-			message.getProperties().setProperty("prop1", "val1");
-			message.getProperties().setProperty("prop2", "val2");
-			//set the body inside the Message
-			message.getBody().setContents(("TEST BODY").getBytes());
-			//set some object attachments inside the Message
-			message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
-			message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
-			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
-		
-			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
-			List<String> destinationServices = cbr.route("JBossESBRules.drl",false,message);
-			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XMLDestination");
-		} catch (MessageRouterException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	@Test
-	public void routeXMLMessageUsingXPathMatch()
-	{
-		try {
-			//add new messages
-			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-			//set some properties inside the Message
-			message.getProperties().setProperty("prop1", "val1");
-			message.getProperties().setProperty("prop2", "val2");
-			//set the body inside the Message
-			message.getBody().setContents(("<jbossesb>TEST BODY</jbossesb>").getBytes());
-			//set some object attachments inside the Message
-			message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
-			message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
-			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
-		
-			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
-			List<String> destinationServices = cbr.route("JBossESBRules-XPath.drl","XPathLanguage.dsl",false,message);
-			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XML_XPath_Destination");
-		} catch (MessageRouterException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	@Test
-	public void routeXMLMessageUsingXPathEquals()
-	{
-		try {
-			//add new messages
-			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-			//set the body inside the Message
-			message.getBody().setContents(("<Dave>rocks</Dave>").getBytes());
-			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
-		
-			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
-			List<String> destinationServices = cbr.route("JBossESBRules-XPath.drl","XPathLanguage.dsl",false,message);
-			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XML_XPath_Dave_Destination");
-		} catch (MessageRouterException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	@Test
-	public void routeXMLMessageUsingXPathGreaterThen()
-	{
-		try {
-			//add new messages
-			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-			//set the body inside the Message
-			message.getBody().setContents(("<price>1.55</price>").getBytes());
-			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
-		
-			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
-			List<String> destinationServices = cbr.route("JBossESBRules-XPath.drl","XPathLanguage.dsl",false,message);
-			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XML_XPath_GreaterThan_Destination");
-		} catch (MessageRouterException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	@Test
-	public void routeXMLMessageUsingXPathLessThen()
-	{
-		try {
-			//add new messages
-			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
-			//set the body inside the Message
-			message.getBody().setContents(("<price>0.55</price>").getBytes());
-			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
-		
-			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
-			List<String> destinationServices = cbr.route("JBossESBRules-XPath.drl","XPathLanguage.dsl",false,message);
-			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XML_XPath_LessThan_Destination");
-		} catch (MessageRouterException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	@BeforeClass
-	public static void runBeforeAllTests() throws Exception 
-	{
-		try {
-			DOMConfigurator.configure(TestEnvironmentUtil.getUserDir() + "etc/test/resources/log4j.xml");
-			TestEnvironmentUtil.setESBPropertiesFileToUse();
-		} catch (Exception e) {
-			e.printStackTrace();
-			System.out.println("We should stop testing, since we don't any config properties");
-			assertTrue(false);
-		}
-	}
-	
-	public static junit.framework.Test suite() {
-		return new JUnit4TestAdapter(ContentBasedRoutingUnitTest.class);
-	}
-	
-}
+/*
+ * 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.services.routing.cbr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.xml.DOMConfigurator;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+/**
+ * 
+ * @author kurt.stam at redhat.com
+ *
+ */
+public class ContentBasedRoutingUnitTest
+{
+	@Test
+	public void routeSerializedMessage()
+	{
+		try {
+            //new messages
+			Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+			//set some properties inside the Message
+			message.getProperties().setProperty("prop1", "val1");
+			message.getProperties().setProperty("prop2", "val2");
+			//set the body inside the Message
+			message.getBody().setContents(("TEST BODY").getBytes());
+			//set some object attachments inside the Message
+			message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
+			message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
+			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
+			
+			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
+			List<String> destinationServices = cbr.route("JBossESBRules.drl",false,message);
+			assertEquals(destinationServices.iterator().next(),"test_category:Serialized_ServiceDestination");
+		} catch (MessageRouterException e) {
+			e.printStackTrace();
+			assertTrue(false);
+		}
+	}
+	
+	@Test
+	public void routeXMLMessage()
+	{
+		try {
+			//add new messages
+			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+			//set some properties inside the Message
+			message.getProperties().setProperty("prop1", "val1");
+			message.getProperties().setProperty("prop2", "val2");
+			//set the body inside the Message
+			message.getBody().setContents(("TEST BODY").getBytes());
+			//set some object attachments inside the Message
+			message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
+			message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
+			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
+		
+			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
+			List<String> destinationServices = cbr.route("JBossESBRules.drl",false,message);
+			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XMLDestination");
+		} catch (MessageRouterException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	@Test
+	public void routeXMLMessageUsingXPathMatch()
+	{
+		try {
+			//add new messages
+			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+			//set some properties inside the Message
+			message.getProperties().setProperty("prop1", "val1");
+			message.getProperties().setProperty("prop2", "val2");
+			//set the body inside the Message
+			message.getBody().setContents(("<jbossesb>TEST BODY</jbossesb>").getBytes());
+			//set some object attachments inside the Message
+			message.getAttachment().addItem(new String("TEST ATTACHMENT1"));
+			message.getAttachment().addItem(new String("TEST ATTACHMENT2"));
+			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
+		
+			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
+			List<String> destinationServices = cbr.route("JBossESBRules-XPath.drl","XPathLanguage.dsl",false,message);
+			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XML_XPath_Destination");
+		} catch (MessageRouterException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	@Test
+	public void routeXMLMessageUsingXPathEquals()
+	{
+		try {
+			//add new messages
+			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+			//set the body inside the Message
+			message.getBody().setContents(("<Dave>rocks</Dave>").getBytes());
+			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
+		
+			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
+			List<String> destinationServices = cbr.route("JBossESBRules-XPath.drl","XPathLanguage.dsl",false,message);
+			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XML_XPath_Dave_Destination");
+		} catch (MessageRouterException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	@Test
+	public void routeXMLMessageUsingXPathGreaterThen()
+	{
+		try {
+			//add new messages
+			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+			//set the body inside the Message
+			message.getBody().setContents(("<price>1.55</price>").getBytes());
+			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
+		
+			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
+			List<String> destinationServices = cbr.route("JBossESBRules-XPath.drl","XPathLanguage.dsl",false,message);
+			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XML_XPath_GreaterThan_Destination");
+		} catch (MessageRouterException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	@Test
+	public void routeXMLMessageUsingXPathLessThen()
+	{
+		try {
+			//add new messages
+			Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+			//set the body inside the Message
+			message.getBody().setContents(("<price>0.55</price>").getBytes());
+			message.getProperties().setProperty(MessageRouter.DELIVER_MESSAGES, Boolean.FALSE);
+		
+			ContentBasedRouter cbr = ContentBasedRouterFactory.getRouter();
+			List<String> destinationServices = cbr.route("JBossESBRules-XPath.drl","XPathLanguage.dsl",false,message);
+			assertEquals(destinationServices.iterator().next(),"test_category:JBOSS_XML_XPath_LessThan_Destination");
+		} catch (MessageRouterException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	@BeforeClass
+	public static void runBeforeAllTests() throws Exception 
+	{
+		try {
+			DOMConfigurator.configure(TestEnvironmentUtil.getUserDir() + "etc/test/resources/log4j.xml");
+			TestEnvironmentUtil.setESBPropertiesFileToUse();
+		} catch (Exception e) {
+			e.printStackTrace();
+			System.out.println("We should stop testing, since we don't any config properties");
+			assertTrue(false);
+		}
+	}
+	
+	public static junit.framework.Test suite() {
+		return new JUnit4TestAdapter(ContentBasedRoutingUnitTest.class);
+	}
+	
+}


Property changes on: labs/jbossesb/trunk/product/core/services/tests/src/org/jboss/soa/esb/services/routing/cbr/ContentBasedRoutingUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerEasier2ReadExample.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerEasier2ReadExample.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerEasier2ReadExample.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,36 +1,36 @@
-<EsbListenerControllerExample
-	parameterReloadSecs="180"
->
-   <ListenJmsQueueExample
-    service-name="myEprMnemonicName"
-   	listenerClass="org.jboss.soa.esb.message.listeners.JmsQueueListener"
-	connection-factory="ConnectionFactory"
-	destination-type="queue"
-   	destination-name="queue/A"
-	jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-    jndi-URL="localhost"
-    message-selector="service='handOfGod'"
-   >
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction" />
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  process="process222" /> 
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  
-   	process="noOperation" okMethod="endOfChainNotification"/> 
-
-	<NotificationList type="OK"> 
-		<target class="NotifyFiles">
-			<file	URI="file:///E:/tmp/jbossEsb/notifyDir/GpListenerExample.notifOK" 
-			 	append="true"
-			/>
-		</target> 
-	</NotificationList> 
-	
-	<NotificationList type="err"> 
-		<target class="NotifyFiles">
-			<file	URI="file:///E:/tmp/jbossEsb/notifyDir/GpListenerExample.notifErr" 
-			 	append="true"
-			/>
-		</target> 
-	</NotificationList>
-   </ListenJmsQueueExample>
-   
-</EsbListenerControllerExample>
+<EsbListenerControllerExample
+	parameterReloadSecs="180"
+>
+   <ListenJmsQueueExample
+    service-name="myEprMnemonicName"
+   	listenerClass="org.jboss.soa.esb.message.listeners.JmsQueueListener"
+	connection-factory="ConnectionFactory"
+	destination-type="queue"
+   	destination-name="queue/A"
+	jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+    jndi-URL="localhost"
+    message-selector="service='handOfGod'"
+   >
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction" />
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  process="process222" /> 
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  
+   	process="noOperation" okMethod="endOfChainNotification"/> 
+
+	<NotificationList type="OK"> 
+		<target class="NotifyFiles">
+			<file	URI="file:///E:/tmp/jbossEsb/notifyDir/GpListenerExample.notifOK" 
+			 	append="true"
+			/>
+		</target> 
+	</NotificationList> 
+	
+	<NotificationList type="err"> 
+		<target class="NotifyFiles">
+			<file	URI="file:///E:/tmp/jbossEsb/notifyDir/GpListenerExample.notifErr" 
+			 	append="true"
+			/>
+		</target> 
+	</NotificationList>
+   </ListenJmsQueueExample>
+   
+</EsbListenerControllerExample>


Property changes on: labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerEasier2ReadExample.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerExample.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerExample.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerExample.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,44 +1,44 @@
-<EsbListenerControllerExample
-	parameterReloadSecs="180"
->
-   <ListenJmsQueueExample
-    service-name="myServiceName"
-   	listenerClass="org.jboss.soa.esb.message.listeners.JmsQueueListener"
-	connection-factory="ConnectionFactory"
-	destination-type="queue"
-   	destination-name="queue/A"
-	jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-    jndi-URL="localhost"
-    message-selector="service='maradona'"
-   >
-   <!-- next line will call (default) process(Message) method with no notification for step -->
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction" />
-   <!-- next line will call process222(Message) method with no notification for step -->
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  process="process222" /> 
-   <!-- next line will call (default) process(Message) - on success=>invoke myOkMethod1 -->
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  okMethod="myOkMethod1" /> 
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  process="process222" 
-   		okMethod="myMethod2" />
-   <!-- next line would be useful to notify end of action chain process=noOperation (see class)-->
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  process="noOperation" /> 
-   <!-- example of a method that will always throw an Exception  -->
-   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction" process="justThrow" exceptionMethod="exceptionCallback1"/> 
-
-	<NotificationList type="OK"> 
-		<target class="NotifyFiles">
-			<file	URI="file:///E:/tmp/jbossEsb/notifyDir/GpListenerExample.notifOK" 
-			 	append="true"
-			/>
-		</target> 
-	</NotificationList> 
-	
-	<NotificationList type="err"> 
-		<target class="NotifyFiles">
-			<file	URI="file:///E:/tmp/jbossEsb/notifyDir/GpListenerExample.notifErr" 
-			 	append="true"
-			/>
-		</target> 
-	</NotificationList>
-   </ListenJmsQueueExample>
-   
-</EsbListenerControllerExample>
+<EsbListenerControllerExample
+	parameterReloadSecs="180"
+>
+   <ListenJmsQueueExample
+    service-name="myServiceName"
+   	listenerClass="org.jboss.soa.esb.message.listeners.JmsQueueListener"
+	connection-factory="ConnectionFactory"
+	destination-type="queue"
+   	destination-name="queue/A"
+	jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+    jndi-URL="localhost"
+    message-selector="service='maradona'"
+   >
+   <!-- next line will call (default) process(Message) method with no notification for step -->
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction" />
+   <!-- next line will call process222(Message) method with no notification for step -->
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  process="process222" /> 
+   <!-- next line will call (default) process(Message) - on success=>invoke myOkMethod1 -->
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  okMethod="myOkMethod1" /> 
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  process="process222" 
+   		okMethod="myMethod2" />
+   <!-- next line would be useful to notify end of action chain process=noOperation (see class)-->
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction"  process="noOperation" /> 
+   <!-- example of a method that will always throw an Exception  -->
+   <action class="org.jboss.soa.esb.actions.templates.MockMessageAction" process="justThrow" exceptionMethod="exceptionCallback1"/> 
+
+	<NotificationList type="OK"> 
+		<target class="NotifyFiles">
+			<file	URI="file:///E:/tmp/jbossEsb/notifyDir/GpListenerExample.notifOK" 
+			 	append="true"
+			/>
+		</target> 
+	</NotificationList> 
+	
+	<NotificationList type="err"> 
+		<target class="NotifyFiles">
+			<file	URI="file:///E:/tmp/jbossEsb/notifyDir/GpListenerExample.notifErr" 
+			 	append="true"
+			/>
+		</target> 
+	</NotificationList>
+   </ListenJmsQueueExample>
+   
+</EsbListenerControllerExample>


Property changes on: labs/jbossesb/trunk/product/etc/examples/listeners/EsbJmsListenerExample.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/examples/listeners/gatewayExample.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/examples/listeners/gatewayExample.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/examples/listeners/gatewayExample.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,22 +1,22 @@
-<GatewayListenerControllerExample
-	parameterReloadSecs="180"
->
-   <JmsGatewayExample
-    target-service-category="eprManager"
-    target-service-name="your target service name"
-
-    service-category="eprManager"
-    service-name="JmsGatewayService"
-
-   	listenerClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener"
-	connection-factory="ConnectionFactory"
-	destination-type="queue"
-   	destination-name="queue/A"
-	jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-    jndi-URL="localhost"
-    message-selector="service='composeExampleService'"
-   >
-	   <action class="org.jboss.soa.esb.message.listeners.MockComposer" process="composeEmptyMessage" />
-   </JmsGatewayExample>
-   
-</GatewayListenerControllerExample>
+<GatewayListenerControllerExample
+	parameterReloadSecs="180"
+>
+   <JmsGatewayExample
+    target-service-category="eprManager"
+    target-service-name="your target service name"
+
+    service-category="eprManager"
+    service-name="JmsGatewayService"
+
+   	listenerClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener"
+	connection-factory="ConnectionFactory"
+	destination-type="queue"
+   	destination-name="queue/A"
+	jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+    jndi-URL="localhost"
+    message-selector="service='composeExampleService'"
+   >
+	   <action class="org.jboss.soa.esb.message.listeners.MockComposer" process="composeEmptyMessage" />
+   </JmsGatewayExample>
+   
+</GatewayListenerControllerExample>


Property changes on: labs/jbossesb/trunk/product/etc/examples/listeners/gatewayExample.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/examples/listeners/jbossesb_config_01.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/examples/listeners/jbossesb_config_01.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/examples/listeners/jbossesb_config_01.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,45 +1,45 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd">
-
-	<buses>
-		<jms-bus busid="local-jms" 
-				connection-factory="ConnectionFactory" 
-				jndi-URL="jnp://localhost:1099" />
-		<jms-bus busid="server1-jms" 
-				connection-factory="com.xyz.provider.XYZConnectionFactory" 
-				jndi-context-factory="com.xyz.provider.NamingContextFactory"
-				jndi-URL="xyz://server1:9876" 
-				jndi-pkg-prefix="com.xyz" />
-	</buses>
-	<services>    
-		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service">
-		
-			<listeners>    	    
-				<jms-listener name="Bank-JMS-Gateway"
-							is-gateway="true" 
-							busidref="server1-jms"
-							destination-type="QUEUE"
-						   	destination-name="queue/A"
-							message-selector="service='Reconciliation'"
-							maxThreads="1"
-							/>
-				<jms-listener name="Bank-Listener" 
-							is-gateway="false"
-							busidref="local-jms"
-							destination-type="TOPIC"
-						   	destination-name="queue/B"
-							message-selector="service='Reconciliation'"
-							maxThreads="2"
-							/>
-			</listeners>    	
-			  
-			<actions>    	    
-				<action name="TestDefaultRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction">
-					<property name="propName" value="propValue" />
-				</action>
-			</actions>
-			
-		</service>    
-	</services>
-	
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd">
+
+	<buses>
+		<jms-bus busid="local-jms" 
+				connection-factory="ConnectionFactory" 
+				jndi-URL="jnp://localhost:1099" />
+		<jms-bus busid="server1-jms" 
+				connection-factory="com.xyz.provider.XYZConnectionFactory" 
+				jndi-context-factory="com.xyz.provider.NamingContextFactory"
+				jndi-URL="xyz://server1:9876" 
+				jndi-pkg-prefix="com.xyz" />
+	</buses>
+	<services>    
+		<service category="Bank" name="Reconciliation" description="Bank Reconciliation Service">
+		
+			<listeners>    	    
+				<jms-listener name="Bank-JMS-Gateway"
+							is-gateway="true" 
+							busidref="server1-jms"
+							destination-type="QUEUE"
+						   	destination-name="queue/A"
+							message-selector="service='Reconciliation'"
+							maxThreads="1"
+							/>
+				<jms-listener name="Bank-Listener" 
+							is-gateway="false"
+							busidref="local-jms"
+							destination-type="TOPIC"
+						   	destination-name="queue/B"
+							message-selector="service='Reconciliation'"
+							maxThreads="2"
+							/>
+			</listeners>    	
+			  
+			<actions>    	    
+				<action name="TestDefaultRouteAction" process="route" class="org.jboss.soa.esb.actions.CbrProxyAction">
+					<property name="propName" value="propValue" />
+				</action>
+			</actions>
+			
+		</service>    
+	</services>
+	
 </jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/examples/listeners/jbossesb_config_01.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/validation/build.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/validation/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/validation/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,143 +1,143 @@
-<project name="JBESB" default="usage" basedir=".">
-
-
-    <!-- ================================================================== -->
-    <!--                      P R O P E R T I E S                           -->
-    <!-- ================================================================== -->
-    <!--
-    <property name="org.jboss.esb.etc.schema.xsd.home" value="../schemas/xml"/>
-    <property name="org.jboss.esb.etc.schema.xsd.examples" value="."/>
-    -->
-    <property name="org.jboss.esb.etc.validation.build.dir" value="build"/>
-    <property name="org.jboss.esb.etc.validation.classes.dir" value="${org.jboss.esb.etc.validation.build.dir}/classes"/>
-    <property name="org.jboss.esb.etc.validation.junit.dir" value="${org.jboss.esb.etc.validation.build.dir}/junit"/>
-
-
-    <!-- ================================================================== -->
-    <!--                            P A T H S                               -->
-    <!-- ================================================================== -->
-    <path id="build.classpath">
-        <fileset dir="../../../lib">
-            <include name="**/**/*.jar"/>
-        </fileset>
-    </path>
-
-
-    <!-- ================================================================== -->
-    <!--                        U S A G E                                   -->
-    <!-- ================================================================== -->
-    <target name="org.jboss.esb.etc.schema.usage" >
-        <echo message="+----------------------------------------------------------------+"/>
-        <echo message="|                                                                "/>
-        <echo message="| U S A G E:                                                     "/>
-        <echo message="|                                                                "/>
-        <echo message="| ant  [target] [options]		                                "/>
-        <echo message="|                                                                "/>
-        <echo message="| Where:                                                         "/>
-        <echo message="|                                                                "/>
-        <echo message="| targets =                                                      "/>
-        <echo message="|          clean          [ clean temporary dirs and classes ]   "/>
-        <echo message="|          build          [ compile classes                  ]   "/>
-        <echo message="|          validate       [ validate all xsd examples        ]   "/>
-        <echo message="|                                                                "/>
-        <echo message="+----------------------------------------------------------------+"/>
-    </target>
-
-
-    <!-- ================================================================== -->
-    <!--                        C L E A N                                   -->
-    <!-- ================================================================== -->
-    <target name="org.jboss.esb.etc.schema.clean" >
-        <echo message="+--------------------------------------------------------+"/>
-		<echo message="|                                                        |"/>
-		<echo message="|                      C L E A N                         |"/>
-		<echo message="|                                                        |"/>
-		<echo message="+--------------------------------------------------------+"/>
-        <delete dir="${org.jboss.esb.etc.validation.build.dir}"/>
-    </target>
-
-
-    <!-- ================================================================== -->
-    <!--                       P R E P A R E                                -->
-    <!-- ================================================================== -->
-    <target name="org.jboss.esb.etc.schema.prepare" depends="clean" >
-        <echo message="+--------------------------------------------------------+"/>
-        <echo message="|                                                        |"/>
-        <echo message="|                  P R E P A R E                         |"/>
-        <echo message="|                                                        |"/>
-        <echo message="+--------------------------------------------------------+"/>
-        <mkdir dir="${org.jboss.esb.etc.validation.classes.dir}"/>
-        <mkdir dir="${org.jboss.esb.etc.validation.junit.dir}"/>
-    </target>
-
-
-    <!-- ================================================================== -->
-    <!--                          B U I L D                                 -->
-    <!-- ================================================================== -->
-    <target name="org.jboss.esb.etc.schema.build" depends="org.jboss.esb.etc.schema.prepare" >
-        <echo message="+--------------------------------------------------------+"/>
-        <echo message="|                                                        |"/>
-        <echo message="|                C O M P I L E                           |"/>
-        <echo message="|                                                        |"/>
-        <echo message="+--------------------------------------------------------+"/>
-        <javac
-            destdir="${org.jboss.esb.etc.validation.classes.dir}"
-            classpathref="build.classpath">
-            <src path="src"/>
-        </javac>
-    </target>
-
-    <!-- ================================================================== -->
-    <!--                      V A L I D A T E                                -->
-    <!-- ================================================================== -->
-    <target name="org.jboss.esb.etc.schema.validate" depends="build" >
-        <echo message="+--------------------------------------------------------+"/>
-        <echo message="|                                                        |"/>
-        <echo message="|                V A L I D A T E                         |"/>
-        <echo message="|                                                        |"/>
-        <echo message="+--------------------------------------------------------+"/>
-        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
-            <formatter type="plain" usefile="false"/>
-            <formatter type="xml"/>
-            <batchtest todir="${org.jboss.esb.etc.validation.junit.dir}">
-                <fileset dir="src">
-                    <include name="**/**Test.java"/>
-                </fileset>
-            </batchtest>
-            <classpath>
-                <pathelement location="${org.jboss.esb.etc.validation.classes.dir}"/>
-                <pathelement location="src"/>
-                <pathelement location="${basedir}"/>
-                <path refid="build.classpath"/>
-            </classpath>
-        	<sysproperty key="log4j.configuration" value="log4j.xml"/>
-            <sysproperty key="xml.base.dir" value="${basedir}/resources"/>
-            <sysproperty key="xsd.base.dir" value="${basedir}/../schemas/xml"/>
-        </junit>
-        <junitreport>
-            <fileset dir="${org.jboss.esb.etc.validation.junit.dir}">
-                <include name="*.xml"/>
-            </fileset>
-            <report format="frames" todir="${org.jboss.esb.etc.validation.junit.dir}"/>
-            <report format="noframes" todir="${org.jboss.esb.etc.validation.junit.dir}"/>
-        </junitreport>
-        <!-- clean up
-        <move file="TESTS-TestSuites.xml" todir="${org.jboss.esb.etc.validation.junit.dir}"/>
-        -->
-        
-    </target>
-
-
-
-
-    <!-- ================================================================== -->
-    <!--                    S H O R T   N A M E S                           -->
-    <!-- ================================================================== -->
-    <target name="usage" depends="org.jboss.esb.etc.schema.usage" />
-    <target name="clean" depends="org.jboss.esb.etc.schema.clean" />
-    <target name="build" depends="org.jboss.esb.etc.schema.build" />
-    <target name="validate" depends="org.jboss.esb.etc.schema.validate" />
-
-
-
-</project>
+<project name="JBESB" default="usage" basedir=".">
+
+
+    <!-- ================================================================== -->
+    <!--                      P R O P E R T I E S                           -->
+    <!-- ================================================================== -->
+    <!--
+    <property name="org.jboss.esb.etc.schema.xsd.home" value="../schemas/xml"/>
+    <property name="org.jboss.esb.etc.schema.xsd.examples" value="."/>
+    -->
+    <property name="org.jboss.esb.etc.validation.build.dir" value="build"/>
+    <property name="org.jboss.esb.etc.validation.classes.dir" value="${org.jboss.esb.etc.validation.build.dir}/classes"/>
+    <property name="org.jboss.esb.etc.validation.junit.dir" value="${org.jboss.esb.etc.validation.build.dir}/junit"/>
+
+
+    <!-- ================================================================== -->
+    <!--                            P A T H S                               -->
+    <!-- ================================================================== -->
+    <path id="build.classpath">
+        <fileset dir="../../../lib">
+            <include name="**/**/*.jar"/>
+        </fileset>
+    </path>
+
+
+    <!-- ================================================================== -->
+    <!--                        U S A G E                                   -->
+    <!-- ================================================================== -->
+    <target name="org.jboss.esb.etc.schema.usage" >
+        <echo message="+----------------------------------------------------------------+"/>
+        <echo message="|                                                                "/>
+        <echo message="| U S A G E:                                                     "/>
+        <echo message="|                                                                "/>
+        <echo message="| ant  [target] [options]		                                "/>
+        <echo message="|                                                                "/>
+        <echo message="| Where:                                                         "/>
+        <echo message="|                                                                "/>
+        <echo message="| targets =                                                      "/>
+        <echo message="|          clean          [ clean temporary dirs and classes ]   "/>
+        <echo message="|          build          [ compile classes                  ]   "/>
+        <echo message="|          validate       [ validate all xsd examples        ]   "/>
+        <echo message="|                                                                "/>
+        <echo message="+----------------------------------------------------------------+"/>
+    </target>
+
+
+    <!-- ================================================================== -->
+    <!--                        C L E A N                                   -->
+    <!-- ================================================================== -->
+    <target name="org.jboss.esb.etc.schema.clean" >
+        <echo message="+--------------------------------------------------------+"/>
+		<echo message="|                                                        |"/>
+		<echo message="|                      C L E A N                         |"/>
+		<echo message="|                                                        |"/>
+		<echo message="+--------------------------------------------------------+"/>
+        <delete dir="${org.jboss.esb.etc.validation.build.dir}"/>
+    </target>
+
+
+    <!-- ================================================================== -->
+    <!--                       P R E P A R E                                -->
+    <!-- ================================================================== -->
+    <target name="org.jboss.esb.etc.schema.prepare" depends="clean" >
+        <echo message="+--------------------------------------------------------+"/>
+        <echo message="|                                                        |"/>
+        <echo message="|                  P R E P A R E                         |"/>
+        <echo message="|                                                        |"/>
+        <echo message="+--------------------------------------------------------+"/>
+        <mkdir dir="${org.jboss.esb.etc.validation.classes.dir}"/>
+        <mkdir dir="${org.jboss.esb.etc.validation.junit.dir}"/>
+    </target>
+
+
+    <!-- ================================================================== -->
+    <!--                          B U I L D                                 -->
+    <!-- ================================================================== -->
+    <target name="org.jboss.esb.etc.schema.build" depends="org.jboss.esb.etc.schema.prepare" >
+        <echo message="+--------------------------------------------------------+"/>
+        <echo message="|                                                        |"/>
+        <echo message="|                C O M P I L E                           |"/>
+        <echo message="|                                                        |"/>
+        <echo message="+--------------------------------------------------------+"/>
+        <javac
+            destdir="${org.jboss.esb.etc.validation.classes.dir}"
+            classpathref="build.classpath">
+            <src path="src"/>
+        </javac>
+    </target>
+
+    <!-- ================================================================== -->
+    <!--                      V A L I D A T E                                -->
+    <!-- ================================================================== -->
+    <target name="org.jboss.esb.etc.schema.validate" depends="build" >
+        <echo message="+--------------------------------------------------------+"/>
+        <echo message="|                                                        |"/>
+        <echo message="|                V A L I D A T E                         |"/>
+        <echo message="|                                                        |"/>
+        <echo message="+--------------------------------------------------------+"/>
+        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
+            <formatter type="plain" usefile="false"/>
+            <formatter type="xml"/>
+            <batchtest todir="${org.jboss.esb.etc.validation.junit.dir}">
+                <fileset dir="src">
+                    <include name="**/**Test.java"/>
+                </fileset>
+            </batchtest>
+            <classpath>
+                <pathelement location="${org.jboss.esb.etc.validation.classes.dir}"/>
+                <pathelement location="src"/>
+                <pathelement location="${basedir}"/>
+                <path refid="build.classpath"/>
+            </classpath>
+        	<sysproperty key="log4j.configuration" value="log4j.xml"/>
+            <sysproperty key="xml.base.dir" value="${basedir}/resources"/>
+            <sysproperty key="xsd.base.dir" value="${basedir}/../schemas/xml"/>
+        </junit>
+        <junitreport>
+            <fileset dir="${org.jboss.esb.etc.validation.junit.dir}">
+                <include name="*.xml"/>
+            </fileset>
+            <report format="frames" todir="${org.jboss.esb.etc.validation.junit.dir}"/>
+            <report format="noframes" todir="${org.jboss.esb.etc.validation.junit.dir}"/>
+        </junitreport>
+        <!-- clean up
+        <move file="TESTS-TestSuites.xml" todir="${org.jboss.esb.etc.validation.junit.dir}"/>
+        -->
+        
+    </target>
+
+
+
+
+    <!-- ================================================================== -->
+    <!--                    S H O R T   N A M E S                           -->
+    <!-- ================================================================== -->
+    <target name="usage" depends="org.jboss.esb.etc.schema.usage" />
+    <target name="clean" depends="org.jboss.esb.etc.schema.clean" />
+    <target name="build" depends="org.jboss.esb.etc.schema.build" />
+    <target name="validate" depends="org.jboss.esb.etc.schema.validate" />
+
+
+
+</project>


Property changes on: labs/jbossesb/trunk/product/etc/schemas/validation/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/validation/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-email-epr-example.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-email-epr-example.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-email-epr-example.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<e:email-epr
-        xmlns:e="http://www.jboss.org/soa/endpoint/email-epr"
-        xmlns:email="http://www.jboss.org/soa/endpoint/protocol/email"
-        xmlns:wsa="http://www.w3.org/2005/08/addressing"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.jboss.org/soa/endpoint/email-epr email-epr.xsd" version="String">
-	<wsa:EndpointReference>
-		<wsa:Address>http://www.altova.com</wsa:Address>
-		<wsa:ReferenceParameters/>
-		<wsa:Metadata/>
-	</wsa:EndpointReference>
-	<email:email>
-		<service-name>basic-email-epr-example</service-name>
-		<service-type>email</service-type>
-		<gateway-type>consumer</gateway-type>
-		<protocol>smtp</protocol>
-		<host>String</host>
-		<port>25</port>
-		<username>String</username>
-		<password>String</password>
-	</email:email>
-</e:email-epr>
+<?xml version="1.0" encoding="UTF-8"?>
+<e:email-epr
+        xmlns:e="http://www.jboss.org/soa/endpoint/email-epr"
+        xmlns:email="http://www.jboss.org/soa/endpoint/protocol/email"
+        xmlns:wsa="http://www.w3.org/2005/08/addressing"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.org/soa/endpoint/email-epr email-epr.xsd" version="String">
+	<wsa:EndpointReference>
+		<wsa:Address>http://www.altova.com</wsa:Address>
+		<wsa:ReferenceParameters/>
+		<wsa:Metadata/>
+	</wsa:EndpointReference>
+	<email:email>
+		<service-name>basic-email-epr-example</service-name>
+		<service-type>email</service-type>
+		<gateway-type>consumer</gateway-type>
+		<protocol>smtp</protocol>
+		<host>String</host>
+		<port>25</port>
+		<username>String</username>
+		<password>String</password>
+	</email:email>
+</e:email-epr>


Property changes on: labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-email-epr-example.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-ftp-epr-example.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-ftp-epr-example.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-ftp-epr-example.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:ftp-epr
-        xmlns:f="http://www.jboss.org/soa/endpoint/ftp-epr"
-        xmlns:ftp="http://www.jboss.org/soa/endpoint/protocol/ftp"
-        xmlns:wsa="http://www.w3.org/2005/08/addressing"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.jboss.org/soa/endpoint/ftp-epr ftp-epr.xsd" version="String">
-	<wsa:EndpointReference>
-		<wsa:Address>http://www.altova.com</wsa:Address>
-		<wsa:ReferenceParameters/>
-		<wsa:Metadata/>
-	</wsa:EndpointReference>
-	<ftp:ftp>
-		<service-name>String</service-name>
-		<service-type>ftp</service-type>
-		<gateway-type>consumer</gateway-type>
-		<host>String</host>
-		<port>23</port>
-		<username>String</username>
-		<password>String</password>
-		<directory>String</directory>
-	</ftp:ftp>
-</f:ftp-epr>
+<?xml version="1.0" encoding="UTF-8"?>
+<f:ftp-epr
+        xmlns:f="http://www.jboss.org/soa/endpoint/ftp-epr"
+        xmlns:ftp="http://www.jboss.org/soa/endpoint/protocol/ftp"
+        xmlns:wsa="http://www.w3.org/2005/08/addressing"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.org/soa/endpoint/ftp-epr ftp-epr.xsd" version="String">
+	<wsa:EndpointReference>
+		<wsa:Address>http://www.altova.com</wsa:Address>
+		<wsa:ReferenceParameters/>
+		<wsa:Metadata/>
+	</wsa:EndpointReference>
+	<ftp:ftp>
+		<service-name>String</service-name>
+		<service-type>ftp</service-type>
+		<gateway-type>consumer</gateway-type>
+		<host>String</host>
+		<port>23</port>
+		<username>String</username>
+		<password>String</password>
+		<directory>String</directory>
+	</ftp:ftp>
+</f:ftp-epr>


Property changes on: labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-ftp-epr-example.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jdbc-epr-example.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jdbc-epr-example.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jdbc-epr-example.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<j:jdbc-epr
-        xmlns:j="http://www.jboss.org/soa/endpoint/jdbc-epr"
-        xmlns:jdbc="http://www.jboss.org/soa/endpoint/protocol/jdbc"
-        xmlns:wsa="http://www.w3.org/2005/08/addressing"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.jboss.org/soa/endpoint/jdbc-epr jdbc-epr.xsd" version="String">
-	<wsa:EndpointReference>
-		<wsa:Address>http://www.altova.com</wsa:Address>
-		<wsa:ReferenceParameters/>
-		<wsa:Metadata/>
-	</wsa:EndpointReference>
-	<jdbc:jdbc>
-		<service-name>String</service-name>
-		<service-type>http</service-type>
-		<gateway-type>consumer</gateway-type>
-		<url>String</url>
-		<driver>String</driver>
-		<username>String</username>
-		<password>String</password>
-		<sql>String</sql>
-	</jdbc:jdbc>
+<?xml version="1.0" encoding="UTF-8"?>
+<j:jdbc-epr
+        xmlns:j="http://www.jboss.org/soa/endpoint/jdbc-epr"
+        xmlns:jdbc="http://www.jboss.org/soa/endpoint/protocol/jdbc"
+        xmlns:wsa="http://www.w3.org/2005/08/addressing"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.org/soa/endpoint/jdbc-epr jdbc-epr.xsd" version="String">
+	<wsa:EndpointReference>
+		<wsa:Address>http://www.altova.com</wsa:Address>
+		<wsa:ReferenceParameters/>
+		<wsa:Metadata/>
+	</wsa:EndpointReference>
+	<jdbc:jdbc>
+		<service-name>String</service-name>
+		<service-type>http</service-type>
+		<gateway-type>consumer</gateway-type>
+		<url>String</url>
+		<driver>String</driver>
+		<username>String</username>
+		<password>String</password>
+		<sql>String</sql>
+	</jdbc:jdbc>
 </j:jdbc-epr>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jdbc-epr-example.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jms-epr-example.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jms-epr-example.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jms-epr-example.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,22 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<j:jms-epr
-        xmlns:j="http://www.jboss.org/soa/endpoint/jms-epr"
-        xmlns:jms="http://www.jboss.org/soa/endpoint/protocol/jms"
-        xmlns:wsa="http://www.w3.org/2005/08/addressing"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.jboss.org/soa/endpoint/jms-epr jms-epr.xsd" version="String">
-	<wsa:EndpointReference>
-		<wsa:Address>http://www.altova.com</wsa:Address>
-		<wsa:ReferenceParameters/>
-		<wsa:Metadata/>
-	</wsa:EndpointReference>
-	<jms:jms>
-		<service-name>basic-jms-epr-example</service-name>
-		<service-type>jms</service-type>
-		<gateway-type>consumer</gateway-type>
-		<spec-version>1.1</spec-version>
-		<destination-type>queue</destination-type>
-		<destination-name>String</destination-name>
-		<connection-factory>String</connection-factory>
-	</jms:jms>
+<?xml version="1.0" encoding="UTF-8"?>
+<j:jms-epr
+        xmlns:j="http://www.jboss.org/soa/endpoint/jms-epr"
+        xmlns:jms="http://www.jboss.org/soa/endpoint/protocol/jms"
+        xmlns:wsa="http://www.w3.org/2005/08/addressing"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.jboss.org/soa/endpoint/jms-epr jms-epr.xsd" version="String">
+	<wsa:EndpointReference>
+		<wsa:Address>http://www.altova.com</wsa:Address>
+		<wsa:ReferenceParameters/>
+		<wsa:Metadata/>
+	</wsa:EndpointReference>
+	<jms:jms>
+		<service-name>basic-jms-epr-example</service-name>
+		<service-type>jms</service-type>
+		<gateway-type>consumer</gateway-type>
+		<spec-version>1.1</spec-version>
+		<destination-type>queue</destination-type>
+		<destination-name>String</destination-name>
+		<connection-factory>String</connection-factory>
+	</jms:jms>
 </j:jms-epr>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/validation/resources/basic-jms-epr-example.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/validation/src/org/jboss/soa/esb/services/xml/XmlValidation.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/validation/src/org/jboss/soa/esb/services/xml/XmlValidationTest.java
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/validation/src/org/jboss/soa/esb/services/xml/XmlValidationTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/validation/src/org/jboss/soa/esb/services/xml/XmlValidationTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,59 +1,59 @@
-package org.jboss.soa.esb.services.xml;
-
-import junit.framework.TestCase;
-import org.jboss.logging.Logger;
-
-
-public class XmlValidationTest extends TestCase  {
-
-    /**
-     * Our Logger
-     */
-    private Logger log = Logger.getLogger(XmlValidationTest.class);
-
-    /**
-     * Validate the Email EPR
-     * @throws Exception
-     */
-    public void testBasicEmailEPR() throws Exception {
-        log.info("Running Basic Email EPR Test");
-        XmlValidation xmlValidator = new XmlValidation();
-        boolean isValid = xmlValidator.validate("basic-email-epr-example.xml","email-epr.xsd");
-        assertTrue("Expecting basic-email-epr-example.xml to be valid.", isValid);
-    }
-
-    /**
-     * Validate the JMS EPR
-     * @throws Exception
-     */
-    public void testBasicJMSEPR() throws Exception {
-        log.info("Running Basic JMS EPR Test");
-        XmlValidation xmlValidator = new XmlValidation();
-        boolean isValid = xmlValidator.validate("basic-jms-epr-example.xml","jms-epr.xsd");
-        assertTrue("Expecting basic-jms-epr-example.xml to be valid.", isValid);
-    }
-
-    /**
-     * Validate the JDBC EPR
-     * @throws Exception
-     */
-    public void testBasicJDBCEPR() throws Exception {
-        log.info("Running Basic JDBC EPR Test");
-        XmlValidation xmlValidator = new XmlValidation();
-        boolean isValid = xmlValidator.validate("basic-jdbc-epr-example.xml","jdbc-epr.xsd");
-        assertTrue("Expecting basic-jdbc-epr-example.xml to be valid.", isValid);
-    }
-
-    /**
-     * Validate the FTP EPR
-     * @throws Exception
-     */
-    public void testBasicFTPEPR() throws Exception {
-        log.info("Running Basic FTP EPR Test");
-        XmlValidation xmlValidator = new XmlValidation();
-        boolean isValid = xmlValidator.validate("basic-ftp-epr-example.xml","ftp-epr.xsd");
-        assertTrue("Expecting basic-ftp-epr-example.xml to be valid.", isValid);
-    }
-
-
-}
+package org.jboss.soa.esb.services.xml;
+
+import junit.framework.TestCase;
+import org.jboss.logging.Logger;
+
+
+public class XmlValidationTest extends TestCase  {
+
+    /**
+     * Our Logger
+     */
+    private Logger log = Logger.getLogger(XmlValidationTest.class);
+
+    /**
+     * Validate the Email EPR
+     * @throws Exception
+     */
+    public void testBasicEmailEPR() throws Exception {
+        log.info("Running Basic Email EPR Test");
+        XmlValidation xmlValidator = new XmlValidation();
+        boolean isValid = xmlValidator.validate("basic-email-epr-example.xml","email-epr.xsd");
+        assertTrue("Expecting basic-email-epr-example.xml to be valid.", isValid);
+    }
+
+    /**
+     * Validate the JMS EPR
+     * @throws Exception
+     */
+    public void testBasicJMSEPR() throws Exception {
+        log.info("Running Basic JMS EPR Test");
+        XmlValidation xmlValidator = new XmlValidation();
+        boolean isValid = xmlValidator.validate("basic-jms-epr-example.xml","jms-epr.xsd");
+        assertTrue("Expecting basic-jms-epr-example.xml to be valid.", isValid);
+    }
+
+    /**
+     * Validate the JDBC EPR
+     * @throws Exception
+     */
+    public void testBasicJDBCEPR() throws Exception {
+        log.info("Running Basic JDBC EPR Test");
+        XmlValidation xmlValidator = new XmlValidation();
+        boolean isValid = xmlValidator.validate("basic-jdbc-epr-example.xml","jdbc-epr.xsd");
+        assertTrue("Expecting basic-jdbc-epr-example.xml to be valid.", isValid);
+    }
+
+    /**
+     * Validate the FTP EPR
+     * @throws Exception
+     */
+    public void testBasicFTPEPR() throws Exception {
+        log.info("Running Basic FTP EPR Test");
+        XmlValidation xmlValidator = new XmlValidation();
+        boolean isValid = xmlValidator.validate("basic-ftp-epr-example.xml","ftp-epr.xsd");
+        assertTrue("Expecting basic-ftp-epr-example.xml to be valid.", isValid);
+    }
+
+
+}


Property changes on: labs/jbossesb/trunk/product/etc/schemas/validation/src/org/jboss/soa/esb/services/xml/XmlValidationTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/common.xsd
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/contract.xsd
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/dispatcher.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/common/email.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/common/email.xsd	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/common/email.xsd	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,73 +1,73 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
-        xmlns:common="http://www.jboss.org/soa/endpoint/common"
-        xmlns:email="http://www.jboss.org/soa/endpoint/protocol/email"
-        targetNamespace="http://www.jboss.org/soa/endpoint/protocol/email" elementFormDefault="unqualified"
-        attributeFormDefault="unqualified">
-    <annotation>
-        <documentation>
-            JBoss Inc JMS SOA Schema Definition Copyright 2006
-        </documentation>
-    </annotation>
-
-    <!-- import common -->
-    <import namespace="http://www.jboss.org/soa/endpoint/common" schemaLocation="common.xsd"/>
-    <element name="email">
-        <complexType>
-            <sequence>
-                <!-- Core -->
-                <element name="service-name" type="common:service-name"/>
-                <element name="service-type" type="common:service-type"/>
-                <element name="gateway-type" type="common:gateway-type"/>
-                <!-- email related -->
-                <element name="protocol" type="email:protocol"/>
-                <element name="host" type="email:host"/>
-                <element name="port" type="email:port"/>
-                <element name="username" type="email:username"/>
-                <element name="password" type="email:password"/>
-            </sequence>
-        </complexType>
-    </element>
-
-    <!-- Email Specific Definitions -->
-    <simpleType name="protocol">
-        <restriction base="string">
-            <enumeration value="smtp"/>
-            <enumeration value="pop"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="host">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="port">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="5"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="username">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="password">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:common="http://www.jboss.org/soa/endpoint/common"
+        xmlns:email="http://www.jboss.org/soa/endpoint/protocol/email"
+        targetNamespace="http://www.jboss.org/soa/endpoint/protocol/email" elementFormDefault="unqualified"
+        attributeFormDefault="unqualified">
+    <annotation>
+        <documentation>
+            JBoss Inc JMS SOA Schema Definition Copyright 2006
+        </documentation>
+    </annotation>
+
+    <!-- import common -->
+    <import namespace="http://www.jboss.org/soa/endpoint/common" schemaLocation="common.xsd"/>
+    <element name="email">
+        <complexType>
+            <sequence>
+                <!-- Core -->
+                <element name="service-name" type="common:service-name"/>
+                <element name="service-type" type="common:service-type"/>
+                <element name="gateway-type" type="common:gateway-type"/>
+                <!-- email related -->
+                <element name="protocol" type="email:protocol"/>
+                <element name="host" type="email:host"/>
+                <element name="port" type="email:port"/>
+                <element name="username" type="email:username"/>
+                <element name="password" type="email:password"/>
+            </sequence>
+        </complexType>
+    </element>
+
+    <!-- Email Specific Definitions -->
+    <simpleType name="protocol">
+        <restriction base="string">
+            <enumeration value="smtp"/>
+            <enumeration value="pop"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="host">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="port">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="5"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="username">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="password">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+
 </schema>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/email.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/common/ftp.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/common/ftp.xsd	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/common/ftp.xsd	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,73 +1,73 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
-        xmlns:common="http://www.jboss.org/soa/endpoint/common"
-        xmlns:ftp="http://www.jboss.org/soa/endpoint/protocol/ftp"
-        targetNamespace="http://www.jboss.org/soa/endpoint/protocol/ftp" elementFormDefault="unqualified"
-        attributeFormDefault="unqualified">
-    <annotation>
-        <documentation>
-            JBoss Inc JMS SOA Schema Definition Copyright 2006
-        </documentation>
-    </annotation>
-
-    <!-- import common -->
-    <import namespace="http://www.jboss.org/soa/endpoint/common" schemaLocation="common.xsd"/>
-    <element name="ftp">
-        <complexType>
-            <sequence>
-                <!-- Core -->
-                <element name="service-name" type="common:service-name"/>
-                <element name="service-type" type="common:service-type"/>
-                <element name="gateway-type" type="common:gateway-type"/>
-                <!-- ftp related -->
-                <element name="host" type="ftp:host"/>
-                <element name="port" type="ftp:port"/>
-                <element name="username" type="ftp:username"/>
-                <element name="password" type="ftp:password"/>
-                <element name="directory" type="ftp:directory"/>
-
-            </sequence>
-        </complexType>
-    </element>
-
-    <!-- FTP Specific Definitions -->
-    <simpleType name="host">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="port">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="5"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="username">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="password">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-    <simpleType name="directory">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:common="http://www.jboss.org/soa/endpoint/common"
+        xmlns:ftp="http://www.jboss.org/soa/endpoint/protocol/ftp"
+        targetNamespace="http://www.jboss.org/soa/endpoint/protocol/ftp" elementFormDefault="unqualified"
+        attributeFormDefault="unqualified">
+    <annotation>
+        <documentation>
+            JBoss Inc JMS SOA Schema Definition Copyright 2006
+        </documentation>
+    </annotation>
+
+    <!-- import common -->
+    <import namespace="http://www.jboss.org/soa/endpoint/common" schemaLocation="common.xsd"/>
+    <element name="ftp">
+        <complexType>
+            <sequence>
+                <!-- Core -->
+                <element name="service-name" type="common:service-name"/>
+                <element name="service-type" type="common:service-type"/>
+                <element name="gateway-type" type="common:gateway-type"/>
+                <!-- ftp related -->
+                <element name="host" type="ftp:host"/>
+                <element name="port" type="ftp:port"/>
+                <element name="username" type="ftp:username"/>
+                <element name="password" type="ftp:password"/>
+                <element name="directory" type="ftp:directory"/>
+
+            </sequence>
+        </complexType>
+    </element>
+
+    <!-- FTP Specific Definitions -->
+    <simpleType name="host">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="port">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="5"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="username">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="password">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+    <simpleType name="directory">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+
 </schema>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/ftp.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/common/jdbc.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/common/jdbc.xsd	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/common/jdbc.xsd	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,70 +1,70 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
-        xmlns:common="http://www.jboss.org/soa/endpoint/common"
-        xmlns:jdbc="http://www.jboss.org/soa/endpoint/protocol/jdbc"
-        targetNamespace="http://www.jboss.org/soa/endpoint/protocol/jdbc" elementFormDefault="unqualified"
-        attributeFormDefault="unqualified">
-    <annotation>
-        <documentation>
-            JBoss Inc JMS SOA Schema Definition Copyright 2006
-        </documentation>
-    </annotation>
-
-    <!-- import common -->
-    <import namespace="http://www.jboss.org/soa/endpoint/common" schemaLocation="common.xsd"/>
-    <element name="jdbc">
-        <complexType>
-            <sequence>
-                <!-- Core -->
-                <element name="service-name" type="common:service-name"/>
-                <element name="service-type" type="common:service-type"/>
-                <element name="gateway-type" type="common:gateway-type"/>
-                <!-- jdbc related -->
-                <element name="url" type="jdbc:url"/>
-                <element name="driver" type="jdbc:driver"/>
-                <element name="username" type="jdbc:username"/>
-                <element name="password" type="jdbc:password"/>
-                <element name="sql" type="jdbc:sql"/>
-            </sequence>
-        </complexType>
-    </element>
-
-    <!-- JDBC Specific Definitions -->
-    <simpleType name="url">
-        <restriction base="string">
-             <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="driver">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-    <simpleType name="username">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-
-    <simpleType name="password">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="20"/>
-        </restriction>
-    </simpleType>
-
-    <simpleType name="sql">
-        <restriction base="string">
-            <minLength value="1"/>
-            <maxLength value="100"/>
-        </restriction>
-    </simpleType>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:common="http://www.jboss.org/soa/endpoint/common"
+        xmlns:jdbc="http://www.jboss.org/soa/endpoint/protocol/jdbc"
+        targetNamespace="http://www.jboss.org/soa/endpoint/protocol/jdbc" elementFormDefault="unqualified"
+        attributeFormDefault="unqualified">
+    <annotation>
+        <documentation>
+            JBoss Inc JMS SOA Schema Definition Copyright 2006
+        </documentation>
+    </annotation>
+
+    <!-- import common -->
+    <import namespace="http://www.jboss.org/soa/endpoint/common" schemaLocation="common.xsd"/>
+    <element name="jdbc">
+        <complexType>
+            <sequence>
+                <!-- Core -->
+                <element name="service-name" type="common:service-name"/>
+                <element name="service-type" type="common:service-type"/>
+                <element name="gateway-type" type="common:gateway-type"/>
+                <!-- jdbc related -->
+                <element name="url" type="jdbc:url"/>
+                <element name="driver" type="jdbc:driver"/>
+                <element name="username" type="jdbc:username"/>
+                <element name="password" type="jdbc:password"/>
+                <element name="sql" type="jdbc:sql"/>
+            </sequence>
+        </complexType>
+    </element>
+
+    <!-- JDBC Specific Definitions -->
+    <simpleType name="url">
+        <restriction base="string">
+             <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="driver">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+    <simpleType name="username">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+
+    <simpleType name="password">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="20"/>
+        </restriction>
+    </simpleType>
+
+    <simpleType name="sql">
+        <restriction base="string">
+            <minLength value="1"/>
+            <maxLength value="100"/>
+        </restriction>
+    </simpleType>
+
 </schema>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/jdbc.xsd
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/jms.xsd
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/plugin.xsd
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/routing.xsd
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/common/ws-addr.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/email-epr.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/email-epr.xsd	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/email-epr.xsd	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:email="http://www.jboss.org/soa/endpoint/protocol/email"  targetNamespace="http://www.jboss.org/soa/endpoint/email-epr" elementFormDefault="qualified" attributeFormDefault="unqualified">
-    <import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="common/ws-addr.xsd"/>
-	<import namespace="http://www.jboss.org/soa/endpoint/protocol/email" schemaLocation="common/email.xsd"/>
-	<element name="email-epr">
-      <complexType>
-       <sequence>
-        <element ref="wsa:EndpointReference"/>
-        <element ref="email:email"/>
-        </sequence>
-       <attribute name="version" type="string" use="required"/>
-      </complexType>
-  </element>
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:email="http://www.jboss.org/soa/endpoint/protocol/email"  targetNamespace="http://www.jboss.org/soa/endpoint/email-epr" elementFormDefault="qualified" attributeFormDefault="unqualified">
+    <import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="common/ws-addr.xsd"/>
+	<import namespace="http://www.jboss.org/soa/endpoint/protocol/email" schemaLocation="common/email.xsd"/>
+	<element name="email-epr">
+      <complexType>
+       <sequence>
+        <element ref="wsa:EndpointReference"/>
+        <element ref="email:email"/>
+        </sequence>
+       <attribute name="version" type="string" use="required"/>
+      </complexType>
+  </element>
 </schema>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/email-epr.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/ftp-epr.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/ftp-epr.xsd	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/ftp-epr.xsd	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:ftp="http://www.jboss.org/soa/endpoint/protocol/ftp"  targetNamespace="http://www.jboss.org/soa/endpoint/ftp-epr" elementFormDefault="qualified" attributeFormDefault="unqualified">
-    <import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="common/ws-addr.xsd"/>
-	<import namespace="http://www.jboss.org/soa/endpoint/protocol/ftp" schemaLocation="common/ftp.xsd"/>
-	<element name="ftp-epr">
-      <complexType>
-       <sequence>
-        <element ref="wsa:EndpointReference"/>
-        <element ref="ftp:ftp"/>
-        </sequence>
-       <attribute name="version" type="string" use="required"/>
-      </complexType>
-  </element>
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:ftp="http://www.jboss.org/soa/endpoint/protocol/ftp"  targetNamespace="http://www.jboss.org/soa/endpoint/ftp-epr" elementFormDefault="qualified" attributeFormDefault="unqualified">
+    <import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="common/ws-addr.xsd"/>
+	<import namespace="http://www.jboss.org/soa/endpoint/protocol/ftp" schemaLocation="common/ftp.xsd"/>
+	<element name="ftp-epr">
+      <complexType>
+       <sequence>
+        <element ref="wsa:EndpointReference"/>
+        <element ref="ftp:ftp"/>
+        </sequence>
+       <attribute name="version" type="string" use="required"/>
+      </complexType>
+  </element>
 </schema>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/ftp-epr.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,31 +1,31 @@
-<?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:xsd="http://www.w3.org/2001/XMLSchema"
-	 xmlns:jesb="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd"
+<?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:xsd="http://www.w3.org/2001/XMLSchema"
+	 xmlns:jesb="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd"
 	 targetNamespace="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd"
 	 elementFormDefault="qualified">
 	
 	<!-- 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 ref="jesb:providers" minOccurs="0" maxOccurs="1"/>
+	
+	<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 ref="jesb:providers" minOccurs="0" maxOccurs="1"/>
 				<xsd:element ref="jesb:services" minOccurs="0" maxOccurs="1"/>
-			</xsd:sequence>
-			<xsd:attribute name="parameterReloadSecs" use="optional" default="180"/>
-		</xsd:complexType>
-	</xsd:element>
+			</xsd:sequence>
+			<xsd:attribute name="parameterReloadSecs" use="optional" default="180"/>
+		</xsd:complexType>
+	</xsd:element>
 
-	<xsd:element name="property">
-	    <xsd:annotation>
-	    	<xsd:documentation xml:lang="en">A simple name-value pair.</xsd:documentation>
+	<xsd:element name="property">
+	    <xsd:annotation>
+	    	<xsd:documentation xml:lang="en">A simple name-value pair.</xsd:documentation>
 	    </xsd:annotation>
 		<xsd:complexType>
 			<xsd:complexContent>
@@ -41,9 +41,9 @@
 			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: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>
@@ -51,98 +51,98 @@
 			</xsd:sequence>
 		</xsd:complexType>
 	</xsd:element>
-	<xsd:complexType name="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:complexType name="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 ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
 			<xsd:element ref="jesb:bus" maxOccurs="unbounded" minOccurs="1"/>
-		</xsd:sequence>
+		</xsd:sequence>
 		<xsd:attribute name="name" use="required" type="xsd:string"/>
 	</xsd:complexType>
 	<xsd:element name="provider" type="jesb:provider"/>
-	
-	<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: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 ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
 		</xsd:sequence>
-		<xsd:attribute name="busid" use="required" type="xsd:string">
-			<xsd:annotation>
-				<xsd:documentation xml:lang="en">An id such that this bus can be referenced by Service listn.</xsd:documentation><xsd:appinfo>
-			</xsd:appinfo></xsd:annotation>
-		</xsd:attribute>
-	</xsd:complexType>
-	<xsd:element name="bus" type="jesb:bus" />
+		<xsd:attribute name="busid" use="required" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">An id such that this bus can be referenced by Service listn.</xsd:documentation><xsd:appinfo>
+			</xsd:appinfo></xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+	<xsd:element name="bus" type="jesb:bus" />
 	
 	<!-- 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 ref="jesb:service" minOccurs="1" maxOccurs="unbounded"/>
-			</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 ref="jesb:listeners" minOccurs="1" maxOccurs="1"/>
-				<xsd:element ref="jesb:actions" minOccurs="0" maxOccurs="1"/>
-			</xsd:sequence>
-			<xsd:attribute name="category" use="required" type="xsd:string">
-				<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:element name="services">
+	    <xsd:annotation>
+	    	<xsd:documentation xml:lang="en">A container for services.</xsd:documentation>
+	    </xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="jesb:service" minOccurs="1" maxOccurs="unbounded"/>
+			</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 ref="jesb:listeners" minOccurs="1" maxOccurs="1"/>
+				<xsd:element ref="jesb:actions" minOccurs="0" maxOccurs="1"/>
+			</xsd:sequence>
+			<xsd:attribute name="category" use="required" type="xsd:string">
+				<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:attribute>
-			<xsd:attribute name="name" use="required" type="xsd:string">
-				<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:attribute>
-			<xsd:attribute name="description" use="required" type="xsd:string">
-				<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:attribute>
-			<xsd:attribute name="is-gateway" use="required" type="xsd:boolean">
-				<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:attribute name="target-service-name" use="optional" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">Used by gateways only, where it will send it's now esb-aware messages to.</xsd:documentation>
-				</xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="target-service-category" use="optional" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">Used by gateways only, where it will send it's now esb-aware messages to.</xsd:documentation>
-				</xsd:annotation>
-			</xsd:attribute>
-		    <xsd:attribute name="service-class" use="optional" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">Fully qualified class name of the server class.</xsd:documentation>
-				</xsd:annotation>
-			</xsd:attribute>
-		</xsd:complexType>
-	</xsd:element>
+			<xsd:attribute name="name" use="required" type="xsd:string">
+				<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:attribute>
+			<xsd:attribute name="description" use="required" type="xsd:string">
+				<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:attribute>
+			<xsd:attribute name="is-gateway" use="required" type="xsd:boolean">
+				<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:attribute name="target-service-name" use="optional" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">Used by gateways only, where it will send it's now esb-aware messages to.</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="target-service-category" use="optional" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">Used by gateways only, where it will send it's now esb-aware messages to.</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		    <xsd:attribute name="service-class" use="optional" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">Fully qualified class name of the server class.</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
 
-	<xsd:element name="actions">
-		<xsd:annotation>
-			<xsd:documentation xml:lang="en">A container for actions belonging to this service.</xsd:documentation>
+	<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>
@@ -150,29 +150,29 @@
 			</xsd:sequence>
 		</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: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 ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
 			</xsd:sequence>
-			<xsd:attribute name="name" use="required" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">The logical name of the action.</xsd:documentation>
-				</xsd:annotation>
+			<xsd:attribute name="name" use="required" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">The logical name of the action.</xsd:documentation>
+				</xsd:annotation>
 			</xsd:attribute>
-			<xsd:attribute name="class" use="required" type="xsd:string">
-				<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 name="class" use="required" type="xsd:string">
+				<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 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>
@@ -181,9 +181,9 @@
 			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: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>
@@ -191,27 +191,27 @@
 			</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: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 ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
 		</xsd:sequence>
-		<xsd:attribute name="name" use="required" type="xsd:string">
-			<xsd:annotation>
-				<xsd:documentation xml:lang="en">The logical name of the listener.</xsd:documentation>
-			</xsd:annotation>
+		<xsd:attribute name="name" use="required" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation xml:lang="en">The logical name of the listener.</xsd:documentation>
+			</xsd:annotation>
 		</xsd:attribute>
-		<xsd:attribute name="busidref" use="required" type="xsd:string">
-			<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 name="maxThreads" use="required" type="xsd:int">
-				<xsd:annotation><xsd:documentation xml:lang="en">The number of threads which will be started for this listener.</xsd:documentation></xsd:annotation>
+		<xsd:attribute name="busidref" use="required" type="xsd:string">
+			<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 name="maxThreads" use="required" type="xsd:int">
+				<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:complexType>
 	<xsd:element name="listener" type="jesb:listener" />
 
@@ -219,15 +219,15 @@
 			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
+	<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" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">Name of the Queue of Topic.</xsd:documentation></xsd:annotation>
+			<xsd:attribute name="dest-name" use="required" type="xsd:string">
+				<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: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">
@@ -236,13 +236,13 @@
 					</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 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:complexType>
 	</xsd:element>
-	<xsd:element name="jms-bus" substitutionGroup="jesb:bus">
+	<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>
@@ -254,28 +254,28 @@
 			</xsd:complexContent>
 		</xsd:complexType>
 	</xsd:element>
-	<xsd:element name="jms-provider" substitutionGroup="jesb:provider">
+	<xsd:element name="jms-provider" substitutionGroup="jesb:provider">
 		<xsd:annotation><xsd:documentation xml:lang="en">A specific instance of a provider, providing JMS.</xsd:documentation></xsd:annotation>
 		<xsd:complexType>
 			<xsd:complexContent>
 				<xsd:extension base="jesb:provider">
-					<xsd:attribute name="connection-factory" use="required" type="xsd:string">
-						<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 name="connection-factory" use="required" type="xsd:string">
+						<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 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 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" use="required" type="xsd:anyURI">
-						<xsd:annotation><xsd:documentation xml:lang="en">The URL used to do naming lookups.</xsd:documentation></xsd:annotation>
+					<xsd:attribute name="jndi-URL" use="required" 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>
-	<xsd:element name="jms-listener" substitutionGroup="jesb:listener">
+	<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>
@@ -286,272 +286,272 @@
 				</xsd:extension>
 			</xsd:complexContent>
 		</xsd:complexType>
-	</xsd:element>
+	</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" use="required" type="xsd:string">
-				<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" use="required" type="xsd:string">
-				<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 name="work-suffix" use="optional" type="xsd:string" default=".esbInProcess">
-				<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 name="post-delete" use="optional" type="xsd:boolean" default="true">
-				<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" use="optional" type="xsd:string" default="processed">
-				<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 name="post-suffix" use="optional" type="xsd:string" default=".esbDone">
-				<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 name="error-delete" use="optional" type="xsd:boolean" default="true">
-				<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 name="error-directory" use="optional" type="xsd:string" default="processed">
-				<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 name="error-suffix" use="optional" type="xsd:string" default=".esbERROR">
-				<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 ref="jesb:fs-message-filter" maxOccurs="1" minOccurs="0"/>
-					</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: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:listener">
-					<xsd:sequence>
-						<xsd:element ref="jesb:fs-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
-					    <xsd:annotation>
-							<xsd:documentation xml:lang="en">The frequency with which this listener polls fs 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
-			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" use="required" type="xsd:string">
-				<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" use="required" type="xsd:string">
-				<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" use="required" 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" use="required" type="xsd:string">
-				<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 name="work-suffix" use="optional" type="xsd:string" default=".esbInProcess">
-				<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 name="post-delete" use="optional" type="xsd:boolean" default="true">
-				<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" use="optional" type="xsd:string" default="processed">
-				<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 name="post-suffix" use="optional" type="xsd:string" default=".esbDone">
-				<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 name="error-delete" use="optional" type="xsd:boolean" default="true">
-				<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 name="error-directory" use="optional" type="xsd:string" default="processed">
-				<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 name="error-suffix" use="optional" type="xsd:string" default=".esbERROR">
-				<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" use="optional" type="xsd:boolean">
-				<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 name="protocol" use="optional" default="ftp">
-				<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" use="optional" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The url to a certificate, which can be needed for secure protocols (sftp and ftps).</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 ref="jesb:ftp-message-filter" maxOccurs="1" minOccurs="0"/>
-					</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:provider">
-					<xsd:attribute name="hostname" use="required" type="xsd:string">
-						<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:listener">
-					<xsd:sequence>
-						<xsd:element ref="jesb:ftp-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
-					    <xsd:annotation>
-							<xsd:documentation xml:lang="en">The frequency with which this listener polls ftp server 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
-			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" use="required" type="xsd:string">
-				<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" use="optional" type="xsd:string" default="message_id">
-				<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" use="optional" type="xsd:string" default="message">
-				<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" use="optional" type="xsd:string" default="status">
-				<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="insert-timestamp-column" use="optional" type="xsd:string" default="insert_timestamp">
-				<xsd:annotation><xsd:documentation xml:lang="en">Holds the timestamp when the record was inserted.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="post-delete" use="optional" type="xsd:boolean" default="true">
-				<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 name="error-delete" use="optional" type="xsd:boolean" default="true">
-				<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 ref="jesb:sql-message-filter" maxOccurs="1" minOccurs="0"/>
-					</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:provider">
-					<xsd:attribute name="url" use="required" type="xsd:string">
-						<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" use="required" type="xsd:string">
-						<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" use="required" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The username used to access the database.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-					<xsd:attribute name="password" use="optional" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The password used to access the database.</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 ftp protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:listener">
-					<xsd:sequence>
-						<xsd:element ref="jesb:sql-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
-						<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
+			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" use="required" type="xsd:string">
+				<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" use="required" type="xsd:string">
+				<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 name="work-suffix" use="optional" type="xsd:string" default=".esbInProcess">
+				<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 name="post-delete" use="optional" type="xsd:boolean" default="true">
+				<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" use="optional" type="xsd:string" default="processed">
+				<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 name="post-suffix" use="optional" type="xsd:string" default=".esbDone">
+				<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 name="error-delete" use="optional" type="xsd:boolean" default="true">
+				<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 name="error-directory" use="optional" type="xsd:string" default="processed">
+				<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 name="error-suffix" use="optional" type="xsd:string" default=".esbERROR">
+				<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 ref="jesb:fs-message-filter" maxOccurs="1" minOccurs="0"/>
+					</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: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:listener">
+					<xsd:sequence>
+						<xsd:element ref="jesb:fs-message-filter" maxOccurs="1" minOccurs="0"/>
+					</xsd:sequence>
+					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
+					    <xsd:annotation>
+							<xsd:documentation xml:lang="en">The frequency with which this listener polls fs 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
+			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" use="required" type="xsd:string">
+				<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" use="required" type="xsd:string">
+				<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" use="required" 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" use="required" type="xsd:string">
+				<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 name="work-suffix" use="optional" type="xsd:string" default=".esbInProcess">
+				<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 name="post-delete" use="optional" type="xsd:boolean" default="true">
+				<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" use="optional" type="xsd:string" default="processed">
+				<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 name="post-suffix" use="optional" type="xsd:string" default=".esbDone">
+				<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 name="error-delete" use="optional" type="xsd:boolean" default="true">
+				<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 name="error-directory" use="optional" type="xsd:string" default="processed">
+				<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 name="error-suffix" use="optional" type="xsd:string" default=".esbERROR">
+				<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" use="optional" type="xsd:boolean">
+				<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 name="protocol" use="optional" default="ftp">
+				<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" use="optional" type="xsd:string">
+				<xsd:annotation><xsd:documentation xml:lang="en">The url to a certificate, which can be needed for secure protocols (sftp and ftps).</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 ref="jesb:ftp-message-filter" maxOccurs="1" minOccurs="0"/>
+					</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:provider">
+					<xsd:attribute name="hostname" use="required" type="xsd:string">
+						<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:listener">
+					<xsd:sequence>
+						<xsd:element ref="jesb:ftp-message-filter" maxOccurs="1" minOccurs="0"/>
+					</xsd:sequence>
+					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
+					    <xsd:annotation>
+							<xsd:documentation xml:lang="en">The frequency with which this listener polls ftp server 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
+			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" use="required" type="xsd:string">
+				<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" use="optional" type="xsd:string" default="message_id">
+				<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" use="optional" type="xsd:string" default="message">
+				<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" use="optional" type="xsd:string" default="status">
+				<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="insert-timestamp-column" use="optional" type="xsd:string" default="insert_timestamp">
+				<xsd:annotation><xsd:documentation xml:lang="en">Holds the timestamp when the record was inserted.</xsd:documentation></xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="post-delete" use="optional" type="xsd:boolean" default="true">
+				<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 name="error-delete" use="optional" type="xsd:boolean" default="true">
+				<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 ref="jesb:sql-message-filter" maxOccurs="1" minOccurs="0"/>
+					</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:provider">
+					<xsd:attribute name="url" use="required" type="xsd:string">
+						<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" use="required" type="xsd:string">
+						<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" use="required" type="xsd:string">
+						<xsd:annotation><xsd:documentation xml:lang="en">The username used to access the database.</xsd:documentation></xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="password" use="optional" type="xsd:string">
+						<xsd:annotation><xsd:documentation xml:lang="en">The password used to access the database.</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 ftp protocol.</xsd:documentation></xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jesb:listener">
+					<xsd:sequence>
+						<xsd:element ref="jesb:sql-message-filter" maxOccurs="1" minOccurs="0"/>
+					</xsd:sequence>
+					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
+						<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>
 </xsd:schema>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,41 +1,41 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation = "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd">   
-	<hosts>
-		<host name = "filebank" dnsName = "localhost"/>
-		<host name = "jmsbank" dnsName = "localhost"/>
-		<host name = "loanbroker" dnsName = "localhost"/>
-		<host name = "jms-provider" dnsName = "localhost"/>  
-	</hosts>  
-	<servers>    
-		<server name = "fileBankServer" host = "fileBank" appserver = "jboss-4.0.3SP1">    
-			<properties>    
-				<property name = "java.naming.provider.url" value = "localhost:1099"/>    
-				<property name = "java.naming.factory.initial" value = "org.jnp.interfaces.NamingContextFactory"/>    
-				<property name = "java.naming.factory.url.pkgs" value = "org.jboss.naming:org.jnp.interfaces"/>    
-			</properties>    
-		</server>   
-		<server name = "inhouse-jboss-4.0.4" host = "jms-provider" appserver = "jboss-4.0.4">    
-			<properties>
-				<property name = "java.naming.provider.url" value = "localhost:1099"/>
-				<property name = "java.naming.factory.initial" value = "org.jnp.interfaces.NamingContextFactory"/>
-				<property name = "java.naming.factory.url.pkgs" value = "org.jboss.naming:org.jnp.interfaces"/>    
-			</properties>    
-		</server>    
-		<server name = "loanbroker-listener" host = "loanbroker" appserver = "jbossesb"/>    
-	</servers>    
-	<buses>    
-		<bus name = "bank-jms-channel" server = "fileBankServer" resourceType = "QUEUE" userName = "" password = ""/>    
-		<bus name = "bank-ftp-channel" server = "inhouse-jboss-4.0.4" resourceType = "FTP" userName = "kurt" password = "secret"/>    
-	</buses>    
-	<services>    
-		<service name = "filebank-gateway" category = "gateway" server = "loanbroker-listener" description = "This listener picks up files deposited by the fileBank" class = "org.jboss.soa.esb.FileBankGateway">    	  
-			<listeners>    	    
-				<listener description = "A File-Based listener" bus = "bank-ftp-bus"/>    	    
-				<listener description = "A JMS-Based listener" bus = "bank-jms-bus"/>    	  
-			</listeners>    	  
-			<actions>    	    
-				<action name = "TestDefaultRouteAction" process = "route" class = "org.jboss.soa.esb.actions.CbrProxyAction" service-category = "MessageRouting" service-name = "ContentBasedRoutingService"/>    
-			</actions>    
-		</service>    
-	</services>
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation = "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd">   
+	<hosts>
+		<host name = "filebank" dnsName = "localhost"/>
+		<host name = "jmsbank" dnsName = "localhost"/>
+		<host name = "loanbroker" dnsName = "localhost"/>
+		<host name = "jms-provider" dnsName = "localhost"/>  
+	</hosts>  
+	<servers>    
+		<server name = "fileBankServer" host = "fileBank" appserver = "jboss-4.0.3SP1">    
+			<properties>    
+				<property name = "java.naming.provider.url" value = "localhost:1099"/>    
+				<property name = "java.naming.factory.initial" value = "org.jnp.interfaces.NamingContextFactory"/>    
+				<property name = "java.naming.factory.url.pkgs" value = "org.jboss.naming:org.jnp.interfaces"/>    
+			</properties>    
+		</server>   
+		<server name = "inhouse-jboss-4.0.4" host = "jms-provider" appserver = "jboss-4.0.4">    
+			<properties>
+				<property name = "java.naming.provider.url" value = "localhost:1099"/>
+				<property name = "java.naming.factory.initial" value = "org.jnp.interfaces.NamingContextFactory"/>
+				<property name = "java.naming.factory.url.pkgs" value = "org.jboss.naming:org.jnp.interfaces"/>    
+			</properties>    
+		</server>    
+		<server name = "loanbroker-listener" host = "loanbroker" appserver = "jbossesb"/>    
+	</servers>    
+	<buses>    
+		<bus name = "bank-jms-channel" server = "fileBankServer" resourceType = "QUEUE" userName = "" password = ""/>    
+		<bus name = "bank-ftp-channel" server = "inhouse-jboss-4.0.4" resourceType = "FTP" userName = "kurt" password = "secret"/>    
+	</buses>    
+	<services>    
+		<service name = "filebank-gateway" category = "gateway" server = "loanbroker-listener" description = "This listener picks up files deposited by the fileBank" class = "org.jboss.soa.esb.FileBankGateway">    	  
+			<listeners>    	    
+				<listener description = "A File-Based listener" bus = "bank-ftp-bus"/>    	    
+				<listener description = "A JMS-Based listener" bus = "bank-jms-bus"/>    	  
+			</listeners>    	  
+			<actions>    	    
+				<action name = "TestDefaultRouteAction" process = "route" class = "org.jboss.soa.esb.actions.CbrProxyAction" service-category = "MessageRouting" service-name = "ContentBasedRoutingService"/>    
+			</actions>    
+		</service>    
+	</services>
 </jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/jdbc-epr.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/jdbc-epr.xsd	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/jdbc-epr.xsd	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:jdbc="http://www.jboss.org/soa/endpoint/protocol/jdbc"  targetNamespace="http://www.jboss.org/soa/endpoint/jdbc-epr" elementFormDefault="qualified" attributeFormDefault="unqualified">
-    <import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="common/ws-addr.xsd"/>
-	<import namespace="http://www.jboss.org/soa/endpoint/protocol/jdbc" schemaLocation="common/jdbc.xsd"/>
-	<element name="jdbc-epr">
-      <complexType>
-       <sequence>
-        <element ref="wsa:EndpointReference"/>
-        <element ref="jdbc:jdbc"/>
-        </sequence>
-       <attribute name="version" type="string" use="required"/>
-      </complexType>
-  </element>
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:jdbc="http://www.jboss.org/soa/endpoint/protocol/jdbc"  targetNamespace="http://www.jboss.org/soa/endpoint/jdbc-epr" elementFormDefault="qualified" attributeFormDefault="unqualified">
+    <import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="common/ws-addr.xsd"/>
+	<import namespace="http://www.jboss.org/soa/endpoint/protocol/jdbc" schemaLocation="common/jdbc.xsd"/>
+	<element name="jdbc-epr">
+      <complexType>
+       <sequence>
+        <element ref="wsa:EndpointReference"/>
+        <element ref="jdbc:jdbc"/>
+        </sequence>
+       <attribute name="version" type="string" use="required"/>
+      </complexType>
+  </element>
 </schema>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/jdbc-epr.xsd
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/jms-epr.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/message.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/message.xsd	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/message.xsd	2007-01-22 11:01:15 UTC (rev 8960)
@@ -49,5 +49,5 @@
 		<xs:attribute ref="Attachment" use="optional"/>
 		<xs:attribute ref="Properties" use="optional"/>
 		<xs:attribute ref="Fault" use="optional"/>
-	</xs:complexType>	
+	</xs:complexType>	
 </xs:schema>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/etc/schemas/xml/message.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/test/resources/jbossesb-unittest-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/test/resources/jbossesb-unittest-properties.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/test/resources/jbossesb-unittest-properties.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -30,21 +30,21 @@
 <esb
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
-    <properties name="core">
+    <properties name="core">
 		<property name="org.jboss.soa.esb.jndi.server.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
 		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-    </properties>
-    <properties name="registry">
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
-    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
     </properties>
+    <properties name="registry">
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
+    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+    </properties>
     <properties name="transports" depends="core">
     	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
     	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
@@ -70,8 +70,8 @@
 		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
 		<!-- # of milliseconds to timeout waiting for a connection from pool -->
 		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
     </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
 </esb>


Property changes on: labs/jbossesb/trunk/product/etc/test/resources/jbossesb-unittest-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/etc/test/resources/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/etc/test/resources/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/etc/test/resources/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -28,35 +28,35 @@
          <!-- The default pattern: Date Priority [Category] Message\n -->
          <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
       </layout>
-   </appender>
-   
-   <!-- ================================= -->
-   <!-- Preserve messages in a local file -->
-   <!-- ================================= -->
-   
-   <!-- A time/date based rolling appender -->
-   <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-      <param name="File" value="./unittest.log"/>
-      <param name="Append" value="false"/>
-      
-      <!-- Rollover at midnight each day -->
-      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
-      
-      <!-- Rollover at the top of each hour
-         <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-      -->
-      
-      <layout class="org.apache.log4j.PatternLayout">
-         <!-- The default pattern: Date Priority [Category] Message\n -->
-         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
-         
-         <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
-            <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
-         -->
-      </layout>
    </appender>
    
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+   
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="File" value="./unittest.log"/>
+      <param name="Append" value="false"/>
+      
+      <!-- Rollover at midnight each day -->
+      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+      
+      <!-- Rollover at the top of each hour
+         <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+      -->
+      
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+         
+         <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+            <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+         -->
+      </layout>
+   </appender>
+   
    <!-- ================ -->
    <!-- Limit categories -->
    <!-- ================ -->


Property changes on: labs/jbossesb/trunk/product/etc/test/resources/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/build.xml
===================================================================
--- labs/jbossesb/trunk/product/install/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,42 +1,42 @@
-<project name="JBESB_Config" default="configure.jboss" basedir=".">
-
-	<!-- Set deployment properties filename -->
-	<property name="org.jboss.esb.deployment.properties" location="deployment.properties"/>
-
-	<!-- Load Build Properties File -->
-	<property file="${org.jboss.esb.deployment.properties}"/>
-	<property name="org.jboss.esb.deployment.conf" location="conf"/>
-	<property name="org.jboss.esb.deployment.deploy" location="deploy"/>
-	<property name="org.jboss.esb.deployment.data" location="data"/>
-	
-	<target name="configure" depends="configure.jboss" />
-	<target name="configure.jboss">
-		<!-- conf -->
-		<copy  file="${org.jboss.esb.deployment.conf}/log4j.xml" overwrite="true"
-			           todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
-		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-properties.xml" overwrite="true"
-				       todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
-		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb.xml" overwrite="true"
-					   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
-		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-gateway.xml" overwrite="true"
-		       todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
-		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-listener.xml" overwrite="true"
-			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
-		<copy  file="${org.jboss.esb.deployment.conf}/juddi.properties" overwrite="true"
-			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
-		<!-- data -->
-		<copy  file="${org.jboss.esb.deployment.data}/hypersonic/default.data" overwrite="true"
-			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/data/hypersonic" />
-		<copy  file="${org.jboss.esb.deployment.data}/hypersonic/default.properties"  overwrite="true"
-			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/data/hypersonic" />
-		<copy  file="${org.jboss.esb.deployment.data}/hypersonic/default.script" overwrite="true"
-			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/data/hypersonic" />
-		<!-- deploy -->
-		<copy  file="${org.jboss.esb.deployment.deploy}/hsqldb-ds.xml" overwrite="true"
-			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy" />
-		<copy  todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
-			<fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb.sar/**"/></copy>
-			  
-	</target>
-	
-</project>
+<project name="JBESB_Config" default="configure.jboss" basedir=".">
+
+	<!-- Set deployment properties filename -->
+	<property name="org.jboss.esb.deployment.properties" location="deployment.properties"/>
+
+	<!-- Load Build Properties File -->
+	<property file="${org.jboss.esb.deployment.properties}"/>
+	<property name="org.jboss.esb.deployment.conf" location="conf"/>
+	<property name="org.jboss.esb.deployment.deploy" location="deploy"/>
+	<property name="org.jboss.esb.deployment.data" location="data"/>
+	
+	<target name="configure" depends="configure.jboss" />
+	<target name="configure.jboss">
+		<!-- conf -->
+		<copy  file="${org.jboss.esb.deployment.conf}/log4j.xml" overwrite="true"
+			           todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-properties.xml" overwrite="true"
+				       todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb.xml" overwrite="true"
+					   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-gateway.xml" overwrite="true"
+		       todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-listener.xml" overwrite="true"
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+		<copy  file="${org.jboss.esb.deployment.conf}/juddi.properties" overwrite="true"
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+		<!-- data -->
+		<copy  file="${org.jboss.esb.deployment.data}/hypersonic/default.data" overwrite="true"
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/data/hypersonic" />
+		<copy  file="${org.jboss.esb.deployment.data}/hypersonic/default.properties"  overwrite="true"
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/data/hypersonic" />
+		<copy  file="${org.jboss.esb.deployment.data}/hypersonic/default.script" overwrite="true"
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/data/hypersonic" />
+		<!-- deploy -->
+		<copy  file="${org.jboss.esb.deployment.deploy}/hsqldb-ds.xml" overwrite="true"
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy" />
+		<copy  todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
+			<fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb.sar/**"/></copy>
+			  
+	</target>
+	
+</project>


Property changes on: labs/jbossesb/trunk/product/install/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/conf/jbossesb-gateway.xml
===================================================================
--- labs/jbossesb/trunk/product/install/conf/jbossesb-gateway.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/conf/jbossesb-gateway.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-<JBossESB-Gateway parameterReloadSecs="60">
-
+<JBossESB-Gateway parameterReloadSecs="60">
+
 <!-- Define your ESB Gateways in this file -->
 
 </JBossESB-Gateway>


Property changes on: labs/jbossesb/trunk/product/install/conf/jbossesb-gateway.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/conf/jbossesb-listener.xml
===================================================================
--- labs/jbossesb/trunk/product/install/conf/jbossesb-listener.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/conf/jbossesb-listener.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-<JBossESB-Listeners parameterReloadSecs="30">
-
-<!-- Define your ESB Listeners in this file -->
-	
-</JBossESB-Listeners>
+<JBossESB-Listeners parameterReloadSecs="30">
+
+<!-- Define your ESB Listeners in this file -->
+	
+</JBossESB-Listeners>


Property changes on: labs/jbossesb/trunk/product/install/conf/jbossesb-listener.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/conf/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/install/conf/jbossesb-properties.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/conf/jbossesb-properties.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -33,18 +33,18 @@
     <properties name="core">
 		<property name="org.jboss.soa.esb.jndi.server.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
 		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-    </properties>
-    <properties name="registry">
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
-    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
     </properties>
+    <properties name="registry">
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
+    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+    </properties>
     <properties name="transports" depends="core">
     	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
     	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
@@ -72,8 +72,8 @@
 		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
 		<!-- # of milliseconds to timeout waiting for a connection from pool -->
 		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
     </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
 </esb>


Property changes on: labs/jbossesb/trunk/product/install/conf/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/conf/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/install/conf/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/conf/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,3 +1,3 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="50">
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="50">
 </jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/install/conf/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/conf/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/install/conf/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/conf/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,66 +1,66 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=true
-
-# jUDDI DataSource to use
-juddi.dataSource=java:/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=true
+
+# jUDDI DataSource to use
+juddi.dataSource=java:/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/install/conf/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/conf/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/install/conf/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/conf/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -162,15 +162,15 @@
    <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
    <category name="org.apache">
       <priority value="WARN"/>
-   </category>
-   
-  <category name="org.jboss.internal.soa.esb">
-    <priority value="WARN"/>
-  </category>
-  
-  <category name="org.jboss.soa.esb">
-    <priority value="WARN"/>
+   </category>
+   
+  <category name="org.jboss.internal.soa.esb">
+    <priority value="WARN"/>
   </category>
+  
+  <category name="org.jboss.soa.esb">
+    <priority value="WARN"/>
+  </category>
 
    <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
    <category name="org.jboss.serial">


Property changes on: labs/jbossesb/trunk/product/install/conf/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/data/hypersonic/default.properties
===================================================================
--- labs/jbossesb/trunk/product/install/data/hypersonic/default.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/data/hypersonic/default.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,17 +1,17 @@
-#HSQL Database Engine
-#Thu Dec 07 13:13:52 EST 2006
-hsqldb.script_format=0
-runtime.gc_interval=0
-sql.enforce_strict_size=false
-hsqldb.cache_size_scale=8
-readonly=false
-hsqldb.nio_data_file=true
-hsqldb.cache_scale=14
-version=1.8.0
-hsqldb.default_table_type=memory
-hsqldb.cache_file_scale=1
-hsqldb.log_size=200
-modified=yes
-hsqldb.cache_version=1.7.0
-hsqldb.original_version=1.8.0
-hsqldb.compatible_version=1.8.0
+#HSQL Database Engine
+#Thu Dec 07 13:13:52 EST 2006
+hsqldb.script_format=0
+runtime.gc_interval=0
+sql.enforce_strict_size=false
+hsqldb.cache_size_scale=8
+readonly=false
+hsqldb.nio_data_file=true
+hsqldb.cache_scale=14
+version=1.8.0
+hsqldb.default_table_type=memory
+hsqldb.cache_file_scale=1
+hsqldb.log_size=200
+modified=yes
+hsqldb.cache_version=1.7.0
+hsqldb.original_version=1.8.0
+hsqldb.compatible_version=1.8.0


Property changes on: labs/jbossesb/trunk/product/install/data/hypersonic/default.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/deploy/hsqldb-ds.xml
===================================================================
--- labs/jbossesb/trunk/product/install/deploy/hsqldb-ds.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/deploy/hsqldb-ds.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- The Hypersonic embedded database JCA connection factory config -->
-
-<!-- $Id: hsqldb-ds.xml,v 1.15.2.1 2006/01/10 18:11:03 dimitris Exp $ -->
-
-<datasources>
-   <local-tx-datasource>
-      <jndi-name>DefaultDS</jndi-name>
-      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
-      <driver-class>org.hsqldb.jdbcDriver</driver-class>
-      <user-name>sa</user-name>
-      <password></password>
-      <min-pool-size>5</min-pool-size>
-      <max-pool-size>20</max-pool-size>
-      <idle-timeout-minutes>0</idle-timeout-minutes>
-      <security-domain>HsqlDbRealm</security-domain>
-      <prepared-statement-cache-size>32</prepared-statement-cache-size>
-      <metadata>
-         <type-mapping>Hypersonic SQL</type-mapping>
-      </metadata>
-      <depends>jboss:service=Hypersonic,database=default</depends>
-   </local-tx-datasource>
-   
-   <local-tx-datasource>
-         <jndi-name>juddiDB</jndi-name>
-         <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
-         <driver-class>org.hsqldb.jdbcDriver</driver-class>
-         <user-name>sa</user-name>
-         <password></password>
-         <min-pool-size>5</min-pool-size>
-         <max-pool-size>20</max-pool-size>
-         <idle-timeout-minutes>0</idle-timeout-minutes>
-         <security-domain>HsqlDbRealm</security-domain>
-         <prepared-statement-cache-size>32</prepared-statement-cache-size>
-         <metadata>
-            <type-mapping>Hypersonic SQL</type-mapping>
-         </metadata>
-         <depends>jboss:service=Hypersonic,database=default</depends>
-   </local-tx-datasource>
-   
-   <local-tx-datasource>
-            <jndi-name>JBossESBDS</jndi-name>
-            <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
-            <driver-class>org.hsqldb.jdbcDriver</driver-class>
-            <user-name>sa</user-name>
-            <password></password>
-            <min-pool-size>5</min-pool-size>
-            <max-pool-size>20</max-pool-size>
-            <idle-timeout-minutes>0</idle-timeout-minutes>
-            <security-domain>HsqlDbRealm</security-domain>
-            <prepared-statement-cache-size>32</prepared-statement-cache-size>
-            <metadata>
-               <type-mapping>Hypersonic SQL</type-mapping>
-            </metadata>
-            <depends>jboss:service=Hypersonic,database=default</depends>
-   </local-tx-datasource>
-
-   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
-        name="jboss:service=Hypersonic,database=default">
-        <attribute name="Database">default</attribute>
-        <attribute name="InProcessMode">true</attribute>
-   </mbean>
-   
-</datasources>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Hypersonic embedded database JCA connection factory config -->
+
+<!-- $Id: hsqldb-ds.xml,v 1.15.2.1 2006/01/10 18:11:03 dimitris Exp $ -->
+
+<datasources>
+   <local-tx-datasource>
+      <jndi-name>DefaultDS</jndi-name>
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+      <user-name>sa</user-name>
+      <password></password>
+      <min-pool-size>5</min-pool-size>
+      <max-pool-size>20</max-pool-size>
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+      <security-domain>HsqlDbRealm</security-domain>
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+      <metadata>
+         <type-mapping>Hypersonic SQL</type-mapping>
+      </metadata>
+      <depends>jboss:service=Hypersonic,database=default</depends>
+   </local-tx-datasource>
+   
+   <local-tx-datasource>
+         <jndi-name>juddiDB</jndi-name>
+         <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
+         <driver-class>org.hsqldb.jdbcDriver</driver-class>
+         <user-name>sa</user-name>
+         <password></password>
+         <min-pool-size>5</min-pool-size>
+         <max-pool-size>20</max-pool-size>
+         <idle-timeout-minutes>0</idle-timeout-minutes>
+         <security-domain>HsqlDbRealm</security-domain>
+         <prepared-statement-cache-size>32</prepared-statement-cache-size>
+         <metadata>
+            <type-mapping>Hypersonic SQL</type-mapping>
+         </metadata>
+         <depends>jboss:service=Hypersonic,database=default</depends>
+   </local-tx-datasource>
+   
+   <local-tx-datasource>
+            <jndi-name>JBossESBDS</jndi-name>
+            <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
+            <driver-class>org.hsqldb.jdbcDriver</driver-class>
+            <user-name>sa</user-name>
+            <password></password>
+            <min-pool-size>5</min-pool-size>
+            <max-pool-size>20</max-pool-size>
+            <idle-timeout-minutes>0</idle-timeout-minutes>
+            <security-domain>HsqlDbRealm</security-domain>
+            <prepared-statement-cache-size>32</prepared-statement-cache-size>
+            <metadata>
+               <type-mapping>Hypersonic SQL</type-mapping>
+            </metadata>
+            <depends>jboss:service=Hypersonic,database=default</depends>
+   </local-tx-datasource>
+
+   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
+        name="jboss:service=Hypersonic,database=default">
+        <attribute name="Database">default</attribute>
+        <attribute name="InProcessMode">true</attribute>
+   </mbean>
+   
+</datasources>


Property changes on: labs/jbossesb/trunk/product/install/deploy/hsqldb-ds.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/jUDDI-registry/juddi-ds.xml
===================================================================
--- labs/jbossesb/trunk/product/install/jUDDI-registry/juddi-ds.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/jUDDI-registry/juddi-ds.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  JBoss Server Configuration                                           -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id$ -->
-<!-- ==================================================================== -->
-<!--  Datasource config for MySQL using 2.0.11 driver                     -->
-<!-- ==================================================================== -->
-
-<datasources>
-  <local-tx-datasource>
-    <jndi-name>juddiDB</jndi-name>
-    <connection-url>jdbc:mysql://localhost/juddi</connection-url>
-    <driver-class>com.mysql.jdbc.Driver</driver-class>
-    <user-name>root</user-name>
-    <password></password>
-    <check-valid-connection-sql>select count(*) from publisher</check-valid-connection-sql>
-    <max-pool-size>30</max-pool-size>
-    <min-pool-size>5</min-pool-size>
-  </local-tx-datasource>
-</datasources>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id$ -->
+<!-- ==================================================================== -->
+<!--  Datasource config for MySQL using 2.0.11 driver                     -->
+<!-- ==================================================================== -->
+
+<datasources>
+  <local-tx-datasource>
+    <jndi-name>juddiDB</jndi-name>
+    <connection-url>jdbc:mysql://localhost/juddi</connection-url>
+    <driver-class>com.mysql.jdbc.Driver</driver-class>
+    <user-name>root</user-name>
+    <password></password>
+    <check-valid-connection-sql>select count(*) from publisher</check-valid-connection-sql>
+    <max-pool-size>30</max-pool-size>
+    <min-pool-size>5</min-pool-size>
+  </local-tx-datasource>
+</datasources>


Property changes on: labs/jbossesb/trunk/product/install/jUDDI-registry/juddi-ds.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/install/jUDDI-registry/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/install/jUDDI-registry/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/install/jUDDI-registry/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost/juddi
-juddi.jdbcUsername=juddi
-juddi.jdbcPassword=juddi
-# jUDDI DataSource to use
-juddi.dataSource=java:comp/env/jdbc/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost/juddi
+juddi.jdbcUsername=juddi
+juddi.jdbcPassword=juddi
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/install/jUDDI-registry/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/product.properties
===================================================================
--- labs/jbossesb/trunk/product/product.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/product.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,16 +1,16 @@
-# JBossESB ant properties file
-# $Id$
-#
-org.jboss.esb.build.deprecation=yes
-org.jboss.esb.build.optimize=off
-org.jboss.esb.build.frominstall=no
-org.jboss.esb.build.debug=yes
-org.jboss.esb.build.tests=no
-
-org.jboss.esb.alltests.build=yes
-org.jboss.esb.jboss.home=.
-
-org.jboss.esb.test.ftp.hostname=ftp.ncl.jboss.com
-org.jboss.esb.test.ftp.user=kurt
-org.jboss.esb.test.ftp.pwd=password
+# JBossESB ant properties file
+# $Id$
+#
+org.jboss.esb.build.deprecation=yes
+org.jboss.esb.build.optimize=off
+org.jboss.esb.build.frominstall=no
+org.jboss.esb.build.debug=yes
+org.jboss.esb.build.tests=no
+
+org.jboss.esb.alltests.build=yes
+org.jboss.esb.jboss.home=.
+
+org.jboss.esb.test.ftp.hostname=ftp.ncl.jboss.com
+org.jboss.esb.test.ftp.user=kurt
+org.jboss.esb.test.ftp.pwd=password
 org.jboss.esb.test.ftp.dir=/home/kurt
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/product.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/esb-quickstart-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/esb-quickstart-service.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/esb-quickstart-service.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,107 +1,107 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_helloworld_Request">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_helloworld_action_Request">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_helloworld_action_Response">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_simple_transformation_Request">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_simple_transformation_Response">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_simple_cbr_Request">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=CBRExpressFreeShipping">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=CBRNormalShipping">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=CBRExpressFreeShippingAlert">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=CBRNormalShippingAlert">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>  
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_more_action_Request">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-  </mbean> 
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_more_action_Response">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-   </mbean>
-  <!-- Fun CBR Demo -->
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Request_GW">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Request_ESB">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_ToBlue">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Blue_Alert">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_ToRed">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Red_Alert">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_ToGreenTransformer">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_ToGreen">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Green_Alert">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-  </mbean>
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_helloworld_Request">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_helloworld_action_Request">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_helloworld_action_Response">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_simple_transformation_Request">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_simple_transformation_Response">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_simple_cbr_Request">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=CBRExpressFreeShipping">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=CBRNormalShipping">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=CBRExpressFreeShippingAlert">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=CBRNormalShippingAlert">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>  
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_more_action_Request">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+  </mbean> 
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_more_action_Response">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+   </mbean>
+  <!-- Fun CBR Demo -->
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Request_GW">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Request_ESB">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_ToBlue">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Blue_Alert">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_ToRed">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Red_Alert">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_ToGreenTransformer">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_ToGreen">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=quickstart_Fun_CBR_Green_Alert">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
 </server>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/esb-quickstart-service.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/SampleOrder.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,121 +1,121 @@
-<project name="Quickstart_fun_cbr" default="run" basedir=".">
-
- <property file="../quickstarts.properties" />
-
- <property name="build.dir"
-    value="${basedir}/build"/>
- <property name="src.dir"
-    value="${basedir}/src"/>
-	
- <property name="esb-config" value="${basedir}/jbossesb.xml"/>
-  
-	<path id="classpath">
-    <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
-	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
-	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
-	<fileset dir="${basedir}" includes="smooks-cdr.lst"/>
-	<fileset dir="${basedir}" includes="smooks-res.xml"/>
-	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/server/default/lib">
-	  <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
-	 </fileset>		
-  	
-    <fileset dir="${basedir}" includes="build/**/*.jar"/>
-  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
-    <pathelement location="." />  
-  </path>
- 
-  <property name="cp" refid="classpath"/>
-  
-  <target name="echoCP">    
-  	<echo message="Classpath is ${cp}"/>
-  </target>
-  
-  <target name="prepare">
-	<mkdir dir="${build.dir}" />
-  </target>
-
-  <target name="clean">
-	<delete dir="${build.dir}" />
-  </target>
-
-  <target name="compile" depends="prepare">
-	<javac srcdir="${src.dir}"
-	   destdir="${build.dir}">
-	  <classpath refid="classpath"/>
- 	</javac>
-  </target>
-
-  <target name="jars" depends="compile">
-	<delete file="${build.dir}/${ant.project.name}.jar"/>
-    <jar destfile="${build.dir}/${ant.project.name}.jar"
-		basedir="${build.dir}"
-		includes="**/*.class"/>
-  	<!-- Rules files must be jarred and on the classpath -->
-    <jar destfile="${build.dir}/${ant.project.name}_Rules.jar"
-		basedir="${basedir}/src/services/rules" includes="*.*"/>
-  </target>
-
-  <target name="updateRules">
-	  	<!-- Rules files must be jarred and on the classpath -->
-	    <jar destfile="${build.dir}/${ant.project.name}_Rules.jar"
-			basedir="${basedir}/src/services/rules" includes="*.*"/>
-
-  	  <copy file="${build.dir}/${ant.project.name}_Rules.jar" overwrite="true"
-			todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-	  />
-  </target>
-  <target name="run">
-	    <echo>Fun CBR: make sure to also run receiveBlue, receiveRed, receiveGreen</echo>
-			 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
-		  	   	<arg value="${esb-config}"/>
-		  		<classpath refid="classpath"/>
-		  	 </java>
-  </target>
-
-  <target name="deployToSAR">
-		    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-		  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
-		  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-		  	/>
-		  	<copy file="${build.dir}/${ant.project.name}_Rules.jar" overwrite="true"
-  				todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-  			/>
-		  	<copy file="jbossesb.xml" overwrite="true"
-		  		todir="${jbosshome.dir}/server/default/conf"
-		  	/>
-		  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
-		  	<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
-  </target>
-	
-  <target name="runtest">
-     <echo>Runs Test JMS Sender</echo>
-     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
-		<classpath refid="classpath"/>
-     </java>
-  </target>  
-	
-  <target name="receiveBlue">
-	 <echo>Runs Test JMS Receiver</echo>
-	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
-	  	<arg value="queue/quickstart_Fun_CBR_Blue_Alert"/>
-		<classpath refid="classpath"/>
-	 </java>
-  </target>  
-	
-  <target name="receiveRed">
-	 <echo>Runs Test JMS Receiver</echo>
-	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
-	   	<arg value="queue/quickstart_Fun_CBR_Red_Alert"/>
-		<classpath refid="classpath"/>
-	 </java>
-   </target>  
-	
-  <target name="receiveGreen">
-	 <echo>Runs Test JMS Receiver</echo>
-	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
-	   	<arg value="queue/quickstart_Fun_CBR_Green_Alert"/>
-		<classpath refid="classpath"/>
-	 </java>
-   </target> 
+<project name="Quickstart_fun_cbr" default="run" basedir=".">
+
+ <property file="../quickstarts.properties" />
+
+ <property name="build.dir"
+    value="${basedir}/build"/>
+ <property name="src.dir"
+    value="${basedir}/src"/>
+	
+ <property name="esb-config" value="${basedir}/jbossesb.xml"/>
+  
+	<path id="classpath">
+    <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+	<fileset dir="${basedir}" includes="smooks-cdr.lst"/>
+	<fileset dir="${basedir}" includes="smooks-res.xml"/>
+	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/server/default/lib">
+	  <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+	 </fileset>		
+  	
+    <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
+    <pathelement location="." />  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+  	<echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+	<mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+	<delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+	<javac srcdir="${src.dir}"
+	   destdir="${build.dir}">
+	  <classpath refid="classpath"/>
+ 	</javac>
+  </target>
+
+  <target name="jars" depends="compile">
+	<delete file="${build.dir}/${ant.project.name}.jar"/>
+    <jar destfile="${build.dir}/${ant.project.name}.jar"
+		basedir="${build.dir}"
+		includes="**/*.class"/>
+  	<!-- Rules files must be jarred and on the classpath -->
+    <jar destfile="${build.dir}/${ant.project.name}_Rules.jar"
+		basedir="${basedir}/src/services/rules" includes="*.*"/>
+  </target>
+
+  <target name="updateRules">
+	  	<!-- Rules files must be jarred and on the classpath -->
+	    <jar destfile="${build.dir}/${ant.project.name}_Rules.jar"
+			basedir="${basedir}/src/services/rules" includes="*.*"/>
+
+  	  <copy file="${build.dir}/${ant.project.name}_Rules.jar" overwrite="true"
+			todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+	  />
+  </target>
+  <target name="run">
+	    <echo>Fun CBR: make sure to also run receiveBlue, receiveRed, receiveGreen</echo>
+			 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
+		  	   	<arg value="${esb-config}"/>
+		  		<classpath refid="classpath"/>
+		  	 </java>
+  </target>
+
+  <target name="deployToSAR">
+		    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+		  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
+		  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+		  	/>
+		  	<copy file="${build.dir}/${ant.project.name}_Rules.jar" overwrite="true"
+  				todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+  			/>
+		  	<copy file="jbossesb.xml" overwrite="true"
+		  		todir="${jbosshome.dir}/server/default/conf"
+		  	/>
+		  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
+		  	<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
+  </target>
+	
+  <target name="runtest">
+     <echo>Runs Test JMS Sender</echo>
+     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
+		<classpath refid="classpath"/>
+     </java>
+  </target>  
+	
+  <target name="receiveBlue">
+	 <echo>Runs Test JMS Receiver</echo>
+	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+	  	<arg value="queue/quickstart_Fun_CBR_Blue_Alert"/>
+		<classpath refid="classpath"/>
+	 </java>
+  </target>  
+	
+  <target name="receiveRed">
+	 <echo>Runs Test JMS Receiver</echo>
+	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+	   	<arg value="queue/quickstart_Fun_CBR_Red_Alert"/>
+		<classpath refid="classpath"/>
+	 </java>
+   </target>  
+	
+  <target name="receiveGreen">
+	 <echo>Runs Test JMS Receiver</echo>
+	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+	   	<arg value="queue/quickstart_Fun_CBR_Green_Alert"/>
+		<classpath refid="classpath"/>
+	 </java>
+   </target> 
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,155 +1,155 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" >
-
-    <providers>
-          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
-                      jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-                      jndi-URL="localhost" >                      
-             <jms-bus busid="quickstartGwChannel">
-                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_GW"/>
-             </jms-bus>
-             <jms-bus busid="quickstartEsbChannel">
-                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_ESB"/>
-             </jms-bus>
-             <jms-bus busid="Fun_CBR_ToBlue">
-                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToBlue"/>
-             </jms-bus>
-             <jms-bus busid="Fun_CBR_ToRed">
-                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToRed"/>
-             </jms-bus>
-             <jms-bus busid="Fun_CBR_ToGreenTransformer">
-                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToGreenTransformer"/>
-             </jms-bus>		                          
-             <jms-bus busid="Fun_CBR_ToGreen">
-                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToGreen"/>
-             </jms-bus>		             
-          </jms-provider>
-      </providers>
-      
-      <services>
-        <!-- Gateway -->
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" >
+
+    <providers>
+          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+                      jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+                      jndi-URL="localhost" >                      
+             <jms-bus busid="quickstartGwChannel">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_GW"/>
+             </jms-bus>
+             <jms-bus busid="quickstartEsbChannel">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_ESB"/>
+             </jms-bus>
+             <jms-bus busid="Fun_CBR_ToBlue">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToBlue"/>
+             </jms-bus>
+             <jms-bus busid="Fun_CBR_ToRed">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToRed"/>
+             </jms-bus>
+             <jms-bus busid="Fun_CBR_ToGreenTransformer">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToGreenTransformer"/>
+             </jms-bus>		                          
+             <jms-bus busid="Fun_CBR_ToGreen">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToGreen"/>
+             </jms-bus>		             
+          </jms-provider>
+      </providers>
+      
+      <services>
+        <!-- Gateway -->
         <service 
             category="Fun_CBRServices_GW" 
           	name="FunCBRService_GW" 
           	description="This CBR routes messages to different service destinations based on Rules - see .drl" 
           	is-gateway="true"
             target-service-category="Fun_CBRServices_ESB"
-            target-service-name="FunCBRService_ESB">
-            <listeners>        
-                  <jms-listener name="TheGateway"
-                              busidref="quickstartGwChannel"
-                              maxThreads="1"                              
-                  />                  
-            </listeners>    
-        </service>
-        <!-- ESB CBR Service -->
+            target-service-name="FunCBRService_ESB">
+            <listeners>        
+                  <jms-listener name="TheGateway"
+                              busidref="quickstartGwChannel"
+                              maxThreads="1"                              
+                  />                  
+            </listeners>    
+        </service>
+        <!-- ESB CBR Service -->
         <service 
         	category="Fun_CBRServices_ESB" 
         	name="FunCBRService_ESB" 
         	description="ESB Listener - for the native clients" 
-        	is-gateway="false"
-        	service-class="org.jboss.soa.esb.listeners.message.CbrListener">
-        	<listeners>        
-                  <jms-listener name="XPathContentBasedRouter"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1">  
-                     <property name="ruleSet" value="MyESBRules-XPath.drl"/>
-	                 <property name="ruleLanguage" value="XPathLanguage.dsl"/>
-	                 <property name="ruleReload" value="true"/>                
-	             </jms-listener>
-             </listeners> 
-        </service>
-        
-        <!-- Blue -->
-        <service
-  	      category="BlueTeam"
-  	      name="GoBlue"
-  	      description="Move to the Blue Team"
-  	      is-gateway="false">
-  	      <listeners>
-  	        <jms-listener
-  	       	  name="Fun_CBR_ToBlue"
-  	       	  busidref="Fun_CBR_ToBlue"
-  	       	  maxThreads="1"
-  	         />
-  	      </listeners>
-  	      <actions>
-  	      	  <action name="notificationAction" 
-               		class="org.jboss.soa.esb.actions.Notifier">
-               		<property name="okMethod" value="notifyOK" />
-               		<property name="notification-details">
-   	 				   <NotificationList type="OK"> 
-      				     <target class="NotifyConsole" /> <!--  System.out.println -->
-				    	 <target class="NotifyQueues">
-				   	       <queue jndiName="queue/quickstart_Fun_CBR_Blue_Alert">
-					         	<messageProp name="quickstart" value="Fun_CBR_Blue_Alert" />
-					       </queue> 
-			 	     	 </target>
-	    		   	   </NotificationList> 
-	    		   </property>
-   	   			</action>      
-           </actions>
-  	    </service>
-
-        <!-- Red -->
-        <service
-  	      category="RedTeam"
-  	      name="GoRed"
-  	      description="Move to the Red Team"
-  	      is-gateway="false">
-  	      <listeners>
-  	        <jms-listener
-  	       	  name="Fun_CBR_ToRed"
-  	       	  busidref="Fun_CBR_ToRed"
-  	       	  maxThreads="1"
-  	         />
-  	      </listeners>
-  	      <actions>
-  	      	  <action name="notificationAction" 
-               		class="org.jboss.soa.esb.actions.Notifier">
-               		<property name="okMethod" value="notifyOK" />
-               		<property name="notification-details">
-   	 				   <NotificationList type="OK"> 
-      				     <target class="NotifyConsole" /> <!--  System.out.println -->
-				    	 <target class="NotifyQueues">
-				   	       <queue jndiName="queue/quickstart_Fun_CBR_Red_Alert">
-					         	<messageProp name="quickstart" value="Fun_CBR_Red_Alert" />
-					       </queue> 
-			 	     	 </target>
-	    		   	   </NotificationList> 
-	    		   </property>
-   	   			</action>      
-           </actions>
-  	    </service>
-
-        <!--  Green Entry Point - conducts a transformation -->
-        <service
-  	      category="GreenTeam"
-  	      name="GoGreen"
-  	      description="First transform then send to the Green Team"
-  	      is-gateway="false">
-  	      <listeners>
-  	        <jms-listener
-  	       	  name="Fun_CBR_ToGreenTransformer"
-  	       	  busidref="Fun_CBR_ToGreenTransformer"
-  	       	  maxThreads="1"
-  	         />
-  	      </listeners>  	      
-  	      <actions>
-  	          <!-- insert transformer here -->
-   	   		    <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
-               		<property name="okMethod" value="notifyOK" />
-               		<property name="notification-details">
-   	 				   <NotificationList type="OK"> 
-				    	 <target class="NotifyQueues">
-				   	       <queue jndiName="queue/quickstart_Fun_CBR_Green_Alert">
-					         	<messageProp name="quickstart" value="Fun_CBR_Green_Alert" />
-					       </queue> 
-			 	     	 </target>
-	    		   	   </NotificationList> 
-	    		   </property>
-   	   			</action>  
-           </actions>
-  	    </service>  	         
-	</services>
-</jbossesb>
+        	is-gateway="false"
+        	service-class="org.jboss.soa.esb.listeners.message.CbrListener">
+        	<listeners>        
+                  <jms-listener name="XPathContentBasedRouter"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1">  
+                     <property name="ruleSet" value="MyESBRules-XPath.drl"/>
+	                 <property name="ruleLanguage" value="XPathLanguage.dsl"/>
+	                 <property name="ruleReload" value="true"/>                
+	             </jms-listener>
+             </listeners> 
+        </service>
+        
+        <!-- Blue -->
+        <service
+  	      category="BlueTeam"
+  	      name="GoBlue"
+  	      description="Move to the Blue Team"
+  	      is-gateway="false">
+  	      <listeners>
+  	        <jms-listener
+  	       	  name="Fun_CBR_ToBlue"
+  	       	  busidref="Fun_CBR_ToBlue"
+  	       	  maxThreads="1"
+  	         />
+  	      </listeners>
+  	      <actions>
+  	      	  <action name="notificationAction" 
+               		class="org.jboss.soa.esb.actions.Notifier">
+               		<property name="okMethod" value="notifyOK" />
+               		<property name="notification-details">
+   	 				   <NotificationList type="OK"> 
+      				     <target class="NotifyConsole" /> <!--  System.out.println -->
+				    	 <target class="NotifyQueues">
+				   	       <queue jndiName="queue/quickstart_Fun_CBR_Blue_Alert">
+					         	<messageProp name="quickstart" value="Fun_CBR_Blue_Alert" />
+					       </queue> 
+			 	     	 </target>
+	    		   	   </NotificationList> 
+	    		   </property>
+   	   			</action>      
+           </actions>
+  	    </service>
+
+        <!-- Red -->
+        <service
+  	      category="RedTeam"
+  	      name="GoRed"
+  	      description="Move to the Red Team"
+  	      is-gateway="false">
+  	      <listeners>
+  	        <jms-listener
+  	       	  name="Fun_CBR_ToRed"
+  	       	  busidref="Fun_CBR_ToRed"
+  	       	  maxThreads="1"
+  	         />
+  	      </listeners>
+  	      <actions>
+  	      	  <action name="notificationAction" 
+               		class="org.jboss.soa.esb.actions.Notifier">
+               		<property name="okMethod" value="notifyOK" />
+               		<property name="notification-details">
+   	 				   <NotificationList type="OK"> 
+      				     <target class="NotifyConsole" /> <!--  System.out.println -->
+				    	 <target class="NotifyQueues">
+				   	       <queue jndiName="queue/quickstart_Fun_CBR_Red_Alert">
+					         	<messageProp name="quickstart" value="Fun_CBR_Red_Alert" />
+					       </queue> 
+			 	     	 </target>
+	    		   	   </NotificationList> 
+	    		   </property>
+   	   			</action>      
+           </actions>
+  	    </service>
+
+        <!--  Green Entry Point - conducts a transformation -->
+        <service
+  	      category="GreenTeam"
+  	      name="GoGreen"
+  	      description="First transform then send to the Green Team"
+  	      is-gateway="false">
+  	      <listeners>
+  	        <jms-listener
+  	       	  name="Fun_CBR_ToGreenTransformer"
+  	       	  busidref="Fun_CBR_ToGreenTransformer"
+  	       	  maxThreads="1"
+  	         />
+  	      </listeners>  	      
+  	      <actions>
+  	          <!-- insert transformer here -->
+   	   		    <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
+               		<property name="okMethod" value="notifyOK" />
+               		<property name="notification-details">
+   	 				   <NotificationList type="OK"> 
+				    	 <target class="NotifyQueues">
+				   	       <queue jndiName="queue/quickstart_Fun_CBR_Green_Alert">
+					         	<messageProp name="quickstart" value="Fun_CBR_Green_Alert" />
+					       </queue> 
+			 	     	 </target>
+	    		   	   </NotificationList> 
+	    		   </property>
+   	   			</action>  
+           </actions>
+  	    </service>  	         
+	</services>
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -29,8 +29,8 @@
          <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
       </layout>
    </appender>
-
 
+
    <!-- ================================= -->
    <!-- Preserve messages in a local file -->
    <!-- ================================= -->
@@ -52,25 +52,25 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
    <category name="org.jboss.soa.esb">
       <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.milyn">
-      <priority value="ERROR"/>
-   </category>
-
-   <category name="quickstarts">
-      <priority value="ERROR"/>
-   </category>
+   </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.milyn">
+      <priority value="ERROR"/>
+   </category>
+
+   <category name="quickstarts">
+      <priority value="ERROR"/>
+   </category>
    
    <!-- ======================= -->
    <!-- Setup the Root category -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-res.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/Customer.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/DVDStoreAction.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderHeader.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderItem.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,47 +1,47 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.apache.log4j.Logger;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getContents()));
-		  logFooter();
-		  return message;         	
-	}
-  
-   public void exceptionHandler(Message message, Throwable exception) {
-	   logHeader();
-	   System.out.println("!ERROR!");
-	   System.out.println(exception.getMessage());
-	   System.out.println("For Message: ");
-	   System.out.println(message.getBody().getContents());
-	   logFooter();
-   }
-	
-
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.apache.log4j.Logger;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  System.out.println("Body: " + new String(message.getBody().getContents()));
+		  logFooter();
+		  return message;         	
+	}
+  
+   public void exceptionHandler(Message message, Throwable exception) {
+	   logHeader();
+	   System.out.println("!ERROR!");
+	   System.out.println(exception.getMessage());
+	   System.out.println("For Message: ");
+	   System.out.println(message.getBody().getContents());
+	   logFooter();
+   }
+	
+
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,49 +1,49 @@
-package quickstart;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-import javax.jms.TextMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import org.jboss.soa.esb.message.Message;
-
-public class ReturnJMSMessage {
-       
-    public static void sendMessage(Message esbMessage,String newDestination) throws JMSException, NamingException, Exception {
-    	if (esbMessage == null || newDestination == null) 
-    		throw new Exception("Message and JMS Destination are required");
-    
-    	QueueConnection conn;
-        QueueSession session;
-        Queue que;
-        
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/" + newDestination);
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-
-    	    	   
-    	String newMsg = new String(esbMessage.getBody().getContents());
-
-    	
-    	QueueSender send = session.createSender(que);        
-        TextMessage tm = session.createTextMessage(newMsg);
-        send.send(tm);
-        
-
-    	conn.stop();
-    }    
-    
+package quickstart;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import org.jboss.soa.esb.message.Message;
+
+public class ReturnJMSMessage {
+       
+    public static void sendMessage(Message esbMessage,String newDestination) throws JMSException, NamingException, Exception {
+    	if (esbMessage == null || newDestination == null) 
+    		throw new Exception("Message and JMS Destination are required");
+    
+    	QueueConnection conn;
+        QueueSession session;
+        Queue que;
+        
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/" + newDestination);
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+
+    	    	   
+    	String newMsg = new String(esbMessage.getBody().getContents());
+
+    	
+    	QueueSender send = session.createSender(que);        
+        TextMessage tm = session.createTextMessage(newMsg);
+        send.send(tm);
+        
+
+    	conn.stop();
+    }    
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,65 +1,65 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class TeamAlert {
-	
-	  protected Message  _message;
-	  protected ConfigTree	_config;
-	  
-	  public TeamAlert (ConfigTree config) { _config = config; } 
-	  	  
-	  public Message sendResponseBlue(Message message) {
-		  try {
-			   logHeader();
-			   System.out.println(new String(message.getBody().getContents()));
-			   System.out.println("Blue Blue Blue");
-			   logFooter();
-			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Blue_Alert");
-		   } catch (Exception e) {
-			   logHeader();
-			   System.out.println(e.getMessage());
-			   logFooter();
-		   }
-		   return message;
-	  }
-	  
-	  public Message sendResponseRed(Message message) {
-		  try {
-			   logHeader();
-			   System.out.println(new String(message.getBody().getContents()));
-			   System.out.println("Red Red Red");
-			   logFooter();
-			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Red_Alert");
-		   } catch (Exception e) {
-			   logHeader();
-			   System.out.println(e.getMessage());
-			   logFooter();
-		   }
-		   return message;
-	  }
-
-	  public Message sendResponseGreen(Message message) {
-		  try {
-			   logHeader();
-			   System.out.println(new String(message.getBody().getContents()));
-			   System.out.println("Green Green Green");
-			   logFooter();
-			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Green_Alert");
-		   } catch (Exception e) {
-			   logHeader();
-			   System.out.println(e.getMessage());
-			   logFooter();
-		   }
-		   return message;
-	  }
-	  
-	  private void logHeader() {
-		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-	  }
-	  private void logFooter() {
-		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-	  }
-	
-}
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class TeamAlert {
+	
+	  protected Message  _message;
+	  protected ConfigTree	_config;
+	  
+	  public TeamAlert (ConfigTree config) { _config = config; } 
+	  	  
+	  public Message sendResponseBlue(Message message) {
+		  try {
+			   logHeader();
+			   System.out.println(new String(message.getBody().getContents()));
+			   System.out.println("Blue Blue Blue");
+			   logFooter();
+			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Blue_Alert");
+		   } catch (Exception e) {
+			   logHeader();
+			   System.out.println(e.getMessage());
+			   logFooter();
+		   }
+		   return message;
+	  }
+	  
+	  public Message sendResponseRed(Message message) {
+		  try {
+			   logHeader();
+			   System.out.println(new String(message.getBody().getContents()));
+			   System.out.println("Red Red Red");
+			   logFooter();
+			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Red_Alert");
+		   } catch (Exception e) {
+			   logHeader();
+			   System.out.println(e.getMessage());
+			   logFooter();
+		   }
+		   return message;
+	  }
+
+	  public Message sendResponseGreen(Message message) {
+		  try {
+			   logHeader();
+			   System.out.println(new String(message.getBody().getContents()));
+			   System.out.println("Green Green Green");
+			   logFooter();
+			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Green_Alert");
+		   } catch (Exception e) {
+			   logHeader();
+			   System.out.println(e.getMessage());
+			   logFooter();
+		   }
+		   return message;
+	  }
+	  
+	  private void logHeader() {
+		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+	  }
+	  private void logFooter() {
+		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+	  }
+	
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,55 +1,55 @@
-package quickstart.test;
-
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-public class ReceiveJMSMessage {
-	   QueueConnection conn = null;	   
-	   QueueSession receiverSession = null;	   
-	   Queue receiverQueue = null;	   
-	   QueueReceiver queueReceiver = null;
-	   InitialContext iniCtx = null;
-	   QueueConnectionFactory qcf = null;
-	   String receiveQueueName = "queue/D"; // Default to queue/D
-	   
-	   public ReceiveJMSMessage() {
-		   
-	   }
-	   public void receiveOne() {
-		   try {
-		   if (iniCtx == null) iniCtx = new InitialContext();
-	          if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
-	          if (conn == null) {
-	              conn = qcf.createQueueConnection();
-	              conn.start();
-	          }	        
-	          receiverQueue = (Queue) iniCtx.lookup(receiveQueueName);
-	          receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-	    	  queueReceiver = receiverSession.createReceiver(receiverQueue); 
-	    	  TextMessage msg = (TextMessage) queueReceiver.receive(2000);
-	    	  if (msg != null) {
-	    		  System.out.println("*********************************************************");
-	    		  System.out.println(msg);
-	    		  System.out.println("*********************************************************");
-	    	  }	
-		   } catch (Exception e) {
-			   System.out.println(e);
-		   }
-	   }
-	   public static void main(String[] args) {
-		      ReceiveJMSMessage receiver = new ReceiveJMSMessage();
-		      
-		      if(args[0] != null) {
-		    	  receiver.receiveQueueName = args[0];
-		    	  System.out.println("Receiving on: " + receiver.receiveQueueName );		    	 
-		      }		    	  
-		      while (true) { // loop until I'm killed
-		    	  receiver.receiveOne();
-		      }
-	   }
-}
+package quickstart.test;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+public class ReceiveJMSMessage {
+	   QueueConnection conn = null;	   
+	   QueueSession receiverSession = null;	   
+	   Queue receiverQueue = null;	   
+	   QueueReceiver queueReceiver = null;
+	   InitialContext iniCtx = null;
+	   QueueConnectionFactory qcf = null;
+	   String receiveQueueName = "queue/D"; // Default to queue/D
+	   
+	   public ReceiveJMSMessage() {
+		   
+	   }
+	   public void receiveOne() {
+		   try {
+		   if (iniCtx == null) iniCtx = new InitialContext();
+	          if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+	          if (conn == null) {
+	              conn = qcf.createQueueConnection();
+	              conn.start();
+	          }	        
+	          receiverQueue = (Queue) iniCtx.lookup(receiveQueueName);
+	          receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+	    	  queueReceiver = receiverSession.createReceiver(receiverQueue); 
+	    	  TextMessage msg = (TextMessage) queueReceiver.receive(2000);
+	    	  if (msg != null) {
+	    		  System.out.println("*********************************************************");
+	    		  System.out.println(msg);
+	    		  System.out.println("*********************************************************");
+	    	  }	
+		   } catch (Exception e) {
+			   System.out.println(e);
+		   }
+	   }
+	   public static void main(String[] args) {
+		      ReceiveJMSMessage receiver = new ReceiveJMSMessage();
+		      
+		      if(args[0] != null) {
+		    	  receiver.receiveQueueName = args[0];
+		    	  System.out.println("Receiving on: " + receiver.receiveQueueName );		    	 
+		      }		    	  
+		      while (true) { // loop until I'm killed
+		    	  receiver.receiveOne();
+		      }
+	   }
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,90 +1,90 @@
-package quickstart.test;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/quickstart_Fun_CBR_Request_GW");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        ObjectMessage tm = session.createObjectMessage(msg);        
-        send.send(tm);        
-        send.close();
-    }
-    public String readAsciiFile(String fileName) throws IOException {
-		  FileReader fr = null;
-		  char[] thechars = null;
-
-		  try {
-			  File thefile = new File( fileName );
-			  fr = new FileReader( thefile );
-			  int size = (int) thefile.length();
-			  thechars = new char[size];
-		
-			  int count, index = 0;
-		
-			  // 	read in the bytes from the input stream
-			  while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
-				  size -= count;
-				  index += count;
-			  }
-			} catch(Exception e) {	
-				System.out.println(e);
-			}
-			finally {
-				if( fr != null )
-		        fr.close();
-			}
-			return new String(thechars);
-
-    } // readAsciiFile
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	String fileContent = sm.readAsciiFile("SampleOrder.xml");
-    	System.out.println("---------------------------------------------");
-    	System.out.println(fileContent);
-    	System.out.println("---------------------------------------------");
-    	sm.sendAMessage(fileContent); 
-    	sm.stop();
-    	
-    }
-    
+package quickstart.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/quickstart_Fun_CBR_Request_GW");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);        
+        send.send(tm);        
+        send.close();
+    }
+    public String readAsciiFile(String fileName) throws IOException {
+		  FileReader fr = null;
+		  char[] thechars = null;
+
+		  try {
+			  File thefile = new File( fileName );
+			  fr = new FileReader( thefile );
+			  int size = (int) thefile.length();
+			  thechars = new char[size];
+		
+			  int count, index = 0;
+		
+			  // 	read in the bytes from the input stream
+			  while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
+				  size -= count;
+				  index += count;
+			  }
+			} catch(Exception e) {	
+				System.out.println(e);
+			}
+			finally {
+				if( fr != null )
+		        fr.close();
+			}
+			return new String(thechars);
+
+    } // readAsciiFile
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	String fileContent = sm.readAsciiFile("SampleOrder.xml");
+    	System.out.println("---------------------------------------------");
+    	System.out.println(fileContent);
+    	System.out.println("---------------------------------------------");
+    	sm.sendAMessage(fileContent); 
+    	sm.stop();
+    	
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,86 +1,86 @@
-<project name="Quickstart_helloworld" default="run" basedir=".">
-  
-  <property file="../quickstarts.properties" />
-  
-  <property name="build.dir" value="${basedir}/build"/>
-  <property name="src.dir" value="${basedir}/src"/>
-		
-  <property name="esb-config" value="${basedir}/jbossesb.xml"/>
-
-	<path id="classpath">
-    <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
-    <!-- fileset dir="${basedir}" includes="juddi.properties" -->
-    <fileset dir="${basedir}/lib" includes="*jar"/>    
-	<fileset dir="${esb.product.lib.dir}" includes="*jar"/>
-	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
-	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/server/default/lib">
-			<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
-	</fileset>		
-  	
-  <fileset dir="${basedir}" includes="build/**/*.jar"/>
-  <fileset dir="${basedir}" includes="build/**/*.xml"/>
-  <pathelement location="." />
-  
-  </path>
- 
-  <property name="cp" refid="classpath"/>
-  
-  <target name="echoCP">    
-  	<echo message="Classpath is ${cp}"/>
-  </target>
-  
-  <target name="prepare">
-	<mkdir dir="${build.dir}" />
-  </target>
-
-  <target name="clean">
-	<delete dir="${build.dir}" />
-  </target>
-
-  <target name="compile" depends="prepare">
-	<javac srcdir="${src.dir}"
-	   destdir="${build.dir}">
-	  <classpath refid="classpath"/>
- 	</javac>
-  </target>
-
-  <target name="jars" depends="compile">
-	<delete file="${build.dir}/${ant.project.name}.jar"/>
-        <jar destfile="${build.dir}/${ant.project.name}.jar"
-		basedir="${build.dir}"
-		includes="**/*.class"/>
-  </target>
-
-  <target name="run" depends="jars">
-	     <echo>Basic JMS Gateway and Listener with Actions</echo>
-	     <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
-	     	<arg value="${esb-config}"/>
-			<classpath refid="classpath"/>
-	     </java>     
-  </target>	
-
-  <target name="deployToSAR" depends="jars">
-	    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-	  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
-	  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-	  	/>
-	  	<copy file="jbossesb.xml" overwrite="true"
-	  		todir="${jbosshome.dir}/server/default/conf"
-	  	/>
-	  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
-	  	<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
-  </target>
-	
-  <target name="runtest">
-     <echo>Runs Test JMS Sender</echo>
-     <java fork="yes" classname="quickstart.helloworld.test.SendJMSMessage" failonerror="true">
-     	<arg value="Hello World"/>
-		<classpath refid="classpath"/>
-     </java>
-  </target>  
+<project name="Quickstart_helloworld" default="run" basedir=".">
+  
+  <property file="../quickstarts.properties" />
+  
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
+		
+  <property name="esb-config" value="${basedir}/jbossesb.xml"/>
 
+	<path id="classpath">
+    <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
+    <!-- fileset dir="${basedir}" includes="juddi.properties" -->
+    <fileset dir="${basedir}/lib" includes="*jar"/>    
+	<fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/server/default/lib">
+			<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+	</fileset>		
+  	
+  <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  <fileset dir="${basedir}" includes="build/**/*.xml"/>
+  <pathelement location="." />
+  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+  	<echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+	<mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+	<delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+	<javac srcdir="${src.dir}"
+	   destdir="${build.dir}">
+	  <classpath refid="classpath"/>
+ 	</javac>
+  </target>
+
+  <target name="jars" depends="compile">
+	<delete file="${build.dir}/${ant.project.name}.jar"/>
+        <jar destfile="${build.dir}/${ant.project.name}.jar"
+		basedir="${build.dir}"
+		includes="**/*.class"/>
+  </target>
+
+  <target name="run" depends="jars">
+	     <echo>Basic JMS Gateway and Listener with Actions</echo>
+	     <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
+	     	<arg value="${esb-config}"/>
+			<classpath refid="classpath"/>
+	     </java>     
+  </target>	
+
+  <target name="deployToSAR" depends="jars">
+	    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+	  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
+	  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+	  	/>
+	  	<copy file="jbossesb.xml" overwrite="true"
+	  		todir="${jbosshome.dir}/server/default/conf"
+	  	/>
+	  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
+	  	<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
+  </target>
+	
+  <target name="runtest">
+     <echo>Runs Test JMS Sender</echo>
+     <java fork="yes" classname="quickstart.helloworld.test.SendJMSMessage" failonerror="true">
+     	<arg value="Hello World"/>
+		<classpath refid="classpath"/>
+     </java>
+  </target>  
+
   <target name="sendesb">
      <echo>Runs Test ESB Message Sender</echo>
      <java fork="yes" classname="quickstart.helloworld.test.SendEsbMessage" failonerror="true">


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,28 +1,28 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_helloworld_Request"
-                   />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/B"
-                  />
-              </jms-bus>
-
-          </jms-provider>
-      </providers>
-      
-      <services>
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_helloworld_Request"
+                   />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/B"
+                  />
+              </jms-bus>
+
+          </jms-provider>
+      </providers>
+      
+      <services>
           <service 
           		category="FirstServicesGW" 
           		name="SimpleJMSGateway" 
@@ -30,33 +30,33 @@
           		is-gateway="true"
                 target-service-category="FirstServiceESB"
                 target-service-name="SimpleListener"
-          		>
-              <listeners>        
-                  <jms-listener name="JMS-Gateway"
-                              busidref="quickstartGwChannel"
-                              maxThreads="1"
-                  />
-              </listeners>    
-          </service>
-          
+          		>
+              <listeners>        
+                  <jms-listener name="JMS-Gateway"
+                              busidref="quickstartGwChannel"
+                              maxThreads="1"
+                  />
+              </listeners>    
+          </service>
+          
         <service 
         	category="FirstServiceESB" 
         	name="SimpleListener" 
         	description="Hello World" 
-        	is-gateway="false">
-            <listeners>
-                <jms-listener name="helloWorld"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />
-            </listeners>
-            <actions>
+        	is-gateway="false">
+            <listeners>
+                <jms-listener name="helloWorld"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />
+            </listeners>
+            <actions>
                    <action name="action1" 
                    	class="quickstart.helloworld.MyJMSListenerAction" 
                    	process="displayMessage" 
-                   	/>      
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>
+                   	/>      
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/MyJMSListenerAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/MyJMSListenerAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,24 +1,24 @@
-package quickstart.helloworld;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-
-  
-  public Message displayMessage(Message message) throws Exception{
-		
-		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");		  		  
-		  System.out.println("\nBody: " + new String(message.getBody().getContents()));
-		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-		  return message; 
-        		
-	}
-    
-	
+package quickstart.helloworld;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+
+  
+  public Message displayMessage(Message message) throws Exception{
+		
+		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");		  		  
+		  System.out.println("\nBody: " + new String(message.getBody().getContents()));
+		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+		  return message; 
+        		
+	}
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/test/SendEsbMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,56 +1,56 @@
-package quickstart.helloworld.test;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_Request");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        ObjectMessage tm = session.createObjectMessage(msg);
-        send.send(tm);        
-        send.close();
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    	
-    }
-    
+package quickstart.helloworld.test;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_Request");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);
+        send.send(tm);        
+        send.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    	
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/quickstart/helloworld/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,82 +1,82 @@
-<project name="Quickstart_helloworld_action" default="run" basedir=".">
-  
-  <property file="../quickstarts.properties" />
-  
-  <property name="build.dir" value="${basedir}/build"/>
-  <property name="src.dir" value="${basedir}/src"/>
-		
-  <property name="esb-config" value="${basedir}/jbossesb.xml"/>
-
-	<path id="classpath">
-  <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
-  <!-- fileset dir="${basedir}" includes="juddi.properties" -->
-    <fileset dir="${basedir}/lib" includes="*jar"/>    
-	<fileset dir="${esb.product.lib.dir}" includes="*jar"/>
-	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
-	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/server/default/lib">
-			<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
-	</fileset>		
-  	
-  <fileset dir="${basedir}" includes="build/**/*.jar"/>
-  <fileset dir="${basedir}" includes="build/**/*.xml"/>
-  <pathelement location="." />
-  
-  </path>
- 
-  <property name="cp" refid="classpath"/>
-  
-  <target name="echoCP">    
-  	<echo message="Classpath is ${cp}"/>
-  </target>
-  
-  <target name="prepare">
-	<mkdir dir="${build.dir}" />
-  </target>
-
-  <target name="clean">
-	<delete dir="${build.dir}" />
-  </target>
-
-  <target name="compile" depends="prepare">
-	<javac srcdir="${src.dir}"
-	   destdir="${build.dir}">
-	  <classpath refid="classpath"/>
- 	</javac>
-  </target>
-
-  <target name="jars" depends="compile">
-	<delete file="${build.dir}/${ant.project.name}.jar"/>
-        <jar destfile="${build.dir}/${ant.project.name}.jar"
-		basedir="${build.dir}"
-		includes="**/*.class"/>
-  </target>
-
-  <target name="run" depends="jars">
-     <echo>Basic JMS Gateway and Listener with Actions</echo>
-	 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
-  	   	<arg value="${esb-config}"/>
-  		<classpath refid="classpath"/>
-  	 </java>     
-  </target>	
-
-  <target name="deployToSAR" depends="jars">
-    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
-  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-  	/>
-  	<copy file="jbossesb.xml" overwrite="true"
-  		todir="${jbosshome.dir}/server/default/conf"
-  	/>
-  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
-  </target>
-	
-  <target name="runtest">
-     <echo>Runs Test JMS Sender</echo>
-     <java fork="yes" classname="quickstart.helloworld_action.test.SendJMSMessage" failonerror="true">
-     	<arg value="Hello World"/>
-		<classpath refid="classpath"/>
-     </java>
-  </target>  
+<project name="Quickstart_helloworld_action" default="run" basedir=".">
+  
+  <property file="../quickstarts.properties" />
+  
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
+		
+  <property name="esb-config" value="${basedir}/jbossesb.xml"/>
+
+	<path id="classpath">
+  <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
+  <!-- fileset dir="${basedir}" includes="juddi.properties" -->
+    <fileset dir="${basedir}/lib" includes="*jar"/>    
+	<fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/server/default/lib">
+			<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+	</fileset>		
+  	
+  <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  <fileset dir="${basedir}" includes="build/**/*.xml"/>
+  <pathelement location="." />
+  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+  	<echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+	<mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+	<delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+	<javac srcdir="${src.dir}"
+	   destdir="${build.dir}">
+	  <classpath refid="classpath"/>
+ 	</javac>
+  </target>
+
+  <target name="jars" depends="compile">
+	<delete file="${build.dir}/${ant.project.name}.jar"/>
+        <jar destfile="${build.dir}/${ant.project.name}.jar"
+		basedir="${build.dir}"
+		includes="**/*.class"/>
+  </target>
+
+  <target name="run" depends="jars">
+     <echo>Basic JMS Gateway and Listener with Actions</echo>
+	 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
+  	   	<arg value="${esb-config}"/>
+  		<classpath refid="classpath"/>
+  	 </java>     
+  </target>	
+
+  <target name="deployToSAR" depends="jars">
+    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
+  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+  	/>
+  	<copy file="jbossesb.xml" overwrite="true"
+  		todir="${jbosshome.dir}/server/default/conf"
+  	/>
+  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
+  </target>
+	
+  <target name="runtest">
+     <echo>Runs Test JMS Sender</echo>
+     <java fork="yes" classname="quickstart.helloworld_action.test.SendJMSMessage" failonerror="true">
+     	<arg value="Hello World"/>
+		<classpath refid="classpath"/>
+     </java>
+  </target>  
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,85 +1,85 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
+<?xml version = "1.0" encoding = "UTF-8"?>
 <jbossesb xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd"
  xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_helloworld_action_Request"
-                  />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/B"
-                  />
-              </jms-bus>
-
-          </jms-provider>
-      </providers>
-      
-      <services>
-          <service category="HelloWorld_ActionGW" 
-                   name="SimpleJMSGateway" 
-          		   description="Hello World(gateway)" 
-          		   is-gateway="true"
-          		   target-service-category="HelloWorld_ActionESB"
-          		   target-service-name="SimpleListener"
-          		   >
-              <listeners>        
-                  <jms-listener name="JMS-Gateway"
-                              busidref="quickstartGwChannel"                         
-                              maxThreads="1"
-                              
-                  />
-              </listeners>    
-          </service>
-          
-        <service category="HelloWorld_ActionESB" 
-                 name="SimpleListener" 
-                 description="Hello World" 
-                 is-gateway="false">
-            <listeners>
-                <jms-listener name="JMS-ESBListener"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />                
-            </listeners>
-            <actions>
-               <action name="displayAction" 
-               		class="quickstart.helloworld_action.MyJMSListenerAction" 
-               		process="displayMessage">
-               		<property name="exceptionMethod" value="exceptionHandler"/>
-               </action>
-  			   <action name="playAction" 
-  			   		class="quickstart.helloworld_action.MyJMSListenerAction" 
-  			   		process="playWithMessage">
-  	               
-               		<property name="exceptionMethod" value="exceptionHandler"/>
-  			   </action>
-               <action name="notificationAction" 
-               		class="org.jboss.soa.esb.actions.Notifier">
-               		<property name="okMethod" value="notifyOK" />
-               		<property name="notification-details">
-   	 				   <NotificationList type="OK"> 
-      				     <target class="NotifyConsole" />
-				    	 <target class="NotifyQueues">
-				   	       <queue jndiName="queue/quickstart_helloworld_action_Response">
-					         	<messageProp name="quickstart" value="hello_world_action" />
-					       </queue> 
-			 	     	 </target>
-	    		   	   </NotificationList> 
-	    		   </property>
-   	   			</action>    
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>
+ parameterReloadSecs="5">
+
+    <providers>
+          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+                      jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+                      jndi-URL="localhost" >
+                      
+              <jms-bus busid="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_helloworld_action_Request"
+                  />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/B"
+                  />
+              </jms-bus>
+
+          </jms-provider>
+      </providers>
+      
+      <services>
+          <service category="HelloWorld_ActionGW" 
+                   name="SimpleJMSGateway" 
+          		   description="Hello World(gateway)" 
+          		   is-gateway="true"
+          		   target-service-category="HelloWorld_ActionESB"
+          		   target-service-name="SimpleListener"
+          		   >
+              <listeners>        
+                  <jms-listener name="JMS-Gateway"
+                              busidref="quickstartGwChannel"                         
+                              maxThreads="1"
+                              
+                  />
+              </listeners>    
+          </service>
+          
+        <service category="HelloWorld_ActionESB" 
+                 name="SimpleListener" 
+                 description="Hello World" 
+                 is-gateway="false">
+            <listeners>
+                <jms-listener name="JMS-ESBListener"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />                
+            </listeners>
+            <actions>
+               <action name="displayAction" 
+               		class="quickstart.helloworld_action.MyJMSListenerAction" 
+               		process="displayMessage">
+               		<property name="exceptionMethod" value="exceptionHandler"/>
+               </action>
+  			   <action name="playAction" 
+  			   		class="quickstart.helloworld_action.MyJMSListenerAction" 
+  			   		process="playWithMessage">
+  	               
+               		<property name="exceptionMethod" value="exceptionHandler"/>
+  			   </action>
+               <action name="notificationAction" 
+               		class="org.jboss.soa.esb.actions.Notifier">
+               		<property name="okMethod" value="notifyOK" />
+               		<property name="notification-details">
+   	 				   <NotificationList type="OK"> 
+      				     <target class="NotifyConsole" />
+				    	 <target class="NotifyQueues">
+				   	       <queue jndiName="queue/quickstart_helloworld_action_Response">
+					         	<messageProp name="quickstart" value="hello_world_action" />
+					       </queue> 
+			 	     	 </target>
+	    		   	   </NotificationList> 
+	    		   </property>
+   	   			</action>    
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/MyJMSListenerAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/MyJMSListenerAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,60 +1,60 @@
-package quickstart.helloworld_action;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.apache.log4j.Logger;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getContents()));
-		  logFooter();
-		  return message;         	
-	}
-  
-   public Message playWithMessage(Message message) throws Exception {
-	   Header msgHeader = message.getHeader();
-	   Body msgBody = message.getBody();
-	   Call theCall = msgHeader.getCall();
-	   EPR theEpr = theCall.getFrom();
-	   String contents = new String(msgBody.getContents());
-	   StringBuffer sb = new StringBuffer();
-	   sb.append("\nBEFORE**\n");
-	   sb.append(contents);
-	   sb.append("\nAFTER**\n");
-	   msgBody.setContents(sb.toString().getBytes());
-	   return message;
-   }
-   
-   public void exceptionHandler(Message message, Throwable exception) {
-	   logHeader();
-	   System.out.println("!ERROR!");
-	   System.out.println(exception.getMessage());
-	   System.out.println("For Message: ");
-	   System.out.println(message.getBody().getContents());
-	   logFooter();
-   }
-	
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
+package quickstart.helloworld_action;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.apache.log4j.Logger;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  System.out.println("Body: " + new String(message.getBody().getContents()));
+		  logFooter();
+		  return message;         	
+	}
+  
+   public Message playWithMessage(Message message) throws Exception {
+	   Header msgHeader = message.getHeader();
+	   Body msgBody = message.getBody();
+	   Call theCall = msgHeader.getCall();
+	   EPR theEpr = theCall.getFrom();
+	   String contents = new String(msgBody.getContents());
+	   StringBuffer sb = new StringBuffer();
+	   sb.append("\nBEFORE**\n");
+	   sb.append(contents);
+	   sb.append("\nAFTER**\n");
+	   msgBody.setContents(sb.toString().getBytes());
+	   return message;
+   }
+   
+   public void exceptionHandler(Message message, Throwable exception) {
+	   logHeader();
+	   System.out.println("!ERROR!");
+	   System.out.println(exception.getMessage());
+	   System.out.println("For Message: ");
+	   System.out.println(message.getBody().getContents());
+	   logFooter();
+   }
+	
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,60 +1,60 @@
-package quickstart.helloworld_action.test;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_action_Request");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        ObjectMessage tm = session.createObjectMessage(msg);
-        send.send(tm);        
-        send.close();
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    	
-    }
-    
+package quickstart.helloworld_action.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_action_Request");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);
+        send.send(tm);        
+        send.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    	
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/helloworld_action/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,71 +1,71 @@
-<project name="Quickstart_db_registration" default="run" basedir=".">
-  
-  <property file="../quickstarts.properties" />
-  
-  <property name="build.dir" value="${basedir}/build"/>
-  <property name="src.dir" value="${basedir}/src"/>
-		
+<project name="Quickstart_db_registration" default="run" basedir=".">
+  
+  <property file="../quickstarts.properties" />
+  
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
+		
   <property name="jbossesb-config" value="${basedir}/jbossesb.xml"/>
-
-	<path id="classpath">
-  <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
-  <!-- fileset dir="${basedir}" includes="juddi.properties" -->
-  <fileset dir="${basedir}/lib" includes="*jar"/>    
-	<fileset dir="${esb.product.lib.dir}" includes="*jar"/>
-	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
-	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/server/default/lib">
-			<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
-	</fileset>		
-  	
-  <fileset dir="${basedir}" includes="build/**/*.jar"/>
-  <fileset dir="${basedir}" includes="build/**/*.xml"/>
-  <pathelement location="." />
-  
-  </path>
- 
-  <property name="cp" refid="classpath"/>
-  
-  <target name="echoCP">    
-  	<echo message="Classpath is ${cp}"/>
-  </target>
-  
-  <target name="prepare">
-	<mkdir dir="${build.dir}" />
-  </target>
-
-  <target name="clean">
-	<delete dir="${build.dir}" />
-  </target>
-
-  <target name="compile" depends="prepare">
-	<javac srcdir="${src.dir}"
-	   destdir="${build.dir}">
-	  <classpath refid="classpath"/>
- 	</javac>
-  </target>
-
-  <target name="jars" depends="compile">
-	<delete file="${build.dir}/${ant.project.name}.jar"/>
-        <jar destfile="${build.dir}/${ant.project.name}.jar"
-		basedir="${build.dir}"
-		includes="**/*.class"/>
-  </target>
-
-  <target name="run" depends="jars">
-     <echo>Basic JMS Gateway and Listener</echo>
+
+	<path id="classpath">
+  <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
+  <!-- fileset dir="${basedir}" includes="juddi.properties" -->
+  <fileset dir="${basedir}/lib" includes="*jar"/>    
+	<fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/server/default/lib">
+			<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+	</fileset>		
+  	
+  <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  <fileset dir="${basedir}" includes="build/**/*.xml"/>
+  <pathelement location="." />
+  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+  	<echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+	<mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+	<delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+	<javac srcdir="${src.dir}"
+	   destdir="${build.dir}">
+	  <classpath refid="classpath"/>
+ 	</javac>
+  </target>
+
+  <target name="jars" depends="compile">
+	<delete file="${build.dir}/${ant.project.name}.jar"/>
+        <jar destfile="${build.dir}/${ant.project.name}.jar"
+		basedir="${build.dir}"
+		includes="**/*.class"/>
+  </target>
+
+  <target name="run" depends="jars">
+     <echo>Basic JMS Gateway and Listener</echo>
     <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
     	<arg value="${jbossesb-config}"/>
-		<classpath refid="classpath"/>
-     </java>     
-  </target>	
-
-  <target name="runtest">
-     <echo>Runs Test JMS Sender</echo>
-     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
-     	<arg value="Hello World"/>
-		<classpath refid="classpath"/>
-     </java>
-  </target>  
+		<classpath refid="classpath"/>
+     </java>     
+  </target>	
+
+  <target name="runtest">
+     <echo>Runs Test JMS Sender</echo>
+     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
+     	<arg value="Hello World"/>
+		<classpath refid="classpath"/>
+     </java>
+  </target>  
 </project>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/MyJMSListenerAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/MyJMSListenerAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,24 +1,24 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-
-  
-  public Message displayMessage(Message message) throws Exception{
-		
-		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");		  		  
-		  System.out.println("\nBody: " + new String(message.getBody().getContents()));
-		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-		  return message; 
-        		
-	}
-    
-	
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+
+  
+  public Message displayMessage(Message message) throws Exception{
+		
+		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");		  		  
+		  System.out.println("\nBody: " + new String(message.getBody().getContents()));
+		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+		  return message; 
+        		
+	}
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,60 +1,60 @@
-package quickstart.test;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_Request");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        ObjectMessage tm = session.createObjectMessage(msg);
-        send.send(tm);        
-        send.close();
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    	
-    }
-    
+package quickstart.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_Request");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);
+        send.send(tm);        
+        send.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    	
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/base-build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/base-build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/base-build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,53 +1,53 @@
-<project name="Base" default="run" basedir=".">
-
-	<property file="../quickstarts.properties" />
-
-	<property name="classes" value="build/classes" />
-
-	<path id="compile-classpath">
-		<fileset dir="lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
-		<fileset dir="../../../lib/ext" includes="*.jar" /> <!-- Product Dependencies. -->
-		<fileset dir="${esb.product.lib.dir}" includes="*.jar" /> <!-- Product Jars. -->
-	</path>
-	<path id="exec-classpath">
-		<pathelement location="." />
-		<fileset dir="build" includes="${ant.project.name}.jar" />
-		<path refid="compile-classpath" />
-		<pathelement location="../../../" />
-		<fileset dir="${jbosshome.dir}/server/default/lib" includes="jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
-	</path>
-
-	<target name="compile" depends="clean">
-		<mkdir dir="${classes}" />
-		<javac srcdir="src" destdir="${classes}">
-			<classpath refid="compile-classpath" />
-		</javac>
-		<jar basedir="${classes}" destfile="build/${ant.project.name}.jar" />
-	</target>
-
-	<target name="run" depends="compile">
-		<echo>Launching Quickstart in standalone mode...</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
-			<arg value="jbossesb.xml" />
-			<classpath refid="exec-classpath" />
-		</java>
-	</target>
-
-	<target name="deployToSAR">
-		<echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-		<copy file="build/${ant.project.name}.jar" overwrite="true" todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar" />
-		<copy file="jbossesb.xml" overwrite="true" todir="${jbosshome.dir}/server/default/conf" />
-		<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml" />
-		<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
-	</target>
-
-	<target name="echoCP">
-		<property name="cp" refid="exec-classpath" />
-		<echo message="Classpath is ${cp}" />
-	</target>
-
-	<target name="clean">
-		<delete dir="build" />
-	</target>
+<project name="Base" default="run" basedir=".">
 
+	<property file="../quickstarts.properties" />
+
+	<property name="classes" value="build/classes" />
+
+	<path id="compile-classpath">
+		<fileset dir="lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
+		<fileset dir="../../../lib/ext" includes="*.jar" /> <!-- Product Dependencies. -->
+		<fileset dir="${esb.product.lib.dir}" includes="*.jar" /> <!-- Product Jars. -->
+	</path>
+	<path id="exec-classpath">
+		<pathelement location="." />
+		<fileset dir="build" includes="${ant.project.name}.jar" />
+		<path refid="compile-classpath" />
+		<pathelement location="../../../" />
+		<fileset dir="${jbosshome.dir}/server/default/lib" includes="jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
+	</path>
+
+	<target name="compile" depends="clean">
+		<mkdir dir="${classes}" />
+		<javac srcdir="src" destdir="${classes}">
+			<classpath refid="compile-classpath" />
+		</javac>
+		<jar basedir="${classes}" destfile="build/${ant.project.name}.jar" />
+	</target>
+
+	<target name="run" depends="compile">
+		<echo>Launching Quickstart in standalone mode...</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
+			<arg value="jbossesb.xml" />
+			<classpath refid="exec-classpath" />
+		</java>
+	</target>
+
+	<target name="deployToSAR">
+		<echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+		<copy file="build/${ant.project.name}.jar" overwrite="true" todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar" />
+		<copy file="jbossesb.xml" overwrite="true" todir="${jbosshome.dir}/server/default/conf" />
+		<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml" />
+		<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
+	</target>
+
+	<target name="echoCP">
+		<property name="cp" refid="exec-classpath" />
+		<echo message="Classpath is ${cp}" />
+	</target>
+
+	<target name="clean">
+		<delete dir="build" />
+	</target>
+
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/base-build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,25 +1,25 @@
-<project name="helloworld-embeddedreg-quickstart" default="run" basedir=".">
-
-	<target name="run" depends="compile">
-		<echo>Basic JMS Gateway and Listener</echo>
-		<java fork="yes" classname="quickstart.Launcher" failonerror="true">
-			<classpath refid="exec-classpath" />
-		</java>
-	</target>
-
-	<target name="runtest">
-		<echo>Runs Test JMS Sender</echo>
-		<java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
-			<arg value="Hello World" />
-			<classpath refid="exec-classpath" />
-		</java>
-	</target>
-
-	<!-- Import the base Ant build script... -->
-	<import file="base-build.xml" />
-	
-	<target name="deployToSAR">
-			<echo>Not supported</echo>
-	</target>
-
+<project name="helloworld-embeddedreg-quickstart" default="run" basedir=".">
+
+	<target name="run" depends="compile">
+		<echo>Basic JMS Gateway and Listener</echo>
+		<java fork="yes" classname="quickstart.Launcher" failonerror="true">
+			<classpath refid="exec-classpath" />
+		</java>
+	</target>
+
+	<target name="runtest">
+		<echo>Runs Test JMS Sender</echo>
+		<java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
+			<arg value="Hello World" />
+			<classpath refid="exec-classpath" />
+		</java>
+	</target>
+
+	<!-- Import the base Ant build script... -->
+	<import file="base-build.xml" />
+	
+	<target name="deployToSAR">
+			<echo>Not supported</echo>
+	</target>
+
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb-properties.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb-properties.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -33,18 +33,18 @@
     <properties name="core">
 		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
 		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-    </properties>
-    <properties name="registry">
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
-    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
     </properties>
+    <properties name="registry">
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
+    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+    </properties>
     <properties name="transports" depends="core">
     	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
     	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
@@ -70,8 +70,8 @@
 		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
 		<!-- # of milliseconds to timeout waiting for a connection from pool -->
 		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
     </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
 </esb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,42 +1,42 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
+<?xml version = "1.0" encoding = "UTF-8"?>
 <jbossesb
-	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd">
-
-	<providers>
+	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd">
+
+	<providers>
 		<jms-provider name="JBossMQ"
 			connection-factory="ConnectionFactory"
 			jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-			jndi-URL="localhost">
-
-			<jms-bus busid="quickstartGwChannel">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/A" />
-			</jms-bus>
-			<jms-bus busid="quickstartEsbChannel">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/B" />
-			</jms-bus>
-
-		</jms-provider>
-	</providers>
-
-	<services>
+			jndi-URL="localhost">
+
+			<jms-bus busid="quickstartGwChannel">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/A" />
+			</jms-bus>
+			<jms-bus busid="quickstartEsbChannel">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/B" />
+			</jms-bus>
+
+		</jms-provider>
+	</providers>
+
+	<services>
 		<service category="FirstServicesGW" name="SimpleJMSGateway"
 			description="Hello World(gateway)" is-gateway="true"
 			target-service-category="FirstServiceESB"
-			target-service-name="SimpleListener">
-			<listeners>
-				<jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" />
-			</listeners>
-		</service>
-
+			target-service-name="SimpleListener">
+			<listeners>
+				<jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" />
+			</listeners>
+		</service>
+
 		<service category="FirstServiceESB" name="SimpleListener"
-			description="Hello World" is-gateway="false">
-			<listeners>
-				<jms-listener name="quickstart" busidref="quickstartEsbChannel" maxThreads="1" />
-			</listeners>
-			<actions>
+			description="Hello World" is-gateway="false">
+			<listeners>
+				<jms-listener name="quickstart" busidref="quickstartEsbChannel" maxThreads="1" />
+			</listeners>
+			<actions>
 				<action name="MyJMSListenerAction" class="quickstart.MyJMSListenerAction" process="displayMessage" />
-			</actions>
-		</service>
-	</services>
-
-</jbossesb>
+			</actions>
+		</service>
+	</services>
+
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,70 +1,70 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=org.hsqldb.jdbcDriver
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=org.hsqldb.jdbcDriver
 #juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/jbossesb
-juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost:9001/jbossesb
-juddi.jdbcUsername=sa
-juddi.jdbcPassword=
-# jUDDI DataSource to use
-juddi.dataSource=java:comp/env/jdbc/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost:9001/jbossesb
+juddi.jdbcUsername=sa
+juddi.jdbcPassword=
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="INFO"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="INFO"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/HsqldbUtil.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/HsqldbUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/HsqldbUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,105 +1,105 @@
-package quickstart;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.Statement;
-
-import org.apache.log4j.Logger;
-import org.hsqldb.Server;
-import org.jboss.internal.soa.esb.persistence.format.db.DBConnectionManager;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.testutils.FileUtil;
-
-/**
- * Utility to start and stop a hsql Database.
- * 
- * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
- *
- */
-public class HsqldbUtil 
-{
-	final private static String THREAD_NAME = "hypersonic-unittest";
-	
-	private static Logger _logger = Logger.getLogger(HsqldbUtil.class);
-	/**
-	 * Starts the hsql database in it's own thread. 
-	 * Don't forget to shut it down when you're done.
-	 * 
-	 * @param databaseFile - i.e. build/hsqltestdb
-	 * @param databaseName - i.e. jbossesb
-	 * @throws Exception
-	 */
-	public static void startHsqldb() throws Exception 
-	{
-		// Start DB in new thread, or else it will block us
-		Thread serverThread = new Thread(THREAD_NAME) {
-			public void run() {
-				try {
-					// Create startup arguments
-					String[] args = new String[4];
-					args[0] = "-database.0";
-					args[1] = "build/hsqldb";
-					args[2] = "-dbname.0";
-					args[3] = "jbossesb";
-					
-					_logger.info("creating db from this script: " + args[1]);
-
-					// Start server
-					Server.main(args);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-//				log.error("Failed to start database", e);
-			}
-		};
-		serverThread.run();
-		
-		createDatabase();
-	}
-	/**
-	 * 
-	 * @param url
-	 * @param username
-	 * @param password
-	 * @throws Exception
-	 */
-	public static void stopHsqldb() throws Exception {
-		String url = Configuration.getStoreUrl();
-		String username = Configuration.getStoreUser();
-		String password = Configuration.getStorePwd();
-		
-		java.sql.Connection connection = DriverManager.getConnection(
-				url, username, password);
-		Statement statement = connection.createStatement();
-		String shutdownCommand = "SHUTDOWN COMPACT";
-		statement.executeQuery(shutdownCommand);
-	}
-
-	private static void createDatabase() throws Exception{	
-		//message store db
-		String sqlCreateCmd    = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/message-store/sql/hsqldb/create_database.sql"));
-		String sqlDropCmd      = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/message-store/sql/hsqldb/drop_database.sql"));		
-		
-		DBConnectionManager mgr = DBConnectionManager.getInstance();
-		Connection con = mgr.getConnection();
-		
-		Statement stmnt = con.createStatement();
-		System.out.println("Dropping the message store schema if exists...");
-		stmnt.execute(sqlDropCmd);
-		System.out.println("Creating the message store schema...");
-		stmnt.execute(sqlCreateCmd);
-		
-		//registry DB
-		System.out.println("Dropping the registry schema if exists...");
-		sqlDropCmd      = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/drop_database.sql"));
-		stmnt.execute(sqlDropCmd);
-		System.out.println("creating the registry schema...");
-		sqlCreateCmd    = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/create_database.sql"));
-		stmnt.execute(sqlCreateCmd);
-		System.out.println("inserting registry publishers...");
-		String sqlInsertPubCmd = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/insert_publishers.sql"));
-		stmnt.execute(sqlInsertPubCmd);
-		stmnt.close();
-		con.close();
-	}
-}
+package quickstart;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import org.apache.log4j.Logger;
+import org.hsqldb.Server;
+import org.jboss.internal.soa.esb.persistence.format.db.DBConnectionManager;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.testutils.FileUtil;
+
+/**
+ * Utility to start and stop a hsql Database.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
+ *
+ */
+public class HsqldbUtil 
+{
+	final private static String THREAD_NAME = "hypersonic-unittest";
+	
+	private static Logger _logger = Logger.getLogger(HsqldbUtil.class);
+	/**
+	 * Starts the hsql database in it's own thread. 
+	 * Don't forget to shut it down when you're done.
+	 * 
+	 * @param databaseFile - i.e. build/hsqltestdb
+	 * @param databaseName - i.e. jbossesb
+	 * @throws Exception
+	 */
+	public static void startHsqldb() throws Exception 
+	{
+		// Start DB in new thread, or else it will block us
+		Thread serverThread = new Thread(THREAD_NAME) {
+			public void run() {
+				try {
+					// Create startup arguments
+					String[] args = new String[4];
+					args[0] = "-database.0";
+					args[1] = "build/hsqldb";
+					args[2] = "-dbname.0";
+					args[3] = "jbossesb";
+					
+					_logger.info("creating db from this script: " + args[1]);
+
+					// Start server
+					Server.main(args);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+//				log.error("Failed to start database", e);
+			}
+		};
+		serverThread.run();
+		
+		createDatabase();
+	}
+	/**
+	 * 
+	 * @param url
+	 * @param username
+	 * @param password
+	 * @throws Exception
+	 */
+	public static void stopHsqldb() throws Exception {
+		String url = Configuration.getStoreUrl();
+		String username = Configuration.getStoreUser();
+		String password = Configuration.getStorePwd();
+		
+		java.sql.Connection connection = DriverManager.getConnection(
+				url, username, password);
+		Statement statement = connection.createStatement();
+		String shutdownCommand = "SHUTDOWN COMPACT";
+		statement.executeQuery(shutdownCommand);
+	}
+
+	private static void createDatabase() throws Exception{	
+		//message store db
+		String sqlCreateCmd    = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/message-store/sql/hsqldb/create_database.sql"));
+		String sqlDropCmd      = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/message-store/sql/hsqldb/drop_database.sql"));		
+		
+		DBConnectionManager mgr = DBConnectionManager.getInstance();
+		Connection con = mgr.getConnection();
+		
+		Statement stmnt = con.createStatement();
+		System.out.println("Dropping the message store schema if exists...");
+		stmnt.execute(sqlDropCmd);
+		System.out.println("Creating the message store schema...");
+		stmnt.execute(sqlCreateCmd);
+		
+		//registry DB
+		System.out.println("Dropping the registry schema if exists...");
+		sqlDropCmd      = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/drop_database.sql"));
+		stmnt.execute(sqlDropCmd);
+		System.out.println("creating the registry schema...");
+		sqlCreateCmd    = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/create_database.sql"));
+		stmnt.execute(sqlCreateCmd);
+		System.out.println("inserting registry publishers...");
+		String sqlInsertPubCmd = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/insert_publishers.sql"));
+		stmnt.execute(sqlInsertPubCmd);
+		stmnt.close();
+		con.close();
+	}
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/HsqldbUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/Launcher.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/MyJMSListenerAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/MyJMSListenerAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,24 +1,24 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-
-  
-  public Message displayMessage(Message message) throws Exception{
-		
-		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");		  		  
-		  System.out.println("\nBody: " + new String(message.getBody().getContents()));
-		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-		  return message; 
-        		
-	}
-    
-	
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+
+  
+  public Message displayMessage(Message message) throws Exception{
+		
+		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");		  		  
+		  System.out.println("\nBody: " + new String(message.getBody().getContents()));
+		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+		  return message; 
+        		
+	}
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,60 +1,60 @@
-package quickstart.test;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/A");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        ObjectMessage tm = session.createObjectMessage(msg);
-        send.send(tm);        
-        send.close();
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    	
-    }
-    
+package quickstart.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/A");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);
+        send.send(tm);        
+        send.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    	
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_embedded_reg/src/quickstart/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,68 +1,68 @@
-<project name="Quickstart_helloworld_file_action" default="run" basedir=".">
-  
-  <property file="../quickstarts.properties" />
-  
-  <property name="build.dir" value="${basedir}/build"/>
-  <property name="src.dir" value="${basedir}/src"/>
+<project name="Quickstart_helloworld_file_action" default="run" basedir=".">
+  
+  <property file="../quickstarts.properties" />
+  
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
 
-  <property name="jbossesb.name" value="jbossesb.xml"/>
-  <property name="jbossesb.origconfig" location="${basedir}/${jbossesb.name}"/>
+  <property name="jbossesb.name" value="jbossesb.xml"/>
+  <property name="jbossesb.origconfig" location="${basedir}/${jbossesb.name}"/>
   <property name="jbossesb.config" location="${build.dir}/${jbossesb.name}"/>
 
   <property name="jbossesb.rootdir" location="${build.dir}/dirs"/>
   <property name="jbossesb.inputdir" location="${jbossesb.rootdir}/input"/>
   <property name="jbossesb.outputdir" location="${jbossesb.rootdir}/output"/>
   <property name="jbossesb.errordir" location="${jbossesb.rootdir}/error"/>
-
-  <property name="jboss.server.dir" location="${jbosshome.dir}/server/default"/>
-  <property name="jboss.deploy.dir" location="${jboss.server.dir}/deploy/jbossesb.sar"/>
-  <property name="jboss.conf.dir" location="${jboss.server.dir}/conf"/>
-
-  <path id="classpath">
-    <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
-    <!-- fileset dir="${basedir}" includes="juddi.properties" -->
- 
-  <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
-  <fileset dir="${esb.product.lib.dir}" includes="*xml"/>
-  <fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
-  <fileset dir="${jbosshome.dir}/client" includes="*jar"/>
-  <fileset dir="${jbosshome.dir}/server/default/lib">
-    <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
-  </fileset>
-  
-  <fileset dir="${basedir}" includes="build/**/*.jar"/>
-  <fileset dir="${basedir}" includes="build/**/*.xml"/>
-  <pathelement location="." />
-  
-  </path>
- 
-  <property name="cp" refid="classpath"/>
-  
-  <target name="echoCP">    
-    <echo message="Classpath is ${cp}"/>
-  </target>
-  
-  <target name="prepare">
-    <mkdir dir="${build.dir}" />
-  </target>
-
-  <target name="clean">
-    <delete dir="${build.dir}" />
-  </target>
-
-  <target name="compile" depends="prepare">
-    <javac srcdir="${src.dir}"
-        destdir="${build.dir}">
-      <classpath refid="classpath"/>
-    </javac>
-  </target>
-
-  <target name="jars" depends="compile">
-    <delete file="${build.dir}/${ant.project.name}.jar"/>
-    <jar destfile="${build.dir}/${ant.project.name}.jar"
-        basedir="${build.dir}" includes="**/*.class"/>
-  </target>
 
+  <property name="jboss.server.dir" location="${jbosshome.dir}/server/default"/>
+  <property name="jboss.deploy.dir" location="${jboss.server.dir}/deploy/jbossesb.sar"/>
+  <property name="jboss.conf.dir" location="${jboss.server.dir}/conf"/>
+
+  <path id="classpath">
+    <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
+    <!-- fileset dir="${basedir}" includes="juddi.properties" -->
+ 
+  <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+  <fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+  <fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+  <fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+  <fileset dir="${jbosshome.dir}/server/default/lib">
+    <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+  </fileset>
+  
+  <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  <fileset dir="${basedir}" includes="build/**/*.xml"/>
+  <pathelement location="." />
+  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+    <echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+    <mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+    <delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+    <javac srcdir="${src.dir}"
+        destdir="${build.dir}">
+      <classpath refid="classpath"/>
+    </javac>
+  </target>
+
+  <target name="jars" depends="compile">
+    <delete file="${build.dir}/${ant.project.name}.jar"/>
+    <jar destfile="${build.dir}/${ant.project.name}.jar"
+        basedir="${build.dir}" includes="**/*.class"/>
+  </target>
+
   <target name="config">
     <delete dir="${jbossesb.rootdir}" quiet="true"/>
     <mkdir dir="${jbossesb.rootdir}"/>
@@ -79,30 +79,30 @@
       </filterset>
     </copy>
   </target>
-  
-  <target name="run" depends="jars, config">
-    <echo>Basic File Gateway and Listener</echo>
-    <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
-      <arg value="${jbossesb.config}"/>
-      <classpath refid="classpath"/>
-    </java>
-  </target>
-
-  <target name="deployToSAR" depends="jars, config">
-    <echo message="Deploying to ${jboss.deploy.dir}"/>
-    <copy file="${build.dir}/${ant.project.name}.jar"
-          todir="${jboss.deploy.dir}" overwrite="true"/>
-    <copy file="${jbossesb.config}" todir="${jboss.conf.dir}" overwrite="true"/>
-    <touch file="${jboss.deploy.dir}/META-INF/jboss-service.xml"/>
-  </target>
-
-  <target name="runtest">
-    <echo>Runs Test File Creator</echo>
-    <java fork="yes" classname="quickstart.hw_file_action.test.CreateTestFile" failonerror="true">
-      <arg value="${jbossesb.inputdir}"/>
-      <arg value="MyInput.dat"/> <!-- the directory the file should be created in -->
-      <arg value="Hello World In A File"/> <!-- the file contents -->
-      <classpath refid="classpath"/>
-    </java>
-  </target>  
-</project>
+  
+  <target name="run" depends="jars, config">
+    <echo>Basic File Gateway and Listener</echo>
+    <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
+      <arg value="${jbossesb.config}"/>
+      <classpath refid="classpath"/>
+    </java>
+  </target>
+
+  <target name="deployToSAR" depends="jars, config">
+    <echo message="Deploying to ${jboss.deploy.dir}"/>
+    <copy file="${build.dir}/${ant.project.name}.jar"
+          todir="${jboss.deploy.dir}" overwrite="true"/>
+    <copy file="${jbossesb.config}" todir="${jboss.conf.dir}" overwrite="true"/>
+    <touch file="${jboss.deploy.dir}/META-INF/jboss-service.xml"/>
+  </target>
+
+  <target name="runtest">
+    <echo>Runs Test File Creator</echo>
+    <java fork="yes" classname="quickstart.hw_file_action.test.CreateTestFile" failonerror="true">
+      <arg value="${jbossesb.inputdir}"/>
+      <arg value="MyInput.dat"/> <!-- the directory the file should be created in -->
+      <arg value="Hello World In A File"/> <!-- the file contents -->
+      <classpath refid="classpath"/>
+    </java>
+  </target>  
+</project>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5" >
-
-    <providers>
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5" >
+
+    <providers>
           <fs-provider name="FSprovider1">
           	<fs-bus busid="helloFileChannel" >
           		<fs-message-filter
@@ -32,10 +32,10 @@
 			    </jms-bus>
 			
 		   </jms-provider>
-
-      </providers>
-      
-      <services>
+
+      </providers>
+      
+      <services>
           <service 
           		category="myCategory" 
           		name="TheFileGateway" 
@@ -43,34 +43,34 @@
           		is-gateway="true"
 			 	target-service-category="myCategory"
 			    target-service-name="myFileListener"
-          		>
-              <listeners>        
-                  <fs-listener name="FileGateway"
-                              busidref="helloFileChannel"
+          		>
+              <listeners>        
+                  <fs-listener name="FileGateway"
+                              busidref="helloFileChannel"
                               maxThreads="1"
-                  />
+                  />
                           <!-- pollLatencySeconds="10"  WHERE DOES THIS GO--> 
-              </listeners>    
-          </service>
-          
+              </listeners>    
+          </service>
+          
         <service 
 			category="myCategory"
 			name="myFileListener"
         	description="Hello World File Action (esb listener)" 
-        	is-gateway="false">
-            <listeners>
-                <jms-listener name="helloWorldFileAction"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />
-            </listeners>
-            <actions>
+        	is-gateway="false">
+            <listeners>
+                <jms-listener name="helloWorldFileAction"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />
+            </listeners>
+            <actions>
                    <action name="action1" 
                    	class="quickstart.hw_file_action.MyAction" 
                    	process="displayMessage,playWithMessage" 
-                   	/>      
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>
+                   	/>      
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/src/quickstart/hw_file_action/MyAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/src/quickstart/hw_file_action/MyAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/src/quickstart/hw_file_action/MyAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,43 +1,43 @@
-package quickstart.hw_file_action;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.message.Message;
-
-public class MyAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getContents()));
-		  logFooter();
-		  return message;         	
-	}
-  
-   public Message playWithMessage(Message message) throws Exception {
-	   Body msgBody = message.getBody();
-	   String contents = new String(msgBody.getContents());
-	   StringBuffer sb = new StringBuffer();
-	   sb.append("\nBEFORE\n");
-	   sb.append(contents);
-	   sb.append("\nAFTER\n");
-	   msgBody.setContents(sb.toString().getBytes());
-	   return message;
-   }
-	
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
+package quickstart.hw_file_action;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Message;
+
+public class MyAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  System.out.println("Body: " + new String(message.getBody().getContents()));
+		  logFooter();
+		  return message;         	
+	}
+  
+   public Message playWithMessage(Message message) throws Exception {
+	   Body msgBody = message.getBody();
+	   String contents = new String(msgBody.getContents());
+	   StringBuffer sb = new StringBuffer();
+	   sb.append("\nBEFORE\n");
+	   sb.append(contents);
+	   sb.append("\nAFTER\n");
+	   msgBody.setContents(sb.toString().getBytes());
+	   return message;
+   }
+	
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/src/quickstart/hw_file_action/MyAction.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/src/quickstart/hw_file_action/test/CreateTestFile.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5">
-
-    <providers>
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5">
+
+    <providers>
           <ftp-provider name="FTPprovider" hostname="@FTP_HOSTNAME@" >
           	<ftp-bus busid="helloFTPChannel" >
           		<ftp-message-filter
@@ -12,7 +12,7 @@
           			input-suffix=".dat"
           			work-suffix=".esbWorking"
           			post-delete="false"
-          			post-suffix=".COMPLETE"
+          			post-suffix=".COMPLETE"
           			error-delete="false"
           			error-suffix=".HAS_ERROR"
           		/>
@@ -33,10 +33,10 @@
 			    </jms-bus>
 			
 		   </jms-provider>
-
-      </providers>
-      
-      <services>
+
+      </providers>
+      
+      <services>
           <service 
           		category="myCategory" 
           		name="TheFileGateway" 
@@ -44,35 +44,35 @@
           		is-gateway="true"
 			 	target-service-category="myCategory"
 			    target-service-name="myFileListener"
-          		>
-              <listeners>        
-                  <ftp-listener name="FtpGateway"
-                              busidref="helloFTPChannel"
+          		>
+              <listeners>        
+                  <ftp-listener name="FtpGateway"
+                              busidref="helloFTPChannel"
                               maxThreads="1"
-                  >
+                  >
                           <property name="pollLatencySeconds" value="5"/> 
                   </ftp-listener>
-              </listeners>    
-          </service>
-          
+              </listeners>    
+          </service>
+          
         <service 
 			category="myCategory"
 			name="myFileListener"
         	description="Hello World File Action (esb listener)" 
-        	is-gateway="false">
-            <listeners>
-                <jms-listener name="helloWorldFileAction"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />
-            </listeners>
-            <actions>
+        	is-gateway="false">
+            <listeners>
+                <jms-listener name="helloWorldFileAction"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />
+            </listeners>
+            <actions>
                    <action name="action1" 
                    	class="quickstart.hw_ftp_action.MyAction" 
                    	process="displayMessage,playWithMessage" 
-                   	/>      
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>
+                   	/>      
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/src/quickstart/hw_ftp_action/MyAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/src/quickstart/hw_ftp_action/MyAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/src/quickstart/hw_ftp_action/MyAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,58 +1,58 @@
-package quickstart.hw_ftp_action;
-
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Message;
-
-public class MyAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getContents()));
-		  logFooter();
-		  return message;         	
-	}
-  
-   public Message playWithMessage(Message message) throws Exception {
-	   Header msgHeader = message.getHeader();
-	   Body msgBody = message.getBody();
-	   Call theCall = msgHeader.getCall();
-	   EPR theEpr = theCall.getFrom();
-	   String contents = new String(msgBody.getContents());
-	   StringBuffer sb = new StringBuffer();
-	   sb.append("\nBEFORE\n");
-	   sb.append(contents);
-	   sb.append("\nAFTER\n");
-	   msgBody.setContents(sb.toString().getBytes());
-	   return message;
-   }
-   
-   public void exceptionHandler(Message message, Throwable exception) {
-	   logHeader();
-	   System.out.println("!ERROR!");
-	   System.out.println(exception.getMessage());
-	   System.out.println("For Message: ");
-	   System.out.println(message.getBody().getContents());
-	   logFooter();
-   }
-	
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
+package quickstart.hw_ftp_action;
+
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Message;
+
+public class MyAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  System.out.println("Body: " + new String(message.getBody().getContents()));
+		  logFooter();
+		  return message;         	
+	}
+  
+   public Message playWithMessage(Message message) throws Exception {
+	   Header msgHeader = message.getHeader();
+	   Body msgBody = message.getBody();
+	   Call theCall = msgHeader.getCall();
+	   EPR theEpr = theCall.getFrom();
+	   String contents = new String(msgBody.getContents());
+	   StringBuffer sb = new StringBuffer();
+	   sb.append("\nBEFORE\n");
+	   sb.append(contents);
+	   sb.append("\nAFTER\n");
+	   msgBody.setContents(sb.toString().getBytes());
+	   return message;
+   }
+   
+   public void exceptionHandler(Message message, Throwable exception) {
+	   logHeader();
+	   System.out.println("!ERROR!");
+	   System.out.println(exception.getMessage());
+	   System.out.println("For Message: ");
+	   System.out.println(message.getBody().getContents());
+	   logFooter();
+   }
+	
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
 }


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/src/quickstart/hw_ftp_action/MyAction.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5">
-
-    <providers>
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5">
+
+    <providers>
           <sql-provider name="SQLprovider" 
           			url="jdbc:mysql://localhost:3306/test_sql_gateway"
           			driver="com.mysql.jdbc.Driver"
@@ -31,10 +31,10 @@
 			    </jms-bus>
 			
 		   </jms-provider>
-
-      </providers>
-      
-      <services>
+
+      </providers>
+      
+      <services>
           <service 
           		category="myCategory" 
           		name="TheSQLGateway" 
@@ -42,34 +42,34 @@
           		is-gateway="true"
 			 	target-service-category="myCategory"
 			    target-service-name="myJmsListener"
-          		>
-              <listeners>        
-                  <sql-listener name="SqlGateway"
-                              busidref="helloSQLChannel"
+          		>
+              <listeners>        
+                  <sql-listener name="SqlGateway"
+                              busidref="helloSQLChannel"
                               maxThreads="1"
-                  >
+                  >
                   </sql-listener>
-              </listeners>    
-          </service>
-          
+              </listeners>    
+          </service>
+          
         <service 
 			category="myCategory"
 			name="myJmsListener"
         	description="Hello World SQL Action (esb jdbc listener)" 
-        	is-gateway="false">
-            <listeners>
-                <jms-listener name="helloWorldJmsAction"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />
-            </listeners>
-            <actions>
+        	is-gateway="false">
+            <listeners>
+                <jms-listener name="helloWorldJmsAction"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />
+            </listeners>
+            <actions>
                    <action name="action1" 
                    	class="quickstart.hw_sql_action.MyAction" 
                    	process="displayMessage" 
-                   	/>      
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>
+                   	/>      
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/quickstart/hw_sql_action/MyAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/quickstart/hw_sql_action/MyAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/quickstart/hw_sql_action/MyAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,38 +1,38 @@
-package quickstart.hw_sql_action;
-
-import java.util.Map;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.message.Message;
-
-public class MyAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  @SuppressWarnings("unchecked")
- public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  Map<String,Object> rowData =(Map)message.getProperties()
-		  	.getProperty(ListenerTagNames.SQL_ROW_DATA_TAG);
-		  for (Map.Entry<String,Object> curr : rowData.entrySet())
-			  System.out.println("column "+curr.getKey()+" = <" + curr.getValue()+">");
-		  logFooter();
-		  return message;         	
-	}
-  
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
+package quickstart.hw_sql_action;
+
+import java.util.Map;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.message.Message;
+
+public class MyAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  @SuppressWarnings("unchecked")
+ public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  Map<String,Object> rowData =(Map)message.getProperties()
+		  	.getProperty(ListenerTagNames.SQL_ROW_DATA_TAG);
+		  for (Map.Entry<String,Object> curr : rowData.entrySet())
+			  System.out.println("column "+curr.getKey()+" = <" + curr.getValue()+">");
+		  logFooter();
+		  return message;         	
+	}
+  
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/quickstart/hw_sql_action/MyAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,81 +1,81 @@
-<project name="Quickstart_more_action" default="run" basedir=".">
-  
-  <property file="../quickstarts.properties" />
-
-  <property name="build.dir" value="${basedir}/build"/>
-  <property name="src.dir" value="${basedir}/src"/>
-	
-  <property name="esb-config" value="${basedir}/jbossesb.xml"/>
-
-	<path id="classpath">
-		  <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
-		  <!-- fileset dir="${basedir}" includes="juddi.properties" -->
-    <fileset dir="${basedir}/lib" includes="*jar"/>    
-  	<fileset dir="${esb.product.lib.dir}" includes="*jar"/>
-  	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
-  	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
-	  <fileset dir="${jbosshome.dir}/client" includes="*jar"/>
-	  <fileset dir="${jbosshome.dir}/server/default/lib">
-		  	<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
-	  </fileset>		
-  	
-    <fileset dir="${basedir}" includes="build/**/*.jar"/>
-  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
-    <pathelement location="." />  
-  </path>
- 
-  <property name="cp" refid="classpath"/>
-  
-  <target name="echoCP">    
-  	<echo message="Classpath is ${cp}"/>
-  </target>
-  
-  <target name="prepare">
-	<mkdir dir="${build.dir}" />
-  </target>
-
-  <target name="clean">
-	<delete dir="${build.dir}" />
-  </target>
-
-  <target name="compile" depends="prepare">
-	<javac srcdir="${src.dir}"
-	   destdir="${build.dir}">
-	  <classpath refid="classpath"/>
- 	</javac>
-  </target>
-
-  <target name="jars" depends="compile">
-	<delete file="${build.dir}/${ant.project.name}.jar"/>
-        <jar destfile="${build.dir}/${ant.project.name}.jar"
-		basedir="${build.dir}"
-		includes="**/*.class"/>
-  </target>
-	
-  <target name="run" depends="jars">
-    <echo>More Actions</echo>
-		 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
-	  	   	<arg value="${esb-config}"/>
-	  		<classpath refid="classpath"/>
-	  	 </java>
-  </target>
-
-  <target name="deployToSAR">
-	    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-	  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
-	  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-	  	/>
-	  	<copy file="jbossesb.xml" overwrite="true"
-	  		todir="${jbosshome.dir}/server/default/conf"
-	  	/>
-	  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
-  </target>
-	
-  <target name="runtest">
-     <echo>Runs Test JMS Sender</echo>
-     <java fork="yes" classname="quickstart.moreaction.test.SendJMSMessage" failonerror="true">
-     	<arg value="Goodbye World"/>
-		<classpath refid="classpath"/>
-     </java>
-  </target>  
+<project name="Quickstart_more_action" default="run" basedir=".">
+  
+  <property file="../quickstarts.properties" />
+
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
+	
+  <property name="esb-config" value="${basedir}/jbossesb.xml"/>
+
+	<path id="classpath">
+		  <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
+		  <!-- fileset dir="${basedir}" includes="juddi.properties" -->
+    <fileset dir="${basedir}/lib" includes="*jar"/>    
+  	<fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+  	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+  	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+	  <fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+	  <fileset dir="${jbosshome.dir}/server/default/lib">
+		  	<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+	  </fileset>		
+  	
+    <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
+    <pathelement location="." />  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+  	<echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+	<mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+	<delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+	<javac srcdir="${src.dir}"
+	   destdir="${build.dir}">
+	  <classpath refid="classpath"/>
+ 	</javac>
+  </target>
+
+  <target name="jars" depends="compile">
+	<delete file="${build.dir}/${ant.project.name}.jar"/>
+        <jar destfile="${build.dir}/${ant.project.name}.jar"
+		basedir="${build.dir}"
+		includes="**/*.class"/>
+  </target>
+	
+  <target name="run" depends="jars">
+    <echo>More Actions</echo>
+		 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
+	  	   	<arg value="${esb-config}"/>
+	  		<classpath refid="classpath"/>
+	  	 </java>
+  </target>
+
+  <target name="deployToSAR">
+	    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+	  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
+	  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+	  	/>
+	  	<copy file="jbossesb.xml" overwrite="true"
+	  		todir="${jbosshome.dir}/server/default/conf"
+	  	/>
+	  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
+  </target>
+	
+  <target name="runtest">
+     <echo>Runs Test JMS Sender</echo>
+     <java fork="yes" classname="quickstart.moreaction.test.SendJMSMessage" failonerror="true">
+     	<arg value="Goodbye World"/>
+		<classpath refid="classpath"/>
+     </java>
+  </target>  
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,54 +1,54 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
    					  dest-name="queue/quickstart_more_action_Request"
-                  />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/B"
-                  />
-              </jms-bus>
-
-          </jms-provider>
-      </providers>
-      
-      <services>
-          <service category="More_ActionGW" 
-                   name="SimpleJMSGateway" 
-          		   description="Hello World(gateway)" 
-          		   is-gateway="true"
+                  />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/B"
+                  />
+              </jms-bus>
+
+          </jms-provider>
+      </providers>
+      
+      <services>
+          <service category="More_ActionGW" 
+                   name="SimpleJMSGateway" 
+          		   description="Hello World(gateway)" 
+          		   is-gateway="true"
 				   target-service-category="ActionServices"
 				   target-service-name="MoreActionService"	  
-          		   >
-              <listeners>        
-                  <jms-listener name="JMS-Gateway"
-                              busidref="quickstartGwChannel"                         
-                              maxThreads="1"
-                  />
-              </listeners>    
-          </service>
-          
-        <service category="ActionServices" 
-                 name="MoreActionService" 
-                 description="More Action EPR description" 
-                 is-gateway="false">
-            <listeners>
-                <jms-listener name="JMS-ESBListener"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />                
-            </listeners>
-            <actions>
+          		   >
+              <listeners>        
+                  <jms-listener name="JMS-Gateway"
+                              busidref="quickstartGwChannel"                         
+                              maxThreads="1"
+                  />
+              </listeners>    
+          </service>
+          
+        <service category="ActionServices" 
+                 name="MoreActionService" 
+                 description="More Action EPR description" 
+                 is-gateway="false">
+            <listeners>
+                <jms-listener name="JMS-ESBListener"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />                
+            </listeners>
+            <actions>
 			   <action name="first"  class="quickstart.moreaction.MyJMSListenerAction"  process="displayMessage" >
 			   		<property name="exceptionMethod" value="exceptionHandler" />
 			   </action>
@@ -67,8 +67,8 @@
 			   	   		<subElement3>Value of 3</subElement3>
 		   	   		</property>
 		   	   </action>
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/CustomConfigAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/CustomConfigAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/CustomConfigAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,31 +1,31 @@
-package quickstart.moreaction;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import java.util.Set;
-
-public class CustomConfigAction {
-	protected ConfigTree	_config;
-	public CustomConfigAction(ConfigTree config) { _config = config; } 
-	
-	public Message displayConfig(Message msg) {
-		// Note: in and out message is being ignored
-		
-	    Set<String> names = _config.getAttributeNames();
-	    System.out.println("****************************");
-	    for (String attrName : names) {
-	    	String value = _config.getAttribute(attrName);
-	    	System.out.println("Attribute: " + attrName + " Value: " + value);
-	    }
-	    System.out.println("****************************");
-	    
-	    ConfigTree[] subElements = _config.getAllChildren();
-	    // Note: even a sub-element can have attributes but trying to keep this simple
-	    System.out.println("############################");
-	    for (ConfigTree child : subElements) {
-	    	System.out.println("SubElement: " + child.getName() + "Body: " + child.getWholeText());
-	    }
-	    System.out.println("############################");
-		return msg;
-	}
-}
+package quickstart.moreaction;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import java.util.Set;
+
+public class CustomConfigAction {
+	protected ConfigTree	_config;
+	public CustomConfigAction(ConfigTree config) { _config = config; } 
+	
+	public Message displayConfig(Message msg) {
+		// Note: in and out message is being ignored
+		
+	    Set<String> names = _config.getAttributeNames();
+	    System.out.println("****************************");
+	    for (String attrName : names) {
+	    	String value = _config.getAttribute(attrName);
+	    	System.out.println("Attribute: " + attrName + " Value: " + value);
+	    }
+	    System.out.println("****************************");
+	    
+	    ConfigTree[] subElements = _config.getAllChildren();
+	    // Note: even a sub-element can have attributes but trying to keep this simple
+	    System.out.println("############################");
+	    for (ConfigTree child : subElements) {
+	    	System.out.println("SubElement: " + child.getName() + "Body: " + child.getWholeText());
+	    }
+	    System.out.println("############################");
+		return msg;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/CustomConfigAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/MyJMSListenerAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/MyJMSListenerAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,50 +1,50 @@
-package quickstart.moreaction;
-
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Message;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  public Message process(Message message) {
-	  System.out.println("** Demonstrates the default method call if no process attribute is specified");
-	  return message;	 
-  }
-  
-  public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getContents()));
-		  logFooter();
-		  return message;         	
-	}
-   
-   public void exceptionHandler(Message message, Throwable exception) {
-	   logHeader();
-	   System.out.println("!ERROR!");
-	   System.out.println(exception.getMessage());
-	   System.out.println("For Message: ");
-	   System.out.println(message.getBody().getContents());
-	   logFooter();
-   }
-	
-
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
+package quickstart.moreaction;
+
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Message;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message process(Message message) {
+	  System.out.println("** Demonstrates the default method call if no process attribute is specified");
+	  return message;	 
+  }
+  
+  public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  System.out.println("Body: " + new String(message.getBody().getContents()));
+		  logFooter();
+		  return message;         	
+	}
+   
+   public void exceptionHandler(Message message, Throwable exception) {
+	   logHeader();
+	   System.out.println("!ERROR!");
+	   System.out.println(exception.getMessage());
+	   System.out.println("For Message: ");
+	   System.out.println(message.getBody().getContents());
+	   logFooter();
+   }
+	
+
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/StatefulAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/StatefulAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/StatefulAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,45 +1,45 @@
-package quickstart.moreaction;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class StatefulAction {
-	 protected ConfigTree	_config;
-	 int cnt = 0;
-	 public StatefulAction(ConfigTree config) {
-		 System.out.println("\n\n!!Constructor - " + this.getClass().getName() + "!!\n");
-		 cnt++; // 1
-		 _config = config; 
-	 } 
-	  
-	 public Message methodOne(Message msg) throws Exception {
-		 cnt++; // 2
-		 System.out.println("methodOne: " + cnt);
-		 return msg;
-	 }
-	 public Message methodTwo(Message msg) throws Exception {
-		 cnt++; // 3
-		 System.out.println("methodTwo: " + cnt);
-		 return msg;
-	 }
-	 public Message displayCount(Message msg) throws Exception {
-		 System.out.println("\n\n displayCount cnt=" + cnt + "\n");
-		 return msg;
-	 }
-	 public void exceptionHandler(Message message, Throwable exception) {
-	  logHeader();
-	  System.out.println("!ERROR!");
-	  System.out.println(exception.getMessage());
-	  System.out.println("For Message: ");
-	  System.out.println(message.getBody().getContents());
-	  logFooter();
-	 }
-	   
-	 // This makes it easier to read on the console
-	 private void logHeader() {
-	  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-	 }
-	 private void logFooter() {
-	  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-	 }
-}
+package quickstart.moreaction;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class StatefulAction {
+	 protected ConfigTree	_config;
+	 int cnt = 0;
+	 public StatefulAction(ConfigTree config) {
+		 System.out.println("\n\n!!Constructor - " + this.getClass().getName() + "!!\n");
+		 cnt++; // 1
+		 _config = config; 
+	 } 
+	  
+	 public Message methodOne(Message msg) throws Exception {
+		 cnt++; // 2
+		 System.out.println("methodOne: " + cnt);
+		 return msg;
+	 }
+	 public Message methodTwo(Message msg) throws Exception {
+		 cnt++; // 3
+		 System.out.println("methodTwo: " + cnt);
+		 return msg;
+	 }
+	 public Message displayCount(Message msg) throws Exception {
+		 System.out.println("\n\n displayCount cnt=" + cnt + "\n");
+		 return msg;
+	 }
+	 public void exceptionHandler(Message message, Throwable exception) {
+	  logHeader();
+	  System.out.println("!ERROR!");
+	  System.out.println(exception.getMessage());
+	  System.out.println("For Message: ");
+	  System.out.println(message.getBody().getContents());
+	  logFooter();
+	 }
+	   
+	 // This makes it easier to read on the console
+	 private void logHeader() {
+	  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+	 }
+	 private void logFooter() {
+	  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+	 }
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/StatefulAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,56 +1,56 @@
-package quickstart.moreaction.test;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/quickstart_more_action_Request");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        ObjectMessage tm = session.createObjectMessage(msg);
-        send.send(tm);        
-        send.close();
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    	
-    }
-    
+package quickstart.moreaction.test;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/quickstart_more_action_Request");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);
+        send.send(tm);        
+        send.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    	
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/more_action/src/quickstart/moreaction/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/quickstarts.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/SampleOrder.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,107 +1,107 @@
-<project name="Quickstart_simple_cbr" default="run" basedir=".">
-
- <property file="../quickstarts.properties" />
-
- <property name="build.dir"
-    value="${basedir}/build"/>
- <property name="src.dir"
-    value="${basedir}/src"/>
-	
- <property name="esb-config" value="${basedir}/jbossesb.xml"/>
-  
-	<path id="classpath">
-    <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
-    <!-- fileset dir="${basedir}" includes="juddi.properties" -->
-    <fileset dir="${basedir}/lib" includes="*jar"/>        
-    <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
-	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
-	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
-
-	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/server/default/lib">
-	  <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
-	 </fileset>		
-  	
-    <fileset dir="${basedir}" includes="build/**/*.jar"/>
-  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
-    <pathelement location="." />  
-  </path>
- 
-  <property name="cp" refid="classpath"/>
-  
-  <target name="echoCP">    
-  	<echo message="Classpath is ${cp}"/>
-  </target>
-  
-  <target name="prepare">
-	<mkdir dir="${build.dir}" />
-  </target>
-
-  <target name="clean">
-	<delete dir="${build.dir}" />
-  </target>
-
-  <target name="compile" depends="prepare">
-	<javac srcdir="${src.dir}"
-	   destdir="${build.dir}">
-	  <classpath refid="classpath"/>
- 	</javac>
-  </target>
-
-  <target name="jars" depends="compile">
-	<delete file="${build.dir}/${ant.project.name}.jar"/>
-    <jar destfile="${build.dir}/${ant.project.name}.jar"
-		basedir="${build.dir}"
-		includes="**/*.class"/>
-  	<!-- Rules files must be jarred and on the classpath -->
-    <jar destfile="${build.dir}/${ant.project.name}_rules.jar"
-		basedir="${basedir}/src/services/rules" includes="*.*"/>
-  </target>
-
-  <target name="run" depends="jars">
-	    <echo>Simple CBR: make sure to also run receiveExpress, receiveNormal</echo>
-			 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
-		  	   	<arg value="${esb-config}"/>
-		  		<classpath refid="classpath"/>
-		  	 </java>
-  </target>
-
-  <target name="deployToSAR" depends="jars">
-		    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-		  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
-		  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-		  	/>
-  			<copy file="${build.dir}/${ant.project.name}_rules.jar" overwrite="true"
-  			  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-  			  	/>
-		  	<copy file="jbossesb.xml" overwrite="true"
-		  		todir="${jbosshome.dir}/server/default/conf"
-		  	/>
-		  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
-		  	<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
-  </target>
-	
-  <target name="runtest">
-     <echo>Runs Test JMS Sender</echo>
-     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
-		<classpath refid="classpath"/>
-     </java>
-  </target>  
-	
-  <target name="receiveExpress">
-	 <echo>Runs Test JMS Receiver</echo>
-	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
-	  	<arg value="queue/CBRExpressFreeShippingAlert"/>
-		<classpath refid="classpath"/>
-	 </java>
-  </target>  
-	
-  <target name="receiveNormal">
-	 <echo>Runs Test JMS Receiver</echo>
-	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
-	   	<arg value="queue/CBRNormalShippingAlert"/>
-		<classpath refid="classpath"/>
-	 </java>
-   </target>  
-	
+<project name="Quickstart_simple_cbr" default="run" basedir=".">
+
+ <property file="../quickstarts.properties" />
+
+ <property name="build.dir"
+    value="${basedir}/build"/>
+ <property name="src.dir"
+    value="${basedir}/src"/>
+	
+ <property name="esb-config" value="${basedir}/jbossesb.xml"/>
+  
+	<path id="classpath">
+    <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
+    <!-- fileset dir="${basedir}" includes="juddi.properties" -->
+    <fileset dir="${basedir}/lib" includes="*jar"/>        
+    <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+
+	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/server/default/lib">
+	  <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+	 </fileset>		
+  	
+    <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
+    <pathelement location="." />  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+  	<echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+	<mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+	<delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+	<javac srcdir="${src.dir}"
+	   destdir="${build.dir}">
+	  <classpath refid="classpath"/>
+ 	</javac>
+  </target>
+
+  <target name="jars" depends="compile">
+	<delete file="${build.dir}/${ant.project.name}.jar"/>
+    <jar destfile="${build.dir}/${ant.project.name}.jar"
+		basedir="${build.dir}"
+		includes="**/*.class"/>
+  	<!-- Rules files must be jarred and on the classpath -->
+    <jar destfile="${build.dir}/${ant.project.name}_rules.jar"
+		basedir="${basedir}/src/services/rules" includes="*.*"/>
+  </target>
+
+  <target name="run" depends="jars">
+	    <echo>Simple CBR: make sure to also run receiveExpress, receiveNormal</echo>
+			 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
+		  	   	<arg value="${esb-config}"/>
+		  		<classpath refid="classpath"/>
+		  	 </java>
+  </target>
+
+  <target name="deployToSAR" depends="jars">
+		    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+		  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
+		  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+		  	/>
+  			<copy file="${build.dir}/${ant.project.name}_rules.jar" overwrite="true"
+  			  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+  			  	/>
+		  	<copy file="jbossesb.xml" overwrite="true"
+		  		todir="${jbosshome.dir}/server/default/conf"
+		  	/>
+		  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
+		  	<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
+  </target>
+	
+  <target name="runtest">
+     <echo>Runs Test JMS Sender</echo>
+     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
+		<classpath refid="classpath"/>
+     </java>
+  </target>  
+	
+  <target name="receiveExpress">
+	 <echo>Runs Test JMS Receiver</echo>
+	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+	  	<arg value="queue/CBRExpressFreeShippingAlert"/>
+		<classpath refid="classpath"/>
+	 </java>
+  </target>  
+	
+  <target name="receiveNormal">
+	 <echo>Runs Test JMS Receiver</echo>
+	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+	   	<arg value="queue/CBRNormalShippingAlert"/>
+		<classpath refid="classpath"/>
+	 </java>
+   </target>  
+	
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,125 +1,125 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_simple_cbr_Request"
-                   />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/B"
-                  />
-              </jms-bus>
-              <jms-bus busid="CBRNormalShipping">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/CBRNormalShipping"
-                  />
-              </jms-bus>
-              <jms-bus busid="CBRExpressFreeShipping">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/CBRExpressFreeShipping"
-                  />
-              </jms-bus>
-			  
-          </jms-provider>
-      </providers>
-      
-      <services>
-          <!--  Gateway -->
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_simple_cbr_Request"
+                   />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/B"
+                  />
+              </jms-bus>
+              <jms-bus busid="CBRNormalShipping">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/CBRNormalShipping"
+                  />
+              </jms-bus>
+              <jms-bus busid="CBRExpressFreeShipping">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/CBRExpressFreeShipping"
+                  />
+              </jms-bus>
+			  
+          </jms-provider>
+      </providers>
+      
+      <services>
+          <!--  Gateway -->
           <service 
           		category="MyFirstCBRServices" 
           		name="FirstCBRService" 
           		description="This CBR routes messages to different service destinations based Order totalAmount" 
           		is-gateway="true"
                 target-service-category="MyFirstCBRServicesESB"
-                target-service-name="FirstCBRServiceESB">
-              <listeners>        
-                  <jms-listener name="the-gateway"
-                              busidref="quickstartGwChannel"
-                              maxThreads="1"
-                              
-                  />                  
-              </listeners>    
-          </service>
-        <!--  ESB CBR Service -->
+                target-service-name="FirstCBRServiceESB">
+              <listeners>        
+                  <jms-listener name="the-gateway"
+                              busidref="quickstartGwChannel"
+                              maxThreads="1"
+                              
+                  />                  
+              </listeners>    
+          </service>
+        <!--  ESB CBR Service -->
         <service 
         	category="MyFirstCBRServicesESB" 
         	name="FirstCBRServiceESB" 
         	description="ESB Listener" 
-        	is-gateway="false"
-        	service-class="org.jboss.soa.esb.listeners.message.CbrListener">
-        	<listeners>        
-                  <jms-listener name="XPathContentBasedRouter"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1">  
-                  <property name="ruleSet" value="MyESBRules-XPath.drl"/>
-	              <property name="ruleLanguage" value="XPathLanguage.dsl"/>
-	              <property name="ruleReload" value="true"/>                
-	             </jms-listener>
-             </listeners> 
-        </service>
-        
-        <!--  Normal Shipping -->
-        <service
-  	      category="NormalShipping"
-  	      name="NormalShippingService"
-  	      description="Normal Shipping Service"
-  	      is-gateway="false">
-  	      <listeners>
-  	        <jms-listener
-  	       	  name="CBRNormalShipping"
-  	       	  busidref="CBRNormalShipping"
-  	       	  maxThreads="1"
-  	         />
-  	      </listeners>
-  	      <actions>
-               <action name="displayMessageAction" 
-                   	class="quickstart.MyJMSListenerAction" 
-                   	process="displayMessage" 
-                   	/>   
-                <!-- This can be replaced with notification -->
-                <action name="route"
-                   class="quickstart.RouteNormalShipping"
-                   process="sendResponse"
-                />   
-           </actions>
-  	    </service>
-  	    
-        <!--  Express Shipping -->
-          <service
-  	      category="ExpressShipping"
-  	      name="ExpressShippingService"
-  	      description="Express Shipping Service"
-  	      is-gateway="false">
-  	      <listeners>
-  	        <jms-listener
-  	       	  name="CBRExpressFreeShipping"
-  	       	  busidref="CBRExpressFreeShipping"
-  	       	  maxThreads="1"
-  	         />
-  	      </listeners>
-  	        <actions>
-               <action name="displayMessageAction" 
-                   	class="quickstart.MyJMSListenerAction" 
-                   	process="displayMessage" 
-                   	/>   
-                <!-- This can be replaced with notification -->
-                <action name="route"
-                   class="quickstart.RouteExpressShipping"
-                   process="sendResponse"
-                />   
-           </actions>
-  	    </service>
-      </services>
-     
-</jbossesb>
+        	is-gateway="false"
+        	service-class="org.jboss.soa.esb.listeners.message.CbrListener">
+        	<listeners>        
+                  <jms-listener name="XPathContentBasedRouter"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1">  
+                  <property name="ruleSet" value="MyESBRules-XPath.drl"/>
+	              <property name="ruleLanguage" value="XPathLanguage.dsl"/>
+	              <property name="ruleReload" value="true"/>                
+	             </jms-listener>
+             </listeners> 
+        </service>
+        
+        <!--  Normal Shipping -->
+        <service
+  	      category="NormalShipping"
+  	      name="NormalShippingService"
+  	      description="Normal Shipping Service"
+  	      is-gateway="false">
+  	      <listeners>
+  	        <jms-listener
+  	       	  name="CBRNormalShipping"
+  	       	  busidref="CBRNormalShipping"
+  	       	  maxThreads="1"
+  	         />
+  	      </listeners>
+  	      <actions>
+               <action name="displayMessageAction" 
+                   	class="quickstart.MyJMSListenerAction" 
+                   	process="displayMessage" 
+                   	/>   
+                <!-- This can be replaced with notification -->
+                <action name="route"
+                   class="quickstart.RouteNormalShipping"
+                   process="sendResponse"
+                />   
+           </actions>
+  	    </service>
+  	    
+        <!--  Express Shipping -->
+          <service
+  	      category="ExpressShipping"
+  	      name="ExpressShippingService"
+  	      description="Express Shipping Service"
+  	      is-gateway="false">
+  	      <listeners>
+  	        <jms-listener
+  	       	  name="CBRExpressFreeShipping"
+  	       	  busidref="CBRExpressFreeShipping"
+  	       	  maxThreads="1"
+  	         />
+  	      </listeners>
+  	        <actions>
+               <action name="displayMessageAction" 
+                   	class="quickstart.MyJMSListenerAction" 
+                   	process="displayMessage" 
+                   	/>   
+                <!-- This can be replaced with notification -->
+                <action name="route"
+                   class="quickstart.RouteExpressShipping"
+                   process="sendResponse"
+                />   
+           </actions>
+  	    </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -29,8 +29,8 @@
          <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
       </layout>
    </appender>
-
 
+
    <!-- ================================= -->
    <!-- Preserve messages in a local file -->
    <!-- ================================= -->
@@ -52,25 +52,25 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
    <category name="org.jboss.soa.esb">
       <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.milyn">
-      <priority value="ERROR"/>
-   </category>
-
-   <category name="quickstarts">
-      <priority value="ERROR"/>
-   </category>
+   </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.milyn">
+      <priority value="ERROR"/>
+   </category>
+
+   <category name="quickstarts">
+      <priority value="ERROR"/>
+   </category>
    
    <!-- ======================= -->
    <!-- Setup the Root category -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/MyJMSListenerAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/MyJMSListenerAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,47 +1,47 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.apache.log4j.Logger;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getContents()));
-		  logFooter();
-		  return message;         	
-	}
-  
-   public void exceptionHandler(Message message, Throwable exception) {
-	   logHeader();
-	   System.out.println("!ERROR!");
-	   System.out.println(exception.getMessage());
-	   System.out.println("For Message: ");
-	   System.out.println(message.getBody().getContents());
-	   logFooter();
-   }
-	
-
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.apache.log4j.Logger;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  System.out.println("Body: " + new String(message.getBody().getContents()));
+		  logFooter();
+		  return message;         	
+	}
+  
+   public void exceptionHandler(Message message, Throwable exception) {
+	   logHeader();
+	   System.out.println("!ERROR!");
+	   System.out.println(exception.getMessage());
+	   System.out.println("For Message: ");
+	   System.out.println(message.getBody().getContents());
+	   logFooter();
+   }
+	
+
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/ReturnJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/ReturnJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/ReturnJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,49 +1,49 @@
-package quickstart;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-import javax.jms.TextMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import org.jboss.soa.esb.message.Message;
-
-public class ReturnJMSMessage {
-       
-    public static void sendMessage(Message esbMessage,String newDestination) throws JMSException, NamingException, Exception {
-    	if (esbMessage == null || newDestination == null) 
-    		throw new Exception("Message and JMS Destination are required");
-    
-    	QueueConnection conn;
-        QueueSession session;
-        Queue que;
-        
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/" + newDestination);
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-
-    	    	   
-    	String newMsg = new String(esbMessage.getBody().getContents());
-
-    	
-    	QueueSender send = session.createSender(que);        
-        TextMessage tm = session.createTextMessage(newMsg);
-        send.send(tm);
-        
-
-    	conn.stop();
-    }    
-    
+package quickstart;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import org.jboss.soa.esb.message.Message;
+
+public class ReturnJMSMessage {
+       
+    public static void sendMessage(Message esbMessage,String newDestination) throws JMSException, NamingException, Exception {
+    	if (esbMessage == null || newDestination == null) 
+    		throw new Exception("Message and JMS Destination are required");
+    
+    	QueueConnection conn;
+        QueueSession session;
+        Queue que;
+        
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/" + newDestination);
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+
+    	    	   
+    	String newMsg = new String(esbMessage.getBody().getContents());
+
+    	
+    	QueueSender send = session.createSender(que);        
+        TextMessage tm = session.createTextMessage(newMsg);
+        send.send(tm);
+        
+
+    	conn.stop();
+    }    
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/ReturnJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteExpressShipping.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteExpressShipping.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteExpressShipping.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,38 +1,38 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class RouteExpressShipping {
-	
-	  protected Message  _message;
-	  protected ConfigTree	_config;
-	  
-	  public RouteExpressShipping(ConfigTree config) { _config = config; } 
-	  
-	  // used to send response
-	  public Message noOperation(Message message) { return message; }
-	  
-	  public Message sendResponse(Message message) {
-		  try {
-			   logHeader();
-			   System.out.println(new String(message.getBody().getContents()));
-			   System.out.println("EXPRESS EXPRESS EXPRESS");
-			   logFooter();
-			   ReturnJMSMessage.sendMessage(message,"CBRExpressFreeShippingAlert");
-		   } catch (Exception e) {
-			   logHeader();
-			   System.out.println(e.getMessage());
-			   logFooter();
-		   }
-		   return message;
-	  }
-	   private void logHeader() {
-		   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-	   }
-	   private void logFooter() {
-		   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-	   }
-
-	
-}
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class RouteExpressShipping {
+	
+	  protected Message  _message;
+	  protected ConfigTree	_config;
+	  
+	  public RouteExpressShipping(ConfigTree config) { _config = config; } 
+	  
+	  // used to send response
+	  public Message noOperation(Message message) { return message; }
+	  
+	  public Message sendResponse(Message message) {
+		  try {
+			   logHeader();
+			   System.out.println(new String(message.getBody().getContents()));
+			   System.out.println("EXPRESS EXPRESS EXPRESS");
+			   logFooter();
+			   ReturnJMSMessage.sendMessage(message,"CBRExpressFreeShippingAlert");
+		   } catch (Exception e) {
+			   logHeader();
+			   System.out.println(e.getMessage());
+			   logFooter();
+		   }
+		   return message;
+	  }
+	   private void logHeader() {
+		   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+	   }
+	   private void logFooter() {
+		   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+	   }
+
+	
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteExpressShipping.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteNormalShipping.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteNormalShipping.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteNormalShipping.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,38 +1,38 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class RouteNormalShipping {
-	
-	  protected Message  _message;
-	  protected ConfigTree	_config;
-	  
-	  public RouteNormalShipping(ConfigTree config) { _config = config; } 
-	  
-	  // used to send response
-	  public Message noOperation(Message message) { return message; }
-	  
-	  public Message sendResponse(Message message) {
-		  try {
-			   logHeader();
-			   System.out.println(new String(message.getBody().getContents()));
-			   System.out.println("NORMAL SHIPPING");
-			   logFooter();
-			   ReturnJMSMessage.sendMessage(message,"CBRNormalShippingAlert");
-		   } catch (Exception e) {
-			   logHeader();
-			   System.out.println(e.getMessage());
-			   logFooter();
-		   }
-		   return message;
-	  }
-	   private void logHeader() {
-		   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-	   }
-	   private void logFooter() {
-		   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-	   }
-
-	
-}
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class RouteNormalShipping {
+	
+	  protected Message  _message;
+	  protected ConfigTree	_config;
+	  
+	  public RouteNormalShipping(ConfigTree config) { _config = config; } 
+	  
+	  // used to send response
+	  public Message noOperation(Message message) { return message; }
+	  
+	  public Message sendResponse(Message message) {
+		  try {
+			   logHeader();
+			   System.out.println(new String(message.getBody().getContents()));
+			   System.out.println("NORMAL SHIPPING");
+			   logFooter();
+			   ReturnJMSMessage.sendMessage(message,"CBRNormalShippingAlert");
+		   } catch (Exception e) {
+			   logHeader();
+			   System.out.println(e.getMessage());
+			   logFooter();
+		   }
+		   return message;
+	  }
+	   private void logHeader() {
+		   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+	   }
+	   private void logFooter() {
+		   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+	   }
+
+	
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/RouteNormalShipping.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/ReceiveJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/ReceiveJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/ReceiveJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,55 +1,55 @@
-package quickstart.test;
-
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-public class ReceiveJMSMessage {
-	   QueueConnection conn = null;	   
-	   QueueSession receiverSession = null;	   
-	   Queue receiverQueue = null;	   
-	   QueueReceiver queueReceiver = null;
-	   InitialContext iniCtx = null;
-	   QueueConnectionFactory qcf = null;
-	   String receiveQueueName = "queue/D"; // Default to queue/D
-	   
-	   public ReceiveJMSMessage() {
-		   
-	   }
-	   public void receiveOne() {
-		   try {
-		   if (iniCtx == null) iniCtx = new InitialContext();
-	          if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
-	          if (conn == null) {
-	              conn = qcf.createQueueConnection();
-	              conn.start();
-	          }	        
-	          receiverQueue = (Queue) iniCtx.lookup(receiveQueueName);
-	          receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-	    	  queueReceiver = receiverSession.createReceiver(receiverQueue); 
-	    	  TextMessage msg = (TextMessage) queueReceiver.receive(2000);
-	    	  if (msg != null) {
-	    		  System.out.println("*********************************************************");
-	    		  System.out.println(msg);
-	    		  System.out.println("*********************************************************");
-	    	  }	
-		   } catch (Exception e) {
-			   System.out.println(e);
-		   }
-	   }
-	   public static void main(String[] args) {
-		      ReceiveJMSMessage receiver = new ReceiveJMSMessage();
-		      
-		      if(args[0] != null) {
-		    	  receiver.receiveQueueName = args[0];
-		    	  System.out.println("Receiving on: " + receiver.receiveQueueName );		    	 
-		      }		    	  
-		      while (true) { // loop until I'm killed
-		    	  receiver.receiveOne();
-		      }
-	   }
-}
+package quickstart.test;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+public class ReceiveJMSMessage {
+	   QueueConnection conn = null;	   
+	   QueueSession receiverSession = null;	   
+	   Queue receiverQueue = null;	   
+	   QueueReceiver queueReceiver = null;
+	   InitialContext iniCtx = null;
+	   QueueConnectionFactory qcf = null;
+	   String receiveQueueName = "queue/D"; // Default to queue/D
+	   
+	   public ReceiveJMSMessage() {
+		   
+	   }
+	   public void receiveOne() {
+		   try {
+		   if (iniCtx == null) iniCtx = new InitialContext();
+	          if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+	          if (conn == null) {
+	              conn = qcf.createQueueConnection();
+	              conn.start();
+	          }	        
+	          receiverQueue = (Queue) iniCtx.lookup(receiveQueueName);
+	          receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+	    	  queueReceiver = receiverSession.createReceiver(receiverQueue); 
+	    	  TextMessage msg = (TextMessage) queueReceiver.receive(2000);
+	    	  if (msg != null) {
+	    		  System.out.println("*********************************************************");
+	    		  System.out.println(msg);
+	    		  System.out.println("*********************************************************");
+	    	  }	
+		   } catch (Exception e) {
+			   System.out.println(e);
+		   }
+	   }
+	   public static void main(String[] args) {
+		      ReceiveJMSMessage receiver = new ReceiveJMSMessage();
+		      
+		      if(args[0] != null) {
+		    	  receiver.receiveQueueName = args[0];
+		    	  System.out.println("Receiving on: " + receiver.receiveQueueName );		    	 
+		      }		    	  
+		      while (true) { // loop until I'm killed
+		    	  receiver.receiveOne();
+		      }
+	   }
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/ReceiveJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,90 +1,90 @@
-package quickstart.test;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/quickstart_simple_cbr_Request");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        ObjectMessage tm = session.createObjectMessage(msg);        
-        send.send(tm);        
-        send.close();
-    }
-    public String readAsciiFile(String fileName) throws IOException {
-		  FileReader fr = null;
-		  char[] thechars = null;
-
-		  try {
-			  File thefile = new File( fileName );
-			  fr = new FileReader( thefile );
-			  int size = (int) thefile.length();
-			  thechars = new char[size];
-		
-			  int count, index = 0;
-		
-			  // 	read in the bytes from the input stream
-			  while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
-				  size -= count;
-				  index += count;
-			  }
-			} catch(Exception e) {	
-				System.out.println(e);
-			}
-			finally {
-				if( fr != null )
-		        fr.close();
-			}
-			return new String(thechars);
-
-    } // readAsciiFile
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	String fileContent = sm.readAsciiFile("SampleOrder.xml");
-    	System.out.println("---------------------------------------------");
-    	System.out.println(fileContent);
-    	System.out.println("---------------------------------------------");
-    	sm.sendAMessage(fileContent); 
-    	sm.stop();
-    	
-    }
-    
+package quickstart.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/quickstart_simple_cbr_Request");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);        
+        send.send(tm);        
+        send.close();
+    }
+    public String readAsciiFile(String fileName) throws IOException {
+		  FileReader fr = null;
+		  char[] thechars = null;
+
+		  try {
+			  File thefile = new File( fileName );
+			  fr = new FileReader( thefile );
+			  int size = (int) thefile.length();
+			  thechars = new char[size];
+		
+			  int count, index = 0;
+		
+			  // 	read in the bytes from the input stream
+			  while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
+				  size -= count;
+				  index += count;
+			  }
+			} catch(Exception e) {	
+				System.out.println(e);
+			}
+			finally {
+				if( fr != null )
+		        fr.close();
+			}
+			return new String(thechars);
+
+    } // readAsciiFile
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	String fileContent = sm.readAsciiFile("SampleOrder.xml");
+    	System.out.println("---------------------------------------------");
+    	System.out.println(fileContent);
+    	System.out.println("---------------------------------------------");
+    	sm.sendAMessage(fileContent); 
+    	sm.stop();
+    	
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/simple_cbr/src/quickstart/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/static_router/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/static_router/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/static_router/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/static_router/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/static_router/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,7 +1,7 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" >
-
-    <providers>
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" >
+
+    <providers>
           <ftp-provider name="FTPprovider" hostname="@FTP_HOSTNAME@" >
           	<ftp-bus busid="StaticRouterFtpGW" >
           		<ftp-message-filter
@@ -47,24 +47,24 @@
           	</fs-bus>
           </fs-provider>
           
-      </providers>
-      
-      <services>
-          <service category="StaticRouterCategoryGW" 
-                   name="Gateway" 
-          		   description="Static router(gateway)" 
-          		   is-gateway="true"
-          		   target-service-category="StaticRouterCategoryEsb1"
-          		   target-service-name="fileListener"
-          		   >
-              <listeners>        
-                  <ftp-listener name="Ftp-Gateway"
-                              busidref="StaticRouterFtpGW"
-                              maxThreads="1"
-                  />
-              </listeners>    
-          </service>
-          
+      </providers>
+      
+      <services>
+          <service category="StaticRouterCategoryGW" 
+                   name="Gateway" 
+          		   description="Static router(gateway)" 
+          		   is-gateway="true"
+          		   target-service-category="StaticRouterCategoryEsb1"
+          		   target-service-name="fileListener"
+          		   >
+              <listeners>        
+                  <ftp-listener name="Ftp-Gateway"
+                              busidref="StaticRouterFtpGW"
+                              maxThreads="1"
+                  />
+              </listeners>    
+          </service>
+          
         <service 
           		 category="StaticRouterCategoryEsb1"
           		 name="fileListener"
@@ -131,6 +131,6 @@
                </action>
             </actions>
         </service>
-      </services>
-     
-</jbossesb>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/static_router/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/static_router/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/static_router/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/static_router/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/static_router/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/static_router/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/static_router/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/static_router/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/static_router/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/static_router/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/static_router/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/static_router/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -51,21 +51,21 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
    </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/static_router/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/static_router/src/quickstart/static_router/SimpleFileAction.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/static_router/src/quickstart/static_router/test/CreateTestFile.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/SampleOrder.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,93 +1,93 @@
-<project name="Quickstart_simple_transformation" default="run" basedir=".">
-
-  <property file="../quickstarts.properties" />
-  <property name="build.dir" value="${basedir}/build"/>
-  <property name="src.dir" value="${basedir}/src"/>
-			
-  <property name="esb-config" value="${basedir}/jbossesb.xml"/>
-
-	<path id="classpath">
-	<!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
-	<!-- fileset dir="${basedir}" includes="juddi.properties" -->
-    <fileset dir="${basedir}" includes="smooks-cdr.lst"/>
-    <fileset dir="${basedir}" includes="smooks-res.xml"/>
-    <fileset dir="${basedir}/src" includes="*st"/>    
-    <fileset dir="${basedir}/lib" includes="*jar"/> 
-       
-	  <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
-	  <fileset dir="${esb.product.lib.dir}" includes="*xml"/>
-	  <fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
-	
-	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
-	<fileset dir="${jbosshome.dir}/server/default/lib">
-		<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
-	</fileset>		
-  	
-    <fileset dir="${basedir}" includes="build/**/*.jar"/>
-  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
-    <pathelement location="." />  
-  </path>
- 
-  <property name="cp" refid="classpath"/>
-  
-  <target name="echoCP">    
-  	<echo message="Classpath is ${cp}"/>
-  </target>
-  
-  <target name="prepare">
-	<mkdir dir="${build.dir}" />
-  </target>
-
-  <target name="clean">
-	<delete dir="${build.dir}" />
-  </target>
-
-  <target name="compile" depends="prepare">
-	<javac srcdir="${src.dir}"
-	   destdir="${build.dir}">
-	  <classpath refid="classpath"/>
- 	</javac>
-  </target>
-
-  <target name="jars" depends="compile">
-	<delete file="${build.dir}/${ant.project.name}.jar"/>
-        <jar destfile="${build.dir}/${ant.project.name}.jar"
-		basedir="${build.dir}"
-		includes="**/*.class"/>
-  </target>
-
-  <target name="run" depends="jars">
-	     <echo>Basic XML to POJO transformation via JMS</echo>
-	     <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
-	     	<arg value="${esb-config}"/>
-			<classpath refid="classpath"/>
-	     </java>     
-  </target>	
-
-  <target name="deployToSAR">
-	    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-	  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
-	  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
-	  	/>
-	  	<copy file="jbossesb.xml" overwrite="true"
-	  		todir="${jbosshome.dir}/server/default/conf"
-	  	/>
-	  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
-	  	<echo>Check your AS console to see if everything deployed properly</echo>
-  </target>
-			
-
-  <target name="runtest">
-     <echo>Runs Test JMS Sender</echo>
-     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
-		<classpath refid="classpath"/>
-     </java>
-  </target>  
-	
-  <target name="receive">
-	     <echo>Runs Test JMS Receiver</echo>
-	     <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
-			<classpath refid="classpath"/>
-	     </java>
-	  </target>  
+<project name="Quickstart_simple_transformation" default="run" basedir=".">
+
+  <property file="../quickstarts.properties" />
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
+			
+  <property name="esb-config" value="${basedir}/jbossesb.xml"/>
+
+	<path id="classpath">
+	<!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
+	<!-- fileset dir="${basedir}" includes="juddi.properties" -->
+    <fileset dir="${basedir}" includes="smooks-cdr.lst"/>
+    <fileset dir="${basedir}" includes="smooks-res.xml"/>
+    <fileset dir="${basedir}/src" includes="*st"/>    
+    <fileset dir="${basedir}/lib" includes="*jar"/> 
+       
+	  <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+	  <fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+	  <fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+	
+	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/server/default/lib">
+		<include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+	</fileset>		
+  	
+    <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
+    <pathelement location="." />  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+  	<echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+	<mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+	<delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+	<javac srcdir="${src.dir}"
+	   destdir="${build.dir}">
+	  <classpath refid="classpath"/>
+ 	</javac>
+  </target>
+
+  <target name="jars" depends="compile">
+	<delete file="${build.dir}/${ant.project.name}.jar"/>
+        <jar destfile="${build.dir}/${ant.project.name}.jar"
+		basedir="${build.dir}"
+		includes="**/*.class"/>
+  </target>
+
+  <target name="run" depends="jars">
+	     <echo>Basic XML to POJO transformation via JMS</echo>
+	     <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
+	     	<arg value="${esb-config}"/>
+			<classpath refid="classpath"/>
+	     </java>     
+  </target>	
+
+  <target name="deployToSAR">
+	    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+	  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
+	  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+	  	/>
+	  	<copy file="jbossesb.xml" overwrite="true"
+	  		todir="${jbosshome.dir}/server/default/conf"
+	  	/>
+	  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
+	  	<echo>Check your AS console to see if everything deployed properly</echo>
+  </target>
+			
+
+  <target name="runtest">
+     <echo>Runs Test JMS Sender</echo>
+     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
+		<classpath refid="classpath"/>
+     </java>
+  </target>  
+	
+  <target name="receive">
+	     <echo>Runs Test JMS Receiver</echo>
+	     <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+			<classpath refid="classpath"/>
+	     </java>
+	  </target>  
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,28 +1,28 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_simple_transformation_Request"
-                   />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/B"
-                  />
-              </jms-bus>
-
-          </jms-provider>
-      </providers>
-      
-      <services>
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_simple_transformation_Request"
+                   />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/B"
+                  />
+              </jms-bus>
+
+          </jms-provider>
+      </providers>
+      
+      <services>
           <service 
           		category="MyTransformationServicesGW" 
           		name="MyFirstTransformationServiceGW" 
@@ -30,43 +30,43 @@
           		is-gateway="true"
                 target-service-category="MyTransformationServicesESB"
                 target-service-name="MyFirstTransformationServiceESB"
-          		>
-              <listeners>        
-                  <jms-listener name="JMS-Gateway"
-                              busidref="quickstartGwChannel"
-                              maxThreads="1"
-                  />
-              </listeners>    
-          </service>
-          
+          		>
+              <listeners>        
+                  <jms-listener name="JMS-Gateway"
+                              busidref="quickstartGwChannel"
+                              maxThreads="1"
+                  />
+              </listeners>    
+          </service>
+          
         <service 
         	category="MyTransformationServicesESB" 
         	name="MyFirstTransformationServiceESB" 
         	description="ESB: Takes XML in and produces a POJO" 
-        	is-gateway="false">
-            <listeners>
-                <jms-listener name="jmsTransformer"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />
-            </listeners>
-            <actions>
+        	is-gateway="false">
+            <listeners>
+                <jms-listener name="jmsTransformer"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />
+            </listeners>
+            <actions>
                 <action name="displayBeforeTransformer"
                   	class="quickstart.MyJMSListenerAction" 
                    	process="displayMessage" 
-                />   
-                <action name="transform" class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
-              		<property name="from" value="DVDStore:OrderDispatchService" />
-					<property name="from-type" value="text/xml:fullFillOrder" />
-					<property name="to" value="DVDWarehouse_1:OrderHandlingService" />
-					<property name="to-type" value="text/xml:shipOrder" />
-                </action>
-                <action name="convertPOJO2Message" class="org.jboss.soa.esb.dvdstore.DVDStoreAction"	/>	
-                <action name="displayAfterTransformer" class="quickstart.MyJMSListenerAction" process="displayMessage" />  
-                <action name="returnToSender"
-                	class="quickstart.MyJMSListenerAction" process="sendResponse" />           	   
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>
+                />   
+                <action name="transform" class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
+              		<property name="from" value="DVDStore:OrderDispatchService" />
+					<property name="from-type" value="text/xml:fullFillOrder" />
+					<property name="to" value="DVDWarehouse_1:OrderHandlingService" />
+					<property name="to-type" value="text/xml:shipOrder" />
+                </action>
+                <action name="convertPOJO2Message" class="org.jboss.soa.esb.dvdstore.DVDStoreAction"	/>	
+                <action name="displayAfterTransformer" class="quickstart.MyJMSListenerAction" process="displayMessage" />  
+                <action name="returnToSender"
+                	class="quickstart.MyJMSListenerAction" process="sendResponse" />           	   
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -29,8 +29,8 @@
          <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
       </layout>
    </appender>
-
 
+
    <!-- ================================= -->
    <!-- Preserve messages in a local file -->
    <!-- ================================= -->
@@ -52,25 +52,25 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
    <category name="org.jboss.soa.esb">
       <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.milyn">
-      <priority value="ERROR"/>
-   </category>
-
-   <category name="howto">
-      <priority value="ERROR"/>
-   </category>
+   </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.milyn">
+      <priority value="ERROR"/>
+   </category>
+
+   <category name="howto">
+      <priority value="ERROR"/>
+   </category>
    
    <!-- ======================= -->
    <!-- Setup the Root category -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/smooks-res.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/org/jboss/soa/esb/dvdstore/Customer.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/org/jboss/soa/esb/dvdstore/DVDStoreAction.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/org/jboss/soa/esb/dvdstore/OrderHeader.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/org/jboss/soa/esb/dvdstore/OrderItem.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/MyJMSListenerAction.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/MyJMSListenerAction.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,73 +1,73 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.apache.log4j.Logger;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getContents()));
-		  logFooter();
-		  return message;         	
-	}
-  
-   public Message playWithMessage(Message message) throws Exception {
-	   Header msgHeader = message.getHeader();
-	   Body msgBody = message.getBody();
-	   Call theCall = msgHeader.getCall();
-	   EPR theEpr = theCall.getFrom();
-	   String contents = new String(msgBody.getContents());
-	   StringBuffer sb = new StringBuffer();
-	   sb.append("BEFORE\n");
-	   sb.append(contents);
-	   sb.append("\nAFTER");
-	   msgBody.setContents(sb.toString().getBytes());
-	   return message;
-   }
-   
-   public void exceptionHandler(Message message, Throwable exception) {
-	   logHeader();
-	   System.out.println("!ERROR!");
-	   System.out.println(exception.getMessage());
-	   System.out.println("For Message: ");
-	   System.out.println(message.getBody().getContents());
-	   logFooter();
-   }
-	
-   public Message sendResponse(Message message) { 
-	   try {
-		   logHeader();
-		   System.out.println(new String(message.getBody().getContents()));
-		   logFooter();
-		   ReturnJMSMessage.sendMessage(message,"quickstart_simple_transformation_Response");
-	   } catch (Exception e) {
-		   logHeader();
-		   System.out.println(e.getMessage());
-		   logFooter();
-	   }
-	   return message; //nothing was done to this but action methods must return a Message
-   }
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.apache.log4j.Logger;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  System.out.println("Body: " + new String(message.getBody().getContents()));
+		  logFooter();
+		  return message;         	
+	}
+  
+   public Message playWithMessage(Message message) throws Exception {
+	   Header msgHeader = message.getHeader();
+	   Body msgBody = message.getBody();
+	   Call theCall = msgHeader.getCall();
+	   EPR theEpr = theCall.getFrom();
+	   String contents = new String(msgBody.getContents());
+	   StringBuffer sb = new StringBuffer();
+	   sb.append("BEFORE\n");
+	   sb.append(contents);
+	   sb.append("\nAFTER");
+	   msgBody.setContents(sb.toString().getBytes());
+	   return message;
+   }
+   
+   public void exceptionHandler(Message message, Throwable exception) {
+	   logHeader();
+	   System.out.println("!ERROR!");
+	   System.out.println(exception.getMessage());
+	   System.out.println("For Message: ");
+	   System.out.println(message.getBody().getContents());
+	   logFooter();
+   }
+	
+   public Message sendResponse(Message message) { 
+	   try {
+		   logHeader();
+		   System.out.println(new String(message.getBody().getContents()));
+		   logFooter();
+		   ReturnJMSMessage.sendMessage(message,"quickstart_simple_transformation_Response");
+	   } catch (Exception e) {
+		   logHeader();
+		   System.out.println(e.getMessage());
+		   logFooter();
+	   }
+	   return message; //nothing was done to this but action methods must return a Message
+   }
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/ReturnJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/ReturnJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/ReturnJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,49 +1,49 @@
-package quickstart;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-import javax.jms.TextMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import org.jboss.soa.esb.message.Message;
-
-public class ReturnJMSMessage {
-       
-    public static void sendMessage(Message esbMessage,String newDestination) throws JMSException, NamingException, Exception {
-    	if (esbMessage == null || newDestination == null) 
-    		throw new Exception("Message and JMS Destination are required");
-    
-    	QueueConnection conn;
-        QueueSession session;
-        Queue que;
-        
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/" + newDestination);
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-
-    	    	   
-    	String newMsg = new String(esbMessage.getBody().getContents());
-
-    	
-    	QueueSender send = session.createSender(que);        
-        TextMessage tm = session.createTextMessage(newMsg);
-        send.send(tm);
-        
-
-    	conn.stop();
-    }    
-    
+package quickstart;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import org.jboss.soa.esb.message.Message;
+
+public class ReturnJMSMessage {
+       
+    public static void sendMessage(Message esbMessage,String newDestination) throws JMSException, NamingException, Exception {
+    	if (esbMessage == null || newDestination == null) 
+    		throw new Exception("Message and JMS Destination are required");
+    
+    	QueueConnection conn;
+        QueueSession session;
+        Queue que;
+        
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/" + newDestination);
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+
+    	    	   
+    	String newMsg = new String(esbMessage.getBody().getContents());
+
+    	
+    	QueueSender send = session.createSender(que);        
+        TextMessage tm = session.createTextMessage(newMsg);
+        send.send(tm);
+        
+
+    	conn.stop();
+    }    
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/ReturnJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/ReceiveJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/ReceiveJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/ReceiveJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,49 +1,49 @@
-package quickstart.test;
-
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-public class ReceiveJMSMessage {
-	   QueueConnection conn = null;	   
-	   QueueSession receiverSession = null;	   
-	   Queue receiverQueue = null;	   
-	   QueueReceiver queueReceiver = null;
-	   InitialContext iniCtx = null;
-	   QueueConnectionFactory qcf = null;
-	   public ReceiveJMSMessage() {
-		   
-	   }
-	   public void receiveOne() {
-		   try {
-		   if (iniCtx == null) iniCtx = new InitialContext();
-	          if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
-	          if (conn == null) {
-	              conn = qcf.createQueueConnection();
-	              conn.start();
-	          }
-	          String responseQueueName = "queue/quickstart_simple_transformation_Response";
-	          receiverQueue = (Queue) iniCtx.lookup(responseQueueName);
-	          receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-	    	  queueReceiver = receiverSession.createReceiver(receiverQueue); 
-	    	  TextMessage msg = (TextMessage) queueReceiver.receive(2000);
-	    	  if (msg != null) {
-	    		  System.out.println("*********************************************************");
-	    		  System.out.println(msg);
-	    		  System.out.println("*********************************************************");
-	    	  }	
-		   } catch (Exception e) {
-			   System.out.println(e);
-		   }
-	   }
-	   public static void main(String[] args) {
-		      ReceiveJMSMessage receiver = new ReceiveJMSMessage();
-		      while (true) { // loop until I'm killed
-		    	  receiver.receiveOne();
-		      }
-	   }
-}
+package quickstart.test;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+public class ReceiveJMSMessage {
+	   QueueConnection conn = null;	   
+	   QueueSession receiverSession = null;	   
+	   Queue receiverQueue = null;	   
+	   QueueReceiver queueReceiver = null;
+	   InitialContext iniCtx = null;
+	   QueueConnectionFactory qcf = null;
+	   public ReceiveJMSMessage() {
+		   
+	   }
+	   public void receiveOne() {
+		   try {
+		   if (iniCtx == null) iniCtx = new InitialContext();
+	          if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+	          if (conn == null) {
+	              conn = qcf.createQueueConnection();
+	              conn.start();
+	          }
+	          String responseQueueName = "queue/quickstart_simple_transformation_Response";
+	          receiverQueue = (Queue) iniCtx.lookup(responseQueueName);
+	          receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+	    	  queueReceiver = receiverSession.createReceiver(receiverQueue); 
+	    	  TextMessage msg = (TextMessage) queueReceiver.receive(2000);
+	    	  if (msg != null) {
+	    		  System.out.println("*********************************************************");
+	    		  System.out.println(msg);
+	    		  System.out.println("*********************************************************");
+	    	  }	
+		   } catch (Exception e) {
+			   System.out.println(e);
+		   }
+	   }
+	   public static void main(String[] args) {
+		      ReceiveJMSMessage receiver = new ReceiveJMSMessage();
+		      while (true) { // loop until I'm killed
+		    	  receiver.receiveOne();
+		      }
+	   }
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/ReceiveJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,90 +1,90 @@
-package quickstart.test;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.QueueSender;
-import javax.jms.ObjectMessage;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/quickstart_simple_transformation_Request");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        ObjectMessage tm = session.createObjectMessage(msg);        
-        send.send(tm);        
-        send.close();
-    }
-    public String readAsciiFile(String fileName) throws IOException {
-		  FileReader fr = null;
-		  char[] thechars = null;
-
-		  try {
-			  File thefile = new File( fileName );
-			  fr = new FileReader( thefile );
-			  int size = (int) thefile.length();
-			  thechars = new char[size];
-		
-			  int count, index = 0;
-		
-			  // 	read in the bytes from the input stream
-			  while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
-				  size -= count;
-				  index += count;
-			  }
-			} catch(Exception e) {	
-				System.out.println(e);
-			}
-			finally {
-				if( fr != null )
-		        fr.close();
-			}
-			return new String(thechars);
-
-    } // readAsciiFile
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	String fileContent = sm.readAsciiFile("SampleOrder.xml");
-    	System.out.println("---------------------------------------------");
-    	System.out.println(fileContent);
-    	System.out.println("---------------------------------------------");
-    	sm.sendAMessage(fileContent); 
-    	sm.stop();
-    	
-    }
-    
+package quickstart.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/quickstart_simple_transformation_Request");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);        
+        send.send(tm);        
+        send.close();
+    }
+    public String readAsciiFile(String fileName) throws IOException {
+		  FileReader fr = null;
+		  char[] thechars = null;
+
+		  try {
+			  File thefile = new File( fileName );
+			  fr = new FileReader( thefile );
+			  int size = (int) thefile.length();
+			  thechars = new char[size];
+		
+			  int count, index = 0;
+		
+			  // 	read in the bytes from the input stream
+			  while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
+				  size -= count;
+				  index += count;
+			  }
+			} catch(Exception e) {	
+				System.out.println(e);
+			}
+			finally {
+				if( fr != null )
+		        fr.close();
+			}
+			return new String(thechars);
+
+    } // readAsciiFile
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	String fileContent = sm.readAsciiFile("SampleOrder.xml");
+    	System.out.println("---------------------------------------------");
+    	System.out.println(fileContent);
+    	System.out.println("---------------------------------------------");
+    	sm.sendAMessage(fileContent); 
+    	sm.stop();
+    	
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/src/quickstart/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/SampleOrder.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/base-build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/base-build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/base-build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,52 +1,52 @@
-<project name="Base" default="run" basedir=".">
-
-	<property file="../quickstarts.properties" />
-
-	<property name="classes" value="build/classes" />
-
-	<path id="compile-classpath">
-		<fileset dir="lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
-		<fileset dir="../../../lib/ext" includes="*.jar" /> <!-- Product Dependencies. -->
-		<fileset dir="${esb.product.lib.dir}" includes="*.jar" /> <!-- Product Jars. -->
-	</path>
-	<path id="exec-classpath">
-		<pathelement location="." />
-		<fileset dir="build" includes="${ant.project.name}.jar" />
-		<path refid="compile-classpath" />
-		<fileset dir="${jbosshome.dir}/server/default/lib" includes="jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
-	</path>
-
-	<target name="compile" depends="clean">
-		<mkdir dir="${classes}" />
-		<javac srcdir="src" destdir="${classes}">
-			<classpath refid="compile-classpath" />
-		</javac>
-		<jar basedir="${classes}" destfile="build/${ant.project.name}.jar" />
-	</target>
-
-	<target name="run" depends="compile">
-		<echo>Launching Quickstart in standalone mode...</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
-			<arg value="jbossesb.xml" />
-			<classpath refid="exec-classpath" />
-		</java>
-	</target>
-
-	<target name="deployToSAR">
-		<echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-		<copy file="build/${ant.project.name}.jar" overwrite="true" todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar" />
-		<copy file="jbossesb.xml" overwrite="true" todir="${jbosshome.dir}/server/default/conf" />
-		<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml" />
-		<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
-	</target>
-
-	<target name="echoCP">
-		<property name="cp" refid="exec-classpath" />
-		<echo message="Classpath is ${cp}" />
-	</target>
-
-	<target name="clean">
-		<delete dir="build" />
-	</target>
+<project name="Base" default="run" basedir=".">
 
+	<property file="../quickstarts.properties" />
+
+	<property name="classes" value="build/classes" />
+
+	<path id="compile-classpath">
+		<fileset dir="lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
+		<fileset dir="../../../lib/ext" includes="*.jar" /> <!-- Product Dependencies. -->
+		<fileset dir="${esb.product.lib.dir}" includes="*.jar" /> <!-- Product Jars. -->
+	</path>
+	<path id="exec-classpath">
+		<pathelement location="." />
+		<fileset dir="build" includes="${ant.project.name}.jar" />
+		<path refid="compile-classpath" />
+		<fileset dir="${jbosshome.dir}/server/default/lib" includes="jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
+	</path>
+
+	<target name="compile" depends="clean">
+		<mkdir dir="${classes}" />
+		<javac srcdir="src" destdir="${classes}">
+			<classpath refid="compile-classpath" />
+		</javac>
+		<jar basedir="${classes}" destfile="build/${ant.project.name}.jar" />
+	</target>
+
+	<target name="run" depends="compile">
+		<echo>Launching Quickstart in standalone mode...</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
+			<arg value="jbossesb.xml" />
+			<classpath refid="exec-classpath" />
+		</java>
+	</target>
+
+	<target name="deployToSAR">
+		<echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+		<copy file="build/${ant.project.name}.jar" overwrite="true" todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar" />
+		<copy file="jbossesb.xml" overwrite="true" todir="${jbosshome.dir}/server/default/conf" />
+		<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml" />
+		<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
+	</target>
+
+	<target name="echoCP">
+		<property name="cp" refid="exec-classpath" />
+		<echo message="Classpath is ${cp}" />
+	</target>
+
+	<target name="clean">
+		<delete dir="build" />
+	</target>
+
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/base-build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,17 +1,17 @@
-<project name="transformation-string-manipulation-quickstart" default="run" basedir=".">
-	
-	<!-- Import the base Ant build script... -->
-	<import file="base-build.xml"/>
-
-	<!-- The ESB itself is started by the default "run" target - defined in base-build.xml  -->
-	
-	<!-- Target for injecting the sample order message for transformation... -->
-	<target name="runtest">
-		<echo>Runs Test JMS Sender</echo>
-		<java fork="yes" classname="quickstart.helloworld.test.SendJMSMessage" failonerror="true">
-			<arg value="SampleOrder.xml" />
-			<classpath refid="exec-classpath" />
-		</java>
-	</target>
-
+<project name="transformation-string-manipulation-quickstart" default="run" basedir=".">
+	
+	<!-- Import the base Ant build script... -->
+	<import file="base-build.xml"/>
+
+	<!-- The ESB itself is started by the default "run" target - defined in base-build.xml  -->
+	
+	<!-- Target for injecting the sample order message for transformation... -->
+	<target name="runtest">
+		<echo>Runs Test JMS Sender</echo>
+		<java fork="yes" classname="quickstart.helloworld.test.SendJMSMessage" failonerror="true">
+			<arg value="SampleOrder.xml" />
+			<classpath refid="exec-classpath" />
+		</java>
+	</target>
+
 </project>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,47 +1,47 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
+<?xml version = "1.0" encoding = "UTF-8"?>
 <jbossesb
-	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5">
-
-	<providers>
+	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/A" />
-			</jms-bus>
-			<jms-bus busid="quickstartEsbChannel">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/B" />
-			</jms-bus>
-
-		</jms-provider>
-	</providers>
-
-	<services>
+			jndi-URL="localhost">
+
+			<jms-bus busid="quickstartGwChannel">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/A" />
+			</jms-bus>
+			<jms-bus busid="quickstartEsbChannel">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/B" />
+			</jms-bus>
+
+		</jms-provider>
+	</providers>
+
+	<services>
 		<service category="FirstServicesGW" name="SimpleJMSGateway"
 			description="Hello World(gateway)" is-gateway="true"
 			target-service-category="FirstServiceESB"
-			target-service-name="SimpleListener">
-			<listeners>
-				<jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" />
-			</listeners>
-		</service>
-
+			target-service-name="SimpleListener">
+			<listeners>
+				<jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" />
+			</listeners>
+		</service>
+
 		<service category="FirstServiceESB" name="SimpleListener"
-			description="Hello World" is-gateway="false">
-			<listeners>
-				<jms-listener name="quickstart" busidref="quickstartEsbChannel" maxThreads="1" />
-			</listeners>
-			<actions>
+			description="Hello World" is-gateway="false">
+			<listeners>
+				<jms-listener name="quickstart" busidref="quickstartEsbChannel" maxThreads="1" />
+			</listeners>
+			<actions>
 				<action name="transform" class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
 					<property name="from" value="A" />
 					<property name="from-type" value="text/xml:messageAtA" />
 					<property name="to" value="B" />
 					<property name="to-type" value="text/xml:messageAtB" />
-				</action>
-			</actions>
-		</service>
-	</services>
-
-</jbossesb>
+				</action>
+			</actions>
+		</service>
+	</services>
+
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -34,24 +34,24 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
+   </category>
    <category name="org.jboss.soa.esb.actions.converters.SmooksTransformer">
       <priority value="DEBUG"/>
    </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.apache">
+      <priority value="ERROR"/>
    </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/smooks-res.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/quickstart/helloworld/test/OrderDate.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/quickstart/helloworld/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/quickstart/helloworld/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/quickstart/helloworld/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,73 +1,73 @@
-package quickstart.helloworld.test;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.milyn.io.StreamUtils;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/A");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String fileName) throws JMSException, FileNotFoundException, IOException {
-    	
-        QueueSender send = session.createSender(que);
-        ObjectMessage tm;
-        File file = new File(fileName);
-        
-        if(!file.exists()) {
-        	throw new IllegalArgumentException("Input message file [" + file.getAbsolutePath() + "] not found.");
-        }
-        
-        String message = new String(StreamUtils.readStream(new FileInputStream(file)));
-        
-        tm = session.createObjectMessage(message);
-        send.send(tm);        
-        send.close();
-        
-        System.out.println("*** Switch back to the ESB Java console now to see '" + fileName + "' before and after the transformation...");
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    }
-    
+package quickstart.helloworld.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.milyn.io.StreamUtils;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/A");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String fileName) throws JMSException, FileNotFoundException, IOException {
+    	
+        QueueSender send = session.createSender(que);
+        ObjectMessage tm;
+        File file = new File(fileName);
+        
+        if(!file.exists()) {
+        	throw new IllegalArgumentException("Input message file [" + file.getAbsolutePath() + "] not found.");
+        }
+        
+        String message = new String(StreamUtils.readStream(new FileInputStream(file)));
+        
+        tm = session.createObjectMessage(message);
+        send.send(tm);        
+        send.close();
+        
+        System.out.println("*** Switch back to the ESB Java console now to see '" + fileName + "' before and after the transformation...");
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/quickstart/helloworld/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/SampleOrder.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/base-build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/base-build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/base-build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,52 +1,52 @@
-<project name="Base" default="run" basedir=".">
-
-	<property file="../quickstarts.properties" />
-
-	<property name="classes" value="build/classes" />
-
-	<path id="compile-classpath">
-		<fileset dir="lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
-		<fileset dir="../../../lib/ext" includes="*.jar" /> <!-- Product Dependencies. -->
-		<fileset dir="${esb.product.lib.dir}" includes="*.jar" /> <!-- Product Jars. -->
-	</path>
-	<path id="exec-classpath">
-		<pathelement location="." />
-		<fileset dir="build" includes="${ant.project.name}.jar" />
-		<path refid="compile-classpath" />
-		<fileset dir="${jbosshome.dir}/server/default/lib" includes="jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
-	</path>
-
-	<target name="compile" depends="clean">
-		<mkdir dir="${classes}" />
-		<javac srcdir="src" destdir="${classes}">
-			<classpath refid="compile-classpath" />
-		</javac>
-		<jar basedir="${classes}" destfile="build/${ant.project.name}.jar" />
-	</target>
-
-	<target name="run" depends="compile">
-		<echo>Launching Quickstart in standalone mode...</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
-			<arg value="jbossesb.xml" />
-			<classpath refid="exec-classpath" />
-		</java>
-	</target>
-
-	<target name="deployToSAR">
-		<echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
-		<copy file="build/${ant.project.name}.jar" overwrite="true" todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar" />
-		<copy file="jbossesb.xml" overwrite="true" todir="${jbosshome.dir}/server/default/conf" />
-		<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml" />
-		<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
-	</target>
-
-	<target name="echoCP">
-		<property name="cp" refid="exec-classpath" />
-		<echo message="Classpath is ${cp}" />
-	</target>
-
-	<target name="clean">
-		<delete dir="build" />
-	</target>
+<project name="Base" default="run" basedir=".">
 
+	<property file="../quickstarts.properties" />
+
+	<property name="classes" value="build/classes" />
+
+	<path id="compile-classpath">
+		<fileset dir="lib" includes="*.jar" /> <!-- Quickstart Specific Jars. -->
+		<fileset dir="../../../lib/ext" includes="*.jar" /> <!-- Product Dependencies. -->
+		<fileset dir="${esb.product.lib.dir}" includes="*.jar" /> <!-- Product Jars. -->
+	</path>
+	<path id="exec-classpath">
+		<pathelement location="." />
+		<fileset dir="build" includes="${ant.project.name}.jar" />
+		<path refid="compile-classpath" />
+		<fileset dir="${jbosshome.dir}/server/default/lib" includes="jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
+	</path>
+
+	<target name="compile" depends="clean">
+		<mkdir dir="${classes}" />
+		<javac srcdir="src" destdir="${classes}">
+			<classpath refid="compile-classpath" />
+		</javac>
+		<jar basedir="${classes}" destfile="build/${ant.project.name}.jar" />
+	</target>
+
+	<target name="run" depends="compile">
+		<echo>Launching Quickstart in standalone mode...</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
+			<arg value="jbossesb.xml" />
+			<classpath refid="exec-classpath" />
+		</java>
+	</target>
+
+	<target name="deployToSAR">
+		<echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+		<copy file="build/${ant.project.name}.jar" overwrite="true" todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar" />
+		<copy file="jbossesb.xml" overwrite="true" todir="${jbosshome.dir}/server/default/conf" />
+		<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml" />
+		<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
+	</target>
+
+	<target name="echoCP">
+		<property name="cp" refid="exec-classpath" />
+		<echo message="Classpath is ${cp}" />
+	</target>
+
+	<target name="clean">
+		<delete dir="build" />
+	</target>
+
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/base-build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,17 +1,17 @@
-<project name="transformation-simple-quickstart" default="run" basedir=".">
-	
-	<!-- Import the base Ant build script... -->
-	<import file="base-build.xml"/>
-
-	<!-- The ESB itself is started by the default "run" target - defined in base-build.xml  -->
-	
-	<!-- Target for injecting the sample order message for transformation... -->
-	<target name="runtest">
-		<echo>Runs Test JMS Sender</echo>
-		<java fork="yes" classname="quickstart.helloworld.test.SendJMSMessage" failonerror="true">
-			<arg value="SampleOrder.xml" />
-			<classpath refid="exec-classpath" />
-		</java>
-	</target>
-
+<project name="transformation-simple-quickstart" default="run" basedir=".">
+	
+	<!-- Import the base Ant build script... -->
+	<import file="base-build.xml"/>
+
+	<!-- The ESB itself is started by the default "run" target - defined in base-build.xml  -->
+	
+	<!-- Target for injecting the sample order message for transformation... -->
+	<target name="runtest">
+		<echo>Runs Test JMS Sender</echo>
+		<java fork="yes" classname="quickstart.helloworld.test.SendJMSMessage" failonerror="true">
+			<arg value="SampleOrder.xml" />
+			<classpath refid="exec-classpath" />
+		</java>
+	</target>
+
 </project>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,47 +1,47 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
+<?xml version = "1.0" encoding = "UTF-8"?>
 <jbossesb
-	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5">
-
-	<providers>
+	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-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="quickstartGwChannel">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/A" />
-			</jms-bus>
-			<jms-bus busid="quickstartEsbChannel">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/B" />
-			</jms-bus>
-
-		</jms-provider>
-	</providers>
-
-	<services>
+			jndi-URL="localhost">
+
+			<jms-bus busid="quickstartGwChannel">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/A" />
+			</jms-bus>
+			<jms-bus busid="quickstartEsbChannel">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/B" />
+			</jms-bus>
+
+		</jms-provider>
+	</providers>
+
+	<services>
 		<service category="FirstServicesGW" name="SimpleJMSGateway"
 			description="Hello World(gateway)" is-gateway="true"
 			target-service-category="FirstServiceESB"
-			target-service-name="SimpleListener">
-			<listeners>
-				<jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" />
-			</listeners>
-		</service>
-
+			target-service-name="SimpleListener">
+			<listeners>
+				<jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" maxThreads="1" />
+			</listeners>
+		</service>
+
 		<service category="FirstServiceESB" name="SimpleListener"
-			description="Hello World" is-gateway="false">
-			<listeners>
-				<jms-listener name="quickstart" busidref="quickstartEsbChannel" maxThreads="1" />
-			</listeners>
-			<actions>
+			description="Hello World" is-gateway="false">
+			<listeners>
+				<jms-listener name="quickstart" busidref="quickstartEsbChannel" maxThreads="1" />
+			</listeners>
+			<actions>
 				<action name="transform" class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
 					<property name="from" value="A" />
 					<property name="from-type" value="text/xml:messageAtA" />
 					<property name="to" value="B" />
 					<property name="to-type" value="text/xml:messageAtB" />
-				</action>
-			</actions>
-		</service>
-	</services>
-
-</jbossesb>
+				</action>
+			</actions>
+		</service>
+	</services>
+
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
 juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -34,24 +34,24 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
+   </category>
    <category name="org.jboss.soa.esb.actions.converters.SmooksTransformer">
       <priority value="DEBUG"/>
    </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.apache">
+      <priority value="ERROR"/>
    </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/smooks-res.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/src/quickstart/helloworld/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/src/quickstart/helloworld/test/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/src/quickstart/helloworld/test/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,73 +1,73 @@
-package quickstart.helloworld.test;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.milyn.io.StreamUtils;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/A");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String fileName) throws JMSException, FileNotFoundException, IOException {
-    	
-        QueueSender send = session.createSender(que);
-        ObjectMessage tm;
-        File file = new File(fileName);
-        
-        if(!file.exists()) {
-        	throw new IllegalArgumentException("Input message file [" + file.getAbsolutePath() + "] not found.");
-        }
-        
-        String message = new String(StreamUtils.readStream(new FileInputStream(file)));
-        
-        tm = session.createObjectMessage(message);
-        send.send(tm);        
-        send.close();
-        
-        System.out.println("*** Switch back to the ESB Java console now to see '" + fileName + "' before and after the transformation...");
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    }
-    
+package quickstart.helloworld.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.milyn.io.StreamUtils;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/A");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String fileName) throws JMSException, FileNotFoundException, IOException {
+    	
+        QueueSender send = session.createSender(que);
+        ObjectMessage tm;
+        File file = new File(fileName);
+        
+        if(!file.exists()) {
+        	throw new IllegalArgumentException("Input message file [" + file.getAbsolutePath() + "] not found.");
+        }
+        
+        String message = new String(StreamUtils.readStream(new FileInputStream(file)));
+        
+        tm = session.createObjectMessage(message);
+        send.send(tm);        
+        send.close();
+        
+        System.out.println("*** Switch back to the ESB Java console now to see '" + fileName + "' before and after the transformation...");
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/src/quickstart/helloworld/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,4 +1,4 @@
-jms.provider.url=localhost
-file.monitored.directory=c:\Users\dbrum\workspace\trunk\product\samples\trailblazer\banks\monitored_folders\input
-jms.queue.in=queue/esb-tb-bankRequest
-jms.queue.out=queue/esb-tb-bankResponse
+jms.provider.url=localhost
+file.monitored.directory=c:\Users\dbrum\workspace\trunk\product\samples\trailblazer\banks\monitored_folders\input
+jms.queue.in=queue/esb-tb-bankRequest
+jms.queue.out=queue/esb-tb-bankResponse


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,121 +1,121 @@
-<project name="BANKS" default="compile" basedir=".">
-
-	<property file="bank.properties"/>
-	<!-- Some default build locations -->
-	<property name="org.jboss.esb.ext.lib.dir"                               value="../../../lib/ext"/>
-	<property name="org.jboss.esb.samples.loanbroker.banks.dest"             value="${basedir}/build"/>
-	<property name="org.jboss.esb.samples.loanbroker.banks.classes.dir"      value="${basedir}/build/classes/banks/"/>
-	<property name="org.jboss.esb.samples.loanbroker.banks.testclasses.dir"  value="${basedir}/build/classes/tests/"/>
-	<property name="org.jboss.esb.samples.loanbroker.banks.src.dir"          value="${basedir}/src"/>
-	<property name="org.jboss.esb.samples.loanbroker.banks.test.dir"         value="${basedir}/test"/>
-	<property name="org.jboss.esb.samples.loanbroker.banks.jar.dest"         value="${basedir}/build/dist/lib/"/>
-	<property name="org.jboss.esb.samples.loanbroker.banks.lib.ext.dir"      value="${basedir}/lib/ext"/>
-	<property name="org.jboss.esb.samples.loanbroker.banks.tests.report.dir" value="${basedir}/build/tests"/>
-		
-	<path id="org.jboss.esb.samples.loanbroker.banks.classpath">
-	    <fileset dir="${org.jboss.esb.samples.loanbroker.banks.lib.ext.dir}" includes="*.jar"/>
-		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="log4j.jar jbossall-client.jar xstream-1.1.3.jar junit-4.1.jar"/>
-	</path>
-	<path id="org.jboss.esb.samples.loanbroker.banks.testclasspath">
-	    <fileset dir="${org.jboss.esb.samples.loanbroker.banks.lib.ext.dir}" includes="*.jar"/>
-		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="log4j.jar jbossall-client.jar xstream-1.1.3.jar junit-4.1.jar"/>
-	    <pathelement location="${org.jboss.esb.samples.loanbroker.banks.classes.dir}"/>
-		<pathelement location="${org.jboss.esb.samples.loanbroker.banks.testclasses.dir}"/>
-		<pathelement location="."/>
-	</path>
-	
-	<target name="clean">
-		<delete dir="${org.jboss.esb.samples.loanbroker.banks.dest}" />
-	</target>
-	<!-- =================================================================== -->
-	<!-- Prepares the directory structure                                    -->
-    <!-- =================================================================== -->
-    <target name="org.jboss.esb.samples.loanbroker.banks.prepare">
-    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}"/>
-    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/dist"/>
-		<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/classes/banks"/>
-    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/classes/tests"/>
-    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/tests"/>
-		<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib"/>
-    </target>
-	
-	<!-- Compilation targets -->
-	<target name="org.jboss.esb.samples.loanbroker.banks.compile" depends="org.jboss.esb.samples.loanbroker.banks.prepare"
-		description="Compile all classes">
-
-		        <javac
-		            destdir="${org.jboss.esb.samples.loanbroker.banks.classes.dir}"
-		            classpathref="org.jboss.esb.samples.loanbroker.banks.classpath"
-		        	debug="true"
-		        	>
-		            <src path="${org.jboss.esb.samples.loanbroker.banks.src.dir}"/>
-		        </javac>
-				<javac
-		            destdir="${org.jboss.esb.samples.loanbroker.banks.testclasses.dir}"
-					debug="true"
-					classpathref="org.jboss.esb.samples.loanbroker.banks.testclasspath"
-		    		>
-		            <src path="${org.jboss.esb.samples.loanbroker.banks.test.dir}"/>
-		        </javac>
-	</target>
-
-    <!-- javadocs paths -->
-	<path id="org.jboss.esb.samples.loanbroker.banks.javadocs.path">
-		<pathelement path="esb/classes"/>
-	</path>
-
-	<!-- Jar targets -->
-	<target name="org.jboss.esb.samples.loanbroker.banks.jar" depends="org.jboss.esb.samples.loanbroker.banks.compile">
-		<echo message="Building jar file"/>
-		<delete file="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib/bank.jar" />
-        <jar    destfile="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib/bank.jar" 
-                basedir="${org.jboss.esb.samples.loanbroker.banks.classes.dir}" 
-                includes="**/*.class"
-                />
-	</target>
-	
-	<target name="runJMSBank" depends="org.jboss.esb.samples.loanbroker.banks.jar">
-		<echo>Running JMS Based Bank</echo>
-		<echo>Note that your app-server on host: localhost needs to be up and running!</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.loanbroker.banks.ManagerJMS" failonerror="true">
-			<arg value="${jms.provider.url}"/>
-			<arg value="${jms.queue.in}"/>
-		    <arg value="${jms.queue.out}"/>
-			<classpath refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
-		</java>
-	</target>	
-	
-	<target name="runFileBank" depends="org.jboss.esb.samples.loanbroker.banks.jar">
-		<echo>Running File Based Bank</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.loanbroker.banks.ManagerFlatFile" failonerror="true" args="${file.monitored.directory}">
-			<classpath refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
-		</java>
-	</target>	
-	
-	<!-- Short target names -->
-	<target name="compile" depends="org.jboss.esb.samples.loanbroker.banks.compile"/>
-    <target name="test" depends="org.jboss.esb.samples.loanbroker.banks.test"/>
-    <target name="jar" depends="org.jboss.esb.samples.loanbroker.banks.jar"/>
-	
-    <!-- ====================================================================== -->
-    <!--         U N I T   T E S T S                                            -->
-    <!-- ====================================================================== -->
-    <target name="org.jboss.esb.samples.loanbroker.banks.test" depends="org.jboss.esb.samples.loanbroker.banks.compile">
-        <echo message="Running tests for banks"/>
-        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
-            <formatter type="plain" usefile="false"/>
-            <formatter type="xml"/>
-            <batchtest todir="${org.jboss.esb.samples.loanbroker.banks.tests.report.dir}">
-                <fileset dir="${org.jboss.esb.samples.loanbroker.banks.test.dir}">
-                    <include name="**/**Test.java"/>
-                </fileset>
-            </batchtest>
-            <classpath>
-            	<!-- Need the tests src folder because there may be non-compiled test resources -->
-                <pathelement location="${org.jboss.esb.samples.loanbroker.banks.test.dir}"/>
-                <path refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
-            </classpath>
-        </junit>
-    </target>
-
-</project>
+<project name="BANKS" default="compile" basedir=".">
+
+	<property file="bank.properties"/>
+	<!-- Some default build locations -->
+	<property name="org.jboss.esb.ext.lib.dir"                               value="../../../lib/ext"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.dest"             value="${basedir}/build"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.classes.dir"      value="${basedir}/build/classes/banks/"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.testclasses.dir"  value="${basedir}/build/classes/tests/"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.src.dir"          value="${basedir}/src"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.test.dir"         value="${basedir}/test"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.jar.dest"         value="${basedir}/build/dist/lib/"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.lib.ext.dir"      value="${basedir}/lib/ext"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.tests.report.dir" value="${basedir}/build/tests"/>
+		
+	<path id="org.jboss.esb.samples.loanbroker.banks.classpath">
+	    <fileset dir="${org.jboss.esb.samples.loanbroker.banks.lib.ext.dir}" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="log4j.jar jbossall-client.jar xstream-1.1.3.jar junit-4.1.jar"/>
+	</path>
+	<path id="org.jboss.esb.samples.loanbroker.banks.testclasspath">
+	    <fileset dir="${org.jboss.esb.samples.loanbroker.banks.lib.ext.dir}" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="log4j.jar jbossall-client.jar xstream-1.1.3.jar junit-4.1.jar"/>
+	    <pathelement location="${org.jboss.esb.samples.loanbroker.banks.classes.dir}"/>
+		<pathelement location="${org.jboss.esb.samples.loanbroker.banks.testclasses.dir}"/>
+		<pathelement location="."/>
+	</path>
+	
+	<target name="clean">
+		<delete dir="${org.jboss.esb.samples.loanbroker.banks.dest}" />
+	</target>
+	<!-- =================================================================== -->
+	<!-- Prepares the directory structure                                    -->
+    <!-- =================================================================== -->
+    <target name="org.jboss.esb.samples.loanbroker.banks.prepare">
+    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}"/>
+    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/dist"/>
+		<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/classes/banks"/>
+    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/classes/tests"/>
+    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/tests"/>
+		<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib"/>
+    </target>
+	
+	<!-- Compilation targets -->
+	<target name="org.jboss.esb.samples.loanbroker.banks.compile" depends="org.jboss.esb.samples.loanbroker.banks.prepare"
+		description="Compile all classes">
+
+		        <javac
+		            destdir="${org.jboss.esb.samples.loanbroker.banks.classes.dir}"
+		            classpathref="org.jboss.esb.samples.loanbroker.banks.classpath"
+		        	debug="true"
+		        	>
+		            <src path="${org.jboss.esb.samples.loanbroker.banks.src.dir}"/>
+		        </javac>
+				<javac
+		            destdir="${org.jboss.esb.samples.loanbroker.banks.testclasses.dir}"
+					debug="true"
+					classpathref="org.jboss.esb.samples.loanbroker.banks.testclasspath"
+		    		>
+		            <src path="${org.jboss.esb.samples.loanbroker.banks.test.dir}"/>
+		        </javac>
+	</target>
+
+    <!-- javadocs paths -->
+	<path id="org.jboss.esb.samples.loanbroker.banks.javadocs.path">
+		<pathelement path="esb/classes"/>
+	</path>
+
+	<!-- Jar targets -->
+	<target name="org.jboss.esb.samples.loanbroker.banks.jar" depends="org.jboss.esb.samples.loanbroker.banks.compile">
+		<echo message="Building jar file"/>
+		<delete file="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib/bank.jar" />
+        <jar    destfile="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib/bank.jar" 
+                basedir="${org.jboss.esb.samples.loanbroker.banks.classes.dir}" 
+                includes="**/*.class"
+                />
+	</target>
+	
+	<target name="runJMSBank" depends="org.jboss.esb.samples.loanbroker.banks.jar">
+		<echo>Running JMS Based Bank</echo>
+		<echo>Note that your app-server on host: localhost needs to be up and running!</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.loanbroker.banks.ManagerJMS" failonerror="true">
+			<arg value="${jms.provider.url}"/>
+			<arg value="${jms.queue.in}"/>
+		    <arg value="${jms.queue.out}"/>
+			<classpath refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
+		</java>
+	</target>	
+	
+	<target name="runFileBank" depends="org.jboss.esb.samples.loanbroker.banks.jar">
+		<echo>Running File Based Bank</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.loanbroker.banks.ManagerFlatFile" failonerror="true" args="${file.monitored.directory}">
+			<classpath refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
+		</java>
+	</target>	
+	
+	<!-- Short target names -->
+	<target name="compile" depends="org.jboss.esb.samples.loanbroker.banks.compile"/>
+    <target name="test" depends="org.jboss.esb.samples.loanbroker.banks.test"/>
+    <target name="jar" depends="org.jboss.esb.samples.loanbroker.banks.jar"/>
+	
+    <!-- ====================================================================== -->
+    <!--         U N I T   T E S T S                                            -->
+    <!-- ====================================================================== -->
+    <target name="org.jboss.esb.samples.loanbroker.banks.test" depends="org.jboss.esb.samples.loanbroker.banks.compile">
+        <echo message="Running tests for banks"/>
+        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
+            <formatter type="plain" usefile="false"/>
+            <formatter type="xml"/>
+            <batchtest todir="${org.jboss.esb.samples.loanbroker.banks.tests.report.dir}">
+                <fileset dir="${org.jboss.esb.samples.loanbroker.banks.test.dir}">
+                    <include name="**/**Test.java"/>
+                </fileset>
+            </batchtest>
+            <classpath>
+            	<!-- Need the tests src folder because there may be non-compiled test resources -->
+                <pathelement location="${org.jboss.esb.samples.loanbroker.banks.test.dir}"/>
+                <path refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
+            </classpath>
+        </junit>
+    </target>
+
+</project>


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,117 +1,117 @@
-/*
-* 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.samples.loanbroker.banks;
-
-import java.math.BigDecimal;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-
-/**
- * This Bank is pretty well focussed on doing one thing, which is giving out loans. On the 
- * reception of a BankQuoteRequest it will compute the interest rate it will return
- * in the BankQuoteReply.
- * 
- * Each bank instance can be customized using the parameters bankName, RatePremium and MaxLoanTerm.
- * 
- * @author kstam
- *
- */
-public class Bank 
-{
-	private Logger logger = Logger.getLogger(this.getClass());
-	
-	private static final BigDecimal PRIME_RATE            = BigDecimal.valueOf(8.0);
-	private static final BigDecimal DEFAULT_RATE_PREMIUM  = BigDecimal.valueOf(0.5);
-	private static final int        DEFAULT_MAX_LOAN_TERM = 30;
-	private static final String     DEFAULT_BANK_NAME     = "DefaultBank";
-	private static int _quoteCounter                      = 0;
-	
-	//Default values for bank
-	private String bankName                               = DEFAULT_BANK_NAME;
-	private BigDecimal ratePremium                        = DEFAULT_RATE_PREMIUM;
-	private int maxLoanTerm                               = DEFAULT_MAX_LOAN_TERM;
-
-	/** 
-	 * The Bank's constructor.
-	 * 
-	 * @param bankName    - the name of the bank
-	 * @param ratePremium - the premium it charges for the loan
-	 * @param maxLoanTerm - the maximum loan term
-	 */
-	public Bank(String bankName, BigDecimal ratePremium, int maxLoanTerm) {
-		super();
-		if (bankName!=null) {
-			this.bankName=bankName;
-		}
-		if (ratePremium!=null) {
-			this.ratePremium=ratePremium;
-		}
-		if (maxLoanTerm > 0) {
-			this.maxLoanTerm=maxLoanTerm;
-		}
-	}
-	/**
-	 * The bank computes the interest rate based on configuration parameters of the bank and
-	 * the information in the {@link BankQuoteRequest.
-	 * @param bankQuoteRequest - the bank quote request containing requests parameters
-	 * @return bankQuoteReply  - the bank quote replay contaning the interest rate
-	 */
-	private BankQuoteReply computeBankQuoteReply(BankQuoteRequest bankQuoteRequest)
-	{
-		BankQuoteReply bankQuoteReply = new BankQuoteReply();
-		if (bankQuoteRequest.loanTerm <= maxLoanTerm) {
-			BigDecimal interestRate=BigDecimal.valueOf((bankQuoteRequest.loanTerm/12.0)/10.0);
-			interestRate=PRIME_RATE.add(ratePremium).add(interestRate);
-			bankQuoteReply.setInterestRate(interestRate.setScale(2, BigDecimal.ROUND_HALF_UP));
-			bankQuoteReply.setErrorCode(0);
-		} else {
-			bankQuoteReply.setInterestRate(BigDecimal.valueOf(0.00).setScale(2, BigDecimal.ROUND_HALF_UP));
-			bankQuoteReply.setErrorCode(1);
-		}
-		String quoteId=bankName + "-" + _quoteCounter++;
-		bankQuoteReply.setQuoteId(quoteId);
-		bankQuoteReply.setCustomerUID(bankQuoteRequest.getCustomerUID());
-		return bankQuoteReply;
-	}
-	/**
-	 * Processes the Loan Quote request and returns the banks reply.
-	 * 
-	 * @param bankQuoteRequest - the bank quote request
-	 * @return bankQuoteReply  - the bank quote reply
-	 */
-	protected BankQuoteReply processMessage(BankQuoteRequest bankQuoteRequest)
-	{
-		logger.log(Priority.INFO, "Bank '" + bankName + "' received a request for SSN=" 
-				+ bankQuoteRequest.getSsn()
-				+ " for $" + bankQuoteRequest.loanAmount 
-				+ " over " + bankQuoteRequest.loanTerm + " months.");
-		logger.log(Priority.DEBUG, bankQuoteRequest);
-		
-		BankQuoteReply bankQuoteReply = computeBankQuoteReply(bankQuoteRequest);
-		logger.log(Priority.INFO, "Bank '" + bankName + " offers SSN=" 
-				+ bankQuoteRequest.getSsn() + " " + bankQuoteReply);
-		
-		return bankQuoteReply;
-	}
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import java.math.BigDecimal;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+
+/**
+ * This Bank is pretty well focussed on doing one thing, which is giving out loans. On the 
+ * reception of a BankQuoteRequest it will compute the interest rate it will return
+ * in the BankQuoteReply.
+ * 
+ * Each bank instance can be customized using the parameters bankName, RatePremium and MaxLoanTerm.
+ * 
+ * @author kstam
+ *
+ */
+public class Bank 
+{
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	private static final BigDecimal PRIME_RATE            = BigDecimal.valueOf(8.0);
+	private static final BigDecimal DEFAULT_RATE_PREMIUM  = BigDecimal.valueOf(0.5);
+	private static final int        DEFAULT_MAX_LOAN_TERM = 30;
+	private static final String     DEFAULT_BANK_NAME     = "DefaultBank";
+	private static int _quoteCounter                      = 0;
+	
+	//Default values for bank
+	private String bankName                               = DEFAULT_BANK_NAME;
+	private BigDecimal ratePremium                        = DEFAULT_RATE_PREMIUM;
+	private int maxLoanTerm                               = DEFAULT_MAX_LOAN_TERM;
+
+	/** 
+	 * The Bank's constructor.
+	 * 
+	 * @param bankName    - the name of the bank
+	 * @param ratePremium - the premium it charges for the loan
+	 * @param maxLoanTerm - the maximum loan term
+	 */
+	public Bank(String bankName, BigDecimal ratePremium, int maxLoanTerm) {
+		super();
+		if (bankName!=null) {
+			this.bankName=bankName;
+		}
+		if (ratePremium!=null) {
+			this.ratePremium=ratePremium;
+		}
+		if (maxLoanTerm > 0) {
+			this.maxLoanTerm=maxLoanTerm;
+		}
+	}
+	/**
+	 * The bank computes the interest rate based on configuration parameters of the bank and
+	 * the information in the {@link BankQuoteRequest.
+	 * @param bankQuoteRequest - the bank quote request containing requests parameters
+	 * @return bankQuoteReply  - the bank quote replay contaning the interest rate
+	 */
+	private BankQuoteReply computeBankQuoteReply(BankQuoteRequest bankQuoteRequest)
+	{
+		BankQuoteReply bankQuoteReply = new BankQuoteReply();
+		if (bankQuoteRequest.loanTerm <= maxLoanTerm) {
+			BigDecimal interestRate=BigDecimal.valueOf((bankQuoteRequest.loanTerm/12.0)/10.0);
+			interestRate=PRIME_RATE.add(ratePremium).add(interestRate);
+			bankQuoteReply.setInterestRate(interestRate.setScale(2, BigDecimal.ROUND_HALF_UP));
+			bankQuoteReply.setErrorCode(0);
+		} else {
+			bankQuoteReply.setInterestRate(BigDecimal.valueOf(0.00).setScale(2, BigDecimal.ROUND_HALF_UP));
+			bankQuoteReply.setErrorCode(1);
+		}
+		String quoteId=bankName + "-" + _quoteCounter++;
+		bankQuoteReply.setQuoteId(quoteId);
+		bankQuoteReply.setCustomerUID(bankQuoteRequest.getCustomerUID());
+		return bankQuoteReply;
+	}
+	/**
+	 * Processes the Loan Quote request and returns the banks reply.
+	 * 
+	 * @param bankQuoteRequest - the bank quote request
+	 * @return bankQuoteReply  - the bank quote reply
+	 */
+	protected BankQuoteReply processMessage(BankQuoteRequest bankQuoteRequest)
+	{
+		logger.log(Priority.INFO, "Bank '" + bankName + "' received a request for SSN=" 
+				+ bankQuoteRequest.getSsn()
+				+ " for $" + bankQuoteRequest.loanAmount 
+				+ " over " + bankQuoteRequest.loanTerm + " months.");
+		logger.log(Priority.DEBUG, bankQuoteRequest);
+		
+		BankQuoteReply bankQuoteReply = computeBankQuoteReply(bankQuoteRequest);
+		logger.log(Priority.INFO, "Bank '" + bankName + " offers SSN=" 
+				+ bankQuoteRequest.getSsn() + " " + bankQuoteReply);
+		
+		return bankQuoteReply;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,166 +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.samples.loanbroker.banks;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-
-public class BankQuoteReply implements Serializable 
-{
-	private static final long serialVersionUID = 1L;
-	
-	private BigDecimal interestRate;
-	private String quoteId;
-	private int errorCode;
-	private String customerUID;
-	private String customerEmail;
-	private String customerSSN;
-	private String customerName;	
-	private String customerAddress;	
-	private String customerSalary;
-	private String loanAmount;
-	private String loanDuration;
-	
-	/**
-	 * Gets the SerialVersionUID.
-	 * @return serialVersionUID
-	 */
-	public static long getSerialVersionUID() {
-		return serialVersionUID;
-	}
-	/**
-	 * Gets the errorCode.
-	 * 	<li>0 - success
-	 *  <li>1 - loan term exceeds the maximum available loan term
-	 *  <li>2 - invalid SSN
-	 *  <li>3 - invalid credit score
-	 *  <li>4 - invalid credit history length
-	 *  <li>5 - invalid loan term
-	 *  <li>6 - invalid message
-	 *  <li>7 - invalid customerUID
-	 * @return errorCode
-	 */
-	public int getErrorCode() {
-		return errorCode;
-	}
-	/**
-	 * Sets the errorCode.
-	 *  <li>0 - success
-	 *  <li>1 - loan term exceeds the maximum available loan term
-	 *  <li>2 - invalid SSN
-	 *  <li>3 - invalid credit score
-	 *  <li>4 - invalid credit history length
-	 *  <li>5 - invalid loan term
-	 * @param errorCode
-	 */
-	public void setErrorCode(int errorCode) {
-		this.errorCode = errorCode;
-	}
-	/**
-	 * Gets the quoted interest rate.
-	 * @return interestRate
-	 */
-	public BigDecimal getInterestRate() {
-		return interestRate;
-	}
-	/**
-	 * Sets the quoted interest rate.
-	 * @param interestRate
-	 */
-	public void setInterestRate(BigDecimal interestRate) {
-		this.interestRate = interestRate;
-	}
-	/**
-	 * Gets the Quote ID.
-	 * @return quoteId
-	 */
-	public String getQuoteId() {
-		return quoteId;
-	}
-	/**
-	 * Sets the quoteId.
-	 * @param quoteId
-	 */
-	public void setQuoteId(String quoteId) {
-		this.quoteId = quoteId;
-	}
-	/**
-	 * Returns a human readable string representation of this object.
-	 * @return toString
-	 */
-	public String toString() {
-		return this.getClass().getSimpleName() + "=["
-			+ "interestRate=" + interestRate
-			+ ", quoteId=" + quoteId
-			+ ", errorCode=" + errorCode 
-			+ ", customerUID=" + customerUID + "]";
-	}
-	public String getCustomerUID() {
-		return customerUID;
-	}
-	public void setCustomerUID(String customerUID) {
-		this.customerUID = customerUID;
-	}
-	public String getCustomerAddress() {
-		return customerAddress;
-	}
-	public void setCustomerAddress(String customerAddress) {
-		this.customerAddress = customerAddress;
-	}
-	public String getCustomerEmail() {
-		return customerEmail;
-	}
-	public void setCustomerEmail(String customerEmail) {
-		this.customerEmail = customerEmail;
-	}
-	public String getCustomerName() {
-		return customerName;
-	}
-	public void setCustomerName(String customerName) {
-		this.customerName = customerName;
-	}
-	public String getCustomerSalary() {
-		return customerSalary;
-	}
-	public void setCustomerSalary(String customerSalary) {
-		this.customerSalary = customerSalary;
-	}
-	public String getCustomerSSN() {
-		return customerSSN;
-	}
-	public void setCustomerSSN(String customerSSN) {
-		this.customerSSN = customerSSN;
-	}
-	public String getLoanAmount() {
-		return loanAmount;
-	}
-	public void setLoanAmount(String loanAmount) {
-		this.loanAmount = loanAmount;
-	}
-	public String getLoanDuration() {
-		return loanDuration;
-	}
-	public void setLoanDuration(String loanDuration) {
-		this.loanDuration = loanDuration;
-	}
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+
+public class BankQuoteReply implements Serializable 
+{
+	private static final long serialVersionUID = 1L;
+	
+	private BigDecimal interestRate;
+	private String quoteId;
+	private int errorCode;
+	private String customerUID;
+	private String customerEmail;
+	private String customerSSN;
+	private String customerName;	
+	private String customerAddress;	
+	private String customerSalary;
+	private String loanAmount;
+	private String loanDuration;
+	
+	/**
+	 * Gets the SerialVersionUID.
+	 * @return serialVersionUID
+	 */
+	public static long getSerialVersionUID() {
+		return serialVersionUID;
+	}
+	/**
+	 * Gets the errorCode.
+	 * 	<li>0 - success
+	 *  <li>1 - loan term exceeds the maximum available loan term
+	 *  <li>2 - invalid SSN
+	 *  <li>3 - invalid credit score
+	 *  <li>4 - invalid credit history length
+	 *  <li>5 - invalid loan term
+	 *  <li>6 - invalid message
+	 *  <li>7 - invalid customerUID
+	 * @return errorCode
+	 */
+	public int getErrorCode() {
+		return errorCode;
+	}
+	/**
+	 * Sets the errorCode.
+	 *  <li>0 - success
+	 *  <li>1 - loan term exceeds the maximum available loan term
+	 *  <li>2 - invalid SSN
+	 *  <li>3 - invalid credit score
+	 *  <li>4 - invalid credit history length
+	 *  <li>5 - invalid loan term
+	 * @param errorCode
+	 */
+	public void setErrorCode(int errorCode) {
+		this.errorCode = errorCode;
+	}
+	/**
+	 * Gets the quoted interest rate.
+	 * @return interestRate
+	 */
+	public BigDecimal getInterestRate() {
+		return interestRate;
+	}
+	/**
+	 * Sets the quoted interest rate.
+	 * @param interestRate
+	 */
+	public void setInterestRate(BigDecimal interestRate) {
+		this.interestRate = interestRate;
+	}
+	/**
+	 * Gets the Quote ID.
+	 * @return quoteId
+	 */
+	public String getQuoteId() {
+		return quoteId;
+	}
+	/**
+	 * Sets the quoteId.
+	 * @param quoteId
+	 */
+	public void setQuoteId(String quoteId) {
+		this.quoteId = quoteId;
+	}
+	/**
+	 * Returns a human readable string representation of this object.
+	 * @return toString
+	 */
+	public String toString() {
+		return this.getClass().getSimpleName() + "=["
+			+ "interestRate=" + interestRate
+			+ ", quoteId=" + quoteId
+			+ ", errorCode=" + errorCode 
+			+ ", customerUID=" + customerUID + "]";
+	}
+	public String getCustomerUID() {
+		return customerUID;
+	}
+	public void setCustomerUID(String customerUID) {
+		this.customerUID = customerUID;
+	}
+	public String getCustomerAddress() {
+		return customerAddress;
+	}
+	public void setCustomerAddress(String customerAddress) {
+		this.customerAddress = customerAddress;
+	}
+	public String getCustomerEmail() {
+		return customerEmail;
+	}
+	public void setCustomerEmail(String customerEmail) {
+		this.customerEmail = customerEmail;
+	}
+	public String getCustomerName() {
+		return customerName;
+	}
+	public void setCustomerName(String customerName) {
+		this.customerName = customerName;
+	}
+	public String getCustomerSalary() {
+		return customerSalary;
+	}
+	public void setCustomerSalary(String customerSalary) {
+		this.customerSalary = customerSalary;
+	}
+	public String getCustomerSSN() {
+		return customerSSN;
+	}
+	public void setCustomerSSN(String customerSSN) {
+		this.customerSSN = customerSSN;
+	}
+	public String getLoanAmount() {
+		return loanAmount;
+	}
+	public void setLoanAmount(String loanAmount) {
+		this.loanAmount = loanAmount;
+	}
+	public String getLoanDuration() {
+		return loanDuration;
+	}
+	public void setLoanDuration(String loanDuration) {
+		this.loanDuration = loanDuration;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,133 +1,133 @@
-/*
-* 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.samples.loanbroker.banks;
-
-import java.io.Serializable;
-
-
-public class BankQuoteRequest implements Serializable 
-{
-	private static final long serialVersionUID = 1L;
-	public int ssn;
-	public int creditScore;
-	public int historyLength;
-	public int loanAmount;
-	public int loanTerm;
-	public String customerUID;
-	public String customerEmail;
-	public String customerSSN;
-	public String customerName;	
-	public String customerAddress;	
-	public String customerSalary;	
-	public String loanDuration;
-	
-	/**
-	 * Gets for the credit score.
-	 * @return credit score
-	 */
-	public int getCreditScore() {
-		return creditScore;
-	}
-	/**
-	 * Sets the credit score.
-	 * @param creditScore
-	 */
-	public void setCreditScore(int creditScore) {
-		this.creditScore = creditScore;
-	}
-	/**
-	 * Gets the credit history length (in months).
-	 * @return credit history length
-	 */
-	public int getHistoryLength() {
-		return historyLength;
-	}
-	/**
-	 * Sets the credit history length (in months).
-	 * @param historyLength
-	 */
-	public void setHistoryLength(int historyLength) {
-		this.historyLength = historyLength;
-	}
-	/**
-	 * Gets the requested loan amount (in dollar).
-	 * @return the loan amount
-	 */
-	public int getLoanAmount() {
-		return loanAmount;
-	}
-	/** 
-	 * Sets the loan amount.
-	 * @param loanAmount - the loan amount (in dollar).
-	 */
-	public void setLoanAmount(int loanAmount) {
-		this.loanAmount = loanAmount;
-	}
-	/**
-	 * Gets the duration of the loan, the term, (in months).
-	 * @return loanTerm
-	 */
-	public int getLoanTerm() {
-		return loanTerm;
-	}
-	/**
-	 * Sets the term (duration) of the loan (in months)
-	 * @param loanTerm
-	 */
-	public void setLoanTerm(int loanTerm) {
-		this.loanTerm = loanTerm;
-	}
-	/** 
-	 * Sets the Social Security Number (SSN).
-	 * @return ssn
-	 */
-	public int getSsn() {
-		return ssn;
-	}
-	/**
-	 * Sets the Social Security Number (SSN).
-	 * @param ssn
-	 */
-	public void setSsn(int ssn) {
-		this.ssn = ssn;
-	}
-	/**
-	 * Returns a human readable string representation of this object.
-	 * @return toString
-	 */
-	public String toString() {
-		return this.getClass().getSimpleName() + "=["
-			+ "ssn=" + ssn
-		    + ", creditScore=" + creditScore
-			+ ", historyLength=" + historyLength
-			+ ", loanAmount=" + loanAmount
-			+ ", loanTerm=" + loanTerm
-			+ ", customerUID="+ customerUID + "]";	
-	}
-	
-	public String getCustomerUID() {
-		return customerUID;
-	}
-	public void setCustomerUID(String customerUID) {
-		this.customerUID = customerUID;
-	}
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import java.io.Serializable;
+
+
+public class BankQuoteRequest implements Serializable 
+{
+	private static final long serialVersionUID = 1L;
+	public int ssn;
+	public int creditScore;
+	public int historyLength;
+	public int loanAmount;
+	public int loanTerm;
+	public String customerUID;
+	public String customerEmail;
+	public String customerSSN;
+	public String customerName;	
+	public String customerAddress;	
+	public String customerSalary;	
+	public String loanDuration;
+	
+	/**
+	 * Gets for the credit score.
+	 * @return credit score
+	 */
+	public int getCreditScore() {
+		return creditScore;
+	}
+	/**
+	 * Sets the credit score.
+	 * @param creditScore
+	 */
+	public void setCreditScore(int creditScore) {
+		this.creditScore = creditScore;
+	}
+	/**
+	 * Gets the credit history length (in months).
+	 * @return credit history length
+	 */
+	public int getHistoryLength() {
+		return historyLength;
+	}
+	/**
+	 * Sets the credit history length (in months).
+	 * @param historyLength
+	 */
+	public void setHistoryLength(int historyLength) {
+		this.historyLength = historyLength;
+	}
+	/**
+	 * Gets the requested loan amount (in dollar).
+	 * @return the loan amount
+	 */
+	public int getLoanAmount() {
+		return loanAmount;
+	}
+	/** 
+	 * Sets the loan amount.
+	 * @param loanAmount - the loan amount (in dollar).
+	 */
+	public void setLoanAmount(int loanAmount) {
+		this.loanAmount = loanAmount;
+	}
+	/**
+	 * Gets the duration of the loan, the term, (in months).
+	 * @return loanTerm
+	 */
+	public int getLoanTerm() {
+		return loanTerm;
+	}
+	/**
+	 * Sets the term (duration) of the loan (in months)
+	 * @param loanTerm
+	 */
+	public void setLoanTerm(int loanTerm) {
+		this.loanTerm = loanTerm;
+	}
+	/** 
+	 * Sets the Social Security Number (SSN).
+	 * @return ssn
+	 */
+	public int getSsn() {
+		return ssn;
+	}
+	/**
+	 * Sets the Social Security Number (SSN).
+	 * @param ssn
+	 */
+	public void setSsn(int ssn) {
+		this.ssn = ssn;
+	}
+	/**
+	 * Returns a human readable string representation of this object.
+	 * @return toString
+	 */
+	public String toString() {
+		return this.getClass().getSimpleName() + "=["
+			+ "ssn=" + ssn
+		    + ", creditScore=" + creditScore
+			+ ", historyLength=" + historyLength
+			+ ", loanAmount=" + loanAmount
+			+ ", loanTerm=" + loanTerm
+			+ ", customerUID="+ customerUID + "]";	
+	}
+	
+	public String getCustomerUID() {
+		return customerUID;
+	}
+	public void setCustomerUID(String customerUID) {
+		this.customerUID = customerUID;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,66 +1,66 @@
-/*
-* 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.samples.loanbroker.banks;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-/**
- * Utility class for reading a file into a String and back.
- * @author kstam
- */
-public class FileUtil {
-    /**
-     * Read the file into a String.
-     * @param file - the file to be read
-     * @return String with the content of the file
-     * @throws IOException - when we can't read the file
-     */
-    public static String readTextFile(File file) throws IOException 
-    {
-        StringBuffer sb = new StringBuffer(1024);
-        BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
-        char[] chars = new char[1];
-        while( (reader.read(chars)) > -1){
-            sb.append(String.valueOf(chars)); 
-            chars = new char[1];
-        }
-        reader.close();
-        return sb.toString();
-    }
-    /**
-     * Write a String into a file.
-     * @param file - File to which we write the String
-     * @param str - string which will be written
-     * @throws IOException - when we can't write to the file
-     */
-    public static void writeTextFile(File file, String str) throws IOException 
-    {
-        BufferedWriter writer = new BufferedWriter(new FileWriter(file.getPath()));
-        writer.write(str);
-        writer.close();
-    }
-
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+/**
+ * Utility class for reading a file into a String and back.
+ * @author kstam
+ */
+public class FileUtil {
+    /**
+     * Read the file into a String.
+     * @param file - the file to be read
+     * @return String with the content of the file
+     * @throws IOException - when we can't read the file
+     */
+    public static String readTextFile(File file) throws IOException 
+    {
+        StringBuffer sb = new StringBuffer(1024);
+        BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
+        char[] chars = new char[1];
+        while( (reader.read(chars)) > -1){
+            sb.append(String.valueOf(chars)); 
+            chars = new char[1];
+        }
+        reader.close();
+        return sb.toString();
+    }
+    /**
+     * Write a String into a file.
+     * @param file - File to which we write the String
+     * @param str - string which will be written
+     * @throws IOException - when we can't write to the file
+     */
+    public static void writeTextFile(File file, String str) throws IOException 
+    {
+        BufferedWriter writer = new BufferedWriter(new FileWriter(file.getPath()));
+        writer.write(str);
+        writer.close();
+    }
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,211 +1,211 @@
-/*
- * 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.samples.loanbroker.banks;
-
-import java.io.File;
-import java.math.BigDecimal;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.apache.log4j.xml.DOMConfigurator;
-import org.sadun.util.polling.BasePollManager;
-import org.sadun.util.polling.CycleEndEvent;
-import org.sadun.util.polling.CycleStartEvent;
-import org.sadun.util.polling.DirectoryLookupEndEvent;
-import org.sadun.util.polling.DirectoryLookupStartEvent;
-import org.sadun.util.polling.DirectoryPoller;
-import org.sadun.util.polling.FileFoundEvent;
-import org.sadun.util.polling.FileSetFoundEvent;
-
-/**
- * The FlatFilePollManager monitors a directory specified in the configuration. When a file arrives it
- * tries to process the content assuming it contains one line with loan request information.
- * So for example the content of the file could read some like <br>23456890,3,4,20000,5<br>
- * The order of values needs to be SocialSecurityNumber, CreditScore, HistoryLength [month], LoanAmount [dollar],
- * and finally the LoanTerm [month]. The request will be processed and a BankQouteReply is generated. The
- * original file is moved to a 'processed' directory, and the BankQuoteReply is serialized to an 'outgoing' 
- * directory from the it can be picked up by the system that dropped the request.
- * 
- * @author kstam
- *
- */
-class ManagerFlatFile extends BasePollManager 
-{
-	private Logger logger = Logger.getLogger(this.getClass());
-	
-	private static final String BANK_NAME        = "FileBasedBank";
-	private static final BigDecimal RATE_PREMIUM = BigDecimal.valueOf(0.25);
-	private static final int MAXLOANTERM         = 120;
-	protected static final String OUTGOING_DIR   = "outgoing";
-	protected static final String PREFIX         = "reply_to_";
-	protected static final String PROCESSED_DIR  = "processed";
-	/**
-	 * Handle to the cycle start event.
-	 */
-	public void cycleStarted(CycleStartEvent evt) {
-		logger.log(Priority.DEBUG, "Poller awakened "
-				+ (evt.getPoller().getFilter() == null ? "(no filtering)" : evt
-						.getPoller().getFilter().toString()));
-	}
-	/**
-	 * Handle to the cycle end event.
-	 */
-	public void cycleEnded(CycleEndEvent evt) {
-		logger.log(Priority.DEBUG, "Poller going to sleep");
-	}
-	/**
-	 * Handle to the directory lookup start event.
-	 */
-	public void directoryLookupStarted(DirectoryLookupStartEvent evt) {
-		logger.log(Priority.DEBUG, "Scanning " + evt.getDirectory());
-	}
-	/**
-	 * Handle to the directory lookup end event.
-	 */
-	public void directoryLookupEnded(DirectoryLookupEndEvent evt) {
-		logger.log(Priority.DEBUG, "Finished scanning " + evt.getDirectory());
-	}
-	/**
-	 * Handle to the file set found event. Currenty this is the only event that
-	 * is actually used to proces the incoming loan quote requests. Each file
-	 * is send to be processed.
-	 */
-	public void fileSetFound(FileSetFoundEvent evt) {
-		File[] files = evt.getFiles();
-		
-		for (int i = 0; i < files.length; i++) {
-			File file = files[i];
-			processFile(file);
-		}
-	}
-	/**
-	 * Handle to the file found event.
-	 */
-	public void fileFound(FileFoundEvent evt) {
-		logger.log(Priority.DEBUG, evt);
-		// Add artificial delay
-	}
-	/**
-	 * Returns the name of this PollManager and a quick summary of what it does.
-	 */
-	public String toString() {
-		return "FlatFilePollManager - a pollmanager which processed incoming -flat file based- loan requests";
-	}
-	/**
-	 * Each file is processed assuming it contains one line with loan request information.
-	 * So for example the content of the file could read some like <br>23456890,3,4,20000,5<br>
-	 * The order of values needs to be SocialSecurityNumber, CreditScore, HistoryLength [month], LoanAmount [dollar],
-	 * and finally the LoanTerm [month]. The BankQuoteRequest is processed and a BankQouteReply is generated. The
-	 * original file is moved to a processed directory, and the BankQuoteReply is serialized to an 'outgoing' 
-	 * directory from the it can be picked up by the system that dropped the request.
-	 * 
-	 * @param file - incoming flat file with loan quote request info.
-	 */
-	protected void processFile(File file) 
-	{
-		BankQuoteReply bankQuoteReply=new BankQuoteReply();
-		bankQuoteReply.setQuoteId(BANK_NAME);
-		int errorCode=7;
-		String message=null;
-		logger.log(Priority.INFO, "Found " + file.getAbsolutePath() );
-		
-		try {
-			BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
-            //Read the content of the file into a String
-			message=FileUtil.readTextFile(file);
-			String[] messagePart = message.split(",");
-			
-			errorCode=1;
-			bankQuoteRequest.setSsn(Integer.valueOf(messagePart[0]));
-			errorCode=2;
-			bankQuoteRequest.setCreditScore(Integer.valueOf(messagePart[1]));
-			errorCode=3;
-			bankQuoteRequest.setHistoryLength(Integer.valueOf(messagePart[2]));
-			errorCode=4;
-			bankQuoteRequest.setLoanAmount(Integer.valueOf(messagePart[3]));
-			errorCode=5;
-			bankQuoteRequest.setLoanTerm(Integer.valueOf(messagePart[4]));
-			errorCode=6;
-			bankQuoteRequest.setCustomerUID(String.valueOf(messagePart[5]));
-			
-			Bank fileBasedBank = new Bank(BANK_NAME, RATE_PREMIUM, MAXLOANTERM);
-			bankQuoteReply = fileBasedBank.processMessage(bankQuoteRequest);	
-		} catch (Throwable e) {
-			//Package up the error, so it can be processed
-			logger.log(Priority.ERROR, e.getMessage());
-			bankQuoteReply.setErrorCode(errorCode);
-		}
-		
-		try {
-			//Create the outgoing response file
-			File outgoingDir  = new File(file.getParent() + "/" + OUTGOING_DIR);
-			if (!outgoingDir.exists()) {
-				outgoingDir.mkdir();
-			}
-			File outgoingFile = new File(outgoingDir + "/" + PREFIX + file.getName());
-			logger.log(Priority.INFO, "Creating outgoing file " + outgoingFile.getAbsolutePath());
-			outgoingFile.createNewFile();
-			String reply=bankQuoteReply.getInterestRate() + "," + bankQuoteReply.getQuoteId() + "," 
-				+ bankQuoteReply.getErrorCode() + "," + bankQuoteReply.getCustomerUID();
-			logger.log(Priority.INFO, "Writing reply " + reply);
-			FileUtil.writeTextFile(outgoingFile, reply);
-			
-			//Move the processed file away so it does not get processed again
-			File processedDir  = new File(file.getParent() + "/" + PROCESSED_DIR);
-			if (!processedDir.exists()) {
-				processedDir.mkdir();
-			}
-			logger.log(Priority.INFO, "Moving file " + file.getName() + " to processed directory");
-			File processedFile = new File(processedDir.getAbsolutePath() + "/" + file.getName());
-			file.renameTo(processedFile);
-			if (file.exists()) {
-				file.delete();
-			}
-		} catch (Exception e) {
-			logger.log(Priority.ERROR, e.getMessage(), e);
-		}
-	}
-	
-	public static void main(String[] args)
-	{
-		DOMConfigurator.configure("log4j.xml");
-		String monitoredDirectoryStr = "C:/Temp/BankInput";
-		if (args!=null && args.length > 0) {
-			monitoredDirectoryStr=args[0];
-		}
-		File monitoredDirectory = new File(monitoredDirectoryStr);
-		if (!monitoredDirectory.exists() || !monitoredDirectory.isDirectory()){
-			System.err.println("Invalid directory " + monitoredDirectory.getAbsolutePath());
-			System.out.println("Trying to create the directory.");
-			try {
-				monitoredDirectory.mkdir();
-			} catch (SecurityException e) {
-				e.printStackTrace();
-			}
-		}
-		DirectoryPoller poller = new DirectoryPoller(monitoredDirectory);
-		poller.addPollManager(new ManagerFlatFile());
-		poller.start();
-	}
-	
-
+/*
+ * 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.samples.loanbroker.banks;
+
+import java.io.File;
+import java.math.BigDecimal;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.apache.log4j.xml.DOMConfigurator;
+import org.sadun.util.polling.BasePollManager;
+import org.sadun.util.polling.CycleEndEvent;
+import org.sadun.util.polling.CycleStartEvent;
+import org.sadun.util.polling.DirectoryLookupEndEvent;
+import org.sadun.util.polling.DirectoryLookupStartEvent;
+import org.sadun.util.polling.DirectoryPoller;
+import org.sadun.util.polling.FileFoundEvent;
+import org.sadun.util.polling.FileSetFoundEvent;
+
+/**
+ * The FlatFilePollManager monitors a directory specified in the configuration. When a file arrives it
+ * tries to process the content assuming it contains one line with loan request information.
+ * So for example the content of the file could read some like <br>23456890,3,4,20000,5<br>
+ * The order of values needs to be SocialSecurityNumber, CreditScore, HistoryLength [month], LoanAmount [dollar],
+ * and finally the LoanTerm [month]. The request will be processed and a BankQouteReply is generated. The
+ * original file is moved to a 'processed' directory, and the BankQuoteReply is serialized to an 'outgoing' 
+ * directory from the it can be picked up by the system that dropped the request.
+ * 
+ * @author kstam
+ *
+ */
+class ManagerFlatFile extends BasePollManager 
+{
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	private static final String BANK_NAME        = "FileBasedBank";
+	private static final BigDecimal RATE_PREMIUM = BigDecimal.valueOf(0.25);
+	private static final int MAXLOANTERM         = 120;
+	protected static final String OUTGOING_DIR   = "outgoing";
+	protected static final String PREFIX         = "reply_to_";
+	protected static final String PROCESSED_DIR  = "processed";
+	/**
+	 * Handle to the cycle start event.
+	 */
+	public void cycleStarted(CycleStartEvent evt) {
+		logger.log(Priority.DEBUG, "Poller awakened "
+				+ (evt.getPoller().getFilter() == null ? "(no filtering)" : evt
+						.getPoller().getFilter().toString()));
+	}
+	/**
+	 * Handle to the cycle end event.
+	 */
+	public void cycleEnded(CycleEndEvent evt) {
+		logger.log(Priority.DEBUG, "Poller going to sleep");
+	}
+	/**
+	 * Handle to the directory lookup start event.
+	 */
+	public void directoryLookupStarted(DirectoryLookupStartEvent evt) {
+		logger.log(Priority.DEBUG, "Scanning " + evt.getDirectory());
+	}
+	/**
+	 * Handle to the directory lookup end event.
+	 */
+	public void directoryLookupEnded(DirectoryLookupEndEvent evt) {
+		logger.log(Priority.DEBUG, "Finished scanning " + evt.getDirectory());
+	}
+	/**
+	 * Handle to the file set found event. Currenty this is the only event that
+	 * is actually used to proces the incoming loan quote requests. Each file
+	 * is send to be processed.
+	 */
+	public void fileSetFound(FileSetFoundEvent evt) {
+		File[] files = evt.getFiles();
+		
+		for (int i = 0; i < files.length; i++) {
+			File file = files[i];
+			processFile(file);
+		}
+	}
+	/**
+	 * Handle to the file found event.
+	 */
+	public void fileFound(FileFoundEvent evt) {
+		logger.log(Priority.DEBUG, evt);
+		// Add artificial delay
+	}
+	/**
+	 * Returns the name of this PollManager and a quick summary of what it does.
+	 */
+	public String toString() {
+		return "FlatFilePollManager - a pollmanager which processed incoming -flat file based- loan requests";
+	}
+	/**
+	 * Each file is processed assuming it contains one line with loan request information.
+	 * So for example the content of the file could read some like <br>23456890,3,4,20000,5<br>
+	 * The order of values needs to be SocialSecurityNumber, CreditScore, HistoryLength [month], LoanAmount [dollar],
+	 * and finally the LoanTerm [month]. The BankQuoteRequest is processed and a BankQouteReply is generated. The
+	 * original file is moved to a processed directory, and the BankQuoteReply is serialized to an 'outgoing' 
+	 * directory from the it can be picked up by the system that dropped the request.
+	 * 
+	 * @param file - incoming flat file with loan quote request info.
+	 */
+	protected void processFile(File file) 
+	{
+		BankQuoteReply bankQuoteReply=new BankQuoteReply();
+		bankQuoteReply.setQuoteId(BANK_NAME);
+		int errorCode=7;
+		String message=null;
+		logger.log(Priority.INFO, "Found " + file.getAbsolutePath() );
+		
+		try {
+			BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
+            //Read the content of the file into a String
+			message=FileUtil.readTextFile(file);
+			String[] messagePart = message.split(",");
+			
+			errorCode=1;
+			bankQuoteRequest.setSsn(Integer.valueOf(messagePart[0]));
+			errorCode=2;
+			bankQuoteRequest.setCreditScore(Integer.valueOf(messagePart[1]));
+			errorCode=3;
+			bankQuoteRequest.setHistoryLength(Integer.valueOf(messagePart[2]));
+			errorCode=4;
+			bankQuoteRequest.setLoanAmount(Integer.valueOf(messagePart[3]));
+			errorCode=5;
+			bankQuoteRequest.setLoanTerm(Integer.valueOf(messagePart[4]));
+			errorCode=6;
+			bankQuoteRequest.setCustomerUID(String.valueOf(messagePart[5]));
+			
+			Bank fileBasedBank = new Bank(BANK_NAME, RATE_PREMIUM, MAXLOANTERM);
+			bankQuoteReply = fileBasedBank.processMessage(bankQuoteRequest);	
+		} catch (Throwable e) {
+			//Package up the error, so it can be processed
+			logger.log(Priority.ERROR, e.getMessage());
+			bankQuoteReply.setErrorCode(errorCode);
+		}
+		
+		try {
+			//Create the outgoing response file
+			File outgoingDir  = new File(file.getParent() + "/" + OUTGOING_DIR);
+			if (!outgoingDir.exists()) {
+				outgoingDir.mkdir();
+			}
+			File outgoingFile = new File(outgoingDir + "/" + PREFIX + file.getName());
+			logger.log(Priority.INFO, "Creating outgoing file " + outgoingFile.getAbsolutePath());
+			outgoingFile.createNewFile();
+			String reply=bankQuoteReply.getInterestRate() + "," + bankQuoteReply.getQuoteId() + "," 
+				+ bankQuoteReply.getErrorCode() + "," + bankQuoteReply.getCustomerUID();
+			logger.log(Priority.INFO, "Writing reply " + reply);
+			FileUtil.writeTextFile(outgoingFile, reply);
+			
+			//Move the processed file away so it does not get processed again
+			File processedDir  = new File(file.getParent() + "/" + PROCESSED_DIR);
+			if (!processedDir.exists()) {
+				processedDir.mkdir();
+			}
+			logger.log(Priority.INFO, "Moving file " + file.getName() + " to processed directory");
+			File processedFile = new File(processedDir.getAbsolutePath() + "/" + file.getName());
+			file.renameTo(processedFile);
+			if (file.exists()) {
+				file.delete();
+			}
+		} catch (Exception e) {
+			logger.log(Priority.ERROR, e.getMessage(), e);
+		}
+	}
+	
+	public static void main(String[] args)
+	{
+		DOMConfigurator.configure("log4j.xml");
+		String monitoredDirectoryStr = "C:/Temp/BankInput";
+		if (args!=null && args.length > 0) {
+			monitoredDirectoryStr=args[0];
+		}
+		File monitoredDirectory = new File(monitoredDirectoryStr);
+		if (!monitoredDirectory.exists() || !monitoredDirectory.isDirectory()){
+			System.err.println("Invalid directory " + monitoredDirectory.getAbsolutePath());
+			System.out.println("Trying to create the directory.");
+			try {
+				monitoredDirectory.mkdir();
+			} catch (SecurityException e) {
+				e.printStackTrace();
+			}
+		}
+		DirectoryPoller poller = new DirectoryPoller(monitoredDirectory);
+		poller.addPollManager(new ManagerFlatFile());
+		poller.start();
+	}
+	
+
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,213 +1,213 @@
-/*
- * 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.samples.loanbroker.banks;
-
-import java.math.BigDecimal;
-import java.util.Properties;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.apache.log4j.xml.DOMConfigurator;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.xml.DomDriver;
-
-/**
- * The JMS Manager listens to an incoming queue (by default queue/A on localhost). It consumes the
- * message assuming it is a TextMessage, and that the text is an XML structure that can be marshalled
- * into a BankQuoteRequest. The request will be processed and a BankQuoteRequest Reply will be serialized to XML
- * and send to the outgoing queue (by default this is queue/B on localhost).
- * 
- * @author kstam
- */
-public class ManagerJMS implements javax.jms.MessageListener {
-	private static Logger logger = Logger.getLogger(ManagerJMS.class);
-	/** Name of the Bank */
-	private static final String BANK_NAME = "JMSBasedBank";
-	/** Rate premium the bank charges */
-	private static final BigDecimal RATE_PREMIUM = BigDecimal.valueOf(0.50);
-	/** Maximum duration of the loan the bank will accept [months] */
-	private static final int MAXLOANTERM = 120;
-	/** Default incoming queue */
-	private static String QUEUE_IN = "queue/C";
-	/** Default outgoing queue */
-	private static String QUEUE_OUT = "queue/D";
-	/** Context used to lookup the Queues */
-	private static InitialContext ctx;
-	/** Properties used when constructing the InitialContext */
-	private static Properties properties = new Properties();
-	/** Queue connection for incoming queue */
-	QueueConnection inQueueConnection;
-
-	/**
-	 * Sets up the queue listener. By default is listenes to queue/A on localhost.
-	 */
-	public void listen() {
-		try {
-			//MQ Series
-			//properties.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.mq.jms.context.WMQInitialContextFactory");
-			//properties.put(Context.PROVIDER_URL           , "dev38:1415/SYSTEM.DEF.SVRCONN");
-			//ActiveMQ
-			//properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-			//properties.put(Context.PROVIDER_URL           , "tcp://localhost:61616");
-			//JBossMQ
-		    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
-		    properties.put(Context.PROVIDER_URL           , "localhost");
-			ctx = new InitialContext(properties);
-			
-			logger.info("Looking up connection factory");
-			QueueConnectionFactory qcf = (QueueConnectionFactory) ctx
-					.lookup("ConnectionFactory");
-			logger.info("Creating connection");
-			inQueueConnection = qcf.createQueueConnection();
-			logger.info("Creating session");
-			QueueSession qs = inQueueConnection.createQueueSession(false,
-					Session.DUPS_OK_ACKNOWLEDGE);
-			logger.info("Looking up queue=" + QUEUE_IN);
-			Queue inQueue=null;
-			try {
-				inQueue = (Queue) ctx.lookup(QUEUE_IN);
-			} catch (NamingException ne) {
-				inQueue = qs.createQueue(QUEUE_IN);
-			}
-			//Queue 
-			QueueReceiver qr = qs.createReceiver(inQueue);
-			qr.setMessageListener(this);
-			inQueueConnection.start();
-		} catch (Exception e) {
-			logger.error(e.getMessage(), e);
-		}
-	}
-	/**
-	 * Sets up the queue listener. By default is listenes to queue/A on localhost.  It consumes the
-	 * message assuming it is a TextMessage, and that the text is an XML structure that can be marshalled
-	 * into a BankQuoteRequest. The request will be processed and a BankQuoteRequest Reply will be serialized to XML
-	 * and send to the outgoing queue (by default this is queue/B on localhost). If the processing results
-	 * in an error a BankQuoteReply with ErrorCode other then 0 is send to the outgoing queue.
-	 * 
-	 * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
-	 * changed this to use a CSV from the request, left the reply as is - dbrum
-	 */
-	public void onMessage(Message message) {
-		QueueConnection outQueueConnection;
-		logger.info("Got message: " + message);
-		try {
-			TextMessage textMessage = (TextMessage) message;
-//			String xml = textMessage.getText();
-			String csv = textMessage.getText();
-			XStream xstream = new XStream(new DomDriver());
-			BankQuoteRequest bankQuoteRequest = getQuoteFromCSV(csv);
-			
-            
-//            xstream.fromXML(xml, bankQuoteRequest);
-			Bank bank = new Bank(BANK_NAME, RATE_PREMIUM, MAXLOANTERM);
-			BankQuoteReply bankQuoteReply = bank
-					.processMessage(bankQuoteRequest);
-			bankQuoteReply.setCustomerEmail(bankQuoteRequest.customerEmail);
-			String bankQuoteReplyXML = xstream.toXML(bankQuoteReply);
-			logger.log(Priority.INFO, "Looking up connection factory");
-			QueueConnectionFactory qcf = (QueueConnectionFactory) ctx
-					.lookup("ConnectionFactory");
-			logger.log(Priority.INFO, "Creating connection");
-			outQueueConnection = qcf.createQueueConnection();
-			try {
-				logger.log(Priority.INFO, "Creating session");
-				QueueSession qs = outQueueConnection.createQueueSession(false,
-						Session.DUPS_OK_ACKNOWLEDGE);
-				Queue outQueue;
-				try {
-					outQueue = (Queue) ctx.lookup(QUEUE_OUT);
-				} catch (NamingException ne) {
-					outQueue = qs.createQueue(QUEUE_OUT);
-				}
-				TextMessage responseTextMessage = qs
-						.createTextMessage(bankQuoteReplyXML);
-				QueueSender queueSender = qs.createSender(outQueue);
-				queueSender.send(responseTextMessage);
-				logger.info("message being sent back on " + QUEUE_OUT + "\n" + responseTextMessage);
-			} catch (JMSException je) {
-				logger.log(Priority.ERROR, je.getMessage(), je);
-			} finally {
-				outQueueConnection.close();
-			}
-		} catch (Exception e) {
-			logger.error(e.getMessage(), e);
-		}
-	}
-	/** 
-	 * Closing the queue connection as to not leak connection resources.
-	 */
-	public void close() throws JMSException {
-		inQueueConnection.close();
-	}
-	/**
-	 * Invokes an instance of JMS based bank listener.
-	 * @param args - provider url, queue_in, queue_out
-	 */
-	public static void main(String[] args) {
-		if (args != null && args.length > 0) {
-			if (args.length > 0) {
-				QUEUE_IN = args[1];
-				if (args.length > 1) {
-					QUEUE_OUT = args[2];
-				}
-			}
-		} else {
-			System.out.println(
-					"Usage: ManagerJMS providerURL, queueIn, queueOut");
-		}
-		System.out.println("Starting JMS Bank Listener...");
-		System.out.println("Listening  to Queue '" + QUEUE_IN + "'.");
-		System.out.println("Responding to Queue '" + QUEUE_OUT + "'.");
-		DOMConfigurator.configure("log4j.xml");
-		ManagerJMS managerJMS = new ManagerJMS();
-		managerJMS.listen();
-	}
-	
-	private BankQuoteRequest getQuoteFromCSV(String csv) {
-		BankQuoteRequest quote = new BankQuoteRequest();
-		String[] parsed = csv.split(",");
-		quote.ssn=Integer.parseInt(parsed[0]);
-		quote.creditScore=Integer.parseInt(parsed[1]);
-		quote.historyLength=Integer.parseInt(parsed[2]);
-		quote.loanAmount=Integer.parseInt(parsed[3]);
-		quote.loanTerm=Integer.parseInt(parsed[4]);
-		quote.customerUID=parsed[5];
-		quote.customerEmail=parsed[6];
-		
-		return quote;
-	}
+/*
+ * 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.samples.loanbroker.banks;
+
+import java.math.BigDecimal;
+import java.util.Properties;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.apache.log4j.xml.DOMConfigurator;
+
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.DomDriver;
+
+/**
+ * The JMS Manager listens to an incoming queue (by default queue/A on localhost). It consumes the
+ * message assuming it is a TextMessage, and that the text is an XML structure that can be marshalled
+ * into a BankQuoteRequest. The request will be processed and a BankQuoteRequest Reply will be serialized to XML
+ * and send to the outgoing queue (by default this is queue/B on localhost).
+ * 
+ * @author kstam
+ */
+public class ManagerJMS implements javax.jms.MessageListener {
+	private static Logger logger = Logger.getLogger(ManagerJMS.class);
+	/** Name of the Bank */
+	private static final String BANK_NAME = "JMSBasedBank";
+	/** Rate premium the bank charges */
+	private static final BigDecimal RATE_PREMIUM = BigDecimal.valueOf(0.50);
+	/** Maximum duration of the loan the bank will accept [months] */
+	private static final int MAXLOANTERM = 120;
+	/** Default incoming queue */
+	private static String QUEUE_IN = "queue/C";
+	/** Default outgoing queue */
+	private static String QUEUE_OUT = "queue/D";
+	/** Context used to lookup the Queues */
+	private static InitialContext ctx;
+	/** Properties used when constructing the InitialContext */
+	private static Properties properties = new Properties();
+	/** Queue connection for incoming queue */
+	QueueConnection inQueueConnection;
+
+	/**
+	 * Sets up the queue listener. By default is listenes to queue/A on localhost.
+	 */
+	public void listen() {
+		try {
+			//MQ Series
+			//properties.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.mq.jms.context.WMQInitialContextFactory");
+			//properties.put(Context.PROVIDER_URL           , "dev38:1415/SYSTEM.DEF.SVRCONN");
+			//ActiveMQ
+			//properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+			//properties.put(Context.PROVIDER_URL           , "tcp://localhost:61616");
+			//JBossMQ
+		    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+		    properties.put(Context.PROVIDER_URL           , "localhost");
+			ctx = new InitialContext(properties);
+			
+			logger.info("Looking up connection factory");
+			QueueConnectionFactory qcf = (QueueConnectionFactory) ctx
+					.lookup("ConnectionFactory");
+			logger.info("Creating connection");
+			inQueueConnection = qcf.createQueueConnection();
+			logger.info("Creating session");
+			QueueSession qs = inQueueConnection.createQueueSession(false,
+					Session.DUPS_OK_ACKNOWLEDGE);
+			logger.info("Looking up queue=" + QUEUE_IN);
+			Queue inQueue=null;
+			try {
+				inQueue = (Queue) ctx.lookup(QUEUE_IN);
+			} catch (NamingException ne) {
+				inQueue = qs.createQueue(QUEUE_IN);
+			}
+			//Queue 
+			QueueReceiver qr = qs.createReceiver(inQueue);
+			qr.setMessageListener(this);
+			inQueueConnection.start();
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+		}
+	}
+	/**
+	 * Sets up the queue listener. By default is listenes to queue/A on localhost.  It consumes the
+	 * message assuming it is a TextMessage, and that the text is an XML structure that can be marshalled
+	 * into a BankQuoteRequest. The request will be processed and a BankQuoteRequest Reply will be serialized to XML
+	 * and send to the outgoing queue (by default this is queue/B on localhost). If the processing results
+	 * in an error a BankQuoteReply with ErrorCode other then 0 is send to the outgoing queue.
+	 * 
+	 * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
+	 * changed this to use a CSV from the request, left the reply as is - dbrum
+	 */
+	public void onMessage(Message message) {
+		QueueConnection outQueueConnection;
+		logger.info("Got message: " + message);
+		try {
+			TextMessage textMessage = (TextMessage) message;
+//			String xml = textMessage.getText();
+			String csv = textMessage.getText();
+			XStream xstream = new XStream(new DomDriver());
+			BankQuoteRequest bankQuoteRequest = getQuoteFromCSV(csv);
+			
+            
+//            xstream.fromXML(xml, bankQuoteRequest);
+			Bank bank = new Bank(BANK_NAME, RATE_PREMIUM, MAXLOANTERM);
+			BankQuoteReply bankQuoteReply = bank
+					.processMessage(bankQuoteRequest);
+			bankQuoteReply.setCustomerEmail(bankQuoteRequest.customerEmail);
+			String bankQuoteReplyXML = xstream.toXML(bankQuoteReply);
+			logger.log(Priority.INFO, "Looking up connection factory");
+			QueueConnectionFactory qcf = (QueueConnectionFactory) ctx
+					.lookup("ConnectionFactory");
+			logger.log(Priority.INFO, "Creating connection");
+			outQueueConnection = qcf.createQueueConnection();
+			try {
+				logger.log(Priority.INFO, "Creating session");
+				QueueSession qs = outQueueConnection.createQueueSession(false,
+						Session.DUPS_OK_ACKNOWLEDGE);
+				Queue outQueue;
+				try {
+					outQueue = (Queue) ctx.lookup(QUEUE_OUT);
+				} catch (NamingException ne) {
+					outQueue = qs.createQueue(QUEUE_OUT);
+				}
+				TextMessage responseTextMessage = qs
+						.createTextMessage(bankQuoteReplyXML);
+				QueueSender queueSender = qs.createSender(outQueue);
+				queueSender.send(responseTextMessage);
+				logger.info("message being sent back on " + QUEUE_OUT + "\n" + responseTextMessage);
+			} catch (JMSException je) {
+				logger.log(Priority.ERROR, je.getMessage(), je);
+			} finally {
+				outQueueConnection.close();
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+		}
+	}
+	/** 
+	 * Closing the queue connection as to not leak connection resources.
+	 */
+	public void close() throws JMSException {
+		inQueueConnection.close();
+	}
+	/**
+	 * Invokes an instance of JMS based bank listener.
+	 * @param args - provider url, queue_in, queue_out
+	 */
+	public static void main(String[] args) {
+		if (args != null && args.length > 0) {
+			if (args.length > 0) {
+				QUEUE_IN = args[1];
+				if (args.length > 1) {
+					QUEUE_OUT = args[2];
+				}
+			}
+		} else {
+			System.out.println(
+					"Usage: ManagerJMS providerURL, queueIn, queueOut");
+		}
+		System.out.println("Starting JMS Bank Listener...");
+		System.out.println("Listening  to Queue '" + QUEUE_IN + "'.");
+		System.out.println("Responding to Queue '" + QUEUE_OUT + "'.");
+		DOMConfigurator.configure("log4j.xml");
+		ManagerJMS managerJMS = new ManagerJMS();
+		managerJMS.listen();
+	}
+	
+	private BankQuoteRequest getQuoteFromCSV(String csv) {
+		BankQuoteRequest quote = new BankQuoteRequest();
+		String[] parsed = csv.split(",");
+		quote.ssn=Integer.parseInt(parsed[0]);
+		quote.creditScore=Integer.parseInt(parsed[1]);
+		quote.historyLength=Integer.parseInt(parsed[2]);
+		quote.loanAmount=Integer.parseInt(parsed[3]);
+		quote.loanTerm=Integer.parseInt(parsed[4]);
+		quote.customerUID=parsed[5];
+		quote.customerEmail=parsed[6];
+		
+		return quote;
+	}
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,65 +1,65 @@
-/*
-* 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.samples.loanbroker.banks;
-
-import static org.junit.Assert.assertTrue;
-
-import java.math.BigDecimal;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.junit.Test;
-
-import com.thoughtworks.xstream.XStream;
-
-public class BankQuoteReplyTest {
-
-	private Logger logger = Logger.getLogger(this.getClass());
-	
-	/**
-	 * Testing the XML layout of a BankQuoteReply
-	 */
-	@Test public void obtainExampleXML(){
-		BankQuoteReply bankQuoteReply = new BankQuoteReply();
-		bankQuoteReply.setErrorCode(0);
-		bankQuoteReply.setCustomerUID("unique");
-		bankQuoteReply.setInterestRate(BigDecimal.valueOf(11.7));
-		bankQuoteReply.setQuoteId("JBBANK_1");
-		
-		XStream xstream = new XStream();
-		String bankQuoteReplyXml=xstream.toXML(bankQuoteReply);
-		logger.info("xml=\n" + bankQuoteReplyXml);
-		String expectedXml = 
-			  "<org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteReply>\n"
-			+ "  <interestRate>11.7</interestRate>\n"
-            + "  <quoteId>JBBANK_1</quoteId>\n"
-            + "  <errorCode>0</errorCode>\n"
-            + "  <customerUID>unique</customerUID>\n"
-            + "</org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteReply>";
-		assertTrue(expectedXml.equals(bankQuoteReplyXml));
-	}
-	
-	public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(BankQuoteReplyTest.class);
-    }
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigDecimal;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+import com.thoughtworks.xstream.XStream;
+
+public class BankQuoteReplyTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	/**
+	 * Testing the XML layout of a BankQuoteReply
+	 */
+	@Test public void obtainExampleXML(){
+		BankQuoteReply bankQuoteReply = new BankQuoteReply();
+		bankQuoteReply.setErrorCode(0);
+		bankQuoteReply.setCustomerUID("unique");
+		bankQuoteReply.setInterestRate(BigDecimal.valueOf(11.7));
+		bankQuoteReply.setQuoteId("JBBANK_1");
+		
+		XStream xstream = new XStream();
+		String bankQuoteReplyXml=xstream.toXML(bankQuoteReply);
+		logger.info("xml=\n" + bankQuoteReplyXml);
+		String expectedXml = 
+			  "<org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteReply>\n"
+			+ "  <interestRate>11.7</interestRate>\n"
+            + "  <quoteId>JBBANK_1</quoteId>\n"
+            + "  <errorCode>0</errorCode>\n"
+            + "  <customerUID>unique</customerUID>\n"
+            + "</org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteReply>";
+		assertTrue(expectedXml.equals(bankQuoteReplyXml));
+	}
+	
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(BankQuoteReplyTest.class);
+    }
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,66 +1,66 @@
-/*
-* 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.samples.loanbroker.banks;
-
-import static org.junit.Assert.assertTrue;
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.junit.Test;
-
-import com.thoughtworks.xstream.XStream;
-
-public class BankQuoteRequestTest {
-
-	private Logger logger = Logger.getLogger(this.getClass());
-	
-	/**
-	 * Testing the XML layout of a BankQuoteRequest
-	 */
-	@Test public void obtainExampleXML(){
-		BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
-		bankQuoteRequest.setSsn(123456890);
-		bankQuoteRequest.setCreditScore(3);
-		bankQuoteRequest.setHistoryLength(4);
-		bankQuoteRequest.setLoanTerm(5);
-		bankQuoteRequest.setLoanAmount(20000);
-		bankQuoteRequest.setCustomerUID("unique");
-		
-		XStream xstream = new XStream();
-		String bankQuoteRequestXml=xstream.toXML(bankQuoteRequest);
-		logger.info("xml=\n" + bankQuoteRequestXml);
-		String expectedXml = 
-			  "<org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest>\n"
-			+ "  <ssn>123456890</ssn>\n"
-			+ "  <creditScore>3</creditScore>\n"
-			+ "  <historyLength>4</historyLength>\n"
-			+ "  <loanAmount>20000</loanAmount>\n"
-			+ "  <loanTerm>5</loanTerm>\n"
-		    + "  <customerUID>unique</customerUID>\n"
-			+ "</org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest>";
-		assertTrue(expectedXml.equals(bankQuoteRequestXml));
-	}
-	
-	public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(BankQuoteRequestTest.class);
-    }
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertTrue;
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+import com.thoughtworks.xstream.XStream;
+
+public class BankQuoteRequestTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	/**
+	 * Testing the XML layout of a BankQuoteRequest
+	 */
+	@Test public void obtainExampleXML(){
+		BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
+		bankQuoteRequest.setSsn(123456890);
+		bankQuoteRequest.setCreditScore(3);
+		bankQuoteRequest.setHistoryLength(4);
+		bankQuoteRequest.setLoanTerm(5);
+		bankQuoteRequest.setLoanAmount(20000);
+		bankQuoteRequest.setCustomerUID("unique");
+		
+		XStream xstream = new XStream();
+		String bankQuoteRequestXml=xstream.toXML(bankQuoteRequest);
+		logger.info("xml=\n" + bankQuoteRequestXml);
+		String expectedXml = 
+			  "<org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest>\n"
+			+ "  <ssn>123456890</ssn>\n"
+			+ "  <creditScore>3</creditScore>\n"
+			+ "  <historyLength>4</historyLength>\n"
+			+ "  <loanAmount>20000</loanAmount>\n"
+			+ "  <loanTerm>5</loanTerm>\n"
+		    + "  <customerUID>unique</customerUID>\n"
+			+ "</org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest>";
+		assertTrue(expectedXml.equals(bankQuoteRequestXml));
+	}
+	
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(BankQuoteRequestTest.class);
+    }
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,72 +1,72 @@
-/*
-* 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.samples.loanbroker.banks;
-
-import static org.junit.Assert.assertTrue;
-
-import java.math.BigDecimal;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.junit.Test;
-
-public class BankTest {
-
-	private Logger logger = Logger.getLogger(this.getClass());
-	
-	/**
-	 * Tests the computation of the interestRate for the TestBank.
-	 *
-	 */
-	@Test public void processLoanRequest(){
-		
-		//Building a BankQuoteRequest
-		BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
-		bankQuoteRequest.setSsn(123456890);
-		bankQuoteRequest.setCreditScore(3);
-		bankQuoteRequest.setHistoryLength(4);
-		bankQuoteRequest.setLoanTerm(72);
-		bankQuoteRequest.setLoanAmount(20000);
-		bankQuoteRequest.setCustomerUID("unique");
-		logger.log(Priority.INFO, bankQuoteRequest);
-		
-		//Getting a Bank Instance
-		String bankName        = "TestBank";
-		BigDecimal ratePrimium = BigDecimal.valueOf(0.25);
-		int maxLoanTerm        = 120;
-		Bank bank = new Bank(bankName, ratePrimium, maxLoanTerm);
-		
-		//Getting a quote from this bank
-		BankQuoteReply bankQuoteReply = bank.processMessage(bankQuoteRequest);
-		logger.log(Priority.INFO, bankQuoteReply);
-		
-		//Checking for validity
-		BigDecimal expectedInterestRate = BigDecimal.valueOf(8.85);
-		assertTrue(bankQuoteReply.getInterestRate().equals(expectedInterestRate));
-	}
-	
-	public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(BankTest.class);
-    }
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigDecimal;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.junit.Test;
+
+public class BankTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	/**
+	 * Tests the computation of the interestRate for the TestBank.
+	 *
+	 */
+	@Test public void processLoanRequest(){
+		
+		//Building a BankQuoteRequest
+		BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
+		bankQuoteRequest.setSsn(123456890);
+		bankQuoteRequest.setCreditScore(3);
+		bankQuoteRequest.setHistoryLength(4);
+		bankQuoteRequest.setLoanTerm(72);
+		bankQuoteRequest.setLoanAmount(20000);
+		bankQuoteRequest.setCustomerUID("unique");
+		logger.log(Priority.INFO, bankQuoteRequest);
+		
+		//Getting a Bank Instance
+		String bankName        = "TestBank";
+		BigDecimal ratePrimium = BigDecimal.valueOf(0.25);
+		int maxLoanTerm        = 120;
+		Bank bank = new Bank(bankName, ratePrimium, maxLoanTerm);
+		
+		//Getting a quote from this bank
+		BankQuoteReply bankQuoteReply = bank.processMessage(bankQuoteRequest);
+		logger.log(Priority.INFO, bankQuoteReply);
+		
+		//Checking for validity
+		BigDecimal expectedInterestRate = BigDecimal.valueOf(8.85);
+		assertTrue(bankQuoteReply.getInterestRate().equals(expectedInterestRate));
+	}
+	
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(BankTest.class);
+    }
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,112 +1,112 @@
-/*
-* 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.samples.loanbroker.banks;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.junit.Test;
-
-public class FlatFileProcessorTest {
-
-	private Logger logger = Logger.getLogger(this.getClass());
-	private static String FLAT_FILE = "FlatFileProcessorTest.txt";
-	/**
-	 * Tests the processing of flat file containing a loan quote request. First
-	 * we try to find a temporary directory. When this succeeds we drop a
-	 * loan request file in there and try to process it.
-	 *
-	 */
-	@Test public void processRequest()
-	{
-		File writableDir=null;
-		logger.log(Priority.INFO, "Check to see if I can write to /tmp");
-		File tmpDir = new File("/tmp");
-		if (tmpDir.exists() && tmpDir.canWrite()) {
-			writableDir=tmpDir;
-		} else {
-			File tempDir = new File("C:/temp");
-			if (tempDir.exists() && tempDir.canWrite()) {
-				writableDir=tempDir;
-			} else {
-				logger.log(Priority.ERROR, "Could not find either /tmp or C:\\Temp for a temporary " 
-						+ "writing space.");
-			    assertTrue(false);
-			}
-		}
-//		We found a temp space so now we can drop in a load request file.
-		try {
-			logger.log(Priority.INFO, "Creating " + FLAT_FILE + " file in " + writableDir.getAbsolutePath());
-			File loanRequestFile = new File(writableDir.getAbsolutePath() + "/"+ FLAT_FILE);
-			if (loanRequestFile.exists()) {
-				loanRequestFile.delete();
-			}
-			loanRequestFile.createNewFile();
-			String str="23456890,3,4,20000,5,unique";
-			FileUtil.writeTextFile(loanRequestFile, str);
-			
-			logger.log(Priority.INFO, "Processing FlatFileProcessorTest.txt");
-			ManagerFlatFile pollManager = new ManagerFlatFile();
-			pollManager.processFile(loanRequestFile);
-			
-			//Check to see if the file is now moved.
-			assertFalse(loanRequestFile.exists());
-			
-			File processedFile = new File(writableDir.getAbsolutePath() + "/" 
-				+ ManagerFlatFile.PROCESSED_DIR + "/" + FLAT_FILE);
-			logger.log(Priority.INFO, "Check to see if " + processedFile.getAbsolutePath()
-					+ " exists");
-			assertTrue(processedFile.exists());
-			logger.log(Priority.INFO, "OK");
-			
-			File replyToFile = new File(writableDir.getAbsolutePath() + "/" 
-				+ ManagerFlatFile.OUTGOING_DIR + "/" + ManagerFlatFile.PREFIX
-				+ FLAT_FILE);
-			logger.log(Priority.INFO, "Check to see if " + replyToFile.getAbsolutePath()
-					+ " exists");
-			assertTrue(replyToFile.exists());
-			logger.log(Priority.INFO, "OK");
-			
-			//Checking the content of the reply
-			logger.log(Priority.INFO, "Check the reply, should be ('8.29,FileBasedBank-0,0,unique'");
-			assertTrue("8.29,FileBasedBank-0,0,unique".equals(FileUtil.readTextFile(replyToFile)));
-			logger.log(Priority.INFO, "OK");
-			//Cleaning up
-			processedFile.delete();
-			replyToFile.delete();
-			
-		} catch (Throwable e) {
-			logger.log(Priority.ERROR,e.getMessage(),e);
-			assertTrue(false);
-		}
-	}
-	
-	public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(FlatFileProcessorTest.class);
-    }
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.junit.Test;
+
+public class FlatFileProcessorTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+	private static String FLAT_FILE = "FlatFileProcessorTest.txt";
+	/**
+	 * Tests the processing of flat file containing a loan quote request. First
+	 * we try to find a temporary directory. When this succeeds we drop a
+	 * loan request file in there and try to process it.
+	 *
+	 */
+	@Test public void processRequest()
+	{
+		File writableDir=null;
+		logger.log(Priority.INFO, "Check to see if I can write to /tmp");
+		File tmpDir = new File("/tmp");
+		if (tmpDir.exists() && tmpDir.canWrite()) {
+			writableDir=tmpDir;
+		} else {
+			File tempDir = new File("C:/temp");
+			if (tempDir.exists() && tempDir.canWrite()) {
+				writableDir=tempDir;
+			} else {
+				logger.log(Priority.ERROR, "Could not find either /tmp or C:\\Temp for a temporary " 
+						+ "writing space.");
+			    assertTrue(false);
+			}
+		}
+//		We found a temp space so now we can drop in a load request file.
+		try {
+			logger.log(Priority.INFO, "Creating " + FLAT_FILE + " file in " + writableDir.getAbsolutePath());
+			File loanRequestFile = new File(writableDir.getAbsolutePath() + "/"+ FLAT_FILE);
+			if (loanRequestFile.exists()) {
+				loanRequestFile.delete();
+			}
+			loanRequestFile.createNewFile();
+			String str="23456890,3,4,20000,5,unique";
+			FileUtil.writeTextFile(loanRequestFile, str);
+			
+			logger.log(Priority.INFO, "Processing FlatFileProcessorTest.txt");
+			ManagerFlatFile pollManager = new ManagerFlatFile();
+			pollManager.processFile(loanRequestFile);
+			
+			//Check to see if the file is now moved.
+			assertFalse(loanRequestFile.exists());
+			
+			File processedFile = new File(writableDir.getAbsolutePath() + "/" 
+				+ ManagerFlatFile.PROCESSED_DIR + "/" + FLAT_FILE);
+			logger.log(Priority.INFO, "Check to see if " + processedFile.getAbsolutePath()
+					+ " exists");
+			assertTrue(processedFile.exists());
+			logger.log(Priority.INFO, "OK");
+			
+			File replyToFile = new File(writableDir.getAbsolutePath() + "/" 
+				+ ManagerFlatFile.OUTGOING_DIR + "/" + ManagerFlatFile.PREFIX
+				+ FLAT_FILE);
+			logger.log(Priority.INFO, "Check to see if " + replyToFile.getAbsolutePath()
+					+ " exists");
+			assertTrue(replyToFile.exists());
+			logger.log(Priority.INFO, "OK");
+			
+			//Checking the content of the reply
+			logger.log(Priority.INFO, "Check the reply, should be ('8.29,FileBasedBank-0,0,unique'");
+			assertTrue("8.29,FileBasedBank-0,0,unique".equals(FileUtil.readTextFile(replyToFile)));
+			logger.log(Priority.INFO, "OK");
+			//Cleaning up
+			processedFile.delete();
+			replyToFile.delete();
+			
+		} catch (Throwable e) {
+			logger.log(Priority.ERROR,e.getMessage(),e);
+			assertTrue(false);
+		}
+	}
+	
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(FlatFileProcessorTest.class);
+    }
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,92 +1,92 @@
-/*
-* 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.samples.loanbroker.banks;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
-import org.junit.Test;
-
-public class JmsProcessorTest {
-
-	private Logger logger = Logger.getLogger(this.getClass());
-
-	/**
-	 * This can be activate if the server is running and you want
-	 * to drop a message on the queue
-	 *
-	 */
-	@Test public void sendLoanRequestXML()
-	{
-
-		QueueSession sess;
-		Queue queue;
-		try {
-			Properties properties = new Properties();
-			
-			//ActiveMQ
-			//properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-		    //properties.put(Context.PROVIDER_URL           , "tcp://localhost:61616");
-			//JBossMQ
-		    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
-		    properties.put(Context.PROVIDER_URL           , "localhost");
-			InitialContext ctx = new InitialContext(properties);
-		
-			QueueConnectionFactory factory = (QueueConnectionFactory) ctx
-					.lookup("ConnectionFactory");
-			QueueConnection cnn = factory.createQueueConnection();
-			sess = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-			queue = sess.createQueue("queue/C");
-			//queue = sess.createQueue("queue/C");
-			String str="23456890,3,4,20000,5,unique,kurt.stam at jboss.com";
-			TextMessage msg = sess.createTextMessage(str);
-			QueueSender sender = sess.createSender(queue);
-			sender.send(msg);
-			//if the test gets here without errors it passes.
-			assertTrue(true);
-		} catch (Exception e) {
-			//if it fails it may be because the server is not up and the Queue is not found
-			//I'm not letting the test fail, since we may want to do nightly build/test runs
-			//which may not have the server up.
-			logger.log(Priority.ERROR, e.getMessage(), e);
-			logger.log(Priority.ERROR, "Is the server up and running?");
-		}
-	}
-
-	public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(JmsProcessorTest.class);
-    }
-}
+/*
+* 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.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.Properties;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.junit.Test;
+
+public class JmsProcessorTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+
+	/**
+	 * This can be activate if the server is running and you want
+	 * to drop a message on the queue
+	 *
+	 */
+	@Test public void sendLoanRequestXML()
+	{
+
+		QueueSession sess;
+		Queue queue;
+		try {
+			Properties properties = new Properties();
+			
+			//ActiveMQ
+			//properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+		    //properties.put(Context.PROVIDER_URL           , "tcp://localhost:61616");
+			//JBossMQ
+		    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+		    properties.put(Context.PROVIDER_URL           , "localhost");
+			InitialContext ctx = new InitialContext(properties);
+		
+			QueueConnectionFactory factory = (QueueConnectionFactory) ctx
+					.lookup("ConnectionFactory");
+			QueueConnection cnn = factory.createQueueConnection();
+			sess = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+			queue = sess.createQueue("queue/C");
+			//queue = sess.createQueue("queue/C");
+			String str="23456890,3,4,20000,5,unique,kurt.stam at jboss.com";
+			TextMessage msg = sess.createTextMessage(str);
+			QueueSender sender = sess.createSender(queue);
+			sender.send(msg);
+			//if the test gets here without errors it passes.
+			assertTrue(true);
+		} catch (Exception e) {
+			//if it fails it may be because the server is not up and the Queue is not found
+			//I'm not letting the test fail, since we may want to do nightly build/test runs
+			//which may not have the server up.
+			logger.log(Priority.ERROR, e.getMessage(), e);
+			logger.log(Priority.ERROR, "Is the server up and running?");
+		}
+	}
+
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(JmsProcessorTest.class);
+    }
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/build.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/build.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/build.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,2 +1,2 @@
-org.jboss.soa.samples.trailblazer.jboss_home=/jboss-4.0.5.GA
-org.jboss.soa.samples.trailblazer.jboss_server=default
+org.jboss.soa.samples.trailblazer.jboss_home=/jboss-4.0.5.GA
+org.jboss.soa.samples.trailblazer.jboss_server=default


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/build.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -23,33 +23,33 @@
 
 	<!-- UPDATE THIS WITH YOUR JBOSS_HOME AND SERVER -->
 	<property file="build.properties" />
-
+
 	<property name="org.jboss.soa.samples.trailblazer.jboss_home" 		value="/dev/jboss4.0.5"/>
-	<property name="org.jboss.soa.samples.trailblazer.jboss_server"	value="default"/>
+	<property name="org.jboss.soa.samples.trailblazer.jboss_server"	value="default"/>
 	<property name="org.jboss.soa.samples.trailblazer.home" value="."/>
 
-	<property name="org.jboss.soa.samples.trailblazer.esb_home"	 	location="../../"/>
+	<property name="org.jboss.soa.samples.trailblazer.esb_home"	 	location="../../"/>
 
 	<!-- properties for the esb part of the trailblazer -->
-	<property name="org.jboss.esb.samples.trailblazer.esb.dest"        	value="${basedir}/esb/build"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.classes.dir" 	value="${basedir}/esb/build/classes"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.testclasses.dir"  value="${basedir}/esb/build/classes/tests/"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.src.dir"          value="${basedir}/esb/src"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.test.dir"         value="${basedir}/esb/test"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.lib.dir"      	value="${basedir}/esb/lib"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.dest"        	value="${basedir}/esb/build"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.classes.dir" 	value="${basedir}/esb/build/classes"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.testclasses.dir"  value="${basedir}/esb/build/classes/tests/"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.src.dir"          value="${basedir}/esb/src"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.test.dir"         value="${basedir}/esb/test"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.lib.dir"      	value="${basedir}/esb/lib"/>
 	<property name="org.jboss.esb.samples.trailblazer.esb.tests.report.dir" value="${basedir}/esb/build/tests"/>
 
 	<!-- properties for the client(web) part of the trailblazer -->
-	<property name="org.jboss.esb.samples.trailblazer.client.dest"        		value="${basedir}/client/build"/>
-	<property name="org.jboss.esb.samples.trailblazer.client.classes.dir" 		value="${basedir}/client/build/classes"/>
-	<property name="org.jboss.esb.samples.trailblazer.client.testclasses.dir"  	value="${basedir}/client/build/classes/tests/"/>
-	<property name="org.jboss.esb.samples.trailblazer.client.src.dir"          	value="${basedir}/client/src"/>
-	<property name="org.jboss.esb.samples.trailblazer.client.test.dir"         	value="${basedir}/client/test"/>
-	<property name="org.jboss.esb.samples.trailblazer.client.lib.dir"		value="${basedir}/client/lib"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.dest"        		value="${basedir}/client/build"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.classes.dir" 		value="${basedir}/client/build/classes"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.testclasses.dir"  	value="${basedir}/client/build/classes/tests/"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.src.dir"          	value="${basedir}/client/src"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.test.dir"         	value="${basedir}/client/test"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.lib.dir"		value="${basedir}/client/lib"/>
 	<property name="org.jboss.esb.samples.trailblazer.client.tests.report.dir" 	value="${basedir}/client/build/tests"/>
-
-	<property environment="env" />
 
+	<property environment="env" />
+
         <property name="org.jboss.soa.esb.lib.file" value="jbossesb-rosetta.jar"/>
         <property name="org.jboss.soa.esb.lib.dist.dir" value="${org.jboss.soa.samples.trailblazer.esb_home}/lib"/>
         <property name="org.jboss.soa.esb.lib.src.dir" value="../../build/jbossesb/lib"/>
@@ -65,162 +65,162 @@
             value="${org.jboss.soa.esb.lib.src.dir}"/>
 
 	<property name="org.jboss.soa.esb.lib.ext.dir" value="${org.jboss.soa.esb.lib.dir}/ext"/>
-	
-
+	
+
 	<!-- classpath -->
-	<path id="org.jboss.esb.samples.trailblazer.esb.classpath">
-		<fileset dir="${org.jboss.soa.esb.lib.dir}/ext" includes="*.jar"/>
-		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
-		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath">
+		<fileset dir="${org.jboss.soa.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
 		<fileset dir="${org.jboss.soa.esb.lib.dir}" includes="*.jar"/>
-		<fileset dir="${org.jboss.esb.samples.trailblazer.client.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.client.lib.dir}/ext" includes="*.jar"/>
 	</path>
 
 	<!-- classpath for running the listener-->
-	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.run">
-		<fileset dir="${org.jboss.soa.esb.lib.ext.dir}"
-			includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
-		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist" includes="trailblazer-esb.jar"/>
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.run">
+		<fileset dir="${org.jboss.soa.esb.lib.ext.dir}"
+			includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist" includes="trailblazer-esb.jar"/>
 		<fileset dir="${org.jboss.soa.samples.trailblazer.esb_home}/lib/ext" includes="*.jar" excludes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
 		<fileset dir="${org.jboss.soa.esb.lib.ext.dir}" includes="*.jar" excludes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
-		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
 		<fileset dir="${org.jboss.soa.esb.lib.dir}" includes="*.jar"/>
-		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
 		<!-- for finding the jbossesb-properties.xml file -->
-		<pathelement location="${basedir}"/>
+		<pathelement location="${basedir}"/>
 	</path>
 
-	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.client">
-		<fileset dir="${org.jboss.soa.esb.lib.ext.dir}"/>
-		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
-		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.client">
+		<fileset dir="${org.jboss.soa.esb.lib.ext.dir}"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
 		<fileset dir="${org.jboss.soa.esb.lib.dir}" includes="*.jar"/>
 		<fileset dir="${org.jboss.esb.samples.trailblazer.client.lib.dir}/ext" includes="*.jar"/>
-		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist" includes="trailblazer-esb.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist" includes="trailblazer-esb.jar"/>
 	</path>
 
-
-
-	<target name="clean">
+
+
+	<target name="clean">
 		<delete dir="${org.jboss.esb.samples.trailblazer.esb.dest}"/>
-		<delete dir="${org.jboss.esb.samples.trailblazer.client.dest}"/>
-	</target>
+		<delete dir="${org.jboss.esb.samples.trailblazer.client.dest}"/>
+	</target>
 	
-	<!-- =================================================================== -->
-	<!-- Prepares the directory structure                                    -->
-	<!-- =================================================================== -->
-	<target name="org.jboss.esb.samples.trailblazer.prepare">
-		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}"/>
-		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist"/>
+	<!-- =================================================================== -->
+	<!-- Prepares the directory structure                                    -->
+	<!-- =================================================================== -->
+	<target name="org.jboss.esb.samples.trailblazer.prepare">
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist"/>
 		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/classes"/>
-		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}"/>
-		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}/dist"/>
-		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}/classes"/>
-	</target>
-
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}/dist"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}/classes"/>
+	</target>
+
 	<!-- Compilation targets -->
 	<!-- ___________________ -->
 	
-	<!-- ESB COMPILATION -->
-	<target name="org.jboss.esb.samples.trailblazer.esb.compile" depends="org.jboss.esb.samples.trailblazer.prepare"
-		description="Compiling Trailblazer ESB classes">
-		<javac
-		            destdir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}"
-		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath"
-		        	debug="true"
-		        	>
-			<src path="${org.jboss.esb.samples.trailblazer.esb.src.dir}"/>
-		</javac>
+	<!-- ESB COMPILATION -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.compile" depends="org.jboss.esb.samples.trailblazer.prepare"
+		description="Compiling Trailblazer ESB classes">
+		<javac
+		            destdir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}"
+		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath"
+		        	debug="true"
+		        	>
+			<src path="${org.jboss.esb.samples.trailblazer.esb.src.dir}"/>
+		</javac>
 	</target>
 
 	<!-- CLIENT(WEB) COMPILATION -->
-	<target name="org.jboss.esb.samples.trailblazer.client.compile" depends="org.jboss.esb.samples.trailblazer.prepare"
-		description="Compiling Trailblazer client classes">
-
-		<javac
-		            destdir="${org.jboss.esb.samples.trailblazer.client.classes.dir}"
-		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath.client" debug="true">
-			<src path="${org.jboss.esb.samples.trailblazer.client.src.dir}"/>
-		</javac>
-	</target>
+	<target name="org.jboss.esb.samples.trailblazer.client.compile" depends="org.jboss.esb.samples.trailblazer.prepare"
+		description="Compiling Trailblazer client classes">
+
+		<javac
+		            destdir="${org.jboss.esb.samples.trailblazer.client.classes.dir}"
+		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath.client" debug="true">
+			<src path="${org.jboss.esb.samples.trailblazer.client.src.dir}"/>
+		</javac>
+	</target>
 	
-
-	<!-- JAR/WAR targets -->
-	<target name="org.jboss.esb.samples.trailblazer.esb.jar" depends="compile" >
+
+	<!-- JAR/WAR targets -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.jar" depends="compile" >
 		
 		<!-- ESB JAR -->
-		<echo message="Building Trailblazer ESB jar file"/>
+		<echo message="Building Trailblazer ESB jar file"/>
 		<delete file="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" />
-		<jar    destfile="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" 
-                basedir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}" 
-                includes="**/*.class" excludes="**/web/*.class">
-        </jar>
+		<jar    destfile="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" 
+                basedir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}" 
+                includes="**/*.class" excludes="**/web/*.class">
+        </jar>
 		
 		<!-- Web side WAR -->
 		<echo message="Building Trailblazer WAR file"/>
 		<delete file="${org.jboss.esb.samples.trailblazer.client.dest}/dist/trailblazer.war" />		
-		<war    warfile="${org.jboss.esb.samples.trailblazer.client.dest}/dist/trailblazer.war"
-		        webxml="${basedir}/client/resources/web.xml">
+		<war    warfile="${org.jboss.esb.samples.trailblazer.client.dest}/dist/trailblazer.war"
+		        webxml="${basedir}/client/resources/web.xml">
 			<classes dir="${org.jboss.esb.samples.trailblazer.client.classes.dir}" includes="**/web/**/*.class"/>
-			<classes dir="${org.jboss.esb.samples.trailblazer.client.classes.dir}" includes="**/loanbroker/**/*.class"/>
-			<lib dir="${org.jboss.soa.esb.lib.dir}">
-				<include name="*.jar"/>
+			<classes dir="${org.jboss.esb.samples.trailblazer.client.classes.dir}" includes="**/loanbroker/**/*.class"/>
+			<lib dir="${org.jboss.soa.esb.lib.dir}">
+				<include name="*.jar"/>
 			</lib>
-
-			<lib dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist">
-				<include name="trailblazer-esb.jar"/>
+
+			<lib dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist">
+				<include name="trailblazer-esb.jar"/>
 			</lib>
 
-			<lib dir="${org.jboss.esb.samples.trailblazer.client.lib.dir}/ext">
+			<lib dir="${org.jboss.esb.samples.trailblazer.client.lib.dir}/ext">
 				<include name="axis.jar"/>
-				<include name="commons-discovery.jar"/>
-			</lib>
-			<lib dir="${org.jboss.soa.esb.lib.ext.dir}">
-				<include name="xbean-1.0.4.jar"/>
-				<include name="commons-discovery.jar"/>
+				<include name="commons-discovery.jar"/>
+			</lib>
+			<lib dir="${org.jboss.soa.esb.lib.ext.dir}">
+				<include name="xbean-1.0.4.jar"/>
+				<include name="commons-discovery.jar"/>
 				<include name="jbossts-common.jar"/>
-				<include name="jaxr-api-1.0.jar"/>
-				<include name="scout-0.7rc2-embedded.jar"/>
-				<include name="juddi-embedded.jar"/>				
-			</lib>
-			<fileset dir="${basedir}/client/jsp">
-				<include name="**/*.jsp"/>
+				<include name="jaxr-api-1.0.jar"/>
+				<include name="scout-0.7rc2-embedded.jar"/>
+				<include name="juddi-embedded.jar"/>				
+			</lib>
+			<fileset dir="${basedir}/client/jsp">
+				<include name="**/*.jsp"/>
 			</fileset>
-			<webinf dir="${basedir}/client/resources">
-				<include name="jboss-web.xml"/>
+			<webinf dir="${basedir}/client/resources">
+				<include name="jboss-web.xml"/>
 			</webinf>
-			<classes dir="${basedir}">
-				<include name="juddi.properties"/>
-			</classes>
-		</war>
-	</target>
+			<classes dir="${basedir}">
+				<include name="juddi.properties"/>
+			</classes>
+		</war>
+	</target>
 	
-	<target name="deploy-war" depends="jar">
-		<copy file="${org.jboss.esb.samples.trailblazer.client.dest}/dist/trailblazer.war"
+	<target name="deploy-war" depends="jar">
+		<copy file="${org.jboss.esb.samples.trailblazer.client.dest}/dist/trailblazer.war"
 		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy"/>
 		<copy file="${basedir}/esb-trailblazer-service.xml" overwrite="true"
-				todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy"/>
-		<copy file="${basedir}/jbossesb-properties.xml" 
-				tofile="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf/jbossesb-properties.xml" overwrite="true"/>
-	</target>
-	
-	<target name="deploy-jars" depends="jar">
-		<copy file="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar"
-		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy/jbossesb.sar"/>
-		<copy file="${basedir}/jbossesb-properties.xml" 
-		tofile="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf/jbossesb-properties.xml"/>
-		<copy file="${basedir}/esb-trailblazer-service.xml"
-		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy"/>
-		<copy file="${org.jboss.soa.esb.lib.ext.dir}/stringtemplate-2.3b6.jar"
-		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy/jbossesb.sar"/>
-		<copy file="${basedir}/esb/conf/jbossesb-listener.xml" overwrite="true"
-		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf"/>
-		<copy file="${basedir}/esb/conf/jbossesb-gateway.xml" overwrite="true"
-		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf"/>
-	</target>
+				todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy"/>
+		<copy file="${basedir}/jbossesb-properties.xml" 
+				tofile="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf/jbossesb-properties.xml" overwrite="true"/>
+	</target>
+	
+	<target name="deploy-jars" depends="jar">
+		<copy file="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy/jbossesb.sar"/>
+		<copy file="${basedir}/jbossesb-properties.xml" 
+		tofile="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf/jbossesb-properties.xml"/>
+		<copy file="${basedir}/esb-trailblazer-service.xml"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy"/>
+		<copy file="${org.jboss.soa.esb.lib.ext.dir}/stringtemplate-2.3b6.jar"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy/jbossesb.sar"/>
+		<copy file="${basedir}/esb/conf/jbossesb-listener.xml" overwrite="true"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf"/>
+		<copy file="${basedir}/esb/conf/jbossesb-gateway.xml" overwrite="true"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf"/>
+	</target>
 
 
-	<!-- Short target names -->
+	<!-- Short target names -->
 	<target name="compile" depends="org.jboss.esb.samples.trailblazer.esb.compile,org.jboss.esb.samples.trailblazer.client.compile"/>
 	<target name="jar" depends="org.jboss.esb.samples.trailblazer.esb.jar"/>
 
@@ -229,18 +229,18 @@
 	<!-- arg1 = # of seconds to let the listener threads run -->
 	<!-- arg2 = location of the esb config file which describes the listener configurations for a Message aware listener config -->
 	<!-- arg3 (if any) = location of the esb config file which describes the listener configurations for a NON-Message aware listener config (gateway)-->
-	<target name="runESB" depends="jar">
-		<echo>Running ESB Trailblazer listeners</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.trailblazer.util.TbBootStrapper" failonerror="true">
+	<target name="runESB" depends="jar">
+		<echo>Running ESB Trailblazer listeners</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.trailblazer.util.TbBootStrapper" failonerror="true">
 			<arg value="${org.jboss.soa.samples.trailblazer.home}/esb/conf/jbossesb.xml"/>
-			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath.run"/>
-		</java>
+			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath.run"/>
+		</java>
 	</target>
 
-	<!-- javadocs paths -->
-	<path id="org.jboss.esb.samples.trailblazer.esb.javadocs.path">
-		<pathelement path="esb/classes"/>
-	</path>
-
-		
-</project>
+	<!-- javadocs paths -->
+	<path id="org.jboss.esb.samples.trailblazer.esb.javadocs.path">
+		<pathelement path="esb/classes"/>
+	</path>
+
+		
+</project>


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/jboss-web.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?> 
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> 
-	<servlet> 
-		<servlet-name>LoanBrokerWS</servlet-name> 
-		<servlet-class>org.jboss.soa.esb.samples.trailblazer.web.LoanBrokerWS</servlet-class>
-	</servlet>
-	<servlet-mapping>
-		<servlet-name>LoanBrokerWS</servlet-name>
-		<url-pattern>/LoanBrokerWS</url-pattern>
-	</servlet-mapping>
-</web-app>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> 
+	<servlet> 
+		<servlet-name>LoanBrokerWS</servlet-name> 
+		<servlet-class>org.jboss.soa.esb.samples.trailblazer.web.LoanBrokerWS</servlet-class>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>LoanBrokerWS</servlet-name>
+		<url-pattern>/LoanBrokerWS</url-pattern>
+	</servlet-mapping>
+</web-app>


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/Customer.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/CustomerMasterFile.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,132 +1,132 @@
-/*
-* 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.samples.trailblazer.loanbroker;
-
-import java.io.Serializable;
-
-
-public class QuoteRequest implements Serializable 
-{
-	private static final long serialVersionUID = 1L;
-	public int ssn;
-	public int creditScore;
-	public int creditHistoryLen;
-	public int amount;
-	public int term;
-	public String customerUniqueId;
-	public String customerEmail;
-	
-	/**
-	 * Gets for the credit score.
-	 * @return credit score
-	 */
-	public int getCreditScore() {
-		return creditScore;
-	}
-	/**
-	 * Sets the credit score.
-	 * @param creditScore
-	 */
-	public void setCreditScore(int creditScore) {
-		this.creditScore = creditScore;
-	}
-	/**
-	 * Gets the credit history length (in months).
-	 * @return credit history length
-	 */
-	public int getCreditHistoryLen() {
-		return creditHistoryLen;
-	}
-	/**
-	 * Sets the credit history length (in months).
-	 * @param creditHistoryLen
-	 */
-	public void setCreditHistoryLen(int historyLength) {
-		this.creditHistoryLen = historyLength;
-	}
-	/**
-	 * Gets the requested loan amount (in dollar).
-	 * @return the loan amount
-	 */
-	public int getAmount() {
-		return amount;
-	}
-	/** 
-	 * Sets the loan amount.
-	 * @param amount - the loan amount (in dollar).
-	 */
-	public void setAmount(int loanAmount) {
-		this.amount = loanAmount;
-	}
-	/**
-	 * Gets the duration of the loan, the term, (in months).
-	 * @return term
-	 */
-	public int getTerm() {
-		return term;
-	}
-	/**
-	 * Sets the term (duration) of the loan (in months)
-	 * @param term
-	 */
-	public void setTerm(int loanTerm) {
-		this.term = loanTerm;
-	}
-	/** 
-	 * Sets the Social Security Number (SSN).
-	 * @return ssn
-	 */
-	public int getSsn() {
-		return ssn;
-	}
-	/**
-	 * Sets the Social Security Number (SSN).
-	 * @param ssn
-	 */
-	public void setSsn(int ssn) {
-		this.ssn = ssn;
-	}
-	/**
-	 * Returns a human readable string representation of this object.
-	 * @return toString
-	 */
-	public String toString() {
-		return this.getClass().getSimpleName() + "=["
-			+ "ssn=" + ssn
-		    + ", creditScore=" + creditScore
-			+ ", creditHistoryLen=" + creditHistoryLen
-			+ ", amount=" + amount
-			+ ", term=" + term
-			+ ", customerUniqueId="+ customerUniqueId + "]";	
-	}
-	
-	public String getCSV() {
-		return (ssn+","+creditScore+","+creditHistoryLen+","+amount+","+term+","+ssn+","+customerEmail);
-	}
-	
-	public String getCustomerUniqueId() {
-		return customerUniqueId;
-	}
-	public void setCustomerUniqueId(String customerUID) {
-		this.customerUniqueId = customerUID;
-	}
-}
+/*
+* 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.samples.trailblazer.loanbroker;
+
+import java.io.Serializable;
+
+
+public class QuoteRequest implements Serializable 
+{
+	private static final long serialVersionUID = 1L;
+	public int ssn;
+	public int creditScore;
+	public int creditHistoryLen;
+	public int amount;
+	public int term;
+	public String customerUniqueId;
+	public String customerEmail;
+	
+	/**
+	 * Gets for the credit score.
+	 * @return credit score
+	 */
+	public int getCreditScore() {
+		return creditScore;
+	}
+	/**
+	 * Sets the credit score.
+	 * @param creditScore
+	 */
+	public void setCreditScore(int creditScore) {
+		this.creditScore = creditScore;
+	}
+	/**
+	 * Gets the credit history length (in months).
+	 * @return credit history length
+	 */
+	public int getCreditHistoryLen() {
+		return creditHistoryLen;
+	}
+	/**
+	 * Sets the credit history length (in months).
+	 * @param creditHistoryLen
+	 */
+	public void setCreditHistoryLen(int historyLength) {
+		this.creditHistoryLen = historyLength;
+	}
+	/**
+	 * Gets the requested loan amount (in dollar).
+	 * @return the loan amount
+	 */
+	public int getAmount() {
+		return amount;
+	}
+	/** 
+	 * Sets the loan amount.
+	 * @param amount - the loan amount (in dollar).
+	 */
+	public void setAmount(int loanAmount) {
+		this.amount = loanAmount;
+	}
+	/**
+	 * Gets the duration of the loan, the term, (in months).
+	 * @return term
+	 */
+	public int getTerm() {
+		return term;
+	}
+	/**
+	 * Sets the term (duration) of the loan (in months)
+	 * @param term
+	 */
+	public void setTerm(int loanTerm) {
+		this.term = loanTerm;
+	}
+	/** 
+	 * Sets the Social Security Number (SSN).
+	 * @return ssn
+	 */
+	public int getSsn() {
+		return ssn;
+	}
+	/**
+	 * Sets the Social Security Number (SSN).
+	 * @param ssn
+	 */
+	public void setSsn(int ssn) {
+		this.ssn = ssn;
+	}
+	/**
+	 * Returns a human readable string representation of this object.
+	 * @return toString
+	 */
+	public String toString() {
+		return this.getClass().getSimpleName() + "=["
+			+ "ssn=" + ssn
+		    + ", creditScore=" + creditScore
+			+ ", creditHistoryLen=" + creditHistoryLen
+			+ ", amount=" + amount
+			+ ", term=" + term
+			+ ", customerUniqueId="+ customerUniqueId + "]";	
+	}
+	
+	public String getCSV() {
+		return (ssn+","+creditScore+","+creditHistoryLen+","+amount+","+term+","+ssn+","+customerEmail);
+	}
+	
+	public String getCustomerUniqueId() {
+		return customerUniqueId;
+	}
+	public void setCustomerUniqueId(String customerUID) {
+		this.customerUniqueId = customerUID;
+	}
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,56 +1,56 @@
-package org.jboss.soa.esb.samples.trailblazer.loanbroker;
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-public class SendJMSMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-    
-    
-    public void setupConnection(String queue) throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup(queue);
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender send = session.createSender(que);        
-        TextMessage tm = session.createTextMessage(msg);
-        send.send(tm);        
-        send.close();
-    }
-       
-    
-//    public static void main(String args[]) throws Exception
-//    {        	    	
-//    	SendJMSMessage sm = new SendJMSMessage();
-//    	sm.setupConnection();
-//    	sm.sendAMessage(args[0]); 
-//    	sm.stop();
-//    	
-//    }
-    
+package org.jboss.soa.esb.samples.trailblazer.loanbroker;
+
+import javax.jms.JMSException;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection(String queue) throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup(queue);
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        TextMessage tm = session.createTextMessage(msg);
+        send.send(tm);        
+        send.close();
+    }
+       
+    
+//    public static void main(String args[]) throws Exception
+//    {        	    	
+//    	SendJMSMessage sm = new SendJMSMessage();
+//    	sm.setupConnection();
+//    	sm.sendAMessage(args[0]); 
+//    	sm.stop();
+//    	
+//    }
+    
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,51 +1,51 @@
-/*
- * 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.samples.trailblazer.web;
-
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.samples.trailblazer.loanbroker.LoanBroker;
-
-/**
- * The Loan broker web service, which will handle a loan request. 
- */
- at WebService(name = "LoanBrokerWS", targetNamespace = "http://localhost/trailblazer")
- at SOAPBinding(style = SOAPBinding.Style.RPC)
-public class LoanBrokerWS 
-{
-	private static Logger logger = Logger.getLogger(LoanBrokerWS.class);
-		
-	@WebMethod
-	// method name is .NET friendly
-	public void RequestLoan(WebCustomer customer) {
-			
-			logger.info("WebCustomer received: \n" + customer);
-			
-			LoanBroker broker = new LoanBroker();
-			broker.processLoanRequest(customer);
-	}
-}
+/*
+ * 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.samples.trailblazer.web;
+
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.samples.trailblazer.loanbroker.LoanBroker;
+
+/**
+ * The Loan broker web service, which will handle a loan request. 
+ */
+ at WebService(name = "LoanBrokerWS", targetNamespace = "http://localhost/trailblazer")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public class LoanBrokerWS 
+{
+	private static Logger logger = Logger.getLogger(LoanBrokerWS.class);
+		
+	@WebMethod
+	// method name is .NET friendly
+	public void RequestLoan(WebCustomer customer) {
+			
+			logger.info("WebCustomer received: \n" + customer);
+			
+			LoanBroker broker = new LoanBroker();
+			broker.processLoanRequest(customer);
+	}
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,74 +1,74 @@
-/*
- * 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.
- */
-
-
-/*
- * a simple web Customer to use in the web services call and not expose the internal esb Customer object
- */
-package org.jboss.soa.esb.samples.trailblazer.web;
-
-import java.io.Serializable;
-
-/*
- * WebCustomer represents the data captured in the client JSP page
- */
-
- at SuppressWarnings("serial")
-public class WebCustomer implements Serializable
-{
-	public	String	name	,address	,employerName;
-	public	double	salary	,loanAmount;
-	public	int		loanDuration;	
-	public int		ssn;
-	public String	email;
-	
-	
-	public WebCustomer(){}
-	
-	public WebCustomer(String name, String address, String employerName, double salary, int loanDuration, double loanAmount, int ssn,String email) 
-    {
-		this.name			= name;
-		this.address		= address;
-		this.employerName	= employerName;
-		this.salary			= salary;
-		this.loanAmount		= loanAmount;
-		this.loanDuration	= loanDuration;
-		this.ssn 			= ssn;
-		this.email			= email;		
-    }//_________________________________________
-	
-	public String toString() {
-		String ret = "-- WebCustomer details -- \n";
-		ret += "name: " + name + "\n";
-		ret += "address: " + address + "\n";
-		ret += "employerName: " + employerName + "\n";
-		ret += "salary: " + salary + "\n";
-		ret += "loanAmount: " + loanAmount + "\n";
-		ret += "loanDuration: " + loanDuration + "\n";
-		ret += "ssn: " + ssn + "\n";
-		ret += "email: " + email + "\n";
-		ret += "--------------------------";
-		
-		return ret;
-	}
-
-}
+/*
+ * 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.
+ */
+
+
+/*
+ * a simple web Customer to use in the web services call and not expose the internal esb Customer object
+ */
+package org.jboss.soa.esb.samples.trailblazer.web;
+
+import java.io.Serializable;
+
+/*
+ * WebCustomer represents the data captured in the client JSP page
+ */
+
+ at SuppressWarnings("serial")
+public class WebCustomer implements Serializable
+{
+	public	String	name	,address	,employerName;
+	public	double	salary	,loanAmount;
+	public	int		loanDuration;	
+	public int		ssn;
+	public String	email;
+	
+	
+	public WebCustomer(){}
+	
+	public WebCustomer(String name, String address, String employerName, double salary, int loanDuration, double loanAmount, int ssn,String email) 
+    {
+		this.name			= name;
+		this.address		= address;
+		this.employerName	= employerName;
+		this.salary			= salary;
+		this.loanAmount		= loanAmount;
+		this.loanDuration	= loanDuration;
+		this.ssn 			= ssn;
+		this.email			= email;		
+    }//_________________________________________
+	
+	public String toString() {
+		String ret = "-- WebCustomer details -- \n";
+		ret += "name: " + name + "\n";
+		ret += "address: " + address + "\n";
+		ret += "employerName: " + employerName + "\n";
+		ret += "salary: " + salary + "\n";
+		ret += "loanAmount: " + loanAmount + "\n";
+		ret += "loanDuration: " + loanDuration + "\n";
+		ret += "ssn: " + ssn + "\n";
+		ret += "email: " + email + "\n";
+		ret += "--------------------------";
+		
+		return ret;
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,33 +1,33 @@
-/**
- * LoanBrokerWS.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
- */
-
-/*
- * 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 mark.little at jboss.com
- */
-
-package org.jboss.soa.esb.samples.trailblazer.web.generated;
-
-public interface LoanBrokerWS extends java.rmi.Remote {
-    public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException;
-}
+/**
+ * LoanBrokerWS.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+public interface LoanBrokerWS extends java.rmi.Remote {
+    public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException;
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,189 +1,189 @@
-/**
- * LoanBrokerWSBindingStub.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
- */
-
-/*
- * 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 mark.little at jboss.com
- */
-
-
-package org.jboss.soa.esb.samples.trailblazer.web.generated;
-
-public class LoanBrokerWSBindingStub extends org.apache.axis.client.Stub implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS {
-    private java.util.Vector cachedSerClasses = new java.util.Vector();
-    private java.util.Vector cachedSerQNames = new java.util.Vector();
-    private java.util.Vector cachedSerFactories = new java.util.Vector();
-    private java.util.Vector cachedDeserFactories = new java.util.Vector();
-
-    static org.apache.axis.description.OperationDesc [] _operations;
-
-    static {
-        _operations = new org.apache.axis.description.OperationDesc[1];
-        _initOperationDesc1();
+/**
+ * LoanBrokerWSBindingStub.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+public class LoanBrokerWSBindingStub extends org.apache.axis.client.Stub implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS {
+    private java.util.Vector cachedSerClasses = new java.util.Vector();
+    private java.util.Vector cachedSerQNames = new java.util.Vector();
+    private java.util.Vector cachedSerFactories = new java.util.Vector();
+    private java.util.Vector cachedDeserFactories = new java.util.Vector();
+
+    static org.apache.axis.description.OperationDesc [] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[1];
+        _initOperationDesc1();
     }
-
-    private static void _initOperationDesc1(){
-        org.apache.axis.description.OperationDesc oper;
-        org.apache.axis.description.ParameterDesc param;
-        oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("RequestLoan");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "WebCustomer_1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer"), org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
-        oper.setStyle(org.apache.axis.constants.Style.RPC);
-        oper.setUse(org.apache.axis.constants.Use.LITERAL);
-        _operations[0] = oper;
-
-    }
-
-    public LoanBrokerWSBindingStub() throws org.apache.axis.AxisFault {
-         this(null);
-    }
-
-    public LoanBrokerWSBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
-         this(service);
-         super.cachedEndpoint = endpointURL;
-    }
-
-    @SuppressWarnings({ "unused", "unchecked" })
-    public LoanBrokerWSBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
-        if (service == null) {
-            super.service = new org.apache.axis.client.Service();
-        } else {
-            super.service = service;
-        }
-        ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
-            java.lang.Class cls;
-            javax.xml.namespace.QName qName;
-			javax.xml.namespace.QName qName2;
-            java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
-            java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
-            java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
-            java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
-            java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
-            java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
-            java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
-            java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
-            java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
-            java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
-            qName = new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer");
-            cachedSerQNames.add(qName);
-            cls = org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer.class;
-            cachedSerClasses.add(cls);
-            cachedSerFactories.add(beansf);
-            cachedDeserFactories.add(beandf);
-
-    }
-
-    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
-        try {
-            org.apache.axis.client.Call _call = super._createCall();
-            if (super.maintainSessionSet) {
-                _call.setMaintainSession(super.maintainSession);
-            }
-            if (super.cachedUsername != null) {
-                _call.setUsername(super.cachedUsername);
-            }
-            if (super.cachedPassword != null) {
-                _call.setPassword(super.cachedPassword);
-            }
-            if (super.cachedEndpoint != null) {
-                _call.setTargetEndpointAddress(super.cachedEndpoint);
-            }
-            if (super.cachedTimeout != null) {
-                _call.setTimeout(super.cachedTimeout);
-            }
-            if (super.cachedPortName != null) {
-                _call.setPortName(super.cachedPortName);
-            }
-            java.util.Enumeration keys = super.cachedProperties.keys();
-            while (keys.hasMoreElements()) {
-                java.lang.String key = (java.lang.String) keys.nextElement();
-                _call.setProperty(key, super.cachedProperties.get(key));
-            }
-            // All the type mapping information is registered
-            // when the first call is made.
-            // The type mapping information is actually registered in
-            // the TypeMappingRegistry of the service, which
-            // is the reason why registration is only needed for the first call.
-            synchronized (this) {
-                if (firstCall()) {
-                    // must set encoding style before registering serializers
-                    _call.setEncodingStyle(null);
-                    for (int i = 0; i < cachedSerFactories.size(); ++i) {
-                        java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
-                        javax.xml.namespace.QName qName =
-                                (javax.xml.namespace.QName) cachedSerQNames.get(i);
-                        java.lang.Object x = cachedSerFactories.get(i);
-                        if (x instanceof Class) {
-                            java.lang.Class sf = (java.lang.Class)
-                                 cachedSerFactories.get(i);
-                            java.lang.Class df = (java.lang.Class)
-                                 cachedDeserFactories.get(i);
-                            _call.registerTypeMapping(cls, qName, sf, df, false);
-                        }
-                        else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
-                            org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
-                                 cachedSerFactories.get(i);
-                            org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
-                                 cachedDeserFactories.get(i);
-                            _call.registerTypeMapping(cls, qName, sf, df, false);
-                        }
-                    }
-                }
-            }
-            return _call;
-        }
-        catch (java.lang.Throwable _t) {
-            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
-        }
-    }
-
-    public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[0]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setEncodingStyle(null);
-        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
-        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://localhost/trailblazer", "RequestLoan"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {webCustomer_1});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        extractAttachments(_call);
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-}
+
+    private static void _initOperationDesc1(){
+        org.apache.axis.description.OperationDesc oper;
+        org.apache.axis.description.ParameterDesc param;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("RequestLoan");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "WebCustomer_1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer"), org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.LITERAL);
+        _operations[0] = oper;
+
+    }
+
+    public LoanBrokerWSBindingStub() throws org.apache.axis.AxisFault {
+         this(null);
+    }
+
+    public LoanBrokerWSBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+         this(service);
+         super.cachedEndpoint = endpointURL;
+    }
+
+    @SuppressWarnings({ "unused", "unchecked" })
+    public LoanBrokerWSBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+        ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
+            java.lang.Class cls;
+            javax.xml.namespace.QName qName;
+			javax.xml.namespace.QName qName2;
+            java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
+            java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
+            java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
+            java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
+            java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
+            java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
+            java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
+            java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
+            java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
+            java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
+            qName = new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer");
+            cachedSerQNames.add(qName);
+            cls = org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+    }
+
+    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
+        try {
+            org.apache.axis.client.Call _call = super._createCall();
+            if (super.maintainSessionSet) {
+                _call.setMaintainSession(super.maintainSession);
+            }
+            if (super.cachedUsername != null) {
+                _call.setUsername(super.cachedUsername);
+            }
+            if (super.cachedPassword != null) {
+                _call.setPassword(super.cachedPassword);
+            }
+            if (super.cachedEndpoint != null) {
+                _call.setTargetEndpointAddress(super.cachedEndpoint);
+            }
+            if (super.cachedTimeout != null) {
+                _call.setTimeout(super.cachedTimeout);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                java.lang.String key = (java.lang.String) keys.nextElement();
+                _call.setProperty(key, super.cachedProperties.get(key));
+            }
+            // All the type mapping information is registered
+            // when the first call is made.
+            // The type mapping information is actually registered in
+            // the TypeMappingRegistry of the service, which
+            // is the reason why registration is only needed for the first call.
+            synchronized (this) {
+                if (firstCall()) {
+                    // must set encoding style before registering serializers
+                    _call.setEncodingStyle(null);
+                    for (int i = 0; i < cachedSerFactories.size(); ++i) {
+                        java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
+                        javax.xml.namespace.QName qName =
+                                (javax.xml.namespace.QName) cachedSerQNames.get(i);
+                        java.lang.Object x = cachedSerFactories.get(i);
+                        if (x instanceof Class) {
+                            java.lang.Class sf = (java.lang.Class)
+                                 cachedSerFactories.get(i);
+                            java.lang.Class df = (java.lang.Class)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                        else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
+                            org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
+                                 cachedSerFactories.get(i);
+                            org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                    }
+                }
+            }
+            return _call;
+        }
+        catch (java.lang.Throwable _t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
+        }
+    }
+
+    public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setEncodingStyle(null);
+        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
+        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://localhost/trailblazer", "RequestLoan"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {webCustomer_1});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        extractAttachments(_call);
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+  throw axisFaultException;
+}
+    }
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,70 +1,70 @@
-/*
- * 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 mark.little at jboss.com
- */
-
-package org.jboss.soa.esb.samples.trailblazer.web.generated;
-
-public class LoanBrokerWSProxy implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS {
-  private String _endpoint = null;
-  private org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS loanBrokerWS = null;
-  
-  public LoanBrokerWSProxy() {
-    _initLoanBrokerWSProxy();
-  }
-  
-  private void _initLoanBrokerWSProxy() {
-    try {
-      loanBrokerWS = (new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSServiceLocator()).getLoanBrokerWSPort();
-      if (loanBrokerWS != null) {
-        if (_endpoint != null)
-          ((javax.xml.rpc.Stub)loanBrokerWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
-        else
-          _endpoint = (String)((javax.xml.rpc.Stub)loanBrokerWS)._getProperty("javax.xml.rpc.service.endpoint.address");
-      }
-      
-    }
-    catch (javax.xml.rpc.ServiceException serviceException) {}
-  }
-  
-  public String getEndpoint() {
-    return _endpoint;
-  }
-  
-  public void setEndpoint(String endpoint) {
-    _endpoint = endpoint;
-    if (loanBrokerWS != null)
-      ((javax.xml.rpc.Stub)loanBrokerWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
-    
-  }
-  
-  public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWS() {
-    if (loanBrokerWS == null)
-      _initLoanBrokerWSProxy();
-    return loanBrokerWS;
-  }
-  
-  public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException{
-    if (loanBrokerWS == null)
-      _initLoanBrokerWSProxy();
-    loanBrokerWS.requestLoan(webCustomer_1);
-  }
-  
-  
+/*
+ * 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 mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+public class LoanBrokerWSProxy implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS {
+  private String _endpoint = null;
+  private org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS loanBrokerWS = null;
+  
+  public LoanBrokerWSProxy() {
+    _initLoanBrokerWSProxy();
+  }
+  
+  private void _initLoanBrokerWSProxy() {
+    try {
+      loanBrokerWS = (new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSServiceLocator()).getLoanBrokerWSPort();
+      if (loanBrokerWS != null) {
+        if (_endpoint != null)
+          ((javax.xml.rpc.Stub)loanBrokerWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+        else
+          _endpoint = (String)((javax.xml.rpc.Stub)loanBrokerWS)._getProperty("javax.xml.rpc.service.endpoint.address");
+      }
+      
+    }
+    catch (javax.xml.rpc.ServiceException serviceException) {}
+  }
+  
+  public String getEndpoint() {
+    return _endpoint;
+  }
+  
+  public void setEndpoint(String endpoint) {
+    _endpoint = endpoint;
+    if (loanBrokerWS != null)
+      ((javax.xml.rpc.Stub)loanBrokerWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+    
+  }
+  
+  public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWS() {
+    if (loanBrokerWS == null)
+      _initLoanBrokerWSProxy();
+    return loanBrokerWS;
+  }
+  
+  public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException{
+    if (loanBrokerWS == null)
+      _initLoanBrokerWSProxy();
+    loanBrokerWS.requestLoan(webCustomer_1);
+  }
+  
+  
 }
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,38 +1,38 @@
-/**
- * LoanBrokerWSService.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
- */
-
-
-/*
- * 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 mark.little at jboss.com
- */
-
-package org.jboss.soa.esb.samples.trailblazer.web.generated;
-
-public interface LoanBrokerWSService extends javax.xml.rpc.Service {
-    public java.lang.String getLoanBrokerWSPortAddress();
-
-    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort() throws javax.xml.rpc.ServiceException;
-
-    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
-}
+/**
+ * LoanBrokerWSService.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+public interface LoanBrokerWSService extends javax.xml.rpc.Service {
+    public java.lang.String getLoanBrokerWSPortAddress();
+
+    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort() throws javax.xml.rpc.ServiceException;
+
+    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,166 +1,166 @@
-/**
- * LoanBrokerWSServiceLocator.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
- */
-
-
-/*
- * 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 mark.little at jboss.com
- */
-
-package org.jboss.soa.esb.samples.trailblazer.web.generated;
-
- at SuppressWarnings("serial")
-public class LoanBrokerWSServiceLocator extends org.apache.axis.client.Service implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSService {
-
-    public LoanBrokerWSServiceLocator() {
-    }
-
-
-    public LoanBrokerWSServiceLocator(org.apache.axis.EngineConfiguration config) {
-        super(config);
-    }
-
-    public LoanBrokerWSServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
-        super(wsdlLoc, sName);
-    }
-
-    // Use to get a proxy class for LoanBrokerWSPort
-    private java.lang.String LoanBrokerWSPort_address = "http://localhost:8080/trailblazer/LoanBrokerWS";
-
-    public java.lang.String getLoanBrokerWSPortAddress() {
-        return LoanBrokerWSPort_address;
-    }
-
-    // The WSDD service name defaults to the port name.
-    private java.lang.String LoanBrokerWSPortWSDDServiceName = "LoanBrokerWSPort";
-
-    public java.lang.String getLoanBrokerWSPortWSDDServiceName() {
-        return LoanBrokerWSPortWSDDServiceName;
-    }
-
-    public void setLoanBrokerWSPortWSDDServiceName(java.lang.String name) {
-        LoanBrokerWSPortWSDDServiceName = name;
-    }
-
-    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort() throws javax.xml.rpc.ServiceException {
-       java.net.URL endpoint;
-        try {
-            endpoint = new java.net.URL(LoanBrokerWSPort_address);
-        }
-        catch (java.net.MalformedURLException e) {
-            throw new javax.xml.rpc.ServiceException(e);
-        }
-        return getLoanBrokerWSPort(endpoint);
-    }
-
-    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
-        try {
-            org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub _stub = new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub(portAddress, this);
-            _stub.setPortName(getLoanBrokerWSPortWSDDServiceName());
-            return _stub;
-        }
-        catch (org.apache.axis.AxisFault e) {
-            return null;
-        }
-    }
-
-    public void setLoanBrokerWSPortEndpointAddress(java.lang.String address) {
-        LoanBrokerWSPort_address = address;
-    }
-
-    /**
-     * For the given interface, get the stub implementation.
-     * If this service has no port for the given interface,
-     * then ServiceException is thrown.
-     */
-    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
-        try {
-            if (org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS.class.isAssignableFrom(serviceEndpointInterface)) {
-                org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub _stub = new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub(new java.net.URL(LoanBrokerWSPort_address), this);
-                _stub.setPortName(getLoanBrokerWSPortWSDDServiceName());
-                return _stub;
-            }
-        }
-        catch (java.lang.Throwable t) {
-            throw new javax.xml.rpc.ServiceException(t);
-        }
-        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
-    }
-
-    /**
-     * For the given interface, get the stub implementation.
-     * If this service has no port for the given interface,
-     * then ServiceException is thrown.
-     */
-    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
-        if (portName == null) {
-            return getPort(serviceEndpointInterface);
-        }
-        java.lang.String inputPortName = portName.getLocalPart();
-        if ("LoanBrokerWSPort".equals(inputPortName)) {
-            return getLoanBrokerWSPort();
-        }
-        else  {
-            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
-            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
-            return _stub;
-        }
-    }
-
-    public javax.xml.namespace.QName getServiceName() {
-        return new javax.xml.namespace.QName("http://localhost/trailblazer", "LoanBrokerWSService");
-    }
-
-    private java.util.HashSet ports = null;
-
-    @SuppressWarnings("unchecked")
-	public java.util.Iterator getPorts() {
-        if (ports == null) {
-            ports = new java.util.HashSet();
-            ports.add(new javax.xml.namespace.QName("http://localhost/trailblazer", "LoanBrokerWSPort"));
-        }
-        return ports.iterator();
-    }
-
-    /**
-    * Set the endpoint address for the specified port name.
-    */
-    public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
-        
-if ("LoanBrokerWSPort".equals(portName)) {
-            setLoanBrokerWSPortEndpointAddress(address);
-        }
-        else 
-{ // Unknown Port Name
-            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
-        }
-    }
-
-    /**
-    * Set the endpoint address for the specified port name.
-    */
-    public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
-        setEndpointAddress(portName.getLocalPart(), address);
-    }
-
-}
+/**
+ * LoanBrokerWSServiceLocator.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+ at SuppressWarnings("serial")
+public class LoanBrokerWSServiceLocator extends org.apache.axis.client.Service implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSService {
+
+    public LoanBrokerWSServiceLocator() {
+    }
+
+
+    public LoanBrokerWSServiceLocator(org.apache.axis.EngineConfiguration config) {
+        super(config);
+    }
+
+    public LoanBrokerWSServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
+        super(wsdlLoc, sName);
+    }
+
+    // Use to get a proxy class for LoanBrokerWSPort
+    private java.lang.String LoanBrokerWSPort_address = "http://localhost:8080/trailblazer/LoanBrokerWS";
+
+    public java.lang.String getLoanBrokerWSPortAddress() {
+        return LoanBrokerWSPort_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private java.lang.String LoanBrokerWSPortWSDDServiceName = "LoanBrokerWSPort";
+
+    public java.lang.String getLoanBrokerWSPortWSDDServiceName() {
+        return LoanBrokerWSPortWSDDServiceName;
+    }
+
+    public void setLoanBrokerWSPortWSDDServiceName(java.lang.String name) {
+        LoanBrokerWSPortWSDDServiceName = name;
+    }
+
+    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort() throws javax.xml.rpc.ServiceException {
+       java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(LoanBrokerWSPort_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getLoanBrokerWSPort(endpoint);
+    }
+
+    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub _stub = new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub(portAddress, this);
+            _stub.setPortName(getLoanBrokerWSPortWSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    public void setLoanBrokerWSPortEndpointAddress(java.lang.String address) {
+        LoanBrokerWSPort_address = address;
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        try {
+            if (org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS.class.isAssignableFrom(serviceEndpointInterface)) {
+                org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub _stub = new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub(new java.net.URL(LoanBrokerWSPort_address), this);
+                _stub.setPortName(getLoanBrokerWSPortWSDDServiceName());
+                return _stub;
+            }
+        }
+        catch (java.lang.Throwable t) {
+            throw new javax.xml.rpc.ServiceException(t);
+        }
+        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        if (portName == null) {
+            return getPort(serviceEndpointInterface);
+        }
+        java.lang.String inputPortName = portName.getLocalPart();
+        if ("LoanBrokerWSPort".equals(inputPortName)) {
+            return getLoanBrokerWSPort();
+        }
+        else  {
+            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+            return _stub;
+        }
+    }
+
+    public javax.xml.namespace.QName getServiceName() {
+        return new javax.xml.namespace.QName("http://localhost/trailblazer", "LoanBrokerWSService");
+    }
+
+    private java.util.HashSet ports = null;
+
+    @SuppressWarnings("unchecked")
+	public java.util.Iterator getPorts() {
+        if (ports == null) {
+            ports = new java.util.HashSet();
+            ports.add(new javax.xml.namespace.QName("http://localhost/trailblazer", "LoanBrokerWSPort"));
+        }
+        return ports.iterator();
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
+        
+if ("LoanBrokerWSPort".equals(portName)) {
+            setLoanBrokerWSPortEndpointAddress(address);
+        }
+        else 
+{ // Unknown Port Name
+            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+        }
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
+        setEndpointAddress(portName.getLocalPart(), address);
+    }
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,378 +1,378 @@
-/**
- * WebCustomer.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
- */
-
-
-/*
- * 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 mark.little at jboss.com
- */
-
-package org.jboss.soa.esb.samples.trailblazer.web.generated;
-
- at SuppressWarnings("serial")
-public class WebCustomer  implements java.io.Serializable {
-    private java.lang.String address;
-
-    private java.lang.String email;
-
-    private java.lang.String employerName;
-
-    private double loanAmount;
-
-    private int loanDuration;
-
-    private java.lang.String name;
-
-    private double salary;
-
-    private int ssn;
-
-    public WebCustomer() {
-    }
-
-    public WebCustomer(
-           java.lang.String address,
-           java.lang.String email,
-           java.lang.String employerName,
-           double loanAmount,
-           int loanDuration,
-           java.lang.String name,
-           double salary,
-           int ssn) {
-           this.address = address;
-           this.email = email;
-           this.employerName = employerName;
-           this.loanAmount = loanAmount;
-           this.loanDuration = loanDuration;
-           this.name = name;
-           this.salary = salary;
-           this.ssn = ssn;
-    }
-
-
-    /**
-     * Gets the address value for this WebCustomer.
-     * 
-     * @return address
-     */
-    public java.lang.String getAddress() {
-        return address;
-    }
-
-
-    /**
-     * Sets the address value for this WebCustomer.
-     * 
-     * @param address
-     */
-    public void setAddress(java.lang.String address) {
-        this.address = address;
-    }
-
-
-    /**
-     * Gets the email value for this WebCustomer.
-     * 
-     * @return email
-     */
-    public java.lang.String getEmail() {
-        return email;
-    }
-
-
-    /**
-     * Sets the email value for this WebCustomer.
-     * 
-     * @param email
-     */
-    public void setEmail(java.lang.String email) {
-        this.email = email;
-    }
-
-
-    /**
-     * Gets the employerName value for this WebCustomer.
-     * 
-     * @return employerName
-     */
-    public java.lang.String getEmployerName() {
-        return employerName;
-    }
-
-
-    /**
-     * Sets the employerName value for this WebCustomer.
-     * 
-     * @param employerName
-     */
-    public void setEmployerName(java.lang.String employerName) {
-        this.employerName = employerName;
-    }
-
-
-    /**
-     * Gets the loanAmount value for this WebCustomer.
-     * 
-     * @return loanAmount
-     */
-    public double getLoanAmount() {
-        return loanAmount;
-    }
-
-
-    /**
-     * Sets the loanAmount value for this WebCustomer.
-     * 
-     * @param loanAmount
-     */
-    public void setLoanAmount(double loanAmount) {
-        this.loanAmount = loanAmount;
-    }
-
-
-    /**
-     * Gets the loanDuration value for this WebCustomer.
-     * 
-     * @return loanDuration
-     */
-    public int getLoanDuration() {
-        return loanDuration;
-    }
-
-
-    /**
-     * Sets the loanDuration value for this WebCustomer.
-     * 
-     * @param loanDuration
-     */
-    public void setLoanDuration(int loanDuration) {
-        this.loanDuration = loanDuration;
-    }
-
-
-    /**
-     * Gets the name value for this WebCustomer.
-     * 
-     * @return name
-     */
-    public java.lang.String getName() {
-        return name;
-    }
-
-
-    /**
-     * Sets the name value for this WebCustomer.
-     * 
-     * @param name
-     */
-    public void setName(java.lang.String name) {
-        this.name = name;
-    }
-
-
-    /**
-     * Gets the salary value for this WebCustomer.
-     * 
-     * @return salary
-     */
-    public double getSalary() {
-        return salary;
-    }
-
-
-    /**
-     * Sets the salary value for this WebCustomer.
-     * 
-     * @param salary
-     */
-    public void setSalary(double salary) {
-        this.salary = salary;
-    }
-
-
-    /**
-     * Gets the ssn value for this WebCustomer.
-     * 
-     * @return ssn
-     */
-    public int getSsn() {
-        return ssn;
-    }
-
-
-    /**
-     * Sets the ssn value for this WebCustomer.
-     * 
-     * @param ssn
-     */
-    public void setSsn(int ssn) {
-        this.ssn = ssn;
-    }
-
-    private java.lang.Object __equalsCalc = null;
-    public synchronized boolean equals(java.lang.Object obj) {
-        if (!(obj instanceof WebCustomer)) return false;
-        WebCustomer other = (WebCustomer) obj;
-        if (obj == null) return false;
-        if (this == obj) return true;
-        if (__equalsCalc != null) {
-            return (__equalsCalc == obj);
-        }
-        __equalsCalc = obj;
-        boolean _equals;
-        _equals = true && 
-            ((this.address==null && other.getAddress()==null) || 
-             (this.address!=null &&
-              this.address.equals(other.getAddress()))) &&
-            ((this.email==null && other.getEmail()==null) || 
-             (this.email!=null &&
-              this.email.equals(other.getEmail()))) &&
-            ((this.employerName==null && other.getEmployerName()==null) || 
-             (this.employerName!=null &&
-              this.employerName.equals(other.getEmployerName()))) &&
-            this.loanAmount == other.getLoanAmount() &&
-            this.loanDuration == other.getLoanDuration() &&
-            ((this.name==null && other.getName()==null) || 
-             (this.name!=null &&
-              this.name.equals(other.getName()))) &&
-            this.salary == other.getSalary() &&
-            this.ssn == other.getSsn();
-        __equalsCalc = null;
-        return _equals;
-    }
-
-    private boolean __hashCodeCalc = false;
-    public synchronized int hashCode() {
-        if (__hashCodeCalc) {
-            return 0;
-        }
-        __hashCodeCalc = true;
-        int _hashCode = 1;
-        if (getAddress() != null) {
-            _hashCode += getAddress().hashCode();
-        }
-        if (getEmail() != null) {
-            _hashCode += getEmail().hashCode();
-        }
-        if (getEmployerName() != null) {
-            _hashCode += getEmployerName().hashCode();
-        }
-        _hashCode += new Double(getLoanAmount()).hashCode();
-        _hashCode += getLoanDuration();
-        if (getName() != null) {
-            _hashCode += getName().hashCode();
-        }
-        _hashCode += new Double(getSalary()).hashCode();
-        _hashCode += getSsn();
-        __hashCodeCalc = false;
-        return _hashCode;
-    }
-
-    // Type metadata
-    private static org.apache.axis.description.TypeDesc typeDesc =
-        new org.apache.axis.description.TypeDesc(WebCustomer.class, true);
-
-    static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer"));
-        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("address");
-        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "address"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("email");
-        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "email"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("employerName");
-        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "employerName"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("loanAmount");
-        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "loanAmount"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("loanDuration");
-        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "loanDuration"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("name");
-        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "name"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("salary");
-        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "salary"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("ssn");
-        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "ssn"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-    }
-
-    /**
-     * Return type metadata object
-     */
-    public static org.apache.axis.description.TypeDesc getTypeDesc() {
-        return typeDesc;
-    }
-
-    /**
-     * Get Custom Serializer
-     */
-    public static org.apache.axis.encoding.Serializer getSerializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanSerializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-    /**
-     * Get Custom Deserializer
-     */
-    public static org.apache.axis.encoding.Deserializer getDeserializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanDeserializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-}
+/**
+ * WebCustomer.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+ at SuppressWarnings("serial")
+public class WebCustomer  implements java.io.Serializable {
+    private java.lang.String address;
+
+    private java.lang.String email;
+
+    private java.lang.String employerName;
+
+    private double loanAmount;
+
+    private int loanDuration;
+
+    private java.lang.String name;
+
+    private double salary;
+
+    private int ssn;
+
+    public WebCustomer() {
+    }
+
+    public WebCustomer(
+           java.lang.String address,
+           java.lang.String email,
+           java.lang.String employerName,
+           double loanAmount,
+           int loanDuration,
+           java.lang.String name,
+           double salary,
+           int ssn) {
+           this.address = address;
+           this.email = email;
+           this.employerName = employerName;
+           this.loanAmount = loanAmount;
+           this.loanDuration = loanDuration;
+           this.name = name;
+           this.salary = salary;
+           this.ssn = ssn;
+    }
+
+
+    /**
+     * Gets the address value for this WebCustomer.
+     * 
+     * @return address
+     */
+    public java.lang.String getAddress() {
+        return address;
+    }
+
+
+    /**
+     * Sets the address value for this WebCustomer.
+     * 
+     * @param address
+     */
+    public void setAddress(java.lang.String address) {
+        this.address = address;
+    }
+
+
+    /**
+     * Gets the email value for this WebCustomer.
+     * 
+     * @return email
+     */
+    public java.lang.String getEmail() {
+        return email;
+    }
+
+
+    /**
+     * Sets the email value for this WebCustomer.
+     * 
+     * @param email
+     */
+    public void setEmail(java.lang.String email) {
+        this.email = email;
+    }
+
+
+    /**
+     * Gets the employerName value for this WebCustomer.
+     * 
+     * @return employerName
+     */
+    public java.lang.String getEmployerName() {
+        return employerName;
+    }
+
+
+    /**
+     * Sets the employerName value for this WebCustomer.
+     * 
+     * @param employerName
+     */
+    public void setEmployerName(java.lang.String employerName) {
+        this.employerName = employerName;
+    }
+
+
+    /**
+     * Gets the loanAmount value for this WebCustomer.
+     * 
+     * @return loanAmount
+     */
+    public double getLoanAmount() {
+        return loanAmount;
+    }
+
+
+    /**
+     * Sets the loanAmount value for this WebCustomer.
+     * 
+     * @param loanAmount
+     */
+    public void setLoanAmount(double loanAmount) {
+        this.loanAmount = loanAmount;
+    }
+
+
+    /**
+     * Gets the loanDuration value for this WebCustomer.
+     * 
+     * @return loanDuration
+     */
+    public int getLoanDuration() {
+        return loanDuration;
+    }
+
+
+    /**
+     * Sets the loanDuration value for this WebCustomer.
+     * 
+     * @param loanDuration
+     */
+    public void setLoanDuration(int loanDuration) {
+        this.loanDuration = loanDuration;
+    }
+
+
+    /**
+     * Gets the name value for this WebCustomer.
+     * 
+     * @return name
+     */
+    public java.lang.String getName() {
+        return name;
+    }
+
+
+    /**
+     * Sets the name value for this WebCustomer.
+     * 
+     * @param name
+     */
+    public void setName(java.lang.String name) {
+        this.name = name;
+    }
+
+
+    /**
+     * Gets the salary value for this WebCustomer.
+     * 
+     * @return salary
+     */
+    public double getSalary() {
+        return salary;
+    }
+
+
+    /**
+     * Sets the salary value for this WebCustomer.
+     * 
+     * @param salary
+     */
+    public void setSalary(double salary) {
+        this.salary = salary;
+    }
+
+
+    /**
+     * Gets the ssn value for this WebCustomer.
+     * 
+     * @return ssn
+     */
+    public int getSsn() {
+        return ssn;
+    }
+
+
+    /**
+     * Sets the ssn value for this WebCustomer.
+     * 
+     * @param ssn
+     */
+    public void setSsn(int ssn) {
+        this.ssn = ssn;
+    }
+
+    private java.lang.Object __equalsCalc = null;
+    public synchronized boolean equals(java.lang.Object obj) {
+        if (!(obj instanceof WebCustomer)) return false;
+        WebCustomer other = (WebCustomer) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = true && 
+            ((this.address==null && other.getAddress()==null) || 
+             (this.address!=null &&
+              this.address.equals(other.getAddress()))) &&
+            ((this.email==null && other.getEmail()==null) || 
+             (this.email!=null &&
+              this.email.equals(other.getEmail()))) &&
+            ((this.employerName==null && other.getEmployerName()==null) || 
+             (this.employerName!=null &&
+              this.employerName.equals(other.getEmployerName()))) &&
+            this.loanAmount == other.getLoanAmount() &&
+            this.loanDuration == other.getLoanDuration() &&
+            ((this.name==null && other.getName()==null) || 
+             (this.name!=null &&
+              this.name.equals(other.getName()))) &&
+            this.salary == other.getSalary() &&
+            this.ssn == other.getSsn();
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = 1;
+        if (getAddress() != null) {
+            _hashCode += getAddress().hashCode();
+        }
+        if (getEmail() != null) {
+            _hashCode += getEmail().hashCode();
+        }
+        if (getEmployerName() != null) {
+            _hashCode += getEmployerName().hashCode();
+        }
+        _hashCode += new Double(getLoanAmount()).hashCode();
+        _hashCode += getLoanDuration();
+        if (getName() != null) {
+            _hashCode += getName().hashCode();
+        }
+        _hashCode += new Double(getSalary()).hashCode();
+        _hashCode += getSsn();
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WebCustomer.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("address");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "address"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("email");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "email"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("employerName");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "employerName"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("loanAmount");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "loanAmount"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("loanDuration");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "loanDuration"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("name");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "name"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("salary");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "salary"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("ssn");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "ssn"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           java.lang.String mechType, 
+           java.lang.Class _javaType,  
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           java.lang.String mechType, 
+           java.lang.Class _javaType,  
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,19 +1,19 @@
 <project name="TRAILBLAZER" default="org.jboss.esb.samples.trailblazer.esb.compile" basedir=".">
-
-	<property name="org.jboss.soa.samples.trailblazer.esb_home"	 	value="../../.."/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.dest"        	value="${basedir}/build"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.classes.dir" 	value="${basedir}/build/classes/esb/"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.testclasses.dir"  value="${basedir}/build/classes/tests/"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.src.dir"          value="${basedir}/src"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.test.dir"         value="${basedir}/test"/>
-	<property name="org.jboss.esb.samples.trailblazer.esb.lib.dir"      	value="${basedir}/lib"/>
+
+	<property name="org.jboss.soa.samples.trailblazer.esb_home"	 	value="../../.."/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.dest"        	value="${basedir}/build"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.classes.dir" 	value="${basedir}/build/classes/esb/"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.testclasses.dir"  value="${basedir}/build/classes/tests/"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.src.dir"          value="${basedir}/src"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.test.dir"         value="${basedir}/test"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.lib.dir"      	value="${basedir}/lib"/>
 	<property name="org.jboss.esb.samples.trailblazer.esb.tests.report.dir" value="${basedir}/build/tests"/>
 
 	<!-- UPDATE THIS WITH YOUR JBOSS_HOME -->
 	<property name="org.jboss.soa.samples.trailblazer.jboss_home" 		value="/usr/local/jboss-4.0.4"/>
-
-	<property environment="env" />
 
+	<property environment="env" />
+
         <property name="org.jboss.soa.esb.lib.file" value="jbossesb-rosetta.jar"/>
         <property name="org.jboss.soa.esb.lib.dist.dir" value="${org.jboss.soa.samples.trailblazer.esb_home}/lib"/>
         <property name="org.jboss.soa.esb.lib.src.dir" value="../../../build/jbossesb/lib"/>
@@ -28,79 +28,79 @@
             property="org.jboss.soa.esb.lib.dir"
             value="${org.jboss.soa.esb.lib.src.dir}"/>
 
-
+
 	<!-- classpath -->
-	<path id="org.jboss.esb.samples.trailblazer.esb.classpath">
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath">
 		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
-		<fileset dir="${org.jboss.soa.esb.lib.dir}/ext" includes="*.jar"/>
-		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
-		<fileset dir="${org.jboss.soa.esb.lib.dir}" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+		<fileset dir="${org.jboss.soa.esb.lib.dir}" includes="*.jar"/>
 	</path>
 
 	<!-- classpath for running the listener-->
-	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.run">
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.run">
 		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist" includes="trailblazer-esb.jar"/>
 		<fileset dir="${org.jboss.soa.samples.trailblazer.esb_home}/lib/ext" includes="*.jar"/>
 		<fileset dir="${org.jboss.soa.esb.lib.dir}/ext" includes="*.jar"/>
 		<!-- for finding the jbossesb-properties.xml file -->
-		<fileset dir="${org.jboss.soa.samples.trailblazer.esb_home}/install/conf" includes="*.jar"/>	
-	</path>
-
-	<target name="clean">
-		<delete dir="${org.jboss.esb.samples.trailblazer.esb.dest}" />
-	</target>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.esb_home}/install/conf" includes="*.jar"/>	
+	</path>
+
+	<target name="clean">
+		<delete dir="${org.jboss.esb.samples.trailblazer.esb.dest}" />
+	</target>
 	
-	<!-- =================================================================== -->
-	<!-- Prepares the directory structure                                    -->
-	<!-- =================================================================== -->
-	<target name="org.jboss.esb.samples.trailblazer.esb.prepare">
-		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}"/>
-		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist"/>
-		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/classes/esb"/>
-	</target>
-
-	<!-- Compilation targets -->
-	<target name="org.jboss.esb.samples.trailblazer.esb.compile" depends="org.jboss.esb.samples.trailblazer.esb.prepare"
-		description="Compile all classes">
-
-		<javac
-		            destdir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}"
-		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath"
-		        	debug="true"
-		        	>
-			<src path="${org.jboss.esb.samples.trailblazer.esb.src.dir}"/>
-		</javac>
-
-	</target>
-
-	<!-- javadocs paths -->
-	<path id="org.jboss.esb.samples.trailblazer.esb.javadocs.path">
-		<pathelement path="esb/classes"/>
+	<!-- =================================================================== -->
+	<!-- Prepares the directory structure                                    -->
+	<!-- =================================================================== -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.prepare">
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/classes/esb"/>
+	</target>
+
+	<!-- Compilation targets -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.compile" depends="org.jboss.esb.samples.trailblazer.esb.prepare"
+		description="Compile all classes">
+
+		<javac
+		            destdir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}"
+		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath"
+		        	debug="true"
+		        	>
+			<src path="${org.jboss.esb.samples.trailblazer.esb.src.dir}"/>
+		</javac>
+
+	</target>
+
+	<!-- javadocs paths -->
+	<path id="org.jboss.esb.samples.trailblazer.esb.javadocs.path">
+		<pathelement path="esb/classes"/>
 	</path>
-
-	<!-- Jar targets -->
-	<target name="org.jboss.esb.samples.trailblazer.esb.jar" depends="org.jboss.esb.samples.trailblazer.esb.compile" >
-		<echo message="Building Trailblazer ESB jar file"/>
-		<delete file="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" />
-		<jar    destfile="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" 
-                basedir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}" 
-                includes="**/*.class" excludes="**/web/*.class"
-                />
+
+	<!-- Jar targets -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.jar" depends="org.jboss.esb.samples.trailblazer.esb.compile" >
+		<echo message="Building Trailblazer ESB jar file"/>
+		<delete file="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" />
+		<jar    destfile="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" 
+                basedir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}" 
+                includes="**/*.class" excludes="**/web/*.class"
+                />
 	</target>
 
-	<!-- Short target names -->
-	<target name="compile" depends="org.jboss.esb.samples.trailblazer.esb.compile"/>
+	<!-- Short target names -->
+	<target name="compile" depends="org.jboss.esb.samples.trailblazer.esb.compile"/>
 	<target name="jar" depends="org.jboss.esb.samples.trailblazer.esb.jar"/>
 
 	<!-- run the listener -->
-	<target name="runESB" depends="org.jboss.esb.samples.trailblazer.esb.jar">
-		<echo>Running ESB Trailblazer listeners</echo>
+	<target name="runESB" depends="org.jboss.esb.samples.trailblazer.esb.jar">
+		<echo>Running ESB Trailblazer listeners</echo>
 		<java fork="yes" classname="org.jboss.soa.esb.samples.trailblazer.util.Launcher" failonerror="true" 
-			args="10 /home/dbrum/dev/jbossesb/product/samples/trailblazer2/conf/jbossesb-trailblazer.xml">
+			args="10 /home/dbrum/dev/jbossesb/product/samples/trailblazer2/conf/jbossesb-trailblazer.xml">
 			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath"/>
-			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath.run"/>
-		</java>
-	</target>
-
-		
-</project>
+			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath.run"/>
+		</java>
+	</target>
+
+		
+</project>


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,54 +1,54 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" 
-	parameterReloadSecs="50">
-
-	<providers>
-		<jms-provider name="JBossMQ" connection-factory="ConnectionFactory" 
-					jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-					jndi-URL="localhost">
-			<jms-bus busid="creditAgencyRequest">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/esb-tb-creditAgencyRequest"/>
-			</jms-bus>
-			<jms-bus busid="bankResponseGateway">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/esb-tb-bankRequest"/>
-			</jms-bus>
-			<jms-bus busid="bankResponseListener">
-				<jms-message-filter dest-type="QUEUE" dest-name="queue/esb-tb-bankResponse"/>
-			</jms-bus>
-		</jms-provider>
-
-	</providers>
-	<services>    
-		<service category="trailblazer-jmsbank" name="jmsbankreplies" description="Trailblazer Bank Service" is-gateway="true" target-service-name="jmsbankreplies" target-service-category="trailblazer-jmsbank">
-			<listeners>    	    
-				<jms-listener name="trailblazer-jmsbank"
-							  busidref="bankResponseGateway"
-							  maxThreads="1"/>
-			</listeners>
-		</service>
-		<service category="trailblazer" name="creditagency" description="Credit Agency Service" is-gateway="false">
-			<listeners>
-				<jms-listener name="trailblazer-jmscreditagency"
-							  busidref="creditAgencyRequest"
-							  maxThreads="1"/>
-			</listeners>
-			<actions>
-				<action class="org.jboss.soa.esb.samples.trailblazer.actions.CreditAgencyActions"
-					process="processCreditRequest" name="fido">
-				</action>
-			</actions>
-		</service>
-		<service category="trailblazer-jmsbank" name="jmsbankreplies" description="Trailblazer Bank Reply Service" is-gateway="false">
-			<listeners>
-				<jms-listener name="trailblazer-jmsbankreplies"
-							  busidref="bankResponseListener"
-							  maxThreads="1"/>
-			</listeners>
-			<actions>
-				<action class="org.jboss.soa.esb.samples.trailblazer.actions.BankResponseActions"
-						process="processResponseFromJMSBank" name="pepe"/>
-			</actions>
-		</service>
-	</services>
-	
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" 
+	parameterReloadSecs="50">
+
+	<providers>
+		<jms-provider name="JBossMQ" connection-factory="ConnectionFactory" 
+					jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+					jndi-URL="localhost">
+			<jms-bus busid="creditAgencyRequest">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/esb-tb-creditAgencyRequest"/>
+			</jms-bus>
+			<jms-bus busid="bankResponseGateway">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/esb-tb-bankRequest"/>
+			</jms-bus>
+			<jms-bus busid="bankResponseListener">
+				<jms-message-filter dest-type="QUEUE" dest-name="queue/esb-tb-bankResponse"/>
+			</jms-bus>
+		</jms-provider>
+
+	</providers>
+	<services>    
+		<service category="trailblazer-jmsbank" name="jmsbankreplies" description="Trailblazer Bank Service" is-gateway="true" target-service-name="jmsbankreplies" target-service-category="trailblazer-jmsbank">
+			<listeners>    	    
+				<jms-listener name="trailblazer-jmsbank"
+							  busidref="bankResponseGateway"
+							  maxThreads="1"/>
+			</listeners>
+		</service>
+		<service category="trailblazer" name="creditagency" description="Credit Agency Service" is-gateway="false">
+			<listeners>
+				<jms-listener name="trailblazer-jmscreditagency"
+							  busidref="creditAgencyRequest"
+							  maxThreads="1"/>
+			</listeners>
+			<actions>
+				<action class="org.jboss.soa.esb.samples.trailblazer.actions.CreditAgencyActions"
+					process="processCreditRequest" name="fido">
+				</action>
+			</actions>
+		</service>
+		<service category="trailblazer-jmsbank" name="jmsbankreplies" description="Trailblazer Bank Reply Service" is-gateway="false">
+			<listeners>
+				<jms-listener name="trailblazer-jmsbankreplies"
+							  busidref="bankResponseListener"
+							  maxThreads="1"/>
+			</listeners>
+			<actions>
+				<action class="org.jboss.soa.esb.samples.trailblazer.actions.BankResponseActions"
+						process="processResponseFromJMSBank" name="pepe"/>
+			</actions>
+		</service>
+	</services>
+	
 </jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,64 +1,64 @@
-package org.jboss.soa.esb.samples.trailblazer.actions;
-
-/*
- * 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 mark.little at jboss.com
- */
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.samples.trailblazer.util.ProcessEmail;
-
-public class BankResponseActions {
-	
-	protected Message 		_message;
-	protected ConfigTree	_config;
-	
-	private static Logger _logger = Logger.getLogger(BankResponseActions.class);
-	
-	public BankResponseActions(ConfigTree config) { _config = config; }
-	
-	public Message processResponseFromJMSBank(Message message) throws Exception {
-		_message = message;
-		
-		_logger.debug("message received: \n" + new String(message.getBody().getContents()));
-		
-		//get the response from the bank and set it in the customer
-		ConfigTree tree = ConfigTree.fromXml(new String(message.getBody().getContents()));		
-		String quoteID = tree.getFirstTextChild("quoteId");
-		String rate = tree.getFirstTextChild("interestRate");
-		String errorCode = tree.getFirstTextChild("errorCode");
-		String ssn = tree.getFirstTextChild("customerUID");
-		String email = tree.getFirstTextChild("customerEmail");
-		_logger.debug("info using for email: " + quoteID +" "+rate+" "+errorCode+" "+ssn+" "+email);
-		//_logger.debug("email address found: " + email);
-		
-		
-		
-		_logger.debug("preparing to send the quote response via email to customer");
-		ProcessEmail procEmail = new ProcessEmail(email, quoteID, rate, errorCode, ssn);
-		procEmail.sendEmail();
-		
-		
-		
-		return message;
-	}
-
-}
+package org.jboss.soa.esb.samples.trailblazer.actions;
+
+/*
+ * 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 mark.little at jboss.com
+ */
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.samples.trailblazer.util.ProcessEmail;
+
+public class BankResponseActions {
+	
+	protected Message 		_message;
+	protected ConfigTree	_config;
+	
+	private static Logger _logger = Logger.getLogger(BankResponseActions.class);
+	
+	public BankResponseActions(ConfigTree config) { _config = config; }
+	
+	public Message processResponseFromJMSBank(Message message) throws Exception {
+		_message = message;
+		
+		_logger.debug("message received: \n" + new String(message.getBody().getContents()));
+		
+		//get the response from the bank and set it in the customer
+		ConfigTree tree = ConfigTree.fromXml(new String(message.getBody().getContents()));		
+		String quoteID = tree.getFirstTextChild("quoteId");
+		String rate = tree.getFirstTextChild("interestRate");
+		String errorCode = tree.getFirstTextChild("errorCode");
+		String ssn = tree.getFirstTextChild("customerUID");
+		String email = tree.getFirstTextChild("customerEmail");
+		_logger.debug("info using for email: " + quoteID +" "+rate+" "+errorCode+" "+ssn+" "+email);
+		//_logger.debug("email address found: " + email);
+		
+		
+		
+		_logger.debug("preparing to send the quote response via email to customer");
+		ProcessEmail procEmail = new ProcessEmail(email, quoteID, rate, errorCode, ssn);
+		procEmail.sendEmail();
+		
+		
+		
+		return message;
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-package org.jboss.soa.esb.samples.trailblazer.util;
-
-import java.sql.DriverManager;
-import java.sql.Statement;
-
-import org.apache.log4j.Logger;
-import org.hsqldb.Server;
-/**
- * Utility to start and stop a hsql Database.
- * 
- * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
- *
- */
-public class HsqldbUtil 
-{
-	final private static String THREAD_NAME = "hypersonic-unittest";
-	
-	private static Logger _logger = Logger.getLogger(HsqldbUtil.class);
-	/**
-	 * Starts the hsql database in it's own thread. 
-	 * Don't forget to shut it down when you're done.
-	 * 
-	 * @param databaseFile - i.e. build/hsqltestdb
-	 * @param databaseName - i.e. jbossesb
-	 * @throws Exception
-	 */
-	public static void startHsqldb(final String databaseFile,
-			final String databaseName) throws Exception 
-	{
-		// Start DB in new thread, or else it will block us
-		Thread serverThread = new Thread(THREAD_NAME) {
-			public void run() {
-				try {
-					// Create startup arguments
-					String[] args = new String[4];
-					args[0] = "-database.0";
-					args[1] = databaseFile;
-					args[2] = "-dbname.0";
-					args[3] = databaseName;
-					
-					_logger.info("creating db from this script: " + databaseFile);
-
-					// Start server
-					Server.main(args);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-//				log.error("Failed to start database", e);
-			}
-		};
-		serverThread.run();
-	}
-	/**
-	 * 
-	 * @param url
-	 * @param username
-	 * @param password
-	 * @throws Exception
-	 */
-	public static void stopHsqldb(String url, String username, String password) throws Exception {
-		java.sql.Connection connection = DriverManager.getConnection(
-				url, username, password);
-		Statement statement = connection.createStatement();
-		String shutdownCommand = "SHUTDOWN COMPACT";
-		statement.executeQuery(shutdownCommand);
-	}
-
-	
-}
+package org.jboss.soa.esb.samples.trailblazer.util;
+
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import org.apache.log4j.Logger;
+import org.hsqldb.Server;
+/**
+ * Utility to start and stop a hsql Database.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
+ *
+ */
+public class HsqldbUtil 
+{
+	final private static String THREAD_NAME = "hypersonic-unittest";
+	
+	private static Logger _logger = Logger.getLogger(HsqldbUtil.class);
+	/**
+	 * Starts the hsql database in it's own thread. 
+	 * Don't forget to shut it down when you're done.
+	 * 
+	 * @param databaseFile - i.e. build/hsqltestdb
+	 * @param databaseName - i.e. jbossesb
+	 * @throws Exception
+	 */
+	public static void startHsqldb(final String databaseFile,
+			final String databaseName) throws Exception 
+	{
+		// Start DB in new thread, or else it will block us
+		Thread serverThread = new Thread(THREAD_NAME) {
+			public void run() {
+				try {
+					// Create startup arguments
+					String[] args = new String[4];
+					args[0] = "-database.0";
+					args[1] = databaseFile;
+					args[2] = "-dbname.0";
+					args[3] = databaseName;
+					
+					_logger.info("creating db from this script: " + databaseFile);
+
+					// Start server
+					Server.main(args);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+//				log.error("Failed to start database", e);
+			}
+		};
+		serverThread.run();
+	}
+	/**
+	 * 
+	 * @param url
+	 * @param username
+	 * @param password
+	 * @throws Exception
+	 */
+	public static void stopHsqldb(String url, String username, String password) throws Exception {
+		java.sql.Connection connection = DriverManager.getConnection(
+				url, username, password);
+		Statement statement = connection.createStatement();
+		String shutdownCommand = "SHUTDOWN COMPACT";
+		statement.executeQuery(shutdownCommand);
+	}
+
+	
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,103 +1,103 @@
-/*
- * 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.samples.trailblazer.util;
-
-import org.antlr.stringtemplate.StringTemplate;
-import org.antlr.stringtemplate.StringTemplateGroup;
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.helpers.Email;
-
-
-public class ProcessEmail {
-	
-	private Logger logger = Logger.getLogger(this.getClass());	
-	private String emailTo, quoteID, rate, code, ssn;
-
-
-	public ProcessEmail(String email, String quoteID, String rate, String code, String ssn) {
-		this.emailTo=email;
-		this.quoteID=quoteID;
-		this.rate=rate;
-		this.code=code;
-		this.ssn=ssn;
-		logger.debug("creating email helper");
-						
-	}
-	
-	public void sendEmail() {		
-		try {
-			if (null==emailTo) {
-				logger.error("no email found for customer, aborting send");
-				return;
-			}
-			logger.info("customer SSN " + ssn + " - sending email to: " + emailTo);
-			Email emailMessage = new Email();			
-			emailMessage.setSendTo(emailTo);
-			emailMessage.setSubject("TrailBlazer Quote from Bank");
-			String emailFrom = Configuration.getSmtpFrom();
-			emailMessage.setFrom(emailFrom);
-//			File emailTemplate = new File(LoanBrokerConstants.EMAIL_TEMPLATE);
-//			String quoteMsg=FileUtil.readTextFile(emailTemplate);
-			emailMessage.setMessage(fillTemplate());
-			emailMessage.sendMessage();			
-		}catch (Exception e) {			
-			logger.error("error sending email - " + e);	
-			e.printStackTrace();		
-		}		
-	}
-	
-	private String fillTemplate() throws Exception{
-		//load up the email templates from the StringTemplate files
-		System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "ON");
-		String templatePath = ModulePropertyManager.getPropertyManager("trailblazer").
-			getProperty("org.jboss.soa.esb.trailblazer.email.template.path");
-		String templateFile = ModulePropertyManager.getPropertyManager("trailblazer").
-			getProperty("org.jboss.soa.esb.trailblazer.email.template.file");
-		                 
-		logger.debug("loading StringTemplate from path: "+templatePath);
-		logger.debug("loading StringTemplate from file: "+templateFile);
-		
-		StringTemplateGroup group =  new StringTemplateGroup("loan", templatePath);
-		StringTemplate email = group.getInstanceOf(templateFile);
-		
-		//String email, String quoteID, String rate, String code, String ssn
-		email.setAttribute("quote", quoteID);
-		email.setAttribute("rate", rate);
-		email.setAttribute("ssn", ssn);
-		email.setAttribute("code", code);
-		email.setAttribute("email", emailTo);
-		
-		return email.toString();
-		
-	}
-	
-	public static void main(String[] args) {
-		ProcessEmail email = new ProcessEmail("dbrum101 at gmail.com", "111", ".65", "0", "123456");
-		email.sendEmail();
-		
-	}
-
-}
+/*
+ * 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.samples.trailblazer.util;
+
+import org.antlr.stringtemplate.StringTemplate;
+import org.antlr.stringtemplate.StringTemplateGroup;
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.helpers.Email;
+
+
+public class ProcessEmail {
+	
+	private Logger logger = Logger.getLogger(this.getClass());	
+	private String emailTo, quoteID, rate, code, ssn;
+
+
+	public ProcessEmail(String email, String quoteID, String rate, String code, String ssn) {
+		this.emailTo=email;
+		this.quoteID=quoteID;
+		this.rate=rate;
+		this.code=code;
+		this.ssn=ssn;
+		logger.debug("creating email helper");
+						
+	}
+	
+	public void sendEmail() {		
+		try {
+			if (null==emailTo) {
+				logger.error("no email found for customer, aborting send");
+				return;
+			}
+			logger.info("customer SSN " + ssn + " - sending email to: " + emailTo);
+			Email emailMessage = new Email();			
+			emailMessage.setSendTo(emailTo);
+			emailMessage.setSubject("TrailBlazer Quote from Bank");
+			String emailFrom = Configuration.getSmtpFrom();
+			emailMessage.setFrom(emailFrom);
+//			File emailTemplate = new File(LoanBrokerConstants.EMAIL_TEMPLATE);
+//			String quoteMsg=FileUtil.readTextFile(emailTemplate);
+			emailMessage.setMessage(fillTemplate());
+			emailMessage.sendMessage();			
+		}catch (Exception e) {			
+			logger.error("error sending email - " + e);	
+			e.printStackTrace();		
+		}		
+	}
+	
+	private String fillTemplate() throws Exception{
+		//load up the email templates from the StringTemplate files
+		System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "ON");
+		String templatePath = ModulePropertyManager.getPropertyManager("trailblazer").
+			getProperty("org.jboss.soa.esb.trailblazer.email.template.path");
+		String templateFile = ModulePropertyManager.getPropertyManager("trailblazer").
+			getProperty("org.jboss.soa.esb.trailblazer.email.template.file");
+		                 
+		logger.debug("loading StringTemplate from path: "+templatePath);
+		logger.debug("loading StringTemplate from file: "+templateFile);
+		
+		StringTemplateGroup group =  new StringTemplateGroup("loan", templatePath);
+		StringTemplate email = group.getInstanceOf(templateFile);
+		
+		//String email, String quoteID, String rate, String code, String ssn
+		email.setAttribute("quote", quoteID);
+		email.setAttribute("rate", rate);
+		email.setAttribute("ssn", ssn);
+		email.setAttribute("code", code);
+		email.setAttribute("email", emailTo);
+		
+		return email.toString();
+		
+	}
+	
+	public static void main(String[] args) {
+		ProcessEmail email = new ProcessEmail("dbrum101 at gmail.com", "111", ".65", "0", "123456");
+		email.sendEmail();
+		
+	}
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/TbBootStrapper.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/TbBootStrapper.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/TbBootStrapper.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,150 +1,150 @@
-package org.jboss.soa.esb.samples.trailblazer.util;
-
-import java.io.File;
-import java.sql.Connection;
-import java.sql.Statement;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.xml.DOMConfigurator;
-import org.jboss.internal.soa.esb.persistence.format.db.DBConnectionManager;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.listeners.StandAloneBootStrapper;
-import org.jboss.soa.esb.testutils.HsqldbUtil;
-import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
-
-public class TbBootStrapper extends StandAloneBootStrapper {
-	
-	protected static Logger _logger = Logger.getLogger(TbBootStrapper.class);
-	
-	public static void main(String[] args) throws Exception
-	{
-		Exception eT = null;
-		if (args.length < 1)
-		{
-			eT = new Exception ("No configuration file specified - Ending immediately");
-			_logger.fatal(eT);
-			throw eT;
-		} else {
-			_logger.info("Starting the trailblazer with arg=" + args[0]);
-		}
-		TbBootStrapper boot = null;
-
-		String configName = args[0];
-		long lSecondsToRun = 365 * 24 * 3600;   // run for 1 year (is it enough ?)
-		if (args.length > 1)
-			try 
-		{ 
-			lSecondsToRun = Long.parseLong(args[1]);
-		}
-		catch (Exception e)
-		{
-			_logger.fatal(e);
-			throw e;
-		}
-		try
-		{
-			boot = new TbBootStrapper(configName);
-			if (lSecondsToRun < 5)
-				lSecondsToRun = 5;
-			long lRunTo = System.currentTimeMillis()+1000*lSecondsToRun;
-
-			while (System.currentTimeMillis() < lRunTo)
-				try { Thread.sleep(1000); }
-				catch (InterruptedException e) { break; }
-		}
-		finally
-		{
-			if (null!=boot)
-				boot.requestEnd();
-		}
-	}
-	
-	private TbBootStrapper() throws Exception {super(null);}
-	
-	public TbBootStrapper (String configName) throws Exception
-	{
-		super(configName, null);
-	}
-	
-	public TbBootStrapper (String configName, String validationFileName) throws Exception 
-	{
-		super(configName, validationFileName);		
-	}
-
-	/*
-	 * Setup HSQLDB for the Registry and the MessageStore
-	 */
-	protected void runBefore(){	
-		//System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "on");
-		String baseDir="";
-		String productDir = "../../";
-		if (TestEnvironmentUtil.getUserDir("trailblazer").equals("trailblazer/")) {
-			baseDir = "product/samples/trailblazer/";
-			productDir = "product/";
-		}
-		DOMConfigurator.configure(baseDir + "log4j.xml");
-		String driver = Configuration.getStoreDriver();
-		System.out.println("Driver=" + driver);
-		if ("org.hsqldb.jdbcDriver".equals(driver)) {
-			
-			//start hsqldb
-			try {
-			HsqldbUtil.startHsqldb(productDir + "build/hsqldb", "jbossesb");
-			String database = "hsqldb";	
-			
-			//message store db
-			String sqlDir = productDir + "install/message-store/sql/" + database + "/";
-			String sqlCreateCmd    = TestEnvironmentUtil.readTextFile(new File(sqlDir + "create_database.sql"));
-			String sqlDropCmd      = TestEnvironmentUtil.readTextFile(new File(sqlDir + "drop_database.sql"));		
-			
-			DBConnectionManager mgr = DBConnectionManager.getInstance();
-			Connection con = mgr.getConnection();
-			
-			Statement stmnt = con.createStatement();
-			System.out.println("Dropping the message store schema if exists...");
-			stmnt.execute(sqlDropCmd);
-			System.out.println("Creating the message store schema...");
-			stmnt.execute(sqlCreateCmd);
-			
-			//registry DB
-			sqlDir = productDir + "install/jUDDI-registry/sql/" + database + "/";
-			System.out.println("Dropping the registry schema if exists...");
-			sqlDropCmd      = TestEnvironmentUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
-			stmnt.execute(sqlDropCmd);
-			System.out.println("creating the registry schema...");
-			sqlCreateCmd    = TestEnvironmentUtil.readTextFile(new File(sqlDir + "create_database.sql"));
-			stmnt.execute(sqlCreateCmd);
-			System.out.println("inserting registry publishers...");
-			String sqlInsertPubCmd = TestEnvironmentUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
-			stmnt.execute(sqlInsertPubCmd);
-			stmnt.close();
-			con.close();
-			}catch(Exception e) {
-				e.printStackTrace();
-			}
-		}
-		}
-		
-	/*
-	 * Shuts down the HSQLDB instance
-	 */
-		protected void runAfter()
-		{
-			try { Thread.sleep(5000); }
-			catch (InterruptedException e) {}
-			
-			//shutdown message store if using hsqldb
-			if (Configuration.getStoreDriver().equals("org.hsqldb.jdbcDriver")) {
-				try {
-					HsqldbUtil.stopHsqldb(Configuration.getStoreUrl(),
-							Configuration.getStoreUser(),Configuration.getStorePwd() );
-				} catch (Exception e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-				}
-		}
-
-	
-
-}
+package org.jboss.soa.esb.samples.trailblazer.util;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.Statement;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.xml.DOMConfigurator;
+import org.jboss.internal.soa.esb.persistence.format.db.DBConnectionManager;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.listeners.StandAloneBootStrapper;
+import org.jboss.soa.esb.testutils.HsqldbUtil;
+import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
+
+public class TbBootStrapper extends StandAloneBootStrapper {
+	
+	protected static Logger _logger = Logger.getLogger(TbBootStrapper.class);
+	
+	public static void main(String[] args) throws Exception
+	{
+		Exception eT = null;
+		if (args.length < 1)
+		{
+			eT = new Exception ("No configuration file specified - Ending immediately");
+			_logger.fatal(eT);
+			throw eT;
+		} else {
+			_logger.info("Starting the trailblazer with arg=" + args[0]);
+		}
+		TbBootStrapper boot = null;
+
+		String configName = args[0];
+		long lSecondsToRun = 365 * 24 * 3600;   // run for 1 year (is it enough ?)
+		if (args.length > 1)
+			try 
+		{ 
+			lSecondsToRun = Long.parseLong(args[1]);
+		}
+		catch (Exception e)
+		{
+			_logger.fatal(e);
+			throw e;
+		}
+		try
+		{
+			boot = new TbBootStrapper(configName);
+			if (lSecondsToRun < 5)
+				lSecondsToRun = 5;
+			long lRunTo = System.currentTimeMillis()+1000*lSecondsToRun;
+
+			while (System.currentTimeMillis() < lRunTo)
+				try { Thread.sleep(1000); }
+				catch (InterruptedException e) { break; }
+		}
+		finally
+		{
+			if (null!=boot)
+				boot.requestEnd();
+		}
+	}
+	
+	private TbBootStrapper() throws Exception {super(null);}
+	
+	public TbBootStrapper (String configName) throws Exception
+	{
+		super(configName, null);
+	}
+	
+	public TbBootStrapper (String configName, String validationFileName) throws Exception 
+	{
+		super(configName, validationFileName);		
+	}
+
+	/*
+	 * Setup HSQLDB for the Registry and the MessageStore
+	 */
+	protected void runBefore(){	
+		//System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "on");
+		String baseDir="";
+		String productDir = "../../";
+		if (TestEnvironmentUtil.getUserDir("trailblazer").equals("trailblazer/")) {
+			baseDir = "product/samples/trailblazer/";
+			productDir = "product/";
+		}
+		DOMConfigurator.configure(baseDir + "log4j.xml");
+		String driver = Configuration.getStoreDriver();
+		System.out.println("Driver=" + driver);
+		if ("org.hsqldb.jdbcDriver".equals(driver)) {
+			
+			//start hsqldb
+			try {
+			HsqldbUtil.startHsqldb(productDir + "build/hsqldb", "jbossesb");
+			String database = "hsqldb";	
+			
+			//message store db
+			String sqlDir = productDir + "install/message-store/sql/" + database + "/";
+			String sqlCreateCmd    = TestEnvironmentUtil.readTextFile(new File(sqlDir + "create_database.sql"));
+			String sqlDropCmd      = TestEnvironmentUtil.readTextFile(new File(sqlDir + "drop_database.sql"));		
+			
+			DBConnectionManager mgr = DBConnectionManager.getInstance();
+			Connection con = mgr.getConnection();
+			
+			Statement stmnt = con.createStatement();
+			System.out.println("Dropping the message store schema if exists...");
+			stmnt.execute(sqlDropCmd);
+			System.out.println("Creating the message store schema...");
+			stmnt.execute(sqlCreateCmd);
+			
+			//registry DB
+			sqlDir = productDir + "install/jUDDI-registry/sql/" + database + "/";
+			System.out.println("Dropping the registry schema if exists...");
+			sqlDropCmd      = TestEnvironmentUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
+			stmnt.execute(sqlDropCmd);
+			System.out.println("creating the registry schema...");
+			sqlCreateCmd    = TestEnvironmentUtil.readTextFile(new File(sqlDir + "create_database.sql"));
+			stmnt.execute(sqlCreateCmd);
+			System.out.println("inserting registry publishers...");
+			String sqlInsertPubCmd = TestEnvironmentUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
+			stmnt.execute(sqlInsertPubCmd);
+			stmnt.close();
+			con.close();
+			}catch(Exception e) {
+				e.printStackTrace();
+			}
+		}
+		}
+		
+	/*
+	 * Shuts down the HSQLDB instance
+	 */
+		protected void runAfter()
+		{
+			try { Thread.sleep(5000); }
+			catch (InterruptedException e) {}
+			
+			//shutdown message store if using hsqldb
+			if (Configuration.getStoreDriver().equals("org.hsqldb.jdbcDriver")) {
+				try {
+					HsqldbUtil.stopHsqldb(Configuration.getStoreUrl(),
+							Configuration.getStoreUser(),Configuration.getStorePwd() );
+				} catch (Exception e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+				}
+		}
+
+	
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/TbBootStrapper.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb-trailblazer-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb-trailblazer-service.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb-trailblazer-service.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=esb-tb-creditAgencyRequest">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=esb-tb-bankRequest">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-
-<mbean code="org.jboss.mq.server.jmx.Queue"
-	 name="jboss.mq.destination:service=Queue,name=esb-tb-bankResponse">
-  <depends optional-attribute-name="DestinationManager">
-  	jboss.mq:service=DestinationManager
-  </depends>
-</mbean>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=esb-tb-creditAgencyRequest">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=esb-tb-bankRequest">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=esb-tb-bankResponse">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+
 </server>


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb-trailblazer-service.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -34,20 +34,20 @@
 		<property name="org.jboss.soa.esb.jndi.server.type" 			value="jboss"/>
 		<property name="org.jboss.soa.esb.jndi.server.url" 			value="localhost"/>
 		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-    </properties>
-    <properties name="registry">
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
-    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
     </properties>
+    <properties name="registry">
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
+    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+    </properties>
     <properties name="transports" depends="core">
     	<property name="org.jboss.soa.esb.mail.smtp.host" value="your.mailserver.net"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.user" value="your_username"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.user" value="your_username"/>
     	<property name="org.jboss.soa.esb.mail.smtp.from" value="your.email at mail.net"/>
     	<property name="org.jboss.soa.esb.mail.smtp.password" value="your_password_if_needed"/>
     	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
@@ -75,16 +75,16 @@
 		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
 		<!-- # of milliseconds to timeout waiting for a connection from pool -->
 		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
     </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
     <!-- this section added for the convenience of the trailblazer only -->
     <properties name="trailblazer">
 		<property name="org.jboss.soa.esb.trailblazer.request.service.epr.name" value="creditagency"/>
 		<property name="org.jboss.soa.esb.trailblazer.request.service.category" value="trailblazer"/>
-		<property name="org.jboss.soa.esb.trailblazer.jmsbank.queue" value="queue/C"/>
-		<property name="org.jboss.soa.esb.trailblazer.email.template.path" value="template"/>
+		<property name="org.jboss.soa.esb.trailblazer.jmsbank.queue" value="queue/C"/>
+		<property name="org.jboss.soa.esb.trailblazer.email.template.path" value="template"/>
 		<property name="org.jboss.soa.esb.trailblazer.email.template.file" value="quote"/>		
     </properties>
 </esb>


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,70 +1,70 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=org.hsqldb.jdbcDriver
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=org.hsqldb.jdbcDriver
 #juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/jbossesb
-juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost:9001/jbossesb
-juddi.jdbcUsername=sa
-juddi.jdbcPassword=
-# jUDDI DataSource to use
-juddi.dataSource=java:comp/env/jdbc/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost:9001/jbossesb
+juddi.jdbcUsername=sa
+juddi.jdbcPassword=
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/jbossesb-unittest-properties.xml
===================================================================
--- labs/jbossesb/trunk/qa/jbossesb-unittest-properties.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/jbossesb-unittest-properties.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -33,16 +33,16 @@
     <properties name="core">
 		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
 		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-    </properties>
-    <properties name="registry">
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
     </properties>
+    <properties name="registry">
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+    </properties>
     <properties name="transports" depends="core">
     	<property name="org.jboss.soa.esb.mail.smtp.host" value="@org.jboss.soa.esb.mail.smtp.host@"/>
     	<property name="org.jboss.soa.esb.mail.smtp.user" value="@org.jboss.soa.esb.mail.smtp.user@"/>


Property changes on: labs/jbossesb/trunk/qa/jbossesb-unittest-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/build.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/build.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/build.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,173 +1,173 @@
-<?xml version="1.0"?>
-<project name="JUnit" default="test" basedir=".">
-
-	<property name="product.build" location="../../product/build"/>
-	<property name="product.lib" location="${product.build}/jbossesb/lib"/>
-	<property name="coverage" location="${product.build}/tests/coverage"/>
-	<property name="qa.build" location="../build"/>
-	<property name="qa.lib" location="../lib"/>
-	<property name="qa.junit.src" location="src"/>
-	<property name="qa.junit.classes" location="${qa.build}/junit/classes"/>
-	<property name="qa.junit.report" location="${qa.build}/junit/report" />
-        <property name="qa.junit.memory" value="128m"/>
-
-        <property file="${org.jboss.esb.properties}"/>
-        <property name="org.jboss.esb.test.ftp.hostname" value="ftp.ncl.ac.uk"/>
-        <property name="org.jboss.esb.test.ftp.user" value="anonymous"/>
-        <property name="org.jboss.esb.test.ftp.pwd" value=""/>
-        <property name="org.jboss.esb.test.ftp.dir" value="/pub/DNS"/>
-
-	<path id="base.cp">
-		<fileset dir="${product.lib}/ext"
-		  excludes="*.jar" includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
-		<fileset dir="${qa.lib}/ext" includes="*.jar" />
-		<fileset dir="${product.lib}/ext" includes="*.jar" />
-		<pathelement location="../" />
-	</path>
-	
-	<path id="qa.junit.cp">
-		<fileset dir="${product.lib}" includes="*.jar" />
-		<path refid="base.cp"/>
-	</path>
-	
-	<path id="qa.junit.emma.cp">
-		<fileset dir="${coverage}/all" includes="jbossesb-instr-all.jar" />
-		<path refid="base.cp"/>
-	</path>
-	
-	<target name="test" depends="compile, prompt, execute"/>
-	<target name="ci-test" depends="compile, execute"/>
-
-	<target name="compile">
-		<echo message="Running JUnit based QA tests..."/>
-		
-		<!-- Build the tests... -->
-		<mkdir dir="${qa.junit.classes}"/>
-		<javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="qa.junit.cp" debug="on" />
-	</target>
-
-	<target name="execute">
-		<!-- Run the tests... -->
-		<property name="tests.filter" value="*"/>
-		<mkdir dir="${qa.junit.report}"/>
-       <property name="org.jboss.soa.esb.paramsRepository.file.root" location="src" />
-        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="yes" fork="true">
-            <formatter type="plain" usefile="false"/>
-            <formatter type="xml"/>
-            <batchtest todir="${qa.junit.report}">
-                <fileset dir="${qa.junit.src}">
-                    <include name="**/${tests.filter}Test.java"/>
-                    <exclude name="${tests.exclude}"/>
-                </fileset>
-            </batchtest>
-            <classpath>
-                <pathelement location="${qa.junit.classes}"/>
-                <path refid="qa.junit.cp"/>
-                <pathelement location="${qa.junit.src}"/>
-            </classpath>
-            <jvmarg value="-Xmx${qa.junit.memory}"/>
-
-        	<!-- Listener Sys Props... -->
-        	<sysproperty key="org.jboss.soa.esb.paramsRepository.file.root" value="${org.jboss.soa.esb.paramsRepository.file.root}"/>
-
-        	<!-- Sys Props from the test.properties file... -->
-        	<sysproperty key="org.jboss.soa.esb.jndi.server.type" value="${org.jboss.soa.esb.jndi.server.type}" />
-        	<sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}" />
-        	
-        	<!-- Sys Props from the deployment.properties file... -->
-	    	<sysproperty key="org.jboss.esb.db.driver" 		value="${org.jboss.esb.db.driver}" />
-        	<sysproperty key="org.jboss.esb.db.url" 		value="${org.jboss.esb.db.url}" />
-        	<sysproperty key="org.jboss.esb.db.user" 		value="${org.jboss.esb.db.user}" />
-	    	<sysproperty key="org.jboss.esb.db.password" 	value="${org.jboss.esb.db.password}" />
-                <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
-                <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
-                <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
-                <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
-
-        </junit>
-		
-		<!-- Remove all "fixed-up" listener configuration files -->
-		<delete><fileset dir="${qa.junit.src}" includes="**/*.conftmp" /></delete>
-		
-		<!-- Report on the tests (format results) ... -->
-        <junitreport todir="${qa.junit.report}">
-            <fileset dir="${qa.junit.report}">
-                <include name="*.xml"/>
-            </fileset>
-            <report format="frames" todir="${qa.junit.report}"/>
-            <report format="noframes" todir="${qa.junit.report}"/>
-        </junitreport>
-		
-	</target>
-
-	<target name="test-emma" depends="compile-emma, prompt, execute-emma"/>
-	<target name="ci-test-emma" depends="compile-emma, execute-emma"/>
-
-	<target name="compile-emma">
-		<echo message="Running JUnit based QA tests (with ema enabled) ..."/>
-		<!-- Build the tests... -->
-		<mkdir dir="${qa.junit.classes}"/>
-		<javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="qa.junit.emma.cp" debug="on" />
-	</target>
-
-	<target name="prompt">
-            <property name="tests.exclude" value="**/*IntegrationTest.java"/>
-		<echo message="" />
-		<echo message="" />
-		<input message='Which tests? (Press return to run all tests - Wildcards Supported - already assumes test cases end with the "Test" suffix)' 
-			addproperty="tests.filter"
-			defaultvalue="*"/>
-	</target>
-		
-	<target name="execute-emma">
-		<!-- Run the tests... -->
-		<property name="tests.filter" value="*"/>
-		<mkdir dir="${qa.junit.report}"/>
-        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="yes" fork="true">
-            <formatter type="plain" usefile="false"/>
-            <formatter type="xml"/>
-            <batchtest todir="${qa.junit.report}">
-                <fileset dir="${qa.junit.src}">
-                    <include name="**/${tests.filter}Test.java"/>
-                </fileset>
-            </batchtest>
-            <classpath>
-                <pathelement location="${qa.junit.classes}"/>
-                <path refid="qa.junit.emma.cp"/>
-                <pathelement location="${qa.junit.src}"/>
-            </classpath>
-
-            <jvmarg value="-Xmx${qa.junit.memory}"/>
-        	<!-- emma jvm args -->
-			<jvmarg value="-Demma.coverage.out.file=${coverage}/all/coverage.emma" />
-			<jvmarg value="-Demma.coverage.out.merge=true" />
-
-        	<!-- Listener Sys Props... -->
-        	<sysproperty key="org.jboss.soa.esb.paramsRepository.file.root" value="junit/src" />
-
-        	<!-- Sys Props from the test.properties file... -->
-        	<sysproperty key="org.jboss.soa.esb.jndi.server.type" value="${org.jboss.soa.esb.jndi.server.type}" />
-        	<sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}" />
-        	
-        	<!-- Sys Props from the deployment.properties file... -->
-	    	<sysproperty key="org.jboss.esb.db.driver" 		value="${org.jboss.esb.db.driver}" />
-        	<sysproperty key="org.jboss.esb.db.url" 		value="${org.jboss.esb.db.url}" />
-        	<sysproperty key="org.jboss.esb.db.user" 		value="${org.jboss.esb.db.user}" />
-	    	<sysproperty key="org.jboss.esb.db.password" 	value="${org.jboss.esb.db.password}" />
-        </junit>
-		
-		<!-- Remove all "fixed-up" listener configuration files -->
-		<delete><fileset dir="${qa.junit.src}" includes="**/*.conftmp" /></delete>
-		
-		<!-- Report on the tests (format results) ... -->
-        <junitreport todir="${qa.junit.report}">
-            <fileset dir="${qa.junit.report}">
-                <include name="*.xml"/>
-            </fileset>
-            <report format="frames" todir="${qa.junit.report}"/>
-            <report format="noframes" todir="${qa.junit.report}"/>
-        </junitreport>
-		
-	</target>
-	
-</project>
+<?xml version="1.0"?>
+<project name="JUnit" default="test" basedir=".">
+
+	<property name="product.build" location="../../product/build"/>
+	<property name="product.lib" location="${product.build}/jbossesb/lib"/>
+	<property name="coverage" location="${product.build}/tests/coverage"/>
+	<property name="qa.build" location="../build"/>
+	<property name="qa.lib" location="../lib"/>
+	<property name="qa.junit.src" location="src"/>
+	<property name="qa.junit.classes" location="${qa.build}/junit/classes"/>
+	<property name="qa.junit.report" location="${qa.build}/junit/report" />
+        <property name="qa.junit.memory" value="128m"/>
+
+        <property file="${org.jboss.esb.properties}"/>
+        <property name="org.jboss.esb.test.ftp.hostname" value="ftp.ncl.ac.uk"/>
+        <property name="org.jboss.esb.test.ftp.user" value="anonymous"/>
+        <property name="org.jboss.esb.test.ftp.pwd" value=""/>
+        <property name="org.jboss.esb.test.ftp.dir" value="/pub/DNS"/>
+
+	<path id="base.cp">
+		<fileset dir="${product.lib}/ext"
+		  excludes="*.jar" includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
+		<fileset dir="${qa.lib}/ext" includes="*.jar" />
+		<fileset dir="${product.lib}/ext" includes="*.jar" />
+		<pathelement location="../" />
+	</path>
+	
+	<path id="qa.junit.cp">
+		<fileset dir="${product.lib}" includes="*.jar" />
+		<path refid="base.cp"/>
+	</path>
+	
+	<path id="qa.junit.emma.cp">
+		<fileset dir="${coverage}/all" includes="jbossesb-instr-all.jar" />
+		<path refid="base.cp"/>
+	</path>
+	
+	<target name="test" depends="compile, prompt, execute"/>
+	<target name="ci-test" depends="compile, execute"/>
+
+	<target name="compile">
+		<echo message="Running JUnit based QA tests..."/>
+		
+		<!-- Build the tests... -->
+		<mkdir dir="${qa.junit.classes}"/>
+		<javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="qa.junit.cp" debug="on" />
+	</target>
+
+	<target name="execute">
+		<!-- Run the tests... -->
+		<property name="tests.filter" value="*"/>
+		<mkdir dir="${qa.junit.report}"/>
+       <property name="org.jboss.soa.esb.paramsRepository.file.root" location="src" />
+        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="yes" fork="true">
+            <formatter type="plain" usefile="false"/>
+            <formatter type="xml"/>
+            <batchtest todir="${qa.junit.report}">
+                <fileset dir="${qa.junit.src}">
+                    <include name="**/${tests.filter}Test.java"/>
+                    <exclude name="${tests.exclude}"/>
+                </fileset>
+            </batchtest>
+            <classpath>
+                <pathelement location="${qa.junit.classes}"/>
+                <path refid="qa.junit.cp"/>
+                <pathelement location="${qa.junit.src}"/>
+            </classpath>
+            <jvmarg value="-Xmx${qa.junit.memory}"/>
+
+        	<!-- Listener Sys Props... -->
+        	<sysproperty key="org.jboss.soa.esb.paramsRepository.file.root" value="${org.jboss.soa.esb.paramsRepository.file.root}"/>
+
+        	<!-- Sys Props from the test.properties file... -->
+        	<sysproperty key="org.jboss.soa.esb.jndi.server.type" value="${org.jboss.soa.esb.jndi.server.type}" />
+        	<sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}" />
+        	
+        	<!-- Sys Props from the deployment.properties file... -->
+	    	<sysproperty key="org.jboss.esb.db.driver" 		value="${org.jboss.esb.db.driver}" />
+        	<sysproperty key="org.jboss.esb.db.url" 		value="${org.jboss.esb.db.url}" />
+        	<sysproperty key="org.jboss.esb.db.user" 		value="${org.jboss.esb.db.user}" />
+	    	<sysproperty key="org.jboss.esb.db.password" 	value="${org.jboss.esb.db.password}" />
+                <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
+                <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
+                <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
+                <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
+
+        </junit>
+		
+		<!-- Remove all "fixed-up" listener configuration files -->
+		<delete><fileset dir="${qa.junit.src}" includes="**/*.conftmp" /></delete>
+		
+		<!-- Report on the tests (format results) ... -->
+        <junitreport todir="${qa.junit.report}">
+            <fileset dir="${qa.junit.report}">
+                <include name="*.xml"/>
+            </fileset>
+            <report format="frames" todir="${qa.junit.report}"/>
+            <report format="noframes" todir="${qa.junit.report}"/>
+        </junitreport>
+		
+	</target>
+
+	<target name="test-emma" depends="compile-emma, prompt, execute-emma"/>
+	<target name="ci-test-emma" depends="compile-emma, execute-emma"/>
+
+	<target name="compile-emma">
+		<echo message="Running JUnit based QA tests (with ema enabled) ..."/>
+		<!-- Build the tests... -->
+		<mkdir dir="${qa.junit.classes}"/>
+		<javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="qa.junit.emma.cp" debug="on" />
+	</target>
+
+	<target name="prompt">
+            <property name="tests.exclude" value="**/*IntegrationTest.java"/>
+		<echo message="" />
+		<echo message="" />
+		<input message='Which tests? (Press return to run all tests - Wildcards Supported - already assumes test cases end with the "Test" suffix)' 
+			addproperty="tests.filter"
+			defaultvalue="*"/>
+	</target>
+		
+	<target name="execute-emma">
+		<!-- Run the tests... -->
+		<property name="tests.filter" value="*"/>
+		<mkdir dir="${qa.junit.report}"/>
+        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="yes" fork="true">
+            <formatter type="plain" usefile="false"/>
+            <formatter type="xml"/>
+            <batchtest todir="${qa.junit.report}">
+                <fileset dir="${qa.junit.src}">
+                    <include name="**/${tests.filter}Test.java"/>
+                </fileset>
+            </batchtest>
+            <classpath>
+                <pathelement location="${qa.junit.classes}"/>
+                <path refid="qa.junit.emma.cp"/>
+                <pathelement location="${qa.junit.src}"/>
+            </classpath>
+
+            <jvmarg value="-Xmx${qa.junit.memory}"/>
+        	<!-- emma jvm args -->
+			<jvmarg value="-Demma.coverage.out.file=${coverage}/all/coverage.emma" />
+			<jvmarg value="-Demma.coverage.out.merge=true" />
+
+        	<!-- Listener Sys Props... -->
+        	<sysproperty key="org.jboss.soa.esb.paramsRepository.file.root" value="junit/src" />
+
+        	<!-- Sys Props from the test.properties file... -->
+        	<sysproperty key="org.jboss.soa.esb.jndi.server.type" value="${org.jboss.soa.esb.jndi.server.type}" />
+        	<sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}" />
+        	
+        	<!-- Sys Props from the deployment.properties file... -->
+	    	<sysproperty key="org.jboss.esb.db.driver" 		value="${org.jboss.esb.db.driver}" />
+        	<sysproperty key="org.jboss.esb.db.url" 		value="${org.jboss.esb.db.url}" />
+        	<sysproperty key="org.jboss.esb.db.user" 		value="${org.jboss.esb.db.user}" />
+	    	<sysproperty key="org.jboss.esb.db.password" 	value="${org.jboss.esb.db.password}" />
+        </junit>
+		
+		<!-- Remove all "fixed-up" listener configuration files -->
+		<delete><fileset dir="${qa.junit.src}" includes="**/*.conftmp" /></delete>
+		
+		<!-- Report on the tests (format results) ... -->
+        <junitreport todir="${qa.junit.report}">
+            <fileset dir="${qa.junit.report}">
+                <include name="*.xml"/>
+            </fileset>
+            <report format="frames" todir="${qa.junit.report}"/>
+            <report format="noframes" todir="${qa.junit.report}"/>
+        </junitreport>
+		
+	</target>
+	
+</project>


Property changes on: labs/jbossesb/trunk/qa/junit/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,193 +1,193 @@
-/*
- * 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.actions;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.io.InputStream;
-import java.sql.DriverManager;
-import java.sql.Statement;
-import java.util.Collection;
-import java.util.Properties;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.xml.DOMConfigurator;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerManager;
-import org.jboss.soa.esb.listeners.ListenerUtil;
-import org.jboss.soa.esb.listeners.State;
-import org.jboss.soa.esb.listeners.message.ActionProcessingPipeline;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.services.routing.MessageRouter;
-import org.jboss.soa.esb.testutils.FileUtil;
-import org.jboss.soa.esb.testutils.HsqldbUtil;
-import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Test CbrProxyAction class. First this test brings up a (hsqldb) database, and the registry. It them 
- * brings up the Content Based Router - defined in the CbrProxyActionUnitTest.xml. It then goes on to 
- * read the CbrProxyActionUnitTestFragment.xml, on which we perform the tests.
- * 
- * @author kurt.stam at redhat.com
- */
-public class CbrProxyActionUnitTest  
-{
-	private static Logger logger = Logger.getLogger(CbrProxyActionUnitTest.class);
-	private static ListenerManager _proc = null;
-    private static String mDbDriver;
-	private static String mDbUrl;
-	private static String mDbUsername;
-	private static String mDbPassword;
-	
-	@Test
-    public void route() throws Exception
-    {
-		Message message = MessageFactory.getInstance().getMessage();
-		message.getBody().setContents("Body".getBytes());
-		ConfigTree config = ConfigTree.fromInputStream(getClass().getResourceAsStream("CbrProxyActionUnitTestFragment.xml"));
-        
-        ActionProcessingPipeline chain = null;
-    	
-		try	{ 
-			chain = new ActionProcessingPipeline(message,config); 
-		}catch (IllegalArgumentException e){
-			e.printStackTrace();
-			fail(e.toString());
-		} catch (ConfigurationException e){
-			e.printStackTrace();
-			fail(e.toString());
-		}
-		Thread t = new Thread(chain);
-		t.start();
-
-		// Wait for processing to complte...
-		chain.waitUntilComplete();
-
-		//The message coming should have the Collection of destinationServices as a property.
-		Collection destinationServices = (Collection) chain.getMessage().getProperties().getProperty(MessageRouter.ROUTING_DESTINATION_SERVICE_LIST);
-		assertNotNull("Destination service list is null", destinationServices);
-		String firstDestination = (String) destinationServices.iterator().next();
-		logger.info("Destination=" + firstDestination);
-		assertEquals("test_category:JBOSS_XMLDestination",firstDestination);
-    }
-	
-	
-	
-	@BeforeClass
-	public static void runBeforeAllTests()
-	{
-		try {
-			DOMConfigurator.configure(TestEnvironmentUtil.getUserDir("product","../product") + "etc/test/resources/log4j.xml");
-			TestEnvironmentUtil.setESBPropertiesFileToUse("product","../product");
-			//Set the juddi properties file in System so juddi will pick it up later and use the test values.
-			String juddiPropertiesFile = "/org/jboss/soa/esb/services/registry/juddi-qatest.properties";
-			System.setProperty("juddi.propertiesFile", juddiPropertiesFile);
-			//Read this properties file to get the db connection string
-			Properties props = new Properties();
-			InputStream inStream = Class.class.getResourceAsStream(juddiPropertiesFile);
-			props.load(inStream);
-			mDbDriver    = props.getProperty("juddi.jdbcDriver");
-			mDbUrl       = props.getProperty("juddi.jdbcUrl");
-			mDbUsername  = props.getProperty("juddi.jdbcUsername");
-			mDbPassword  = props.getProperty("juddi.jdbcPassword");
-			
-			String database="not tested yet";
-			if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
-				database = "hsqldb";
-				//Bring up hsql on default port 9001
-				HsqldbUtil.startHsqldb(TestEnvironmentUtil.getUserDir("product","../product") + "build/hsqltestdb", "juddi");
-			} else if ("com.mysql.jdbc.Driver".equals(mDbDriver)) {
-				database = "mysql";
-			} //add and test your own database..
-			
-			//Get the registry-schema create scripts
-			String sqlDir = TestEnvironmentUtil.getUserDir("product","../product") + "install/jUDDI-registry/sql/" + database + "/";
-			//Drop what is there now, if exists. We want to start fresh.
-			String sqlDropCmd      = FileUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
-			String sqlCreateCmd    = FileUtil.readTextFile(new File(sqlDir + "create_database.sql"));
-			String sqlInsertPubCmd = FileUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
-			
-			try {
-				Class.forName(mDbDriver);
-			} catch (Exception e) {
-				System.out.println("ERROR: failed to load " + database + " JDBC driver.");
-				e.printStackTrace();
-				return;
-			}
-			java.sql.Connection con = DriverManager.getConnection(mDbUrl, mDbUsername, mDbPassword);
-			Statement stmnt = con.createStatement();
-			System.out.println("Dropping the schema if exist");
-			stmnt.execute(sqlDropCmd);
-			System.out.println("Creating the juddi-schema");
-			stmnt.execute(sqlCreateCmd);
-			System.out.println("Adding the jbossesb publisher");
-			stmnt.execute(sqlInsertPubCmd);
-			
-			//Now we can bring up the ContentBasedRouter
-			logger.info("Testing to see if we can instantiate one");
-			String deploymentConfigFile = TestEnvironmentUtil.getUserDir("qa") 
-				+ "junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.xml";
-			_proc = ListenerUtil.launchManager(deploymentConfigFile, true);
-			_proc.waitUntilReady();
-			
-		} catch (Throwable e) {
-			e.printStackTrace();
-			System.out.println("We should stop testing, since we don't have a db.");
-			fail(e.toString());
-		}
-	}
-	
-	/**
-	 * Shutdown the database
-	 * @throws Exception
-	 */
-	@AfterClass
-	public static void runAfterAllTests() throws Exception 
-	{
-		//Shutdown the CBR Service
-        //Increase Sleep for debugging
-		Thread.sleep(200);
-		_proc.requestEnd();
-        //Give the controller time to finish
-		Thread.sleep(2000);
-		State oS = _proc.getState();
-		System.out.println("Exit state = "+oS.toString());
-		if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
-			HsqldbUtil.stopHsqldb(mDbUrl, mDbUsername, mDbPassword);
-		}
-	}
-	
-	public static junit.framework.Test suite() {
-		return new JUnit4TestAdapter(CbrProxyActionUnitTest.class);
-	}
-}
+/*
+ * 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.actions;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.InputStream;
+import java.sql.DriverManager;
+import java.sql.Statement;
+import java.util.Collection;
+import java.util.Properties;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.xml.DOMConfigurator;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerManager;
+import org.jboss.soa.esb.listeners.ListenerUtil;
+import org.jboss.soa.esb.listeners.State;
+import org.jboss.soa.esb.listeners.message.ActionProcessingPipeline;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+import org.jboss.soa.esb.testutils.FileUtil;
+import org.jboss.soa.esb.testutils.HsqldbUtil;
+import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test CbrProxyAction class. First this test brings up a (hsqldb) database, and the registry. It them 
+ * brings up the Content Based Router - defined in the CbrProxyActionUnitTest.xml. It then goes on to 
+ * read the CbrProxyActionUnitTestFragment.xml, on which we perform the tests.
+ * 
+ * @author kurt.stam at redhat.com
+ */
+public class CbrProxyActionUnitTest  
+{
+	private static Logger logger = Logger.getLogger(CbrProxyActionUnitTest.class);
+	private static ListenerManager _proc = null;
+    private static String mDbDriver;
+	private static String mDbUrl;
+	private static String mDbUsername;
+	private static String mDbPassword;
+	
+	@Test
+    public void route() throws Exception
+    {
+		Message message = MessageFactory.getInstance().getMessage();
+		message.getBody().setContents("Body".getBytes());
+		ConfigTree config = ConfigTree.fromInputStream(getClass().getResourceAsStream("CbrProxyActionUnitTestFragment.xml"));
+        
+        ActionProcessingPipeline chain = null;
+    	
+		try	{ 
+			chain = new ActionProcessingPipeline(message,config); 
+		}catch (IllegalArgumentException e){
+			e.printStackTrace();
+			fail(e.toString());
+		} catch (ConfigurationException e){
+			e.printStackTrace();
+			fail(e.toString());
+		}
+		Thread t = new Thread(chain);
+		t.start();
+
+		// Wait for processing to complte...
+		chain.waitUntilComplete();
+
+		//The message coming should have the Collection of destinationServices as a property.
+		Collection destinationServices = (Collection) chain.getMessage().getProperties().getProperty(MessageRouter.ROUTING_DESTINATION_SERVICE_LIST);
+		assertNotNull("Destination service list is null", destinationServices);
+		String firstDestination = (String) destinationServices.iterator().next();
+		logger.info("Destination=" + firstDestination);
+		assertEquals("test_category:JBOSS_XMLDestination",firstDestination);
+    }
+	
+	
+	
+	@BeforeClass
+	public static void runBeforeAllTests()
+	{
+		try {
+			DOMConfigurator.configure(TestEnvironmentUtil.getUserDir("product","../product") + "etc/test/resources/log4j.xml");
+			TestEnvironmentUtil.setESBPropertiesFileToUse("product","../product");
+			//Set the juddi properties file in System so juddi will pick it up later and use the test values.
+			String juddiPropertiesFile = "/org/jboss/soa/esb/services/registry/juddi-qatest.properties";
+			System.setProperty("juddi.propertiesFile", juddiPropertiesFile);
+			//Read this properties file to get the db connection string
+			Properties props = new Properties();
+			InputStream inStream = Class.class.getResourceAsStream(juddiPropertiesFile);
+			props.load(inStream);
+			mDbDriver    = props.getProperty("juddi.jdbcDriver");
+			mDbUrl       = props.getProperty("juddi.jdbcUrl");
+			mDbUsername  = props.getProperty("juddi.jdbcUsername");
+			mDbPassword  = props.getProperty("juddi.jdbcPassword");
+			
+			String database="not tested yet";
+			if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
+				database = "hsqldb";
+				//Bring up hsql on default port 9001
+				HsqldbUtil.startHsqldb(TestEnvironmentUtil.getUserDir("product","../product") + "build/hsqltestdb", "juddi");
+			} else if ("com.mysql.jdbc.Driver".equals(mDbDriver)) {
+				database = "mysql";
+			} //add and test your own database..
+			
+			//Get the registry-schema create scripts
+			String sqlDir = TestEnvironmentUtil.getUserDir("product","../product") + "install/jUDDI-registry/sql/" + database + "/";
+			//Drop what is there now, if exists. We want to start fresh.
+			String sqlDropCmd      = FileUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
+			String sqlCreateCmd    = FileUtil.readTextFile(new File(sqlDir + "create_database.sql"));
+			String sqlInsertPubCmd = FileUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
+			
+			try {
+				Class.forName(mDbDriver);
+			} catch (Exception e) {
+				System.out.println("ERROR: failed to load " + database + " JDBC driver.");
+				e.printStackTrace();
+				return;
+			}
+			java.sql.Connection con = DriverManager.getConnection(mDbUrl, mDbUsername, mDbPassword);
+			Statement stmnt = con.createStatement();
+			System.out.println("Dropping the schema if exist");
+			stmnt.execute(sqlDropCmd);
+			System.out.println("Creating the juddi-schema");
+			stmnt.execute(sqlCreateCmd);
+			System.out.println("Adding the jbossesb publisher");
+			stmnt.execute(sqlInsertPubCmd);
+			
+			//Now we can bring up the ContentBasedRouter
+			logger.info("Testing to see if we can instantiate one");
+			String deploymentConfigFile = TestEnvironmentUtil.getUserDir("qa") 
+				+ "junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.xml";
+			_proc = ListenerUtil.launchManager(deploymentConfigFile, true);
+			_proc.waitUntilReady();
+			
+		} catch (Throwable e) {
+			e.printStackTrace();
+			System.out.println("We should stop testing, since we don't have a db.");
+			fail(e.toString());
+		}
+	}
+	
+	/**
+	 * Shutdown the database
+	 * @throws Exception
+	 */
+	@AfterClass
+	public static void runAfterAllTests() throws Exception 
+	{
+		//Shutdown the CBR Service
+        //Increase Sleep for debugging
+		Thread.sleep(200);
+		_proc.requestEnd();
+        //Give the controller time to finish
+		Thread.sleep(2000);
+		State oS = _proc.getState();
+		System.out.println("Exit state = "+oS.toString());
+		if ("org.hsqldb.jdbcDriver".equals(mDbDriver)) {
+			HsqldbUtil.stopHsqldb(mDbUrl, mDbUsername, mDbPassword);
+		}
+	}
+	
+	public static junit.framework.Test suite() {
+		return new JUnit4TestAdapter(CbrProxyActionUnitTest.class);
+	}
+}


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,57 +1,57 @@
-<!-- 
-/*
- * 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.
- */ 
- -->
- 
- <!-- for activemq use:
-  jndi-context-factory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-  jndi-URL="tcp://localhost:61616" -->
-    
- <!--  for mq series use: 
-  jndi-context-factory="com.ibm.mq.jms.context.WMQInitialContextFactory"
-  jndi-URL="dev37:1414/SYSTEM.DEF.SVRCONN" -->
-  
- <!--  for jbossmq use:
-   jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-  jndi-URL="localhost" -->
-
+<!-- 
+/*
+ * 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.
+ */ 
+ -->
+ 
+ <!-- for activemq use:
+  jndi-context-factory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
+  jndi-URL="tcp://localhost:61616" -->
+    
+ <!--  for mq series use: 
+  jndi-context-factory="com.ibm.mq.jms.context.WMQInitialContextFactory"
+  jndi-URL="dev37:1414/SYSTEM.DEF.SVRCONN" -->
+  
+ <!--  for jbossmq use:
+   jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+  jndi-URL="localhost" -->
+
 <ContentBasedRouterTest parameterReloadSecs="180">
-   <ContentBasedRouter
+   <ContentBasedRouter
     service-category="MessageRouting"
-	service-name="ContentBasedRoutingService"
+	service-name="ContentBasedRoutingService"
 	service-description="This CBR routs messages to different service destination based whether the messageType is XML or Serializable"
-   	listenerClass="org.jboss.soa.esb.listeners.message.CbrListener"
+   	listenerClass="org.jboss.soa.esb.listeners.message.CbrListener"
    	ruleSet="JBossESBRules.drl"
-	>
-	   <EPR
-	    protocol="jms"
-		connection-factory="ConnectionFactory"
-		destination-type="queue"
-	   	destination-name="queue/A"
-		jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-		jndi-URL="localhost"
-	    message-selector="service='ContentBasedRouting-SerializableOrXml'"
-	   />
-
+	>
+	   <EPR
+	    protocol="jms"
+		connection-factory="ConnectionFactory"
+		destination-type="queue"
+	   	destination-name="queue/A"
+		jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+		jndi-URL="localhost"
+	    message-selector="service='ContentBasedRouting-SerializableOrXml'"
+	   />
+
    </ContentBasedRouter>
    
 </ContentBasedRouterTest>


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTest.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTestFragment.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTestFragment.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTestFragment.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,34 +1,34 @@
-<!-- 
-/*
- * 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.
- */ 
- -->
- 
+<!-- 
+/*
+ * 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.
+ */ 
+ -->
+ 
 <CbrProxyActionTest>
-<action name="TestDefaultRouteAction"
-    process="route"
+<action name="TestDefaultRouteAction"
+    process="route"
     class="org.jboss.soa.esb.actions.CbrProxyAction"
-	service-category="MessageRouting"
-	service-name="ContentBasedRoutingService" />
-	
+	service-category="MessageRouting"
+	service-name="ContentBasedRoutingService" />
+	
 </CbrProxyActionTest>
-
 
+


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/CbrProxyActionUnitTestFragment.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/MessageBox.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,33 +1,33 @@
-<!-- 
-/*
- * 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.
- */ 
- -->
-
-<SmooksTransformerTest>
-	<action class="org.jboss.soa.esb.actions.converters.SmooksTransformer" 
-		from-type="Acme-Order-XML"
-		from="Acme"
-		to-type="Partner2-Order-XML"
-		to="AcmePartner2"
-	    smooks-cdr.list-classpath-prefix="org/jboss/soa/esb/actions/"
-		/>
-</SmooksTransformerTest>	
+<!-- 
+/*
+ * 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.
+ */ 
+ -->
+
+<SmooksTransformerTest>
+	<action class="org.jboss.soa.esb.actions.converters.SmooksTransformer" 
+		from-type="Acme-Order-XML"
+		from="Acme"
+		to-type="Partner2-Order-XML"
+		to="AcmePartner2"
+	    smooks-cdr.list-classpath-prefix="org/jboss/soa/esb/actions/"
+		/>
+</SmooksTransformerTest>	


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerTest.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/CbrListenerTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/CbrListenerTest.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/CbrListenerTest.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/CbrListenerTest.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,37 +1,37 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd"
-parameterReloadSecs="10">
-
-	<providers>
-          <jms-provider name="localhost" 
-                      connection-factory="ConnectionFactory"
-                      jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-                      jndi-URL="localhost" >
-                      
-              <jms-bus busid="QueueA">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/A"
-                      selector="service='CBRouting-SerializableOrXml'"
-                   />
-              </jms-bus>
-          </jms-provider>
-      </providers>
-      <services>
-        <service 
-        	category="MessageRouting" 
-        	name="ContentBasedRoutingService" 
-        	description="CBR Listener" 
-        	is-gateway="false"
-        	service-class="org.jboss.soa.esb.listeners.message.CbrListener">
-        	<listeners>        
-                  <jms-listener name="XPathContentBasedRouter"
-                              busidref="QueueA"
-                              maxThreads="1">  
-                  <property name="ruleSet" value="JBossESBRules.drl"/>
-                  <property name="ruleReload" value="true"/>          
-	             </jms-listener>
-             </listeners> 
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd"
+parameterReloadSecs="10">
+
+	<providers>
+          <jms-provider name="localhost" 
+                      connection-factory="ConnectionFactory"
+                      jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+                      jndi-URL="localhost" >
+                      
+              <jms-bus busid="QueueA">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/A"
+                      selector="service='CBRouting-SerializableOrXml'"
+                   />
+              </jms-bus>
+          </jms-provider>
+      </providers>
+      <services>
+        <service 
+        	category="MessageRouting" 
+        	name="ContentBasedRoutingService" 
+        	description="CBR Listener" 
+        	is-gateway="false"
+        	service-class="org.jboss.soa.esb.listeners.message.CbrListener">
+        	<listeners>        
+                  <jms-listener name="XPathContentBasedRouter"
+                              busidref="QueueA"
+                              maxThreads="1">  
+                  <property name="ruleSet" value="JBossESBRules.drl"/>
+                  <property name="ruleReload" value="true"/>          
+	             </jms-listener>
+             </listeners> 
         </service>
    </services>
 </jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/CbrListenerTest.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/message/MessageBox.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/HsqldbUtil.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/HsqldbUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/HsqldbUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,88 +1,88 @@
-/*
- * 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.messagestore;
-
-import java.sql.DriverManager;
-import java.sql.Statement;
-
-import org.hsqldb.Server;
-/**
- * Utility to start and stop a hsql Database.
- * 
- * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
- *
- */
-public class HsqldbUtil 
-{
-	final private static String THREAD_NAME = "hypersonic-unittest";
-	/**
-	 * Starts the hsql database in it's own thread. 
-	 * Don't forget to shut it down when you're done.
-	 * 
-	 * @param databaseFile - i.e. build/hsqltestdb
-	 * @param databaseName - i.e. jbossesb
-	 * @throws Exception
-	 */
-	public static void startHsqldb(final String databaseFile,
-			final String databaseName) throws Exception 
-	{
-		// Start DB in new thread, or else it will block us
-		Thread serverThread = new Thread(THREAD_NAME) {
-			public void run() {
-				try {
-					// Create startup arguments
-					final String[] args = {
-						"-database.0", databaseFile,
-						"-dbname.0", databaseName,
-						"-no_system_exit", "true"
-					} ;
-					
-					System.out.println("creating db from this script: " + databaseFile);
-
-					// Start server
-					Server.main(args);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-//				log.error("Failed to start database", e);
-			}
-		};
-		serverThread.run();
-	}
-	/**
-	 * 
-	 * @param url
-	 * @param username
-	 * @param password
-	 * @throws Exception
-	 */
-	public static void stopHsqldb(String url, String username, String password) throws Exception {
-		java.sql.Connection connection = DriverManager.getConnection(
-				url, username, password);
-		Statement statement = connection.createStatement();
-		String shutdownCommand = "SHUTDOWN COMPACT";
-		statement.executeQuery(shutdownCommand);
-	}
-
-	
-}
+/*
+ * 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.messagestore;
+
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import org.hsqldb.Server;
+/**
+ * Utility to start and stop a hsql Database.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
+ *
+ */
+public class HsqldbUtil 
+{
+	final private static String THREAD_NAME = "hypersonic-unittest";
+	/**
+	 * Starts the hsql database in it's own thread. 
+	 * Don't forget to shut it down when you're done.
+	 * 
+	 * @param databaseFile - i.e. build/hsqltestdb
+	 * @param databaseName - i.e. jbossesb
+	 * @throws Exception
+	 */
+	public static void startHsqldb(final String databaseFile,
+			final String databaseName) throws Exception 
+	{
+		// Start DB in new thread, or else it will block us
+		Thread serverThread = new Thread(THREAD_NAME) {
+			public void run() {
+				try {
+					// Create startup arguments
+					final String[] args = {
+						"-database.0", databaseFile,
+						"-dbname.0", databaseName,
+						"-no_system_exit", "true"
+					} ;
+					
+					System.out.println("creating db from this script: " + databaseFile);
+
+					// Start server
+					Server.main(args);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+//				log.error("Failed to start database", e);
+			}
+		};
+		serverThread.run();
+	}
+	/**
+	 * 
+	 * @param url
+	 * @param username
+	 * @param password
+	 * @throws Exception
+	 */
+	public static void stopHsqldb(String url, String username, String password) throws Exception {
+		java.sql.Connection connection = DriverManager.getConnection(
+				url, username, password);
+		Statement statement = connection.createStatement();
+		String shutdownCommand = "SHUTDOWN COMPACT";
+		statement.executeQuery(shutdownCommand);
+	}
+
+	
+}


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/HsqldbUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreClient.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/DrainQueuesAndTopics.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/DrainQueuesAndTopics.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/DrainQueuesAndTopics.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,124 +1,124 @@
-/*
- * 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.objpersist;
-
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSession;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-import javax.naming.Context;
-
-import org.jboss.soa.esb.helpers.NamingContext;
-
-public class DrainQueuesAndTopics
-{
-  private static final int	  MAX_TIMES_NOMSG = 10;
-  private static final String JNDI_URL	= "localhost";
-  private static final String JNDI_CONNECTION_FACTORY  
-  						= NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY;
- 
-  private Context m_oCtx;
-  
-  public DrainQueuesAndTopics() throws Exception
-  {
-	  purgeQueueTopic("queue/A");
-	  purgeQueueTopic("queue/B");
-	  purgeQueueTopic("topic/testTopic");
-  } //__________________________________
-  
-  public int purgeQueueTopic(String p_sName) throws Exception
-  { 
-	int iRet = 0;
-	m_oCtx = NamingContext.getServerContext(JNDI_URL, JNDI_CONNECTION_FACTORY, null);
-	
-	System.out.println(p_sName);
-	MessageConsumer oCns = null;
-	switch(p_sName.toLowerCase().charAt(0))
-	{	case 't' : oCns = getTopic(p_sName);	break;
-		case 'q' : oCns = getQueue(p_sName);	break;
-	}
-	if (null==oCns)
-		return 0;
-	
-	for (int iNoRcv=0; iNoRcv < MAX_TIMES_NOMSG; )
-	{	Message oMsg = oCns.receive(200);
-		if (null==oMsg)
-		{	iNoRcv++;
-			System.out.print(".");
-			continue;
-		}
-		iRet++;
-		dumpMessage(oMsg);
-		iNoRcv = 0;
-	}
-	System.out.println();
-	return iRet;
-  } //__________________________________
-  
-  void dumpMessage(Message pM)
-  {
-	  System.out.println(pM);
-  } //__________________________________
-  
-  QueueReceiver getQueue(String p_sJndi) throws Exception
-  {
-	QueueConnection oQconn = null;
-	QueueSession 	oQsess = null;
-	QueueConnectionFactory qcf = (QueueConnectionFactory) m_oCtx
-		.lookup("ConnectionFactory");
-
-	oQconn = qcf.createQueueConnection();
-	oQsess = oQconn.createQueueSession(false
-			,QueueSession.AUTO_ACKNOWLEDGE);
-    javax.jms.Queue oQueue 
-    	= (javax.jms.Queue) m_oCtx.lookup(p_sJndi);
-
-    QueueReceiver oRcv = oQsess.createReceiver(oQueue);
-    oQconn.start();
-    return oRcv;
-  } //__________________________________
-
-  TopicSubscriber getTopic(String p_sJndi) throws Exception
-  {
-	TopicConnection oTconn = null;
-	TopicSession 	oTsess = null;
-	TopicConnectionFactory qcf = (TopicConnectionFactory) m_oCtx
-		.lookup("ConnectionFactory");
-
-	oTconn = qcf.createTopicConnection();
-	oTsess = oTconn.createTopicSession(false
-			,QueueSession.AUTO_ACKNOWLEDGE);
-    Topic oT = (Topic) m_oCtx.lookup(p_sJndi);
-
-    TopicSubscriber oRcv = oTsess.createSubscriber(oT);
-    oTconn.start();
-    return oRcv;
-  } //__________________________________ 
-} //____________________________________________________________________________
+/*
+ * 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.objpersist;
+
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSession;
+import javax.jms.Topic;
+import javax.jms.TopicConnection;
+import javax.jms.TopicConnectionFactory;
+import javax.jms.TopicSession;
+import javax.jms.TopicSubscriber;
+import javax.naming.Context;
+
+import org.jboss.soa.esb.helpers.NamingContext;
+
+public class DrainQueuesAndTopics
+{
+  private static final int	  MAX_TIMES_NOMSG = 10;
+  private static final String JNDI_URL	= "localhost";
+  private static final String JNDI_CONNECTION_FACTORY  
+  						= NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY;
+ 
+  private Context m_oCtx;
+  
+  public DrainQueuesAndTopics() throws Exception
+  {
+	  purgeQueueTopic("queue/A");
+	  purgeQueueTopic("queue/B");
+	  purgeQueueTopic("topic/testTopic");
+  } //__________________________________
+  
+  public int purgeQueueTopic(String p_sName) throws Exception
+  { 
+	int iRet = 0;
+	m_oCtx = NamingContext.getServerContext(JNDI_URL, JNDI_CONNECTION_FACTORY, null);
+	
+	System.out.println(p_sName);
+	MessageConsumer oCns = null;
+	switch(p_sName.toLowerCase().charAt(0))
+	{	case 't' : oCns = getTopic(p_sName);	break;
+		case 'q' : oCns = getQueue(p_sName);	break;
+	}
+	if (null==oCns)
+		return 0;
+	
+	for (int iNoRcv=0; iNoRcv < MAX_TIMES_NOMSG; )
+	{	Message oMsg = oCns.receive(200);
+		if (null==oMsg)
+		{	iNoRcv++;
+			System.out.print(".");
+			continue;
+		}
+		iRet++;
+		dumpMessage(oMsg);
+		iNoRcv = 0;
+	}
+	System.out.println();
+	return iRet;
+  } //__________________________________
+  
+  void dumpMessage(Message pM)
+  {
+	  System.out.println(pM);
+  } //__________________________________
+  
+  QueueReceiver getQueue(String p_sJndi) throws Exception
+  {
+	QueueConnection oQconn = null;
+	QueueSession 	oQsess = null;
+	QueueConnectionFactory qcf = (QueueConnectionFactory) m_oCtx
+		.lookup("ConnectionFactory");
+
+	oQconn = qcf.createQueueConnection();
+	oQsess = oQconn.createQueueSession(false
+			,QueueSession.AUTO_ACKNOWLEDGE);
+    javax.jms.Queue oQueue 
+    	= (javax.jms.Queue) m_oCtx.lookup(p_sJndi);
+
+    QueueReceiver oRcv = oQsess.createReceiver(oQueue);
+    oQconn.start();
+    return oRcv;
+  } //__________________________________
+
+  TopicSubscriber getTopic(String p_sJndi) throws Exception
+  {
+	TopicConnection oTconn = null;
+	TopicSession 	oTsess = null;
+	TopicConnectionFactory qcf = (TopicConnectionFactory) m_oCtx
+		.lookup("ConnectionFactory");
+
+	oTconn = qcf.createTopicConnection();
+	oTsess = oTconn.createTopicSession(false
+			,QueueSession.AUTO_ACKNOWLEDGE);
+    Topic oT = (Topic) m_oCtx.lookup(p_sJndi);
+
+    TopicSubscriber oRcv = oTsess.createSubscriber(oT);
+    oTconn.start();
+    return oRcv;
+  } //__________________________________ 
+} //____________________________________________________________________________


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/DrainQueuesAndTopics.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessageAttachmentSerializeTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessageAttachmentSerializeTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessageAttachmentSerializeTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,116 +1,116 @@
-/*
- * 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.rosetta;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.message.Attachment;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * QA tests for the Message interface and implementations.
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- */
-public class MessageAttachmentSerializeTest extends TestCase 
-{
-
-	protected void setUp() throws Exception 
-	{
-	}
-
-	public void runTest() throws Exception 
-	{
-		testJavaSerializable();
-		testXml();
-	}
-
-	private static final File TESTFILE = new File("msgAttachment.test");
-	protected void tearDown() throws Exception 
-	{
-		TESTFILE.delete();
-	}
-	
-	public void testJavaSerializable() throws Exception
-	{
-		org.jboss.internal.soa.esb.message.format.serialized.AttachmentImpl
-		old = new  org.jboss.internal.soa.esb.message.format.serialized.AttachmentImpl();
-		populateAttachment(old);
-		ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(TESTFILE));
-		out.writeObject(old);
-		out.close();
-
-		ObjectInputStream inp = new ObjectInputStream(new FileInputStream(TESTFILE));
-		org.jboss.internal.soa.esb.message.format.serialized.AttachmentImpl
-		oNew = (org.jboss.internal.soa.esb.message.format.serialized.AttachmentImpl)
-			inp.readObject();
-		inp.close();
-
-		assertEquals(old,oNew);
-	}
-
-	public void testXml() throws Exception
-	{
-		DocumentBuilder oDB = DocumentBuilderFactory.newInstance().newDocumentBuilder();	
-		Document oDoc = oDB.newDocument();
-		Element  oRoot = oDoc.createElement("root");
-		oDoc.appendChild(oRoot);
-		
-		org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl
-		old = new  org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl();
-		populateAttachment(old);
-		old.toXML(oRoot);
-		
-		org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl
-		oNew = new org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl();		
-		oNew.fromXML(oRoot);
-
-		assertEquals(old,oNew);
-		
-		Document oD2 = oDB.newDocument();
-		Element  oR2 = oD2.createElement("root");
-		oD2.appendChild(oR2);
-		oNew.toXML(oR2);
-
-		String s1 = Util.toString(oRoot);
-		String s2 = Util.toString(oR2);
-		assertEquals(s1,s2);
-	}
-	
-	private void populateAttachment(Attachment att)
-	{
-		att.addItem("unnamed att 1");
-		att.put("name 2","N2N2N2N2N2N2N2N2");
-		att.addItem("unn 2");
-		att.put("name 1","named att 111111111111111");
-	}
-}
+/*
+ * 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.rosetta;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.message.Attachment;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * QA tests for the Message interface and implementations.
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ */
+public class MessageAttachmentSerializeTest extends TestCase 
+{
+
+	protected void setUp() throws Exception 
+	{
+	}
+
+	public void runTest() throws Exception 
+	{
+		testJavaSerializable();
+		testXml();
+	}
+
+	private static final File TESTFILE = new File("msgAttachment.test");
+	protected void tearDown() throws Exception 
+	{
+		TESTFILE.delete();
+	}
+	
+	public void testJavaSerializable() throws Exception
+	{
+		org.jboss.internal.soa.esb.message.format.serialized.AttachmentImpl
+		old = new  org.jboss.internal.soa.esb.message.format.serialized.AttachmentImpl();
+		populateAttachment(old);
+		ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(TESTFILE));
+		out.writeObject(old);
+		out.close();
+
+		ObjectInputStream inp = new ObjectInputStream(new FileInputStream(TESTFILE));
+		org.jboss.internal.soa.esb.message.format.serialized.AttachmentImpl
+		oNew = (org.jboss.internal.soa.esb.message.format.serialized.AttachmentImpl)
+			inp.readObject();
+		inp.close();
+
+		assertEquals(old,oNew);
+	}
+
+	public void testXml() throws Exception
+	{
+		DocumentBuilder oDB = DocumentBuilderFactory.newInstance().newDocumentBuilder();	
+		Document oDoc = oDB.newDocument();
+		Element  oRoot = oDoc.createElement("root");
+		oDoc.appendChild(oRoot);
+		
+		org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl
+		old = new  org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl();
+		populateAttachment(old);
+		old.toXML(oRoot);
+		
+		org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl
+		oNew = new org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl();		
+		oNew.fromXML(oRoot);
+
+		assertEquals(old,oNew);
+		
+		Document oD2 = oDB.newDocument();
+		Element  oR2 = oD2.createElement("root");
+		oD2.appendChild(oR2);
+		oNew.toXML(oR2);
+
+		String s1 = Util.toString(oRoot);
+		String s2 = Util.toString(oR2);
+		assertEquals(s1,s2);
+	}
+	
+	private void populateAttachment(Attachment att)
+	{
+		att.addItem("unnamed att 1");
+		att.put("name 2","N2N2N2N2N2N2N2N2");
+		att.addItem("unn 2");
+		att.put("name 1","named att 111111111111111");
+	}
+}


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessageAttachmentSerializeTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessagePropertiesSerializeTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessagePropertiesSerializeTest.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessagePropertiesSerializeTest.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,113 +1,113 @@
-/*
- * 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.rosetta;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import junit.framework.TestCase;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * QA tests for the Message interface and implementations.
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- */
-public class MessagePropertiesSerializeTest extends TestCase 
-{
-
-	protected void setUp() throws Exception 
-	{
-	}
-
-	public void runTest() throws Exception 
-	{
-		testJavaSerializable();
-		testXml();
-	}
-
-	private static final File TESTFILE = new File("msgProperties.test");
-	protected void tearDown() throws Exception 
-	{
-		TESTFILE.delete();
-	}
-	
-	public void testJavaSerializable() throws Exception
-	{
-		org.jboss.internal.soa.esb.message.format.serialized.PropertiesImpl
-		old = new  org.jboss.internal.soa.esb.message.format.serialized.PropertiesImpl();
-		populateProperties(old);
-		ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(TESTFILE));
-		out.writeObject(old);
-		out.close();
-
-		ObjectInputStream inp = new ObjectInputStream(new FileInputStream(TESTFILE));
-		org.jboss.internal.soa.esb.message.format.serialized.PropertiesImpl
-		oNew = (org.jboss.internal.soa.esb.message.format.serialized.PropertiesImpl)
-			inp.readObject();
-		inp.close();
-
-		assertEquals(old,oNew);
-	}
-
-	public void testXml() throws Exception
-	{
-		DocumentBuilder oDB = DocumentBuilderFactory.newInstance().newDocumentBuilder();	
-		Document oDoc = oDB.newDocument();
-		Element  oRoot = oDoc.createElement("root");
-		oDoc.appendChild(oRoot);
-		
-		org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl
-		old = new  org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl();
-		populateProperties(old);
-		old.toXML(oRoot);
-		
-		org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl
-		oNew = new org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl();		
-		oNew.fromXML(oRoot);
-
-		assertEquals(old,oNew);
-		
-		Document oD2 = oDB.newDocument();
-		Element  oR2 = oD2.createElement("root");
-		oD2.appendChild(oR2);
-		oNew.toXML(oR2);
-
-		String s1 = Util.toString(oRoot);
-		String s2 = Util.toString(oR2);
-		assertEquals(s1,s2);
-	}
-	
-	private void populateProperties(org.jboss.soa.esb.message.Properties props)
-	{
-		props.setProperty("p1","VALUE OF PROP 1");
-		props.setProperty("p2","VALUE 222");
-	}
-}
+/*
+ * 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.rosetta;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * QA tests for the Message interface and implementations.
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ */
+public class MessagePropertiesSerializeTest extends TestCase 
+{
+
+	protected void setUp() throws Exception 
+	{
+	}
+
+	public void runTest() throws Exception 
+	{
+		testJavaSerializable();
+		testXml();
+	}
+
+	private static final File TESTFILE = new File("msgProperties.test");
+	protected void tearDown() throws Exception 
+	{
+		TESTFILE.delete();
+	}
+	
+	public void testJavaSerializable() throws Exception
+	{
+		org.jboss.internal.soa.esb.message.format.serialized.PropertiesImpl
+		old = new  org.jboss.internal.soa.esb.message.format.serialized.PropertiesImpl();
+		populateProperties(old);
+		ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(TESTFILE));
+		out.writeObject(old);
+		out.close();
+
+		ObjectInputStream inp = new ObjectInputStream(new FileInputStream(TESTFILE));
+		org.jboss.internal.soa.esb.message.format.serialized.PropertiesImpl
+		oNew = (org.jboss.internal.soa.esb.message.format.serialized.PropertiesImpl)
+			inp.readObject();
+		inp.close();
+
+		assertEquals(old,oNew);
+	}
+
+	public void testXml() throws Exception
+	{
+		DocumentBuilder oDB = DocumentBuilderFactory.newInstance().newDocumentBuilder();	
+		Document oDoc = oDB.newDocument();
+		Element  oRoot = oDoc.createElement("root");
+		oDoc.appendChild(oRoot);
+		
+		org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl
+		old = new  org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl();
+		populateProperties(old);
+		old.toXML(oRoot);
+		
+		org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl
+		oNew = new org.jboss.internal.soa.esb.message.format.xml.PropertiesImpl();		
+		oNew.fromXML(oRoot);
+
+		assertEquals(old,oNew);
+		
+		Document oD2 = oDB.newDocument();
+		Element  oR2 = oD2.createElement("root");
+		oD2.appendChild(oR2);
+		oNew.toXML(oR2);
+
+		String s1 = Util.toString(oRoot);
+		String s2 = Util.toString(oR2);
+		assertEquals(s1,s2);
+	}
+	
+	private void populateProperties(org.jboss.soa.esb.message.Properties props)
+	{
+		props.setProperty("p1","VALUE OF PROP 1");
+		props.setProperty("p2","VALUE 222");
+	}
+}


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/MessagePropertiesSerializeTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/Util.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/Util.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/Util.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,50 +1,50 @@
-/*
- * 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.rosetta;
-
-import java.io.ByteArrayOutputStream;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.w3c.dom.Element;
-
-public class Util 
-{
-	public static String toString(Element elem) throws Exception
-	{
-		DOMSource src = new DOMSource(elem.getOwnerDocument());
-
-		ByteArrayOutputStream oStrm = new ByteArrayOutputStream(5000);
-		StreamResult res = new StreamResult(oStrm);
-
-		Transformer TT = TransformerFactory.newInstance().newTransformer();
-		TT.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
-		TT.setOutputProperty(OutputKeys.INDENT, "no");
-		TT.transform(src, res);
-		return (oStrm.toString());
-	} // __________________________________
-}
+/*
+ * 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.rosetta;
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Element;
+
+public class Util 
+{
+	public static String toString(Element elem) throws Exception
+	{
+		DOMSource src = new DOMSource(elem.getOwnerDocument());
+
+		ByteArrayOutputStream oStrm = new ByteArrayOutputStream(5000);
+		StreamResult res = new StreamResult(oStrm);
+
+		Transformer TT = TransformerFactory.newInstance().newTransformer();
+		TT.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+		TT.setOutputProperty(OutputKeys.INDENT, "no");
+		TT.transform(src, res);
+		return (oStrm.toString());
+	} // __________________________________
+}


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/rosetta/Util.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/services/registry/juddi-qatest.properties
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/services/registry/juddi-qatest.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/services/registry/juddi-qatest.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,69 +1,69 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=org.hsqldb.jdbcDriver
-juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/juddi
-juddi.jdbcUsername=sa
-juddi.jdbcPassword=
-# jUDDI DataSource to use
-juddi.dataSource=java:comp/env/jdbc/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=org.hsqldb.jdbcDriver
+juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/juddi
+juddi.jdbcUsername=sa
+juddi.jdbcPassword=
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/services/registry/juddi-qatest.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/ClassUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/DbUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/FileUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/JMSClientUtil.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/JMSClientUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/JMSClientUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,149 +1,149 @@
-/*
- * 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.util;
-
-import java.io.Serializable;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-
-import junit.framework.TestCase;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.helpers.NamingContext;
-
-/**
- * JMS Client utilities.
- * @author Esteban
- */
-public class JMSClientUtil {
-	
-	private static Logger logger = Logger.getLogger(JMSClientUtil.class); 
-	
-	/**
-	 * Test queues - correspond to the default queue set e.g. "queue/A", "queue/B" etc.
-	 */
-	public enum QUEUE {
-		A, B, C, D, ex
-	};
-
-	/**
-	 * Send a message to the specified queue.
-	 * @param message The message to be sent (String or other Object).
-	 * @param queue The {@link QUEUE} to send the message to.
-	 * @param properties The String properties to be set on the message.
-	 * @throws Exception
-	 */
-	public static void sendMessageToQueue(Serializable message, QUEUE queue, KeyValuePair[] properties) {
-		JMSSendQueueSetup queueSetup = null;
-		
-		if(message == null || queue == null) {
-			TestCase.fail("Invalid call to sendMessageToQueue: neither 'message' or 'queue' params can be null.");
-		}
-		
-		try {
-			queueSetup = new JMSSendQueueSetup(queue);
-			logger.info("Queue Setup for sending: " + queueSetup.queueName);
-	
-			// Send a Text message to the queue...
-			if (message instanceof String) {
-				TextMessage oMsg = queueSetup.jmsSession.createTextMessage();
-	
-				logger.info("Sending Text message: [" + message + "]");
-				oMsg.setText((String)message);
-				setStringProperties(oMsg, properties);
-				queueSetup.jmsProducer.send(oMsg);
-			} else {
-				ObjectMessage oMsg = queueSetup.jmsSession.createObjectMessage();
-				
-				logger.info("Sending Object message: [" + message + "]");
-				oMsg.setObject(message);
-				setStringProperties(oMsg, properties);
-				queueSetup.jmsProducer.send(oMsg);
-			}
-			logger.info("Message sent: [" + message + "]");
-		} catch(Exception e) {
-			String errorMessage = "Exception while sending message [" + message + "] to queue [" + queue + "].";
-			logger.error(errorMessage, e);
-			TestCase.fail(errorMessage + ": " + e.getMessage());
-		} finally {
-			if(queueSetup != null) {
-				logger.info("Closing Queue Setup: " + queueSetup.queueName);
-				queueSetup.close();
-			}
-		}
-	}
-
-	private static void setStringProperties(Message msg, KeyValuePair[] properties) throws JMSException {
-		if(properties == null) {
-			return;
-		}
-		
-		for(KeyValuePair property : properties) {
-			msg.setStringProperty(property.getKey(), property.getValue());
-		}
-	}
-
-	
-	private static class JMSSendQueueSetup {
-		QueueSession jmsSession;
-		Queue jmsQueue;
-		MessageProducer jmsProducer;
-		String queueName;
-
-		private JMSSendQueueSetup(QUEUE queue) throws Exception {
-			Context m_oCtx = NamingContext.getServerContext(
-					Configuration.getJndiServerURL(),
-					Configuration.getJndiServerContextFactory(), 
-					Configuration.getJndiServerPkgPrefix());
-			QueueConnectionFactory qcf = (QueueConnectionFactory) m_oCtx.lookup("ConnectionFactory");
-			QueueConnection oQconn = qcf.createQueueConnection();
-
-			queueName = "queue/" + queue.name();
-			
-			jmsSession = oQconn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-			jmsQueue = (Queue) m_oCtx.lookup(queueName);
-			jmsProducer = jmsSession.createSender(jmsQueue);			
-		}
-		
-		private void close() {
-			try {
-				jmsProducer.close();
-				jmsSession.close();
-			} catch (Exception e) {
-				logger.error("Unable to close JMS Queue Setup.", e);
-				TestCase.fail("Unable to close JMS Queue Setup: " + e.getMessage());
-			}
-		}
-	}
-}
+/*
+ * 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.util;
+
+import java.io.Serializable;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.Context;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.helpers.KeyValuePair;
+import org.jboss.soa.esb.helpers.NamingContext;
+
+/**
+ * JMS Client utilities.
+ * @author Esteban
+ */
+public class JMSClientUtil {
+	
+	private static Logger logger = Logger.getLogger(JMSClientUtil.class); 
+	
+	/**
+	 * Test queues - correspond to the default queue set e.g. "queue/A", "queue/B" etc.
+	 */
+	public enum QUEUE {
+		A, B, C, D, ex
+	};
+
+	/**
+	 * Send a message to the specified queue.
+	 * @param message The message to be sent (String or other Object).
+	 * @param queue The {@link QUEUE} to send the message to.
+	 * @param properties The String properties to be set on the message.
+	 * @throws Exception
+	 */
+	public static void sendMessageToQueue(Serializable message, QUEUE queue, KeyValuePair[] properties) {
+		JMSSendQueueSetup queueSetup = null;
+		
+		if(message == null || queue == null) {
+			TestCase.fail("Invalid call to sendMessageToQueue: neither 'message' or 'queue' params can be null.");
+		}
+		
+		try {
+			queueSetup = new JMSSendQueueSetup(queue);
+			logger.info("Queue Setup for sending: " + queueSetup.queueName);
+	
+			// Send a Text message to the queue...
+			if (message instanceof String) {
+				TextMessage oMsg = queueSetup.jmsSession.createTextMessage();
+	
+				logger.info("Sending Text message: [" + message + "]");
+				oMsg.setText((String)message);
+				setStringProperties(oMsg, properties);
+				queueSetup.jmsProducer.send(oMsg);
+			} else {
+				ObjectMessage oMsg = queueSetup.jmsSession.createObjectMessage();
+				
+				logger.info("Sending Object message: [" + message + "]");
+				oMsg.setObject(message);
+				setStringProperties(oMsg, properties);
+				queueSetup.jmsProducer.send(oMsg);
+			}
+			logger.info("Message sent: [" + message + "]");
+		} catch(Exception e) {
+			String errorMessage = "Exception while sending message [" + message + "] to queue [" + queue + "].";
+			logger.error(errorMessage, e);
+			TestCase.fail(errorMessage + ": " + e.getMessage());
+		} finally {
+			if(queueSetup != null) {
+				logger.info("Closing Queue Setup: " + queueSetup.queueName);
+				queueSetup.close();
+			}
+		}
+	}
+
+	private static void setStringProperties(Message msg, KeyValuePair[] properties) throws JMSException {
+		if(properties == null) {
+			return;
+		}
+		
+		for(KeyValuePair property : properties) {
+			msg.setStringProperty(property.getKey(), property.getValue());
+		}
+	}
+
+	
+	private static class JMSSendQueueSetup {
+		QueueSession jmsSession;
+		Queue jmsQueue;
+		MessageProducer jmsProducer;
+		String queueName;
+
+		private JMSSendQueueSetup(QUEUE queue) throws Exception {
+			Context m_oCtx = NamingContext.getServerContext(
+					Configuration.getJndiServerURL(),
+					Configuration.getJndiServerContextFactory(), 
+					Configuration.getJndiServerPkgPrefix());
+			QueueConnectionFactory qcf = (QueueConnectionFactory) m_oCtx.lookup("ConnectionFactory");
+			QueueConnection oQconn = qcf.createQueueConnection();
+
+			queueName = "queue/" + queue.name();
+			
+			jmsSession = oQconn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+			jmsQueue = (Queue) m_oCtx.lookup(queueName);
+			jmsProducer = jmsSession.createSender(jmsQueue);			
+		}
+		
+		private void close() {
+			try {
+				jmsProducer.close();
+				jmsSession.close();
+			} catch (Exception e) {
+				logger.error("Unable to close JMS Queue Setup.", e);
+				TestCase.fail("Unable to close JMS Queue Setup: " + e.getMessage());
+			}
+		}
+	}
+}


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/JMSClientUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/TestCaseUtils.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/build.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config-gateway.xml
===================================================================
--- labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config-gateway.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config-gateway.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,15 +1,15 @@
-<esb-config-gateway parameterReloadSecs="180">
-   <esb-jms-gateway
-    target-service-category="Trans"
-  	target-service-name="Gateway"
-   	gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener"
-	connection-factory="ConnectionFactory"
-   	destination-type="queue"
-   	destination-name="queue/A"
-	jndi-type="jboss"
-    jndi-URL="localhost"
-   >
-   <!-- no action needed as the inbound message is automatically converted
-     and sent to the queue for the target service -->  
-   </esb-jms-gateway>   
+<esb-config-gateway parameterReloadSecs="180">
+   <esb-jms-gateway
+    target-service-category="Trans"
+  	target-service-name="Gateway"
+   	gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener"
+	connection-factory="ConnectionFactory"
+   	destination-type="queue"
+   	destination-name="queue/A"
+	jndi-type="jboss"
+    jndi-URL="localhost"
+   >
+   <!-- no action needed as the inbound message is automatically converted
+     and sent to the queue for the target service -->  
+   </esb-jms-gateway>   
 </esb-config-gateway>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config-gateway.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config.xml
===================================================================
--- labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,83 +1,83 @@
-<esb-config parameterReloadSecs="180">
-
-   <esb-listener
-    service-category="Trans"
-  	service-name="InQueue"
-    service-description="Queue for splitting the messages across the 3 Transformations"
-	epr-description="None"
-   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
-	connection-factory="ConnectionFactory"
-	destination-type="queue"
-   	destination-name="queue/B"
-    jndi-type="jboss"
-    jndi-URL="localhost"   
-   >
-   	   <!-- There are 3 listeners pulling from "queue/C", all performing different transformations. -->
-	   <action class="org.jboss.soa.esb.actions.routing.JMSRouter" jndiName="queue/C" unwrap="false" />	   
-   </esb-listener>   
-
-   <esb-listener
-    service-category="Trans"
-  	service-name="TransService_01"
-    service-description="Simply Transformation load test service"
-	epr-description="None"
-   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
-	connection-factory="ConnectionFactory"
-	destination-type="queue"
-   	destination-name="queue/C"
-    jndi-type="jboss"
-    jndi-URL="localhost"   
-   >
-	   <action class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
-	   <action class="org.jboss.soa.esb.actions.converters.SmooksTransformer"
-			from="Trans:Gateway"
-			from-type="text/csv:inmessage"
-			to="Trans:TransService_01"
-			to-type="text/csv:inmessage" />	   
-	   <action class="loadtest.Assertion" message-name="Routing Test" expected="expected/TransService_01.expected"/>	  
-   </esb-listener>
-
-   <esb-listener
-    service-category="Trans"
-  	service-name="TransService_02"
-    service-description="Simply Transformation load test service"
-	epr-description="None"
-   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
-	connection-factory="ConnectionFactory"
-	destination-type="queue"
-   	destination-name="queue/C"
-    jndi-type="jboss"
-    jndi-URL="localhost"   
-   >
-	   <action class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
-	   <action class="org.jboss.soa.esb.actions.converters.SmooksTransformer"
-			from="Trans:Gateway"
-			from-type="text/csv:inmessage"
-			to="Trans:TransService_02"
-			to-type="text/csv:inmessage" />	   
-	   <action class="loadtest.Assertion" message-name="Routing Test" expected="expected/TransService_02.expected"/>	  
-   </esb-listener>   
-
-
-   <esb-listener
-    service-category="Trans"
-  	service-name="TransService_03"
-    service-description="Simply Transformation load test service"
-	epr-description="None"
-   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
-	connection-factory="ConnectionFactory"
-	destination-type="queue"
-   	destination-name="queue/C"
-    jndi-type="jboss"
-    jndi-URL="localhost"   
-   >
-	   <action class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
-	   <action class="org.jboss.soa.esb.actions.converters.SmooksTransformer"
-			from="Trans:Gateway"
-			from-type="text/csv:inmessage"
-			to="Trans:TransService_03"
-			to-type="text/csv:inmessage" />	   
-	   <action class="loadtest.Assertion" message-name="Routing Test" expected="expected/TransService_03.expected"/>	  
-   </esb-listener>
-
+<esb-config parameterReloadSecs="180">
+
+   <esb-listener
+    service-category="Trans"
+  	service-name="InQueue"
+    service-description="Queue for splitting the messages across the 3 Transformations"
+	epr-description="None"
+   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
+	connection-factory="ConnectionFactory"
+	destination-type="queue"
+   	destination-name="queue/B"
+    jndi-type="jboss"
+    jndi-URL="localhost"   
+   >
+   	   <!-- There are 3 listeners pulling from "queue/C", all performing different transformations. -->
+	   <action class="org.jboss.soa.esb.actions.routing.JMSRouter" jndiName="queue/C" unwrap="false" />	   
+   </esb-listener>   
+
+   <esb-listener
+    service-category="Trans"
+  	service-name="TransService_01"
+    service-description="Simply Transformation load test service"
+	epr-description="None"
+   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
+	connection-factory="ConnectionFactory"
+	destination-type="queue"
+   	destination-name="queue/C"
+    jndi-type="jboss"
+    jndi-URL="localhost"   
+   >
+	   <action class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+	   <action class="org.jboss.soa.esb.actions.converters.SmooksTransformer"
+			from="Trans:Gateway"
+			from-type="text/csv:inmessage"
+			to="Trans:TransService_01"
+			to-type="text/csv:inmessage" />	   
+	   <action class="loadtest.Assertion" message-name="Routing Test" expected="expected/TransService_01.expected"/>	  
+   </esb-listener>
+
+   <esb-listener
+    service-category="Trans"
+  	service-name="TransService_02"
+    service-description="Simply Transformation load test service"
+	epr-description="None"
+   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
+	connection-factory="ConnectionFactory"
+	destination-type="queue"
+   	destination-name="queue/C"
+    jndi-type="jboss"
+    jndi-URL="localhost"   
+   >
+	   <action class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+	   <action class="org.jboss.soa.esb.actions.converters.SmooksTransformer"
+			from="Trans:Gateway"
+			from-type="text/csv:inmessage"
+			to="Trans:TransService_02"
+			to-type="text/csv:inmessage" />	   
+	   <action class="loadtest.Assertion" message-name="Routing Test" expected="expected/TransService_02.expected"/>	  
+   </esb-listener>   
+
+
+   <esb-listener
+    service-category="Trans"
+  	service-name="TransService_03"
+    service-description="Simply Transformation load test service"
+	epr-description="None"
+   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
+	connection-factory="ConnectionFactory"
+	destination-type="queue"
+   	destination-name="queue/C"
+    jndi-type="jboss"
+    jndi-URL="localhost"   
+   >
+	   <action class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
+	   <action class="org.jboss.soa.esb.actions.converters.SmooksTransformer"
+			from="Trans:Gateway"
+			from-type="text/csv:inmessage"
+			to="Trans:TransService_03"
+			to-type="text/csv:inmessage" />	   
+	   <action class="loadtest.Assertion" message-name="Routing Test" expected="expected/TransService_03.expected"/>	  
+   </esb-listener>
+
 </esb-config>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/esb-config.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/load_tests/transform_load/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/qa/load_tests/transform_load/jbossesb-properties.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/load_tests/transform_load/jbossesb-properties.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -33,18 +33,18 @@
     <properties name="core">
 		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
 		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-    </properties>
-    <properties name="registry">
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
-    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
     </properties>
+    <properties name="registry">
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
+    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+    </properties>
     <properties name="transports" depends="core">
     	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
     	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
@@ -70,8 +70,8 @@
 		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
 		<!-- # of milliseconds to timeout waiting for a connection from pool -->
 		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
     </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
 </esb>


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/jbossesb-properties.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/load_tests/transform_load/jndi.properties
===================================================================
--- labs/jbossesb/trunk/qa/load_tests/transform_load/jndi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/load_tests/transform_load/jndi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,5 +1,5 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/jndi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/load_tests/transform_load/juddi.properties
===================================================================
--- labs/jbossesb/trunk/qa/load_tests/transform_load/juddi.properties	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/load_tests/transform_load/juddi.properties	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,70 +1,70 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=org.hsqldb.jdbcDriver
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=org.hsqldb.jdbcDriver
 #juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/jbossesb
-juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost:9001/jbossesb
-juddi.jdbcUsername=sa
-juddi.jdbcPassword=
-# jUDDI DataSource to use
-juddi.dataSource=java:comp/env/jdbc/juddiDB
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  
+juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost:9001/jbossesb
+juddi.jdbcUsername=sa
+juddi.jdbcPassword=
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/juddi.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/load_tests/transform_load/log4j.xml
===================================================================
--- labs/jbossesb/trunk/qa/load_tests/transform_load/log4j.xml	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/load_tests/transform_load/log4j.xml	2007-01-22 11:01:15 UTC (rev 8960)
@@ -63,28 +63,28 @@
    <!-- Limit categories -->
    <!-- ================ -->
 
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="INFO"/>
+   <category name="org.jboss">
+      <priority value="WARN"/>
    </category>
-   <category name="loadtest.Assertion">
+   <category name="org.jboss.soa.esb">
+      <priority value="INFO"/>
+   </category>
+   <category name="loadtest.Assertion">
       <priority value="ERROR"/>
-      <appender-ref ref="Assertions"/>
+      <appender-ref ref="Assertions"/>
    </category>
    <category name="org.jboss.soa.esb.actions.routing">
       <priority value="INFO"/>
    </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
    </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
+   <category name="org.apache">
+      <priority value="ERROR"/>
    </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
    <!-- ======================= -->
    <!-- Setup the Root category -->
    <!-- ======================= -->


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/Assertion.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/HsqldbUtil.java
===================================================================
--- labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/HsqldbUtil.java	2007-01-22 10:13:33 UTC (rev 8959)
+++ labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/HsqldbUtil.java	2007-01-22 11:01:15 UTC (rev 8960)
@@ -1,105 +1,105 @@
-package loadtest;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.Statement;
-
-import org.apache.log4j.Logger;
-import org.hsqldb.Server;
-import org.jboss.internal.soa.esb.persistence.format.db.DBConnectionManager;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.testutils.FileUtil;
-
-/**
- * Utility to start and stop a hsql Database.
- * 
- * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
- *
- */
-public class HsqldbUtil 
-{
-	final private static String THREAD_NAME = "hypersonic-unittest";
-	
-	private static Logger _logger = Logger.getLogger(HsqldbUtil.class);
-	/**
-	 * Starts the hsql database in it's own thread. 
-	 * Don't forget to shut it down when you're done.
-	 * 
-	 * @param databaseFile - i.e. build/hsqltestdb
-	 * @param databaseName - i.e. jbossesb
-	 * @throws Exception
-	 */
-	public static void startHsqldb() throws Exception 
-	{
-		// Start DB in new thread, or else it will block us
-		Thread serverThread = new Thread(THREAD_NAME) {
-			public void run() {
-				try {
-					// Create startup arguments
-					String[] args = new String[4];
-					args[0] = "-database.0";
-					args[1] = "build/hsqldb";
-					args[2] = "-dbname.0";
-					args[3] = "jbossesb";
-					
-					_logger.info("creating db from this script: " + args[1]);
-
-					// Start server
-					Server.main(args);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-//				log.error("Failed to start database", e);
-			}
-		};
-		serverThread.run();
-		
-		createDatabase();
-	}
-	/**
-	 * 
-	 * @param url
-	 * @param username
-	 * @param password
-	 * @throws Exception
-	 */
-	public static void stopHsqldb() throws Exception {
-		String url = Configuration.getStoreUrl();
-		String username = Configuration.getStoreUser();
-		String password = Configuration.getStorePwd();
-		
-		java.sql.Connection connection = DriverManager.getConnection(
-				url, username, password);
-		Statement statement = connection.createStatement();
-		String shutdownCommand = "SHUTDOWN COMPACT";
-		statement.executeQuery(shutdownCommand);
-	}
-
-	private static void createDatabase() throws Exception{	
-		//message store db
-		String sqlCreateCmd    = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/message-store/sql/hsqldb/create_database.sql"));
-		String sqlDropCmd      = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/message-store/sql/hsqldb/drop_database.sql"));		
-		
-		DBConnectionManager mgr = DBConnectionManager.getInstance();
-		Connection con = mgr.getConnection();
-		
-		Statement stmnt = con.createStatement();
-		System.out.println("Dropping the message store schema if exists...");
-		stmnt.execute(sqlDropCmd);
-		System.out.println("Creating the message store schema...");
-		stmnt.execute(sqlCreateCmd);
-		
-		//registry DB
-		System.out.println("Dropping the registry schema if exists...");
-		sqlDropCmd      = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/drop_database.sql"));
-		stmnt.execute(sqlDropCmd);
-		System.out.println("creating the registry schema...");
-		sqlCreateCmd    = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/create_database.sql"));
-		stmnt.execute(sqlCreateCmd);
-		System.out.println("inserting registry publishers...");
-		String sqlInsertPubCmd = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/insert_publishers.sql"));
-		stmnt.execute(sqlInsertPubCmd);
-		stmnt.close();
-		con.close();
-	}
-}
+package loadtest;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import org.apache.log4j.Logger;
+import org.hsqldb.Server;
+import org.jboss.internal.soa.esb.persistence.format.db.DBConnectionManager;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.testutils.FileUtil;
+
+/**
+ * Utility to start and stop a hsql Database.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
+ *
+ */
+public class HsqldbUtil 
+{
+	final private static String THREAD_NAME = "hypersonic-unittest";
+	
+	private static Logger _logger = Logger.getLogger(HsqldbUtil.class);
+	/**
+	 * Starts the hsql database in it's own thread. 
+	 * Don't forget to shut it down when you're done.
+	 * 
+	 * @param databaseFile - i.e. build/hsqltestdb
+	 * @param databaseName - i.e. jbossesb
+	 * @throws Exception
+	 */
+	public static void startHsqldb() throws Exception 
+	{
+		// Start DB in new thread, or else it will block us
+		Thread serverThread = new Thread(THREAD_NAME) {
+			public void run() {
+				try {
+					// Create startup arguments
+					String[] args = new String[4];
+					args[0] = "-database.0";
+					args[1] = "build/hsqldb";
+					args[2] = "-dbname.0";
+					args[3] = "jbossesb";
+					
+					_logger.info("creating db from this script: " + args[1]);
+
+					// Start server
+					Server.main(args);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+//				log.error("Failed to start database", e);
+			}
+		};
+		serverThread.run();
+		
+		createDatabase();
+	}
+	/**
+	 * 
+	 * @param url
+	 * @param username
+	 * @param password
+	 * @throws Exception
+	 */
+	public static void stopHsqldb() throws Exception {
+		String url = Configuration.getStoreUrl();
+		String username = Configuration.getStoreUser();
+		String password = Configuration.getStorePwd();
+		
+		java.sql.Connection connection = DriverManager.getConnection(
+				url, username, password);
+		Statement statement = connection.createStatement();
+		String shutdownCommand = "SHUTDOWN COMPACT";
+		statement.executeQuery(shutdownCommand);
+	}
+
+	private static void createDatabase() throws Exception{	
+		//message store db
+		String sqlCreateCmd    = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/message-store/sql/hsqldb/create_database.sql"));
+		String sqlDropCmd      = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/message-store/sql/hsqldb/drop_database.sql"));		
+		
+		DBConnectionManager mgr = DBConnectionManager.getInstance();
+		Connection con = mgr.getConnection();
+		
+		Statement stmnt = con.createStatement();
+		System.out.println("Dropping the message store schema if exists...");
+		stmnt.execute(sqlDropCmd);
+		System.out.println("Creating the message store schema...");
+		stmnt.execute(sqlCreateCmd);
+		
+		//registry DB
+		System.out.println("Dropping the registry schema if exists...");
+		sqlDropCmd      = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/drop_database.sql"));
+		stmnt.execute(sqlDropCmd);
+		System.out.println("creating the registry schema...");
+		sqlCreateCmd    = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/create_database.sql"));
+		stmnt.execute(sqlCreateCmd);
+		System.out.println("inserting registry publishers...");
+		String sqlInsertPubCmd = FileUtil.readStream(HsqldbUtil.class.getResourceAsStream("/install/jUDDI-registry/sql/hsqldb/insert_publishers.sql"));
+		stmnt.execute(sqlInsertPubCmd);
+		stmnt.close();
+		con.close();
+	}
+}


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/HsqldbUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/src/loadtest/Launcher.java
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/test.properties
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/load_tests/transform_load/transform/smooks-trans.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/log4j.xml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: labs/jbossesb/trunk/qa/test.properties
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the jboss-svn-commits mailing list