[jboss-svn-commits] JBL Code SVN: r6560 - in labs/jbossesb/trunk: product/core/rosetta/src/org/jboss/internal/soa/esb product/core/rosetta/src/org/jboss/internal/soa/esb/notification product/core/rosetta/src/org/jboss/internal/soa/esb/parameters product/core/rosetta/src/org/jboss/internal/soa/esb/util product/core/rosetta/src/org/jboss/soa/esb/notification product/core/rosetta/src/org/jboss/soa/esb/parameters product/core/rosetta/src/org/jboss/soa/esb/util product/core/rosetta/tests/src/org/jboss/soa/esb/helpers product/core/rosetta/tests/src/org/jboss/soa/esb/notification product/core/rosetta/tests/src/org/jboss/soa/esb/parameters product/core/rosetta/tests/src/org/jboss/soa/esb/util product/samples/trailblazer/bankloanbrokerdemo qa/junit/src/org/jboss/soa/esb/util

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Oct 3 17:40:19 EDT 2006


Author: mark.little at jboss.com
Date: 2006-10-03 17:39:12 -0400 (Tue, 03 Oct 2006)
New Revision: 6560

Added:
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/notification/
   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/
   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/util/
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java
Removed:
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/MacroExpander.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamFileRepository.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/StreamUtils.java
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/parameters/ParamRepositoryFactory.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/DomElementUnitTest.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/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/util/BaseBusinessObjectUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/build.xml
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/ListenerUtils.java
Log:
http://jira.jboss.com/jira/browse/JBESB-60

Copied: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/notification/MacroExpander.java (from rev 6558, labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/MacroExpander.java)
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/MacroExpander.java	2006-10-03 16:45:27 UTC (rev 6558)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/notification/MacroExpander.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -0,0 +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.internal.soa.esb.notification;
+
+import java.util.Map;
+
+import org.jboss.soa.esb.helpers.DomElement;
+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;
+
+/**
+ * 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 DomElement 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(DomElement domTree, Map replacementTokenMapMap) {
+		replaceMacros(domTree.getDomElement(), replacementTokenMapMap);
+	}
+	
+	private static void replaceMacros(Element element, Map p_oMap) {
+		NamedNodeMap attributes = element.getAttributes();
+		int attribCount = attributes.getLength();
+
+		for (int i = 0; i < attribCount; i++) {
+			Attr attribute = (Attr) attributes.item(i);
+			String sVal = attribute.getValue();
+			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 != p_oMap) ? p_oMap.get(sMac) : null;
+					if (null == oRpl) {
+						continue;
+					}
+					bSubst = true;
+					sVal = sVal.substring(0, iPos) + oRpl.toString() + sVal.substring(iPos + sMac.length());
+					break;
+				}
+			}
+			if (bSubst) {
+				attribute.setValue(sVal);
+			}
+		}
+		
+		// Iterate over the child elements and recursively call this method...
+		NodeList children = element.getChildNodes();
+		int childCount = children.getLength();
+		for (int i = 0; i < childCount; i++) {
+			Node child = children.item(i);
+			
+			if(child.getNodeType() != Node.ELEMENT_NODE) {
+				continue;
+			}
+			replaceMacros((Element)child, p_oMap);
+		}
+	}
+}

Copied: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/parameters/ParamFileRepository.java (from rev 6558, labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamFileRepository.java)
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamFileRepository.java	2006-10-03 16:45:27 UTC (rev 6558)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/parameters/ParamFileRepository.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -0,0 +1,277 @@
+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);
+
+			paramFile.getParentFile().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

Copied: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java (from rev 6558, labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/StreamUtils.java)
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/StreamUtils.java	2006-10-03 16:45:27 UTC (rev 6558)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/util/StreamUtils.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -0,0 +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();
+	}
+}

Deleted: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/MacroExpander.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/MacroExpander.java	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/MacroExpander.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -1,110 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.soa.esb.notification;
-
-import java.util.Map;
-
-import org.jboss.soa.esb.helpers.DomElement;
-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;
-
-/**
- * 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 DomElement 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(DomElement domTree, Map replacementTokenMapMap) {
-		replaceMacros(domTree.getDomElement(), replacementTokenMapMap);
-	}
-	
-	private static void replaceMacros(Element element, Map p_oMap) {
-		NamedNodeMap attributes = element.getAttributes();
-		int attribCount = attributes.getLength();
-
-		for (int i = 0; i < attribCount; i++) {
-			Attr attribute = (Attr) attributes.item(i);
-			String sVal = attribute.getValue();
-			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 != p_oMap) ? p_oMap.get(sMac) : null;
-					if (null == oRpl) {
-						continue;
-					}
-					bSubst = true;
-					sVal = sVal.substring(0, iPos) + oRpl.toString() + sVal.substring(iPos + sMac.length());
-					break;
-				}
-			}
-			if (bSubst) {
-				attribute.setValue(sVal);
-			}
-		}
-		
-		// Iterate over the child elements and recursively call this method...
-		NodeList children = element.getChildNodes();
-		int childCount = children.getLength();
-		for (int i = 0; i < childCount; i++) {
-			Node child = children.item(i);
-			
-			if(child.getNodeType() != Node.ELEMENT_NODE) {
-				continue;
-			}
-			replaceMacros((Element)child, p_oMap);
-		}
-	}
-}

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	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/notification/NotifyUtil.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -27,6 +27,7 @@
 import java.io.Serializable;
 import java.util.Map;
 
+import org.jboss.internal.soa.esb.notification.MacroExpander;
 import org.jboss.soa.esb.helpers.DomElement;
 import org.jboss.soa.esb.services.NotificationManager;
 

Deleted: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamFileRepository.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamFileRepository.java	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamFileRepository.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -1,275 +0,0 @@
-package org.jboss.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.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.util.StreamUtils;
-
-/**
- * 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);
-
-			paramFile.getParentFile().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

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	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/parameters/ParamRepositoryFactory.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -21,6 +21,7 @@
  */
 package org.jboss.soa.esb.parameters;
 
+import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
 import org.jboss.soa.esb.common.Configuration;
 
 /**
@@ -28,7 +29,7 @@
  * "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.soa.esb.parameters.ParamFileRepository}.
+ * {@link org.jboss.internal.soa.esb.parameters.ParamFileRepository}.
  * 
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */

Deleted: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/StreamUtils.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/StreamUtils.java	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/StreamUtils.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.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();
-	}
-}

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/DomElementUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/DomElementUnitTest.java	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/helpers/DomElementUnitTest.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -25,9 +25,9 @@
 import java.io.IOException;
 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.jboss.soa.esb.util.StreamUtils;
 import org.xml.sax.SAXException;
 
 /**

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	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/notification/MacroExpanderUnitTest.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -25,8 +25,9 @@
 
 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.DomElement;
-import org.jboss.soa.esb.util.StreamUtils;
 
 /**
  * MacroExpander unit tests.

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	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamRepositoryFactoryUnitTest.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -23,6 +23,7 @@
 
 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;
 

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	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/parameters/ParamsFileRepositoryUnitTest.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -25,6 +25,7 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
 import org.jboss.soa.esb.common.ModulePropertyManager;
 
 /**

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/BaseBusinessObjectUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/BaseBusinessObjectUnitTest.java	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/BaseBusinessObjectUnitTest.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -24,6 +24,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.jboss.internal.soa.esb.util.StreamUtils;
+
 import junit.framework.TestCase;
 
 /**

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/BobjStdDTOUnitTest.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -25,6 +25,7 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.StringUtils;
 import org.jboss.soa.esb.W3CDomUtils;
 import org.jboss.soa.esb.common.bizclasses.Address;

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	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/StreamUtilsUnitTest.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -23,6 +23,8 @@
 
 import java.io.ByteArrayInputStream;
 
+import org.jboss.internal.soa.esb.util.StreamUtils;
+
 import junit.framework.TestCase;
 
 /**

Modified: labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/build.xml	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/product/samples/trailblazer/bankloanbrokerdemo/build.xml	2006-10-03 21:39:12 UTC (rev 6560)
@@ -2,7 +2,7 @@
 
 	<property file="loanbroker.properties"/>
 	<!-- Some default build locations -->
-	
+
 	<property name="org.jboss.esb.samples.loanbroker.dest"             value="${basedir}/build"/>
 	<property name="org.jboss.esb.samples.loanbroker.classes.dir"      value="${basedir}/build/classes/loanbroker/"/>
 	<property name="org.jboss.esb.samples.loanbroker.testclasses.dir"  value="${basedir}/build/classes/tests/"/>
@@ -17,10 +17,10 @@
 	<!--
 		TODO: Can these classpaths be cleaned up any???
 	-->
-	
+
 	<path id="org.jboss.esb.samples.loanbroker.classpath">
-	    <pathelement location="${org.jboss.esb.samples.loanbroker.smooks}"/>
-	    <fileset dir="${org.jboss.esb.samples.loanbroker.lib.ext.dir}" includes="*.jar"/>
+		<pathelement location="${org.jboss.esb.samples.loanbroker.smooks}"/>
+		<fileset dir="${org.jboss.esb.samples.loanbroker.lib.ext.dir}" includes="*.jar"/>
 		<fileset dir="${org.jboss.soa.esb.samples.loanbroker.jboss_home}/client" 
 			includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
 		<fileset dir="${org.jboss.soa.esb.samples.loanbroker.jboss_home}/server/default/deploy/ejb3.deployer/" 
@@ -33,7 +33,7 @@
 			includes="milyn*.jar commons*.jar xerces*.jar xalan*.jar xml-apis*.jar jbossts-common.jar"/>
 	</path>
 	<path id="org.jboss.esb.samples.loanbroker.testclasspath">
-	    <pathelement location="${org.jboss.esb.samples.loanbroker.smooks}"/>
+		<pathelement location="${org.jboss.esb.samples.loanbroker.smooks}"/>
 
 		<fileset dir="${org.jboss.esb.samples.loanbroker.lib.ext.dir}" includes="*.jar"/>
 		<fileset dir="${org.jboss.soa.esb.samples.loanbroker.jboss_home}/client" 
@@ -46,50 +46,50 @@
 			includes="jbossesb-common.jar jbossesb-listeners.jar jbossesb-processors.jar jbossesb-services.jar"/>
 		<fileset dir="${org.jboss.soa.esb.samples.loanbroker.esb_home}/product/lib/ext" 
 			includes="milyn*.jar commons*.jar xerces*.jar xalan*.jar xml-apis*.jar jbossts-common.jar"/>
-	    <pathelement location="${org.jboss.esb.samples.loanbroker.classes.dir}"/>
+		<pathelement location="${org.jboss.esb.samples.loanbroker.classes.dir}"/>
 	</path>
-	
+
 	<target name="clean">
 		<delete dir="${org.jboss.esb.samples.loanbroker.dest}" />
 	</target>
 	<!-- =================================================================== -->
 	<!-- Prepares the directory structure                                    -->
-    <!-- =================================================================== -->
-    <target name="org.jboss.esb.samples.loanbroker.prepare">
-    	<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}"/>
-    	<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}/dist"/>
+	<!-- =================================================================== -->
+	<target name="org.jboss.esb.samples.loanbroker.prepare">
+		<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}"/>
+		<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}/dist"/>
 		<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}/classes/loanbroker"/>
-    	<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}/classes/tests"/>
-    	<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}/tests"/>
+		<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}/classes/tests"/>
+		<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}/tests"/>
 		<mkdir dir="${org.jboss.esb.samples.loanbroker.dest}/dist/lib"/>
-    </target>
-	
+	</target>
+
 	<!-- Compilation targets -->
 	<target name="org.jboss.esb.samples.loanbroker.compile" depends="org.jboss.esb.samples.loanbroker.prepare"
 		description="Compile all classes">
 
-		        <javac
+		<javac
 		            destdir="${org.jboss.esb.samples.loanbroker.classes.dir}"
 		            classpathref="org.jboss.esb.samples.loanbroker.classpath"
 		        	debug="true"
 		        	>
-		            <src path="${org.jboss.esb.samples.loanbroker.src.dir}"/>
-		        </javac>
-				
+			<src path="${org.jboss.esb.samples.loanbroker.src.dir}"/>
+		</javac>
+
 	</target>
 
-    <!-- javadocs paths -->
+	<!-- javadocs paths -->
 	<path id="org.jboss.esb.samples.loanbroker.javadocs.path">
 		<pathelement path="esb/classes"/>
 	</path>
-	
+
 	<!-- configure the web.xml -->
 	<target name="org.jboss.esb.samples.loanbroker.webxml">
 		<copy  file="java/resources/web.xml" overwrite="true"
 	       todir="${org.jboss.esb.samples.loanbroker.dest}">
 			<filterset>
 				<filter token="LoanBrokerConfigFile" value="${basedir}/conf/LoanBrokerConfig.xml" />
-	        </filterset>
+			</filterset>
 		</copy>
 	</target>
 
@@ -97,62 +97,62 @@
 	<target name="org.jboss.esb.samples.loanbroker.jar" depends="org.jboss.esb.samples.loanbroker.compile, org.jboss.esb.samples.loanbroker.webxml" >
 		<echo message="Building jar file"/>
 		<delete file="${org.jboss.esb.samples.loanbroker.dest}/dist/lib/loanbroker.jar" />
-        <jar    destfile="${org.jboss.esb.samples.loanbroker.dest}/dist/lib/loanbroker.jar" 
+		<jar    destfile="${org.jboss.esb.samples.loanbroker.dest}/dist/lib/loanbroker.jar" 
                 basedir="${org.jboss.esb.samples.loanbroker.classes.dir}" 
                 includes="**/*.class" excludes="**/web/*.class"
                 />
 		<delete file="${org.jboss.esb.samples.loanbroker.dest}/dist/lib/loanbroker.war" />
 		<war    warfile="${org.jboss.esb.samples.loanbroker.dest}/dist/lib/loanbroker.war"
 		        webxml="${org.jboss.esb.samples.loanbroker.dest}/web.xml">
-			    <classes dir="build/classes/loanbroker" includes="**/web/**/*.class"/>
-			    <lib dir="${org.jboss.soa.esb.samples.loanbroker.esb_home}/product/build/dist/lib">
-		    	    <include name="*.jar"/>
-		        </lib>
-			    <lib dir="${org.jboss.esb.samples.loanbroker.dest}/dist/lib">
-					 <include name="loanbroker.jar"/>
-			    </lib>
-			    <lib dir="lib">
-				     <include name="axis.jar"/>
-			    	 <include name="commons-discovery.jar"/>
-				</lib>
-			    <fileset dir="jsp">
-					 <include name="**/*.jsp"/>
-				</fileset>
-		        </war>
+			<classes dir="build/classes/loanbroker" includes="**/web/**/*.class"/>
+			<lib dir="${org.jboss.soa.esb.samples.loanbroker.esb_home}/product/build/dist/lib">
+				<include name="*.jar"/>
+			</lib>
+			<lib dir="${org.jboss.esb.samples.loanbroker.dest}/dist/lib">
+				<include name="loanbroker.jar"/>
+			</lib>
+			<lib dir="lib">
+				<include name="axis.jar"/>
+				<include name="commons-discovery.jar"/>
+			</lib>
+			<fileset dir="jsp">
+				<include name="**/*.jsp"/>
+			</fileset>
+		</war>
 	</target>
-	
+
 	<!-- Deploy the loanbroker.war -->
 	<target name="deploy" depends="jar">
 		<copy file="${org.jboss.esb.samples.loanbroker.dest}/dist/lib/loanbroker.war"
 			 todir="${org.jboss.soa.esb.samples.loanbroker.jboss_home}/server/${org.jboss.soa.esb.samples.loanbroker.jboss_server}/deploy"/>
 	</target>
-	
+
 	<!-- Short target names -->
 	<target name="compile" depends="org.jboss.esb.samples.loanbroker.compile"/>
-    <target name="jar" depends="org.jboss.esb.samples.loanbroker.jar"/>
-	
+	<target name="jar" depends="org.jboss.esb.samples.loanbroker.jar"/>
+
 	<target name="runFileBank">
-	    <ant dir="banks" target="runFileBank"/>
+		<ant dir="banks" target="runFileBank"/>
 	</target>
-	
+
 	<target name="runJMSBank">
-	    <ant dir="banks" target="runJMSBank"/>
+		<ant dir="banks" target="runJMSBank"/>
 	</target>
-	
+
 	<target name="runListener" depends="org.jboss.esb.samples.loanbroker.jar">
 		<echo>Running Loan Broker Listsner</echo>
 		<java fork="yes" classname="org.jboss.soa.esb.samples.loanbroker.web.Launcher" failonerror="true">
 			<classpath refid="org.jboss.esb.samples.loanbroker.testclasspath"/>
 			<sysproperty key="org.apache.commons.logging.LogFactory" value="org.apache.commons.logging.impl.Log4jFactory"/>
 		</java>
-	</target>	
-	
+	</target>
+
 	<!-- Compile the ant task used to convert file paths to fully qualified file URIs -->
 	<target name="compile-antx">
 		<mkdir dir="ant/classes" />
 		<javac srcdir="ant/src" destdir="ant/classes" />
 	</target>
-	
+
 	<target name="configure" depends="compile-antx">
 		<taskdef name="touri" classname="org.jboss.antx.ToURI" classpath="ant/classes"/>
 		<taskdef name="strreplace" classname="org.jboss.antx.StringReplace" classpath="ant/classes"/>
@@ -196,15 +196,18 @@
 		<mkdir dir="${trail.runtime.dir}/notification_output_files"/>
 		<mkdir dir="${trail.runtime.dir}/outgoing/errorDir"/>
 		<mkdir dir="${trail.runtime.dir}/outgoing/inputDoneDir"/>
-		
+
 		<ant target="filter-file">
-			<property name="file" value="loanbroker.properties.template"/><property name="toFile" value="loanbroker.properties"/>
+			<property name="file" value="loanbroker.properties.template"/>
+			<property name="toFile" value="loanbroker.properties"/>
 		</ant>
 		<ant target="filter-file">
-			<property name="file" value="conf/LoanBrokerConfig.xml.template"/><property name="toFile" value="conf/LoanBrokerConfig.xml"/>
+			<property name="file" value="conf/LoanBrokerConfig.xml.template"/>
+			<property name="toFile" value="conf/LoanBrokerConfig.xml"/>
 		</ant>
 		<ant target="filter-file">
-			<property name="file" value="banks/bank.properties.template"/><property name="toFile" value="banks/bank.properties"/>
+			<property name="file" value="banks/bank.properties.template"/>
+			<property name="toFile" value="banks/bank.properties"/>
 		</ant>
 
 		<echo message="" />
@@ -214,14 +217,14 @@
 		<echo message="" />
 
 	</target>
-	
+
 	<target name="filter-file">
-		 <copy file="${file}" tofile="${toFile}" overwrite="true">
+		<copy file="${file}" tofile="${toFile}" overwrite="true">
 			<filterset>
-		    	<filter token="cwd.uri" value="${cwd.uri}"/>
-		    	<filter token="cwd.dir" value="${cwd.dir}"/>
-		    	<filter token="trail.runtime.dir" value="${trail.runtime.dir}"/>
-		    	<filter token="jndi.host" value="${jndi.host}"/>
+				<filter token="cwd.uri" value="${cwd.uri}"/>
+				<filter token="cwd.dir" value="${cwd.dir}"/>
+				<filter token="trail.runtime.dir" value="${trail.runtime.dir}"/>
+				<filter token="jndi.host" value="${jndi.host}"/>
 				<filter token="jboss.as.installdir" value="${jboss.as.installdir}"/>
 				<filter token="smtp.host" value="${smtp.host}"/>
 				<filter token="smtp.port" value="${smtp.port}"/>
@@ -229,8 +232,8 @@
 				<filter token="smtp.user" value="${smtp.user}"/>
 				<filter token="smtp.password" value="${smtp.password}"/>
 				<filter token="smtp.auth" value="${smtp.auth}"/>
-		    </filterset>
-		  </copy>
+			</filterset>
+		</copy>
 	</target>
-	
+
 </project>

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/ListenerUtils.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/ListenerUtils.java	2006-10-03 21:15:04 UTC (rev 6559)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/util/ListenerUtils.java	2006-10-03 21:39:12 UTC (rev 6560)
@@ -28,8 +28,8 @@
 import junit.framework.TestCase;
 
 import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.parameters.ParamFileRepository;
 import org.jboss.soa.esb.listeners.GpListener;
-import org.jboss.soa.esb.parameters.ParamFileRepository;
 import org.jboss.soa.esb.parameters.ParamRepositoryException;
 import org.jboss.soa.esb.parameters.ParamRepositoryFactory;
 




More information about the jboss-svn-commits mailing list