[jboss-svn-commits] JBL Code SVN: r12692 - in labs/jbossesb/workspace/dbevenius/product: core/listeners/src/org/jboss/soa/esb/actions and 9 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jun 19 12:01:55 EDT 2007
Author: beve
Date: 2007-06-19 12:01:55 -0400 (Tue, 19 Jun 2007)
New Revision: 12692
Added:
labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java
labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java
labs/jbossesb/workspace/dbevenius/product/tools/console/distro/jbossfaces-application.xml
labs/jbossesb/workspace/dbevenius/product/tools/console/distro/myfaces-application.xml
Modified:
labs/jbossesb/workspace/dbevenius/product/build-distr.xml
labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedRouter.java
labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java
labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java
labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java
labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java
labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java
labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java
labs/jbossesb/workspace/dbevenius/product/docs/AdministrationGuide.odt
labs/jbossesb/workspace/dbevenius/product/install/build.xml
labs/jbossesb/workspace/dbevenius/product/services/soap/
labs/jbossesb/workspace/dbevenius/product/tools/console/build.xml
labs/jbossesb/workspace/dbevenius/product/tools/console/distro/distro-build.xml
labs/jbossesb/workspace/dbevenius/product/tools/console/distro/jbossfaces-web.xml
Log:
Merge from main 12630:12691
Modified: labs/jbossesb/workspace/dbevenius/product/build-distr.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/build-distr.xml 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/build-distr.xml 2007-06-19 16:01:55 UTC (rev 12692)
@@ -149,6 +149,8 @@
<fileset dir="${services.dir}/jbrules/build" includes="jbrules.esb/**/*"/>
<fileset dir="${services.dir}/smooks/build" includes="smooks.esb/**/*" excludes="smooks.esb/jbmq-queue-service.xml smooks.esb/jbm-queue-service-scoped.xml"/>
<fileset dir="${services.dir}/spring/build" includes="spring.esb/**/*"/>
+ <fileset dir="${services.dir}/spring/build" includes="spring.esb/**/*"/>
+ <fileset dir="${services.dir}/soap/build" includes="soap.esb/**/*"/>
</copy>
</target>
Modified: labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedRouter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedRouter.java 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedRouter.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -21,181 +21,45 @@
*/
package org.jboss.soa.esb.actions;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
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;
-import org.jboss.soa.esb.message.mapping.ObjectMapper;
-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;
-import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouterFactory;
/**
* @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
* @author kstam at jboss.com
*
*/
-public class ContentBasedRouter extends AbstractActionPipelineProcessor
+public class ContentBasedRouter extends ContentBasedWiretap
{
-
- public static final String ROUTE_TO_TAG = "route-to";
- public static final String OBJECT_PATH_TAG = "object-path";
- public static final String OBJECT_PATH = "path";
- public static final String DEFAULT_CBR_CLASS = "org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter";
- private Logger log = Logger.getLogger(this.getClass());
-
- public ContentBasedRouter(ConfigTree config) throws ConfigurationException, RegistryException, MessageRouterException
- {
- _config = config;
- checkMyParms();
- _registry = RegistryFactory.getRegistry();
- _cbr = ContentBasedRouterFactory.getRouter(_cbrClass);
- _mapper = new ObjectMapper();
- }
-
- public void initialise()
- {
- if (_destinations.size() < 1)
- {
- _logger
- .warn("Missing or empty destination list - This action class won't have any effect");
- }
+ public ContentBasedRouter(ConfigTree config) throws ConfigurationException, RegistryException, MessageRouterException
+ {
+ super(config) ;
}
- /** Router the message to one or more destinations, using the ContentBasedRouter to figure out
+ /** Router the message to one or more destinations, using the ContentBasedRouter to figure out
* to which destinations it is going to be routed too.
*
* @param message
* @return Message
* @throws ActionProcessingException
- */
- public Message process(Message message) throws ActionProcessingException
- {
- try {
- List<Object> objectList = _mapper.createObjectList(message, _messagePathList);
- List<String> destinations = _cbr.route(_ruleSet, _ruleLanguage, _ruleReload, message, objectList);
- Collection<String[]> outgoingDestinations = new ArrayList<String[]>();
- for (String destination : destinations) {
- if (_destinations.containsKey(destination)) {
- outgoingDestinations.add(_destinations.get(destination));
- }
- }
- if (outgoingDestinations.size()>0) {
- MessageRouter.deliverMessages(outgoingDestinations, message);
- } else if (destinations.size() > 0) {
- log.error("The rule destination(s) " + destinations
- + " are not in found in the destination names in the configuration "
- + _destinations.keySet() + ". Please fix your configuration.");
-
- MessageRouter.deliverMessage(MessageRouter.INTERNAL_SERVICE_CATEGORY
- , MessageRouter.DEAD_LETTER_SERVICE_NAME
- , message);
- }
- return null;
- } catch (MessageRouterException mre) {
- throw new ActionProcessingException(mre.getMessage(), mre);
- }
- }
-
+ */
+ public Message process(Message message) throws ActionProcessingException
+ {
+ super.process(message) ;
+ return null ;
+ }
+
/**
* @deprecated no longer needed, leaving this in here for backwards compatibility,
* use the default "process".
* */
public Message split(Message message) throws ActionProcessingException
{
- log.warn("Depricated, please use the default 'process' method in your configuration");
+ _logger.warn("Depricated, please use the default 'process' method in your configuration");
return process(message);
}
-
- /**
- * Reading the piece of configTree specific to the CBR, and setting the configuration.
- *
- * @throws ConfigurationException
- */
- protected void checkMyParms() throws ConfigurationException
- {
- if (_config.getAttribute(ListenerTagNames.RULE_SET_TAG)==null) {
- _logger.error("Required attribute " + ListenerTagNames.RULE_SET_TAG + " not found in " + _config.getName() + ".");
- throw new ConfigurationException("Required attribute" + ListenerTagNames.RULE_SET_TAG + " not found.");
- } else {
- _ruleSet =_config.getAttribute(ListenerTagNames.RULE_SET_TAG);
- if (_ruleSet==null) {
- throw new ConfigurationException("Required attribute " + ListenerTagNames.RULE_SET_TAG + " not found.");
- }
- _ruleLanguage =_config.getAttribute(ListenerTagNames.RULE_LANGUAGE_TAG);
- String ruleReload = _config.getAttribute(ListenerTagNames.RULE_RELOAD_TAG);
- if (ruleReload!=null && "true".equals(ruleReload)) {
- _ruleReload = true;
- }
- }
- if (_config.getAttribute(ListenerTagNames.CBR_CLASS)!=null) {
- _cbrClass = _config.getAttribute(ListenerTagNames.CBR_CLASS);
- } else {
- _cbrClass = DEFAULT_CBR_CLASS;
- }
-
- _destinations = new HashMap<String, String[]>();
- ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
- if (destList!=null) {
- for (ConfigTree curr : destList) {
- try
- {
- String key = curr.getRequiredAttribute(ListenerTagNames.DESTINATION_NAME_TAG);
- String category = curr.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
- String name = curr.getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
- _destinations.put(key, new String[] { category, name });
- }
- catch (Exception e)
- {
- throw new ConfigurationException(
- "Problems with destination list", e);
- }
- }
- }
- _messagePathList = new ArrayList<String>();
- ConfigTree[] objectList = _config.getChildren(OBJECT_PATH_TAG);
- if (objectList!=null) {
- for (ConfigTree curr : objectList) {
- try {
- String objectPath = curr.getRequiredAttribute(OBJECT_PATH);
- _messagePathList.add(objectPath);
- } catch (Exception e) {
- throw new ConfigurationException(
- "Problems with object path list", e);
- }
- }
- }
-
- }
- protected ConfigTree _config;
-
- protected Map<String, String[]> _destinations;
-
- protected String _cbrClass;
-
- protected String _ruleSet;
-
- protected String _ruleLanguage;
-
- protected boolean _ruleReload;
-
- protected List <String> _messagePathList;
-
- protected ObjectMapper _mapper;
-
- protected Registry _registry;
-
- protected org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter _cbr;
-
- protected static Logger _logger = Logger.getLogger(ContentBasedRouter.class);
-
+ protected static Logger _logger = Logger.getLogger(ContentBasedRouter.class);
}
Copied: labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java (from rev 12691, labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -0,0 +1,224 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software 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.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+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;
+import org.jboss.soa.esb.message.mapping.ObjectMapper;
+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;
+import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouterFactory;
+
+/**
+ * @author <a
+ * href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @author kstam at jboss.com
+ * @author kevin.conner at jboss.com
+ *
+ */
+public class ContentBasedWiretap extends AbstractActionPipelineProcessor
+{
+ public static final String ROUTE_TO_TAG = "route-to";
+
+ public static final String OBJECT_PATH_TAG = "object-path";
+
+ public static final String OBJECT_PATH = "path";
+
+ public static final String DEFAULT_CBR_CLASS = "org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter";
+
+ public ContentBasedWiretap(ConfigTree config)
+ throws ConfigurationException, RegistryException,
+ MessageRouterException
+ {
+ _config = config;
+ checkMyParms();
+ _registry = RegistryFactory.getRegistry();
+ _cbr = ContentBasedRouterFactory.getRouter(_cbrClass);
+ _mapper = new ObjectMapper();
+ }
+
+ public void initialise()
+ {
+ if (_destinations.size() < 1)
+ {
+ _logger.warn("Missing or empty destination list - This action class won't have any effect");
+ }
+ }
+
+ /**
+ * Router the message to one or more destinations, using the
+ * ContentBasedRouter to figure out to which destinations it is going to be
+ * routed too.
+ *
+ * @param message
+ * @return Message
+ * @throws ActionProcessingException
+ */
+ public Message process(Message message) throws ActionProcessingException
+ {
+ try
+ {
+ List<Object> objectList = _mapper.createObjectList(message, _messagePathList);
+ List<String> destinations = _cbr.route(_ruleSet, _ruleLanguage,
+ _ruleReload, message, objectList);
+ Collection<String[]> outgoingDestinations = new ArrayList<String[]>();
+ for (String destination : destinations)
+ {
+ if (_destinations.containsKey(destination))
+ {
+ outgoingDestinations.add(_destinations.get(destination));
+ }
+ }
+ if (outgoingDestinations.size() > 0)
+ {
+ MessageRouter.deliverMessages(outgoingDestinations, message);
+ }
+ else if (destinations.size() > 0)
+ {
+ _logger.error("The rule destination(s) " + destinations
+ + " are not in found in the destination names in the configuration "
+ + _destinations.keySet() + ". Please fix your configuration.");
+
+ MessageRouter.deliverMessage(MessageRouter.INTERNAL_SERVICE_CATEGORY,
+ MessageRouter.DEAD_LETTER_SERVICE_NAME, message);
+ }
+ return message;
+ }
+ catch (MessageRouterException mre)
+ {
+ throw new ActionProcessingException(mre.getMessage(), mre);
+ }
+ }
+
+ /**
+ * Reading the piece of configTree specific to the CBR, and setting the
+ * configuration.
+ *
+ * @throws ConfigurationException
+ */
+ protected void checkMyParms() throws ConfigurationException
+ {
+ if (_config.getAttribute(ListenerTagNames.RULE_SET_TAG) == null)
+ {
+ _logger.error("Required attribute " + ListenerTagNames.RULE_SET_TAG
+ + " not found in " + _config.getName() + ".");
+ throw new ConfigurationException("Required attribute"
+ + ListenerTagNames.RULE_SET_TAG + " not found.");
+ }
+ else
+ {
+ _ruleSet = _config.getAttribute(ListenerTagNames.RULE_SET_TAG);
+ if (_ruleSet == null)
+ {
+ throw new ConfigurationException("Required attribute "
+ + ListenerTagNames.RULE_SET_TAG + " not found.");
+ }
+ _ruleLanguage = _config.getAttribute(ListenerTagNames.RULE_LANGUAGE_TAG);
+ String ruleReload = _config.getAttribute(ListenerTagNames.RULE_RELOAD_TAG);
+ if (ruleReload != null && "true".equals(ruleReload))
+ {
+ _ruleReload = true;
+ }
+ }
+ if (_config.getAttribute(ListenerTagNames.CBR_CLASS) != null)
+ {
+ _cbrClass = _config.getAttribute(ListenerTagNames.CBR_CLASS);
+ }
+ else
+ {
+ _cbrClass = DEFAULT_CBR_CLASS;
+ }
+
+ _destinations = new HashMap<String, String[]>();
+ ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
+ if (destList != null)
+ {
+ for (ConfigTree curr : destList)
+ {
+ try
+ {
+ String key = curr.getRequiredAttribute(ListenerTagNames.DESTINATION_NAME_TAG);
+ String category = curr.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
+ String name = curr.getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+ _destinations.put(key, new String[] { category, name });
+ }
+ catch (Exception e)
+ {
+ throw new ConfigurationException("Problems with destination list", e);
+ }
+ }
+ }
+ _messagePathList = new ArrayList<String>();
+ ConfigTree[] objectList = _config.getChildren(OBJECT_PATH_TAG);
+ if (objectList != null)
+ {
+ for (ConfigTree curr : objectList)
+ {
+ try
+ {
+ String objectPath = curr.getRequiredAttribute(OBJECT_PATH);
+ _messagePathList.add(objectPath);
+ }
+ catch (Exception e)
+ {
+ throw new ConfigurationException("Problems with object path list", e);
+ }
+ }
+ }
+
+ }
+
+ protected ConfigTree _config;
+
+ protected Map<String, String[]> _destinations;
+
+ protected String _cbrClass;
+
+ protected String _ruleSet;
+
+ protected String _ruleLanguage;
+
+ protected boolean _ruleReload;
+
+ protected List<String> _messagePathList;
+
+ protected ObjectMapper _mapper;
+
+ protected Registry _registry;
+
+ protected org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter _cbr;
+
+ protected static Logger _logger = Logger.getLogger(ContentBasedWiretap.class);
+
+}
Modified: labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -27,80 +27,37 @@
*/
package org.jboss.soa.esb.actions;
-import java.util.ArrayList;
-import java.util.List;
-
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;
import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.routing.MessageRouter;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
-public class StaticRouter extends AbstractActionPipelineProcessor
+public class StaticRouter extends StaticWiretap
{
- public static final String ROUTE_TO_TAG = "route-to";
- private Logger log = Logger.getLogger(this.getClass());
-
- private StaticRouter(){}
-
- public StaticRouter(ConfigTree config) throws ConfigurationException, RegistryException
- {
- _config = config;
- }
- /**
+ public StaticRouter(ConfigTree config) throws ConfigurationException, RegistryException
+ {
+ super(config) ;
+ }
+
+ /**
* Routes the message to one or more destonations.
- */
- public Message process(Message message) throws ActionProcessingException
- {
- try {
- MessageRouter.deliverMessages(_destinations, message);
- return null;
- } catch (MessageRouterException ex) {
- throw new ActionProcessingException(ex);
- }
- }
+ */
+ public Message process(Message message) throws ActionProcessingException
+ {
+ super.process(message) ;
+ return null ;
+ }
+
/**
* @deprecated no longer needed, leaving this in here for backwards compatibility,
* use the default "process".
* */
public Message split(Message message) throws ActionProcessingException
{
- log.warn("Depricated, please use the default 'process' method in your configuration");
+ _logger.warn("Depricated, please use the default 'process' method in your configuration");
return process(message);
}
- /**
- * Initialization by reading the configuration.
- */
- public void initialise() throws ActionLifecycleException
- {
- _destinations = new ArrayList<String[]>();
- ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
- if (null == destList || destList.length < 1)
- {
- _logger.warn("Missing or empty destination list - This action class won't have any effect");
- return;
- }
- for (ConfigTree curr : destList) {
- try {
- String category = curr.getAttribute(
- ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
- String name = curr.getRequiredAttribute(
- ListenerTagNames.SERVICE_NAME_TAG);
- _destinations.add(new String[]{ category, name});
- } catch (Exception e) {
- throw new ActionLifecycleException(
- "Problems with destination list", e);
- }
- }
- }
-
- protected ConfigTree _config;
-
- protected List<String[]> _destinations;
-
- protected static Logger _logger = Logger.getLogger(StaticRouter.class);
-
+
+ protected static Logger _logger = Logger.getLogger(StaticRouter.class);
}
Copied: labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java (from rev 12691, labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+/**
+ * Routes the Message argument to a fixed list of services ([category,name])
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @author Kevin.Conner at jboss.com
+ * @since Version 4.0
+ */
+package org.jboss.soa.esb.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+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;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+
+public class StaticWiretap extends AbstractActionPipelineProcessor
+{
+ public static final String ROUTE_TO_TAG = "route-to";
+
+ public StaticWiretap(ConfigTree config) throws ConfigurationException,
+ RegistryException
+ {
+ _config = config;
+ }
+
+ /**
+ * Routes the message to one or more destinations, returning original message.
+ */
+ public Message process(Message message) throws ActionProcessingException
+ {
+ try
+ {
+ MessageRouter.deliverMessages(_destinations, message);
+ return message;
+ }
+ catch (MessageRouterException ex)
+ {
+ throw new ActionProcessingException(ex);
+ }
+ }
+
+ /**
+ * Initialization by reading the configuration.
+ */
+ public void initialise() throws ActionLifecycleException
+ {
+ _destinations = new ArrayList<String[]>();
+ ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
+ if (null == destList || destList.length < 1)
+ {
+ _logger.warn("Missing or empty destination list - This action class won't have any effect");
+ return;
+ }
+ for (ConfigTree curr : destList)
+ {
+ try
+ {
+ String category = curr.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
+ String name = curr.getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+ _destinations.add(new String[] { category, name });
+ }
+ catch (Exception e)
+ {
+ throw new ActionLifecycleException("Problems with destination list", e);
+ }
+ }
+ }
+
+ protected ConfigTree _config;
+
+ protected List<String[]> _destinations;
+
+ protected static Logger _logger = Logger.getLogger(StaticRouter.class);
+}
Modified: labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/CallHelper.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -80,7 +80,7 @@
final Element relatesToElement = doc.createElementNS(
XMLUtil.WSA_NAMESPACE_URI, XMLUtil.RELATES_TO_TAG);
relatesToElement.setPrefix(XMLUtil.WSA_PREFIX);
- relatesToElement.setNodeValue(call.getRelatesTo().toString());
+ relatesToElement.setTextContent(call.getRelatesTo().toString());
header.appendChild(relatesToElement);
}
@@ -145,20 +145,20 @@
if (n.getPrefix().equals(XMLUtil.WSA_PREFIX) && (n.getLocalName().equals(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);
- }
- catch (Exception ex)
- {
- throw new UnmarshalException("'" + XMLUtil.RELATES_TO_TAG
- + "' has invalid content", ex);
- }
+ try
+ {
+ call.setRelatesTo(new URI(n.getTextContent()));
+ }
+ catch (URISyntaxException e)
+ {
+ throw new UnmarshalException("'" + XMLUtil.RELATES_TO_TAG
+ + "' must be a valid URI", e);
+ }
+ catch (Exception ex)
+ {
+ throw new UnmarshalException("'" + XMLUtil.RELATES_TO_TAG
+ + "' has invalid content", ex);
+ }
}
if (n.getPrefix().equals(XMLUtil.WSA_PREFIX) && (n.getLocalName().equals(XMLUtil.FAULT_TO_TAG)))
Modified: labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/FaultImpl.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -7,6 +7,7 @@
import org.jboss.soa.esb.message.Fault;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
@@ -114,22 +115,26 @@
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();
+ final Node node = children.item(j) ;
+ if (node instanceof Element)
+ {
+ Element child = (Element)node;
+
+ 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();
+ }
}
}
}
Modified: labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/internal/soa/esb/message/format/xml/MessageImpl.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -23,6 +23,7 @@
import java.io.Serializable;
import java.net.URI;
+import org.apache.log4j.Logger;
import org.jboss.soa.esb.MarshalException;
import org.jboss.soa.esb.UnmarshalException;
import org.jboss.soa.esb.message.Attachment;
@@ -162,7 +163,7 @@
}
catch (Exception ex)
{
- ex.printStackTrace();
+ LOGGER.warn("MessageImpl.toXML caught unexpected exception:", ex);
throw new MarshalException(ex);
}
@@ -199,7 +200,7 @@
}
catch (Exception ex)
{
- ex.printStackTrace();
+ LOGGER.warn("MessageImpl.fromXML caught unexpected exception:", ex);
throw new UnmarshalException(ex);
}
@@ -213,4 +214,9 @@
private FaultImpl _theFault = new FaultImpl();
private AttachmentImpl _theAttachment = new AttachmentImpl();
private PropertiesImpl _theProperties = new PropertiesImpl();
+
+ /**
+ * The logger for this class.
+ */
+ private static final Logger LOGGER = Logger.getLogger(MessageImpl.class);
}
Modified: labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/soa/esb/addressing/Call.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -248,7 +248,7 @@
public String toString ()
{
- return "To: "+_to+", From: "+_from+", ReplyTo: "+_replyTo+", FaultTo: "+_faultTo+", Action: "+_action+", MessagdID: "+_messageID;
+ return "To: "+_to+", From: "+_from+", ReplyTo: "+_replyTo+", FaultTo: "+_faultTo+", Action: "+_action+", MessageID: "+_messageID+", RelatesTo: "+_relatesTo;
}
/**
@@ -273,4 +273,4 @@
private URI _action = null;
private URI _messageID = null;
-}
\ No newline at end of file
+}
Modified: labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/core/rosetta/src/org/jboss/soa/esb/util/Util.java 2007-06-19 16:01:55 UTC (rev 12692)
@@ -198,7 +198,9 @@
}
catch (MarshalException ex)
{
- throw new IOException(ex.toString());
+ final IOException ioe = new IOException("Util.serialize caught MarshalException:") ;
+ ioe.initCause(ex) ;
+ throw ioe ;
}
}// ________________________________
@@ -226,7 +228,9 @@
}
catch (UnmarshalException ex)
{
- throw new IOException(ex.toString());
+ final IOException ioe = new IOException("Util.deserialize caught UnmarshalException") ;
+ ioe.initCause(ex) ;
+ throw ioe ;
}
} // ________________________________
@@ -341,5 +345,4 @@
private static final SimpleDateFormat s_oTS = new SimpleDateFormat(
"yyyy/MM/dd hh:mm:ss.SSS");
-
} // ____________________________________________________________________________
Modified: labs/jbossesb/workspace/dbevenius/product/docs/AdministrationGuide.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/dbevenius/product/install/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/install/build.xml 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/install/build.xml 2007-06-19 16:01:55 UTC (rev 12692)
@@ -112,6 +112,12 @@
<fileset dir="${org.jboss.esb.dist.lib}/spring.esb"
excludes="${messaging.excludes}"/>
</copy>
+
+ <!-- soap.esb -->
+ <copy todir="${deploy.dir}/soap.esb">
+ <fileset dir="${org.jboss.esb.dist.lib}/soap.esb"
+ excludes="${messaging.excludes}"/>
+ </copy>
</target>
<property name="org.jboss.esb.tomcat.55lib"
Property changes on: labs/jbossesb/workspace/dbevenius/product/services/soap
___________________________________________________________________
Name: svn:ignore
+ build
Modified: labs/jbossesb/workspace/dbevenius/product/tools/console/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/tools/console/build.xml 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/tools/console/build.xml 2007-06-19 16:01:55 UTC (rev 12692)
@@ -154,7 +154,6 @@
</copy>
<copy todir="${ear.dir}/META-INF">
<fileset dir="${basedir}/resources/META-INF">
- <include name="application.xml" />
<include name="jboss-app.xml" />
</fileset>
</copy>
Modified: labs/jbossesb/workspace/dbevenius/product/tools/console/distro/distro-build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/tools/console/distro/distro-build.xml 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/tools/console/distro/distro-build.xml 2007-06-19 16:01:55 UTC (rev 12692)
@@ -40,18 +40,26 @@
<delete file="console/distro/${db.target}/${dist-props}" />
<ant dir="console/distro/${db.target}" antfile="build.xml" target="capture-config"/>
- <antcall target="filter-files" />
<antcall target="archive" />
<ant dir="console/distro/${db.target}" antfile="build.xml" target="output-instructions" />
</target>
- <target name="jsf-copy" unless="jbossfaces.used">
+ <target name="jsf-copy">
<copy overwrite="true" file="console/distro/${jsf.provider}-web.xml"
tofile="console/jboss-esb-console.war/WEB-INF/web.xml"/>
+ <condition property="is-jbossfaces">
+ <and>
+ <equals arg1="${jsf.provider}" arg2="jbossfaces"/>
+ </and>
+ </condition>
</target>
- <target name="filter-files" depends="jsf-copy">
+ <target name="jsf-excludes" if="is-jbossfaces">
+ <property name="jar.excludes" value="el-*.jar"/>
+ </target>
+
+ <target name="filter-files" depends="jsf-copy,jsf-excludes">
<property file="console/distro/${db.target}/${dist-props}" />
<filterset id="filters" filtersfile="console/distro/${db.target}/${dist-props}"/>
<loadfile property="db.application.modules" srcfile="console/distro/${db.target}/db.application.modules.xml" />
@@ -60,7 +68,7 @@
<copy file="console/distro/${db.target}/persistence.xml" todir="console/${console-package.name}.jar/META-INF" overwrite="true">
<filterset refid="filters" />
</copy>
- <copy file="console/distro/application.xml" todir="console/${console-package.name}.ear/META-INF" overwrite="true">
+ <copy file="console/distro/${jsf.provider}-application.xml" tofile="console/${console-package.name}.ear/META-INF/application.xml" overwrite="true">
<filterset refid="filters" />
<filterset>
<filter token="db.application.modules" value="${db.application.modules}"/>
@@ -77,14 +85,17 @@
</copy>
</target>
- <target name="archive">
+ <target name="archive" depends="filter-files">
<delete dir="temp" failonerror="false"/>
<mkdir dir="temp"/>
-
+
+
<jar jarfile="temp/${console-package.name}.jar" basedir="console/${console-package.name}.jar"/>
<jar jarfile="temp/${console-package.name}.war" basedir="console/${console-package.name}.war"/>
<jar jarfile="${console-package.name}.ear">
- <fileset dir="console/${console-package.name}.ear"/>
+ <fileset dir="console/${console-package.name}.ear">
+ <exclude name="${jar.excludes}"/>
+ </fileset>
<fileset dir="temp">
<include name="${console-package.name}.jar"/>
<include name="${console-package.name}.war"/>
Copied: labs/jbossesb/workspace/dbevenius/product/tools/console/distro/jbossfaces-application.xml (from rev 12691, labs/jbossesb/trunk/product/tools/console/distro/jbossfaces-application.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/tools/console/distro/jbossfaces-application.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/product/tools/console/distro/jbossfaces-application.xml 2007-06-19 16:01:55 UTC (rev 12692)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
+
+ <display-name>jboss-esb-console</display-name>
+
+ <module>
+ <web>
+ <web-uri>jboss-esb-console.war</web-uri>
+ <context-root>/jboss-esb-console</context-root>
+ </web>
+ </module>
+
+ <module>
+ <ejb>jboss-esb-console.jar</ejb>
+ </module>
+
+ <module>
+ <java>jboss-esb-console-service.xml</java>
+ </module>
+
+ <!-- Seam and EL -->
+ <module>
+ <java>jboss-seam.jar</java>
+ </module>
+
+ <!-- jBPM -->
+ <module>
+ <java>jbpm-3.1.4.jar</java>
+ </module>
+
+ <!-- Drools and dependencies -->
+ <module>
+ <java>drools-core-3.0.5.jar</java>
+ </module>
+ <module>
+ <java>drools-compiler-3.0.5.jar</java>
+ </module>
+ <module>
+ <java>janino-2.4.3.jar</java>
+ </module>
+ <module>
+ <java>antlr-2.7.6.jar</java>
+ </module>
+ <module>
+ <java>antlr-3.0b7.jar</java>
+ </module>
+ <module>
+ <java>commons-jci-core-1.0-406301.jar</java>
+ </module>
+ <module>
+ <java>commons-jci-janino-2.4.3.jar</java>
+ </module>
+ <module>
+ <java>stringtemplate-3.0.jar</java>
+ </module>
+
+ <!-- Smooks and dependencies -->
+ <module>
+ <java>milyn-smooks-core-0.9-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-commons-0.9-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-edisax-0.2-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-csv-0.1.1.jar</java>
+ </module>
+ <module>
+ <java>opencsv-1.6.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-edi-0.2-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-javabean-0.3-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-misc-0.2.1.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-scripting-0.1.jar</java>
+ </module>
+ <module>
+ <java>groovy-all-1.0.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-templating-0.2.1.jar</java>
+ </module>
+ <module>
+ <java>ognl-2.6.9.jar</java>
+ </module>
+ <module>
+ <java>xbean.jar</java>
+ </module>
+ <module>
+ <java>xmlpublic.jar</java>
+ </module>
+
+
+ <!-- Hypersonic application modules - there are none. -->
+
+
+</application>
Modified: labs/jbossesb/workspace/dbevenius/product/tools/console/distro/jbossfaces-web.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/tools/console/distro/jbossfaces-web.xml 2007-06-19 12:50:11 UTC (rev 12691)
+++ labs/jbossesb/workspace/dbevenius/product/tools/console/distro/jbossfaces-web.xml 2007-06-19 16:01:55 UTC (rev 12692)
@@ -4,6 +4,16 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+
+
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/navigation.xml</param-value>
Copied: labs/jbossesb/workspace/dbevenius/product/tools/console/distro/myfaces-application.xml (from rev 12691, labs/jbossesb/trunk/product/tools/console/distro/myfaces-application.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/tools/console/distro/myfaces-application.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/product/tools/console/distro/myfaces-application.xml 2007-06-19 16:01:55 UTC (rev 12692)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
+
+ <display-name>jboss-esb-console</display-name>
+
+ <module>
+ <web>
+ <web-uri>jboss-esb-console.war</web-uri>
+ <context-root>/jboss-esb-console</context-root>
+ </web>
+ </module>
+
+ <module>
+ <ejb>jboss-esb-console.jar</ejb>
+ </module>
+
+ <module>
+ <java>jboss-esb-console-service.xml</java>
+ </module>
+
+ <!-- Seam and EL -->
+ <module>
+ <java>jboss-seam.jar</java>
+ </module>
+ <module>
+ <java>el-api.jar</java>
+ </module>
+ <module>
+ <java>el-ri.jar</java>
+ </module>
+
+ <!-- jBPM -->
+ <module>
+ <java>jbpm-3.1.4.jar</java>
+ </module>
+
+ <!-- Drools and dependencies -->
+ <module>
+ <java>drools-core-3.0.5.jar</java>
+ </module>
+ <module>
+ <java>drools-compiler-3.0.5.jar</java>
+ </module>
+ <module>
+ <java>janino-2.4.3.jar</java>
+ </module>
+ <module>
+ <java>antlr-2.7.6.jar</java>
+ </module>
+ <module>
+ <java>antlr-3.0b7.jar</java>
+ </module>
+ <module>
+ <java>commons-jci-core-1.0-406301.jar</java>
+ </module>
+ <module>
+ <java>commons-jci-janino-2.4.3.jar</java>
+ </module>
+ <module>
+ <java>stringtemplate-3.0.jar</java>
+ </module>
+
+ <!-- Smooks and dependencies -->
+ <module>
+ <java>milyn-smooks-core-0.9-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-commons-0.9-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-edisax-0.2-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-csv-0.1.1.jar</java>
+ </module>
+ <module>
+ <java>opencsv-1.6.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-edi-0.2-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-javabean-0.3-SNAPSHOT.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-misc-0.2.1.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-scripting-0.1.jar</java>
+ </module>
+ <module>
+ <java>groovy-all-1.0.jar</java>
+ </module>
+ <module>
+ <java>milyn-smooks-templating-0.2.1.jar</java>
+ </module>
+ <module>
+ <java>ognl-2.6.9.jar</java>
+ </module>
+ <module>
+ <java>xbean.jar</java>
+ </module>
+ <module>
+ <java>xmlpublic.jar</java>
+ </module>
+
+ @db.application.modules@
+
+</application>
More information about the jboss-svn-commits
mailing list