[jboss-svn-commits] JBL Code SVN: r8512 - labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Dec 21 13:00:44 EST 2006
Author: estebanschifman
Date: 2006-12-21 13:00:41 -0500 (Thu, 21 Dec 2006)
New Revision: 8512
Modified:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/StandAloneBootStrapper.java
Log:
Fix pathnames to gateway and listener config files
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/StandAloneBootStrapper.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/StandAloneBootStrapper.java 2006-12-21 17:59:52 UTC (rev 8511)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/StandAloneBootStrapper.java 2006-12-21 18:00:41 UTC (rev 8512)
@@ -47,13 +47,21 @@
try
{
- _confController = initiateController(configName, gatewayConfig,listenerConfig);
+ File configFile = new File(configName);
+ String sParent = configFile.getParent();
+ if (sParent.endsWith("/.") || sParent.endsWith("\\."))
+ sParent = sParent.substring(0,-2+sParent.length());
+ configFile = new File(sParent,configFile.getName());
+ _confController = initiateController(configFile.getAbsolutePath(), gatewayConfig,listenerConfig);
+
+ listenerConfig = new File(sParent,listenerConfig).getAbsolutePath();
ConfigTree tree = ConfigTree.fromInputStream(new FileInputStream(listenerConfig));
_logger.debug("starting message aware listener with config file - " +listenerConfig);
_manager = ListenerUtil.launchManager(tree, true);
_manager.waitUntilReady();
+ gatewayConfig = new File(sParent,gatewayConfig).getAbsolutePath();
_logger.info("starting gateway listener with config file - " + gatewayConfig);
_gatewayController = new GatewayListenerController(gatewayConfig);
new Thread(_gatewayController).start();
@@ -82,17 +90,13 @@
{
if (null==configName)
throw new IllegalArgumentException("Null configuration file specified");
-
+
File configFile = new File(configName);
- String sParent = configFile.getParent();
- if (sParent.endsWith("/.") || sParent.endsWith("\\."))
- sParent = sParent.substring(0,-2+sParent.length());
- configFile = new File(sParent,configFile.getName());
if (!configFile.exists())
throw new IllegalArgumentException("Missing esb configuration file: "+configFile);
//Remove the listener and gateway configuration files if the exist
- File configDir = new File(sParent);
+ File configDir = configFile.getParentFile();
File listenerFile = new File(configDir,esbConf);
if (listenerFile.exists()) {
listenerFile.delete();
More information about the jboss-svn-commits
mailing list