[jboss-svn-commits] JBL Code SVN: r27154 - labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jun 26 09:37:08 EDT 2009


Author: tfennelly
Date: 2009-06-26 09:37:08 -0400 (Fri, 26 Jun 2009)
New Revision: 27154

Modified:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/RemoteGatewayListener.java
Log:
https://jira.jboss.org/jira/browse/JBESB-2648
RemoteGatewayListener should use System tmpdir for ftpLocalDir

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/RemoteGatewayListener.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/RemoteGatewayListener.java	2009-06-26 13:17:12 UTC (rev 27153)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/RemoteGatewayListener.java	2009-06-26 13:37:08 UTC (rev 27154)
@@ -68,15 +68,13 @@
 	{
 		try
 		{
-			File temp = File.createTempFile("FTPdown", ".tmp");
-			temp.delete();
-			String localDir = temp.getParent();
-			if (null==localDir)
-				localDir=new File("").getAbsolutePath();
+            String localDir = config.getAttribute(RemoteFileSystem.PARMS_LOCAL_DIR, System.getProperty("java.io.tmpdir"));
+
 			config.setAttribute(RemoteFileSystem.PARMS_LOCAL_DIR, localDir);
 			final String remoteDir = config.getAttribute(ListenerTagNames.FILE_INPUT_DIR_TAG) ;
 			config.setAttribute(RemoteFileSystem.PARMS_REMOTE_DIR, remoteDir);
-			EPR epr = ListenerUtil.assembleEpr(config);
+
+            EPR epr = ListenerUtil.assembleEpr(config);
 			if (epr instanceof FTPEpr)  {
 				FTPEpr ftpEpr = (FTPEpr) epr;
 				RemoteFileSystem rfs = RemoteFileSystemFactory.getRemoteFileSystem(ftpEpr, true);
@@ -85,10 +83,6 @@
 				throw new GatewayException("This Gateway only accepts FTP and SFTP.");
 			}
 		}
-		catch (IOException ex)
-		{
-			throw new ConfigurationException(ex);
-		}
 		catch (RemoteFileSystemException ex)
 		{
 			throw new ConfigurationException(ex);




More information about the jboss-svn-commits mailing list