You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(39) |
May
(165) |
Jun
(164) |
Jul
(127) |
Aug
(81) |
Sep
(146) |
Oct
(375) |
Nov
(241) |
Dec
(77) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(42) |
Feb
(38) |
Mar
(30) |
Apr
(6) |
May
(17) |
Jun
|
Jul
(15) |
Aug
(59) |
Sep
(31) |
Oct
(44) |
Nov
(30) |
Dec
(12) |
2008 |
Jan
(9) |
Feb
(63) |
Mar
(18) |
Apr
(43) |
May
(28) |
Jun
(32) |
Jul
(61) |
Aug
(5) |
Sep
(72) |
Oct
(48) |
Nov
(6) |
Dec
|
From: <li...@us...> - 2008-11-17 17:02:08
|
Revision: 2261 http://cogkit.svn.sourceforge.net/cogkit/?rev=2261&view=rev Author: liuwt Date: 2008-11-17 17:02:03 +0000 (Mon, 17 Nov 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/remote/gridftp/GridClient.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/remote/gridftp/GridClient.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/remote/gridftp/GridClient.java 2008-11-17 16:56:39 UTC (rev 2260) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/remote/gridftp/GridClient.java 2008-11-17 17:02:03 UTC (rev 2261) @@ -179,7 +179,9 @@ BufferedReader bufReader = null; try { - reader = new FileReader("sitesName"); + String globusDir = System.getProperty("user.home") + File.separator + ".globus"; + File f = new File(globusDir, "sitesName"); + reader = new FileReader(f); bufReader = new BufferedReader(reader); String line = null; while ((line = bufReader.readLine()) != null) { @@ -324,9 +326,14 @@ //save the site name to a file if (-1 == txtHost.getSelectedIndex()) { - File sitesNameFile = new File("sitesName"); + String globusDir = System.getProperty("user.home") + File.separator + ".globus"; + File sitesNameFile = new File(globusDir, "sitesName"); FileWriter writer = null; try { + File dir = new File(globusDir); + if (!dir.isDirectory() || !dir.exists()) { + dir.mkdirs(); + } if (!sitesNameFile.exists() || !sitesNameFile.isFile()) { sitesNameFile.createNewFile(); } @@ -629,6 +636,9 @@ client1.changeDir(dirname); client1.setPassive(); client1.setLocalActive(); +// client1.setLocalPassive(); +// client1.setActive(); + client1.setLocalNoDataChannelAuthentication(); logger.debug("\nSET THE PARAMETERS." + client1); //listing = client1.list(); @@ -689,6 +699,9 @@ client.setPassive(); client.setLocalActive(); +// client.setLocalPassive(); +// client.setActive(); + client.setLocalNoDataChannelAuthentication(); client.list("*", "-d", new DataSink() { public void write(Buffer buffer) @@ -755,6 +768,9 @@ client2.changeDir(dirname); client2.setPassive(); client2.setLocalActive(); +// client2.setLocalPassive(); +// client2.setActive(); + client2.setLocalNoDataChannelAuthentication(); listing = client2.mlsd(); logger.debug("Returned correctly from list."); @@ -806,6 +822,9 @@ client3.changeDir(dirname); client3.setPassive(); client3.setLocalActive(); +// client3.setLocalPassive(); +// client3.setActive(); + client3.setLocalNoDataChannelAuthentication(); listing = client3.list(); logger.debug("Returned correctly from list."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-11-17 16:56:47
|
Revision: 2260 http://cogkit.svn.sourceforge.net/cogkit/?rev=2260&view=rev Author: liuwt Date: 2008-11-17 16:56:39 +0000 (Mon, 17 Nov 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/monitor/UrlCopyPanel.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/monitor/UrlCopyPanel.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/monitor/UrlCopyPanel.java 2008-11-05 20:58:10 UTC (rev 2259) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/monitor/UrlCopyPanel.java 2008-11-17 16:56:39 UTC (rev 2260) @@ -112,6 +112,9 @@ } public boolean callUrlCopyTransfer(String jobid, String from, String to) { + System.out.println("from:" + from); + System.out.println("to:" + to); + GlobusURL froms = null; GlobusURL tos = null; UrlCopy c = null; @@ -123,12 +126,17 @@ logger.info("\nFrom = " + from); logger.info("\nTo = " + to); try { + froms = new GlobusURL(from); tos = new GlobusURL(to); c = new UrlCopy(); c.setSourceUrl(froms); c.setDestinationUrl(tos); - Authorization auth = new IdentityAuthorization(GridClient.subject1); + Authorization auth = null; + if (null != GridClient.subject1 && !"".equals(GridClient.subject1.trim())) { + auth = new IdentityAuthorization(GridClient.subject1); + } + c.setSourceAuthorization(auth); c.setDestinationAuthorization(auth); if (from.startsWith("gsiftp") && to.startsWith("gsiftp")) { @@ -157,6 +165,7 @@ null, null, "No errors"); c.copy(); + finalStatus = "Finished"; updateTransfer(currentJob, "Finished", null, null, "No errors"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-11-05 20:58:15
|
Revision: 2259 http://cogkit.svn.sourceforge.net/cogkit/?rev=2259&view=rev Author: hategan Date: 2008-11-05 20:58:10 +0000 (Wed, 05 Nov 2008) Log Message: ----------- oops2 Modified Paths: -------------- trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java Modified: trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java =================================================================== --- trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java 2008-11-05 20:58:03 UTC (rev 2258) +++ trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java 2008-11-05 20:58:10 UTC (rev 2259) @@ -342,6 +342,7 @@ boolean any = processPairs(); if (processDone()) { closePairs(); + return; } else { if (!any) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-11-05 20:58:10
|
Revision: 2258 http://cogkit.svn.sourceforge.net/cogkit/?rev=2258&view=rev Author: hategan Date: 2008-11-05 20:58:03 +0000 (Wed, 05 Nov 2008) Log Message: ----------- oops Modified Paths: -------------- trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java Modified: trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java =================================================================== --- trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java 2008-11-04 19:44:07 UTC (rev 2257) +++ trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java 2008-11-05 20:58:03 UTC (rev 2258) @@ -362,7 +362,7 @@ int avail = sp.is.available(); if (avail > 0) { any = true; - int len = sp.is.read(); + int len = sp.is.read(buf); sp.os.write(buf, 0, len); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-11-04 19:44:13
|
Revision: 2257 http://cogkit.svn.sourceforge.net/cogkit/?rev=2257&view=rev Author: hategan Date: 2008-11-04 19:44:07 +0000 (Tue, 04 Nov 2008) Log Message: ----------- fixed i/o deadlock Modified Paths: -------------- trunk/current/src/cog/modules/provider-local/CHANGES.txt trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java Modified: trunk/current/src/cog/modules/provider-local/CHANGES.txt =================================================================== --- trunk/current/src/cog/modules/provider-local/CHANGES.txt 2008-11-03 23:58:00 UTC (rev 2256) +++ trunk/current/src/cog/modules/provider-local/CHANGES.txt 2008-11-04 19:44:07 UTC (rev 2257) @@ -1,3 +1,8 @@ +(11/04/2008) + +*** Fixed deadlock in job submission handler caused by stderr not + being consumed properly + (08/20/2007) *** Rimplemented redirection to conform to new things in the Modified: trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java =================================================================== --- trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java 2008-11-03 23:58:00 UTC (rev 2256) +++ trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java 2008-11-04 19:44:07 UTC (rev 2257) @@ -15,6 +15,7 @@ import java.io.OutputStream; import java.util.Collection; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import org.apache.log4j.Logger; @@ -41,6 +42,9 @@ private static Logger logger = Logger .getLogger(JobSubmissionTaskHandler.class); + private static final int STDOUT = 0; + private static final int STDERR = 1; + public static final int BUFFER_SIZE = 1024; private Task task = null; @@ -56,7 +60,8 @@ "JobSubmissionTaskHandler cannot handle two active jobs simultaneously"); } else if (task.getStatus().getStatusCode() != Status.UNSUBMITTED) { - throw new TaskSubmissionException("Task is not in unsubmitted state"); + throw new TaskSubmissionException( + "Task is not in unsubmitted state"); } else { this.task = task; @@ -64,7 +69,8 @@ JobSpecification spec; try { spec = (JobSpecification) this.task.getSpecification(); - } catch (Exception e) { + } + catch (Exception e) { throw new IllegalSpecException( "Exception while retrieving Job Specification", e); } @@ -77,8 +83,10 @@ if (logger.isInfoEnabled()) { logger.info("Submitting task " + task); } - synchronized(this) { - this.thread = new Thread(this); + synchronized (this) { + thread = new Thread(this); + thread.setName("Local task " + task.getIdentity()); + thread.setDaemon(true); if (this.task.getStatus().getStatusCode() != Status.CANCELED) { this.task.setStatus(Status.SUBMITTED); this.thread.start(); @@ -87,7 +95,8 @@ } } } - } catch (Exception e) { + } + catch (Exception e) { throw new TaskSubmissionException("Cannot submit job", e); } } @@ -103,7 +112,7 @@ public void cancel() throws InvalidSecurityContextException, TaskSubmissionException { - synchronized(this) { + synchronized (this) { killed = true; process.destroy(); this.task.setStatus(Status.CANCELED); @@ -128,44 +137,38 @@ buildEnvp(spec), dir); this.task.setStatus(Status.ACTIVE); - // reusable byte buffer - byte[] buf = new byte[BUFFER_SIZE]; - /* - * This should be interleaved with stdout processing, since a - * process could block if its STDOUT is not consumed, thus causing a - * deadlock - */ - processIN(spec.getStdInput(), dir, buf); + processIN(spec.getStdInput(), dir); + List pairs = new LinkedList(); + if (!FileLocation.NONE.equals(spec.getStdOutputLocation())) { - String out = processOUT(spec.getStdOutput(), spec - .getStdOutputLocation(), dir, buf, process - .getInputStream()); - if (out != null) { - if (logger.isDebugEnabled()) { - logger.debug("STDOUT from job: " + out); - } - this.task.setStdOutput(out); + OutputStream os = prepareOutStream(spec.getStdOutput(), spec + .getStdOutputLocation(), dir, task, STDOUT); + if (os != null) { + pairs.add(new StreamPair(process.getInputStream(), os)); } } if (!FileLocation.NONE.equals(spec.getStdErrorLocation())) { - String err = processOUT(spec.getStdError(), spec - .getStdErrorLocation(), dir, buf, process - .getErrorStream()); - if (err != null) { - if (logger.isDebugEnabled()) { - logger.debug("STDERR from job: " + err); - } - this.task.setStdError(err); + OutputStream os = prepareOutStream(spec.getStdError(), spec + .getStdErrorLocation(), dir, task, STDERR); + if (os != null) { + pairs.add(new StreamPair(process.getErrorStream(), os)); } } + Processor p = new Processor(process, pairs); + if (spec.isBatchJob()) { + Thread t = new Thread(p); + t.setName("Local task"); + t.start(); return; } - int exitCode = process.waitFor(); + p.run(); + int exitCode = p.getExitCode(); + if (logger.isDebugEnabled()) { logger.debug("Exit code was " + exitCode); } @@ -174,10 +177,12 @@ } if (exitCode == 0) { this.task.setStatus(Status.COMPLETED); - } else { + } + else { throw new JobException(exitCode); } - } catch (Exception e) { + } + catch (Exception e) { if (killed) { return; } @@ -193,15 +198,17 @@ } } - protected void processIN(String in, File dir, byte[] buf) - throws IOException { + protected void processIN(String in, File dir) throws IOException { + + byte[] buf = new byte[BUFFER_SIZE]; if (in != null) { OutputStream out = process.getOutputStream(); File stdin; if (dir != null) { stdin = new File(dir, in); - } else { + } + else { stdin = new File(in); } @@ -215,20 +222,21 @@ } } - protected String processOUT(String out, FileLocation loc, File dir, - byte[] buf, InputStream pin) throws IOException { + protected OutputStream prepareOutStream(String out, FileLocation loc, + File dir, Task task, int stream) throws IOException { OutputStream os = null; - ByteArrayOutputStream baos = null; + TaskOutputStream baos = null; if (FileLocation.MEMORY.overlaps(loc)) { - baos = new ByteArrayOutputStream(); + baos = new TaskOutputStream(task, stream); os = baos; } if ((FileLocation.LOCAL.overlaps(loc) || FileLocation.REMOTE .equals(loc)) && out != null) { if (os != null) { - os = new OutputStreamMultiplexer(os, new FileOutputStream(out)); + os = new OutputStreamMultiplexer(os, + new FileOutputStream(out)); } else { os = new FileOutputStream(out); @@ -238,17 +246,7 @@ os = new NullOutputStream(); } - int len = pin.read(buf); - while (len != -1) { - os.write(buf, 0, len); - len = pin.read(buf); - } - os.close(); - if (baos != null) { - return baos.toString(); - } else { - return null; - } + return os; } private String[] buildCmdArray(JobSpecification spec) { @@ -284,4 +282,112 @@ } return envp; } + + private static class StreamPair { + public InputStream is; + public OutputStream os; + + public StreamPair(InputStream is, OutputStream os) { + this.is = is; + this.os = os; + } + } + + private static class TaskOutputStream extends ByteArrayOutputStream { + private Task task; + private int stream; + + public TaskOutputStream(Task task, int stream) { + this.task = task; + this.stream = stream; + } + + public void close() throws IOException { + super.close(); + String value = toString(); + if (logger.isDebugEnabled()) { + logger.debug((stream == STDOUT ? "STDOUT" : "STDERR") + + " from job: " + value); + } + if (stream == STDOUT) { + task.setStdOutput(value); + } + else { + task.setStdError(value); + } + } + } + + private static class Processor implements Runnable { + private Process p; + private List streamPairs; + byte[] buf; + + public Processor(Process p, List streamPairs) { + this.p = p; + this.streamPairs = streamPairs; + } + + public void run() { + try { + run2(); + } + catch (Exception e) { + logger.warn("Exception caught while running process", e); + } + } + + public void run2() throws IOException, InterruptedException { + while (true) { + boolean any = processPairs(); + if (processDone()) { + closePairs(); + } + else { + if (!any) { + Thread.sleep(20); + } + } + } + } + + private boolean processPairs() throws IOException { + boolean any = false; + Iterator i = streamPairs.iterator(); + while (i.hasNext()) { + if (buf == null) { + buf = new byte[BUFFER_SIZE]; + } + StreamPair sp = (StreamPair) i.next(); + int avail = sp.is.available(); + if (avail > 0) { + any = true; + int len = sp.is.read(); + sp.os.write(buf, 0, len); + } + } + return any; + } + + private boolean processDone() { + try { + p.exitValue(); + return true; + } + catch (IllegalThreadStateException e) { + return false; + } + } + + private void closePairs() throws IOException { + Iterator i = streamPairs.iterator(); + while (i.hasNext()) { + StreamPair sp = (StreamPair) i.next(); + sp.os.close(); + } + } + public int getExitCode() { + return p.exitValue(); + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-11-03 23:58:04
|
Revision: 2256 http://cogkit.svn.sourceforge.net/cogkit/?rev=2256&view=rev Author: hategan Date: 2008-11-03 23:58:00 +0000 (Mon, 03 Nov 2008) Log Message: ----------- changed timeout to 30 seconds Modified Paths: -------------- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java =================================================================== --- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java 2008-10-31 01:37:04 UTC (rev 2255) +++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java 2008-11-03 23:58:00 UTC (rev 2256) @@ -32,7 +32,7 @@ timer = new Timer(); } - public static final int DEFAULT_REPLY_TIMEOUT = 2 * 60 * 1000; //2 minutes + public static final int DEFAULT_REPLY_TIMEOUT = 30 * 1000; //30 seconds public static final int DEFAULT_MAX_RETRIES = 2; private int replyTimeout = DEFAULT_REPLY_TIMEOUT; private int maxRetries = DEFAULT_MAX_RETRIES; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-31 01:40:55
|
Revision: 2250 http://cogkit.svn.sourceforge.net/cogkit/?rev=2250&view=rev Author: liuwt Date: 2008-10-31 01:35:15 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/utils/Utils.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/utils/Utils.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/utils/Utils.java 2008-10-24 16:13:48 UTC (rev 2249) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/utils/Utils.java 2008-10-31 01:35:15 UTC (rev 2250) @@ -29,7 +29,9 @@ } public static String getProperty(String propertyName, String propertyFileName) { - File propFile = new File(propertyFileName); + String globusDir = System.getProperty("user.home") + File.separator + ".globus"; + File dir = new File(globusDir, "GridFTP_GUI"); + File propFile = new File(dir, propertyFileName); String ret = null; if (!propFile.exists()) { return null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-31 01:40:55
|
Revision: 2251 http://cogkit.svn.sourceforge.net/cogkit/?rev=2251&view=rev Author: liuwt Date: 2008-10-31 01:35:35 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/resources/GridFTPGUIApp.properties Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/resources/GridFTPGUIApp.properties =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/resources/GridFTPGUIApp.properties 2008-10-31 01:35:15 UTC (rev 2250) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/resources/GridFTPGUIApp.properties 2008-10-31 01:35:35 UTC (rev 2251) @@ -2,7 +2,7 @@ Application.name = GridFTP GUI Application.title = GridFTP GUI -Application.version = 1.0 +Application.version = 1.0.1 Application.vendor = Globus Toolkit Application.homepage = http://www.globus.org Application.description = A simple GUI interface for GridFTP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-31 01:40:54
|
Revision: 2255 http://cogkit.svn.sourceforge.net/cogkit/?rev=2255&view=rev Author: liuwt Date: 2008-10-31 01:37:04 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/FileTransferMainPanel.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/FileTransferMainPanel.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/FileTransferMainPanel.java 2008-10-31 01:36:21 UTC (rev 2254) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/FileTransferMainPanel.java 2008-10-31 01:37:04 UTC (rev 2255) @@ -643,7 +643,9 @@ } private Properties getRFTProperties(String fileName) { - File propFile = new File(fileName); + String globusDir = System.getProperty("user.home") + File.separator + ".globus"; + File dir = new File(globusDir, "GridFTP_GUI"); + File propFile = new File(dir, fileName); if (!propFile.exists()) { return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-31 01:40:53
|
Revision: 2252 http://cogkit.svn.sourceforge.net/cogkit/?rev=2252&view=rev Author: liuwt Date: 2008-10-31 01:35:51 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/EPRManager.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/EPRManager.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/EPRManager.java 2008-10-31 01:35:35 UTC (rev 2251) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/EPRManager.java 2008-10-31 01:35:51 UTC (rev 2252) @@ -1,10 +1,14 @@ package org.globus.transfer.reliable.client.eprmgmt; import java.io.File; +import java.io.FileFilter; import java.io.FileReader; import java.io.FileWriter; import java.io.Reader; import java.io.Writer; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; import javax.xml.namespace.QName; @@ -15,11 +19,112 @@ import org.globus.wsrf.encoding.ObjectSerializer; import org.xml.sax.InputSource; -public class EPRManager { - private final static String EPR_DIR = "epr"; +public class EPRManager { + private final static String ERP_FILE_SUFFIX = ".epr"; + private List<EndpointReferenceType> eprList; private static Log logger = LogFactory.getLog(EPRManager.class); - public void saveEPR(EndpointReferenceType epr) throws Exception { + public EPRManager() { + eprList = new ArrayList<EndpointReferenceType>(); + } + + public boolean deleteEPRFile(String location, String resourceKey) throws IllegalArgumentException { + if (null == location) { + throw new IllegalArgumentException("EPR location can not be null"); + } + + if (null == resourceKey || "".equals(resourceKey.trim())) { + throw new IllegalArgumentException("resource key can not be null"); + } + + String eprFileName = resourceKey + ERP_FILE_SUFFIX; + File file = new File(location, eprFileName); + return file.delete(); + } + + public void addEPR (EndpointReferenceType epr) { + eprList.add(epr); + } + + public void removeEPR (EndpointReferenceType epr) { + eprList.remove(epr); + } + + + public int getNumEPR () { + return eprList.size(); + } + + public EndpointReferenceType getEPR (int index) throws IllegalArgumentException { + if (index < 0 || index >= eprList.size()) { + throw new IllegalArgumentException("index is invalid"); + } + + return eprList.get(index); + } + + public EndpointReferenceType getEPR (String resourceKey) throws IllegalArgumentException{ + if (null == resourceKey) { + throw new IllegalArgumentException("resource key can not be null"); + } + + Iterator<EndpointReferenceType> iter = eprList.iterator(); + EndpointReferenceType ret = null; + while (iter.hasNext()) { + ret = iter.next(); + if (resourceKey.equals(ret.getProperties().get_any()[0].getValue())) { + return ret; + } + } + + return null; + } + + public String getResourceKey (int index) throws IllegalArgumentException { + if (index < 0 || index >= eprList.size()) { + throw new IllegalArgumentException("index is invalid"); + } + + EndpointReferenceType epr = eprList.get(index); + return epr.getProperties().get_any()[0].getValue(); + } + + public List<EndpointReferenceType> getEPRList () { + return eprList; + } + + public void writeEPRList (String location) throws Exception{ + if (null == location) { + throw new IllegalArgumentException("EPR location can not be null"); + } + + File eprDir = new File(location); + if (!eprDir.exists() || !eprDir.isDirectory()) { + eprDir.mkdirs(); + } + + Iterator<EndpointReferenceType> iter = eprList.iterator(); + while (iter.hasNext()) { + saveEPR(iter.next(), eprDir); + } + + } + + public void readEPRList (String location) throws Exception { + if (null == location) { + throw new IllegalArgumentException("EPR location can not be null"); + } + + File eprDir = new File(location); + if (!eprDir.exists() || !eprDir.isDirectory()) { + throw new Exception("the directory for storing EPR does not exist, read operation failed"); + } + + List<EndpointReferenceType> savedEPRs = readAll(eprDir); + eprList.addAll(savedEPRs); + } + + private void saveEPR(EndpointReferenceType epr, File eprDir) throws Exception { if (null == epr) { throw new Exception("can not save a null EPR"); } @@ -30,7 +135,8 @@ } QName qname = new QName("", "epr"); - File file = new File(EPR_DIR, resourceKey); + String eprFileName = resourceKey + ERP_FILE_SUFFIX; + File file = new File(eprDir, eprFileName); Writer writer = null; try { writer = new FileWriter(file); @@ -46,54 +152,38 @@ } - public EndpointReferenceType getEPR(String resourceKey) throws Exception { - if (null == resourceKey || "".equals(resourceKey.trim())) { - throw new Exception("resource key can not be null"); - } + private List<EndpointReferenceType> readAll(File eprDir) throws Exception { + List<EndpointReferenceType> ret = new ArrayList<EndpointReferenceType>(); + File[] eprFiles = eprDir.listFiles(new FileFilter() { + public boolean accept(File file) { + if(file.isFile() && file.getName().endsWith(ERP_FILE_SUFFIX)) { + return true; + } + + return false; + } + }); - File file = new File(EPR_DIR, resourceKey); - if (!file.exists() || !file.isFile()) { - return null; - } - - Reader reader = null; - try { - reader = new FileReader(file); - InputSource inputSource = new InputSource(reader); - EndpointReferenceType ret = (EndpointReferenceType)ObjectDeserializer.deserialize( - inputSource, EndpointReferenceType.class); - - return ret; - } catch(Exception e) { - logger.debug(e.getMessage(), e); - } finally { - if (null != reader) { - reader.close(); + if (null != eprFiles) { + Reader reader = null; + for (int i = 0; i < eprFiles.length; i++) { + try { + reader = new FileReader(eprFiles[i]); + InputSource inputSource = new InputSource(reader); + EndpointReferenceType epr = (EndpointReferenceType)ObjectDeserializer.deserialize( + inputSource, EndpointReferenceType.class); + ret.add(epr); + } catch (Exception e) { + logger.debug(e.getMessage(), e); + } finally { + if (null != reader) { + reader.close(); + reader = null; + } + } } } - return null; + return ret; } - - public boolean deleteEPR(String resourceKey) { - if (null == resourceKey || "".equals(resourceKey.trim())) { - return true; - } - - File file = new File(EPR_DIR, resourceKey); - return file.delete(); - } - - public static void main(String[] args) { - EPRManager e = new EPRManager(); - EndpointReferenceType p; - try { - p = e.getEPR("22558696"); - //System.out.println(p); - } catch (Exception e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-31 01:40:50
|
Revision: 2254 http://cogkit.svn.sourceforge.net/cogkit/?rev=2254&view=rev Author: liuwt Date: 2008-10-31 01:36:21 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/GridFTPGUIView.java trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/RFTPanel.java trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/RFTTransferParamPanel.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/GridFTPGUIView.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/GridFTPGUIView.java 2008-10-31 01:36:02 UTC (rev 2253) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/GridFTPGUIView.java 2008-10-31 01:36:21 UTC (rev 2254) @@ -464,21 +464,31 @@ //proxyInfoLabel.setSize(3000, 20); Thread t = new Thread() { - public void run() { - try { - while(true) { - ProxyInfo info = CredManager.getProxyInfo(); - StringBuffer buf = new StringBuffer(); + public void run() { + while (true) { + StringBuffer buf = new StringBuffer(); + try { + ProxyInfo info = CredManager.getProxyInfo(); buf.append("<html>") .append("Proxy Subject: ").append(info.getSubject()) .append("<br>") .append("Time Left: ").append(info.getTimeLeft()) - .append("</html>"); - proxyInfoLabel.setText(buf.toString()); - Thread.sleep(60000); - } - } catch (Exception e) { - } + .append("</html>"); + } catch (Exception e) { + buf.append("<html>") + .append("Proxy Subject: ").append(e.getMessage()) + .append("<br>") + .append("Time Left: ").append(0) + .append("</html>"); + } + + proxyInfoLabel.setText(buf.toString()); + try { + Thread.sleep(60000); + } catch (InterruptedException e) { + } + } + } }; t.start(); Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/RFTPanel.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/RFTPanel.java 2008-10-31 01:36:02 UTC (rev 2253) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/RFTPanel.java 2008-10-31 01:36:21 UTC (rev 2254) @@ -156,8 +156,14 @@ private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stopButtonActionPerformed Properties prop = new Properties(); try { - File prop_file = new File("rft.properties"); - + String globusDir = System.getProperty("user.home") + File.separator + ".globus"; + File dir = new File(globusDir, "GridFTP_GUI"); + if (!dir.exists() || !dir.isDirectory()) { + dir.mkdirs(); + } + + File prop_file = new File(dir, "rft.properties"); + prop.setProperty("rft_enabled", String.valueOf(rFTTransferParam1.isRFTEnabled())); prop.setProperty("host", rFTTransferParam1.getServerHost()); prop.setProperty("port", rFTTransferParam1.getServerPort()); Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/RFTTransferParamPanel.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/RFTTransferParamPanel.java 2008-10-31 01:36:02 UTC (rev 2253) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/RFTTransferParamPanel.java 2008-10-31 01:36:21 UTC (rev 2254) @@ -163,7 +163,10 @@ } }); Properties prop = new Properties(); - File propFile = new File("rft.properties"); + String globusDir = System.getProperty("user.home") + File.separator + ".globus"; + File dir = new File(globusDir, "GridFTP_GUI"); + File propFile = new File(dir, "rft.properties"); + if (propFile.exists()) { try { prop.load(new FileInputStream(propFile)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-31 01:40:49
|
Revision: 2253 http://cogkit.svn.sourceforge.net/cogkit/?rev=2253&view=rev Author: liuwt Date: 2008-10-31 01:36:02 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/CredManager.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/CredManager.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/CredManager.java 2008-10-31 01:35:51 UTC (rev 2252) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/CredManager.java 2008-10-31 01:36:02 UTC (rev 2253) @@ -14,17 +14,18 @@ public static ProxyInfo getProxyInfo() throws Exception { GlobusCredential proxy = null; String file = null; - + ProxyInfo ret = null; + try { file = CoGProperties.getDefault().getProxyFile(); - proxy = new GlobusCredential(file); + proxy = new GlobusCredential(file); } catch (Exception e) { logger.debug("Unable to load the user proxy : " + e.getMessage()); throw e; } - ProxyInfo ret = new ProxyInfo(CertUtil.toGlobusID(proxy.getSubject()), + ret = new ProxyInfo(CertUtil.toGlobusID(proxy.getSubject()), proxy.getStrength(),Util.formatTimeSec(proxy.getTimeLeft())); return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-24 16:14:01
|
Revision: 2249 http://cogkit.svn.sourceforge.net/cogkit/?rev=2249&view=rev Author: liuwt Date: 2008-10-24 16:13:48 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/scripts/build.xml Modified: trunk/current/src/cog/modules/transfer-gui/src/scripts/build.xml =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/scripts/build.xml 2008-10-24 16:13:25 UTC (rev 2248) +++ trunk/current/src/cog/modules/transfer-gui/src/scripts/build.xml 2008-10-24 16:13:48 UTC (rev 2249) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project name="IGTFScratcher" default="run" basedir="."> - <property name="dist_base_name" value="igtf-policy-installation-bundle-1.24"/> + <property name="dist_base_name" value="igtf-policy-installation-bundle-1.25"/> <property name="dist_package_name" value="${dist_base_name}.tar.gz"/> <property name="IGTFDist" value="https://dist.eugridpma.info/distribution/igtf/current/accredited/${dist_package_name}"/> <property name="tmp_file" value="tmf_file"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-24 16:13:39
|
Revision: 2248 http://cogkit.svn.sourceforge.net/cogkit/?rev=2248&view=rev Author: liuwt Date: 2008-10-24 16:13:25 +0000 (Fri, 24 Oct 2008) Log Message: ----------- a class for endpoint reference management Added Paths: ----------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/EPRManager.java Added: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/EPRManager.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/EPRManager.java (rev 0) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/eprmgmt/EPRManager.java 2008-10-24 16:13:25 UTC (rev 2248) @@ -0,0 +1,99 @@ +package org.globus.transfer.reliable.client.eprmgmt; + +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.Reader; +import java.io.Writer; + +import javax.xml.namespace.QName; + +import org.apache.axis.message.addressing.EndpointReferenceType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.globus.wsrf.encoding.ObjectDeserializer; +import org.globus.wsrf.encoding.ObjectSerializer; +import org.xml.sax.InputSource; + +public class EPRManager { + private final static String EPR_DIR = "epr"; + private static Log logger = LogFactory.getLog(EPRManager.class); + + public void saveEPR(EndpointReferenceType epr) throws Exception { + if (null == epr) { + throw new Exception("can not save a null EPR"); + } + + String resourceKey = epr.getProperties().get_any()[0].getValue(); + if (null == resourceKey || "".equals(resourceKey.trim())) { + resourceKey = new Long(System.currentTimeMillis()).toString(); + } + + QName qname = new QName("", "epr"); + File file = new File(EPR_DIR, resourceKey); + Writer writer = null; + try { + writer = new FileWriter(file); + ObjectSerializer.serialize(writer, epr, qname); + } catch (Exception e) { + logger.debug(e.getMessage(), e); + throw e; + } finally { + if (null != writer) { + writer.close(); + } + } + + } + + public EndpointReferenceType getEPR(String resourceKey) throws Exception { + if (null == resourceKey || "".equals(resourceKey.trim())) { + throw new Exception("resource key can not be null"); + } + + File file = new File(EPR_DIR, resourceKey); + if (!file.exists() || !file.isFile()) { + return null; + } + + Reader reader = null; + try { + reader = new FileReader(file); + InputSource inputSource = new InputSource(reader); + EndpointReferenceType ret = (EndpointReferenceType)ObjectDeserializer.deserialize( + inputSource, EndpointReferenceType.class); + + return ret; + } catch(Exception e) { + logger.debug(e.getMessage(), e); + } finally { + if (null != reader) { + reader.close(); + } + } + + return null; + } + + public boolean deleteEPR(String resourceKey) { + if (null == resourceKey || "".equals(resourceKey.trim())) { + return true; + } + + File file = new File(EPR_DIR, resourceKey); + return file.delete(); + } + + public static void main(String[] args) { + EPRManager e = new EPRManager(); + EndpointReferenceType p; + try { + p = e.getEPR("22558696"); + //System.out.println(p); + } catch (Exception e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-24 16:11:52
|
Revision: 2247 http://cogkit.svn.sourceforge.net/cogkit/?rev=2247&view=rev Author: liuwt Date: 2008-10-24 16:11:49 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Added Paths: ----------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/ProxyInfo.java Added: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/ProxyInfo.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/ProxyInfo.java (rev 0) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/ProxyInfo.java 2008-10-24 16:11:49 UTC (rev 2247) @@ -0,0 +1,36 @@ +package org.globus.transfer.reliable.client.credential; + +public class ProxyInfo { + private String subject; + private int strength; + private String timeLeft; + + public ProxyInfo(String subject, int strength, String timeLeft) { + super(); + this.subject = subject; + this.strength = strength; + this.timeLeft = timeLeft; + } + + public String getSubject() { + return subject; + } + + public int getStrength() { + return strength; + } + + public String getTimeLeft() { + return timeLeft; + } + + public String toString() { + StringBuffer buf = new StringBuffer(); + buf.append("Subject: ").append(subject).append("\n") + .append("Strength: ").append(strength).append(" bits\n") + .append("Time Left: ").append(timeLeft); + + return buf.toString(); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-24 16:11:52
|
Revision: 2246 http://cogkit.svn.sourceforge.net/cogkit/?rev=2246&view=rev Author: liuwt Date: 2008-10-24 16:11:38 +0000 (Fri, 24 Oct 2008) Log Message: ----------- a class for managing credential Added Paths: ----------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/CredManager.java Added: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/CredManager.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/CredManager.java (rev 0) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/credential/CredManager.java 2008-10-24 16:11:38 UTC (rev 2246) @@ -0,0 +1,31 @@ +package org.globus.transfer.reliable.client.credential; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.globus.common.CoGProperties; +import org.globus.gsi.CertUtil; +import org.globus.gsi.GlobusCredential; +import org.globus.util.Util; + + +public class CredManager { + private static Log logger = LogFactory.getLog(CredManager.class); + + public static ProxyInfo getProxyInfo() throws Exception { + GlobusCredential proxy = null; + String file = null; + + try { + file = CoGProperties.getDefault().getProxyFile(); + proxy = new GlobusCredential(file); + } catch (Exception e) { + logger.debug("Unable to load the user proxy : " + + e.getMessage()); + throw e; + } + + ProxyInfo ret = new ProxyInfo(CertUtil.toGlobusID(proxy.getSubject()), + proxy.getStrength(),Util.formatTimeSec(proxy.getTimeLeft())); + return ret; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-24 16:10:55
|
Revision: 2245 http://cogkit.svn.sourceforge.net/cogkit/?rev=2245&view=rev Author: liuwt Date: 2008-10-24 16:10:45 +0000 (Fri, 24 Oct 2008) Log Message: ----------- add a feature that can display proxy subject and time left to the status bar Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/GridFTPGUIView.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/GridFTPGUIView.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/GridFTPGUIView.java 2008-10-24 16:09:24 UTC (rev 2244) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/transfer/reliable/client/GridFTPGUIView.java 2008-10-24 16:10:45 UTC (rev 2245) @@ -44,7 +44,9 @@ import org.globus.tools.proxy.GridProxyInit; import org.globus.tools.ui.util.CustomFileFilter; import org.globus.tools.ui.util.UITools; +import org.globus.transfer.reliable.client.credential.CredManager; import org.globus.transfer.reliable.client.credential.CredentialDialog; +import org.globus.transfer.reliable.client.credential.ProxyInfo; import org.globus.transfer.reliable.client.credential.myproxy.MyProxyLogonGUI; import org.globus.transfer.reliable.client.utils.LogFileUtils; import org.globus.transfer.reliable.client.utils.UIConstants; @@ -455,29 +457,52 @@ statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N - progressBar.setName("progressBar"); // NOI18N - + progressBar.setName("progressBar"); // NOI18N org.jdesktop.layout.GroupLayout statusPanelLayout = new org.jdesktop.layout.GroupLayout(statusPanel); statusPanel.setLayout(statusPanelLayout); + final javax.swing.JLabel proxyInfoLabel = new javax.swing.JLabel(); + //proxyInfoLabel.setSize(3000, 20); + + Thread t = new Thread() { + public void run() { + try { + while(true) { + ProxyInfo info = CredManager.getProxyInfo(); + StringBuffer buf = new StringBuffer(); + buf.append("<html>") + .append("Proxy Subject: ").append(info.getSubject()) + .append("<br>") + .append("Time Left: ").append(info.getTimeLeft()) + .append("</html>"); + proxyInfoLabel.setText(buf.toString()); + Thread.sleep(60000); + } + } catch (Exception e) { + } + } + }; + t.start(); statusPanelLayout.setHorizontalGroup( statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(statusPanelLayout.createSequentialGroup() .addContainerGap() - .add(statusMessageLabel) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 662, Short.MAX_VALUE) - .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(statusAnimationLabel) - .addContainerGap()) + .add(proxyInfoLabel) + //.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 662, Short.MAX_VALUE) +// .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) +// .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) +// .add(statusAnimationLabel) + //.addContainerGap() + ) ); statusPanelLayout.setVerticalGroup( statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, statusPanelLayout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(statusMessageLabel) - .add(statusAnimationLabel) - .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(proxyInfoLabel) +// .add(statusAnimationLabel) +// .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + ) .add(3, 3, 3)) ); @@ -703,46 +728,25 @@ proxyInitFrame.setVisible(true); } + + private void showProxyInfo() { - GlobusCredential proxy = null; - String file = null; - - try { - if (file == null) { - file = CoGProperties.getDefault().getProxyFile(); - } - proxy = new GlobusCredential(file); - } catch (Exception e) { - logger.debug("Unable to load the user proxy : " - + e.getMessage()); - - JOptionPane.showMessageDialog( + ProxyInfo proxyInfo = null; + + try { + proxyInfo = CredManager.getProxyInfo(); + } catch (Exception e) { + JOptionPane.showMessageDialog( mainPanel, "Unable to load Grid proxy certificate.\nError: " + e.getMessage(), "Security Message", JOptionPane.WARNING_MESSAGE); - return; - } - StringBuffer proxyInfoBuffer = new StringBuffer(); - proxyInfoBuffer.append("Subject: " - + CertUtil.toGlobusID(proxy.getSubject()) - + "\n"); - - proxyInfoBuffer.append("Strength: " - + proxy.getStrength() + " bits" - + "\n"); - - proxyInfoBuffer.append("Time Left: " - + Util.formatTimeSec(proxy.getTimeLeft())); - - JOptionPane.showMessageDialog( - mainPanel, - proxyInfoBuffer.toString(), - "Grid Proxy Certificate Information", - JOptionPane.INFORMATION_MESSAGE); - //Find out how to display proxyInfo. - } + } + + JOptionPane.showMessageDialog(mainPanel, proxyInfo, + "Grid Proxy Certificate Information",JOptionPane.INFORMATION_MESSAGE); + } public void saveFile() { //Determine the name of the file to save to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-24 16:09:33
|
Revision: 2244 http://cogkit.svn.sourceforge.net/cogkit/?rev=2244&view=rev Author: liuwt Date: 2008-10-24 16:09:24 +0000 (Fri, 24 Oct 2008) Log Message: ----------- the control used for GridFTP address is replaced to a JComboBox, so that it can remember servers that have been used Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/remote/gridftp/GridClient.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/remote/gridftp/GridClient.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/remote/gridftp/GridClient.java 2008-10-24 16:03:13 UTC (rev 2243) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/remote/gridftp/GridClient.java 2008-10-24 16:09:24 UTC (rev 2244) @@ -8,6 +8,8 @@ import org.globus.ftp.exception.ServerException; import org.globus.gsi.GlobusCredential; import org.globus.gsi.gssapi.GlobusGSSCredentialImpl; +import org.globus.gsi.gssapi.auth.Authorization; +import org.globus.gsi.gssapi.auth.IdentityAuthorization; import org.globus.ogce.beans.filetransfer.gui.FileTransferMainPanel; import org.globus.ogce.beans.filetransfer.gui.monitor.WindowProgress; import org.globus.ogce.beans.filetransfer.gui.remote.common.DisplayInterface; @@ -58,7 +60,7 @@ private boolean put = false; - protected JTextField txtHost; + protected JComboBox txtHost; protected JTextField txtPort; @@ -80,7 +82,7 @@ private boolean bean = false; protected Vector remdirlisteners = new Vector(); - + public static String subject1; /** Register an action listener to be notified when a button is pressed */ public void addRemDirListener(RemDirListener l) { remdirlisteners.addElement(l); @@ -170,6 +172,35 @@ this.url = url; remoteTreeFrame.setUrl(url); } + + private JComboBox initComboBox() { + JComboBox box = new JComboBox(); + FileReader reader = null; + BufferedReader bufReader = null; + + try { + reader = new FileReader("sitesName"); + bufReader = new BufferedReader(reader); + String line = null; + while ((line = bufReader.readLine()) != null) { + box.addItem(line); + } + } catch (Exception e) { + logger.debug(e.getMessage(), e); + } finally { + try { + if (null != reader) { + reader.close(); + } + if (null != bufReader) { + bufReader.close(); + } + } catch (IOException e) { + } + } + + return box; + } public void connectDlg(JFrame frame) { if (isConnected) { @@ -189,7 +220,10 @@ remoteTreeFrame.setConnected(false); } }); - txtHost = new JTextField(20); + txtHost = initComboBox(); + + txtHost.setPreferredSize(new Dimension(225, 20)); + txtHost.setEditable(true); txtHost.setFont(new Font("Times New Roman", 0, 15)); txtprofileName = new JTextField(20); txtprofileName.setText(GRID_FTP_PORT + ""); @@ -278,24 +312,47 @@ remoteTreeFrame.setConnected(false); } - host = txtHost.getText(); + host = txtHost.getSelectedItem().toString(); subject = txtSubject.getText(); + subject1 = subject; profile = host + ":" + port;//txtprofileName.getText(); if (profile.length() <= 0) { profile = host; } wndPreload.setProgressValue(8); setConnectDetails(true); + + //save the site name to a file + if (-1 == txtHost.getSelectedIndex()) { + File sitesNameFile = new File("sitesName"); + FileWriter writer = null; + try { + if (!sitesNameFile.exists() || !sitesNameFile.isFile()) { + sitesNameFile.createNewFile(); + } + + writer = new FileWriter(sitesNameFile, true); + writer.write(host); + writer.write("\n"); + } catch (Exception e) { + logger.debug(e.getMessage(), e); + } finally { + try { + writer.close(); + } catch (IOException e) { + } + } + } } public boolean setConnectDetails(boolean interactive) { remoteTreeFrame.setProtocol("gsiftp"); remoteTreeFrame.setHost(host); - remoteTreeFrame.setPort(port); + remoteTreeFrame.setPort(port); if (wndPreload != null) { wndPreload.setProgressValue(10); } - final boolean isInteractive = interactive; + final boolean isInteractive = interactive; Thread connectThread = new Thread(){ public void run(){ remoteTreeFrame._actionConnect(isInteractive); @@ -330,6 +387,13 @@ client1 = new GridFTPClient(host, port); client2 = new GridFTPClient(host, port); client3 = new GridFTPClient(host, port); + if (null != subject && !"".equals(subject.trim())) { + Authorization auth = new IdentityAuthorization(subject); + client.setAuthorization(auth); + client1.setAuthorization(auth); + client2.setAuthorization(auth); + client3.setAuthorization(auth); + } } catch (ServerException fte) { JOptionPane.showMessageDialog(this, "The host: " + host + "\n or the port number: " + @@ -544,6 +608,14 @@ logger.debug("Client null...Trying to create a new instance"); try { client1 = new GridFTPClient(host, port); + System.out.println("subject:" + subject); + if (null != subject && !"".equals(subject.trim())) { + Authorization auth = new IdentityAuthorization(subject); + //client.setAuthorization(auth); + client1.setAuthorization(auth); +// client2.setAuthorization(auth); +// client3.setAuthorization(auth); + } client1.authenticate(null); client1.setDataChannelAuthentication(DataChannelAuthentication.NONE); } catch (Exception e) { @@ -559,7 +631,8 @@ client1.setLocalActive(); client1.setLocalNoDataChannelAuthentication(); logger.debug("\nSET THE PARAMETERS." + client1); - listing = client1.list(); + //listing = client1.list(); + listing = client1.mlsd(); logger.debug("Returned correctly from list."); } catch (ServerException fte) { logger.debug("ServerException listing directory." + client1); @@ -582,7 +655,7 @@ } catch (Exception ioe) { logger.debug("Exception listing the remote directory."); logger.debug(ioe.getMessage()); - ioe.printStackTrace(System.out); + ioe.printStackTrace(); return null; } @@ -683,7 +756,7 @@ client2.setPassive(); client2.setLocalActive(); client2.setLocalNoDataChannelAuthentication(); - listing = client2.list(); + listing = client2.mlsd(); logger.debug("Returned correctly from list."); } catch (ServerException fte) { logger.debug("ServerException listing directory."); @@ -1148,7 +1221,7 @@ default : break; - case 10: // dialog enter the remote details ok button + case 10: // dialog enter the remote details ok button Thread connect = new Thread(this); connect.start(); remoteTreeFrame.statusOut("Connecting ... Please wait"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2008-10-24 16:03:20
|
Revision: 2243 http://cogkit.svn.sourceforge.net/cogkit/?rev=2243&view=rev Author: liuwt Date: 2008-10-24 16:03:13 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Modified Paths: -------------- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/FileTransferMainPanel.java Modified: trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/FileTransferMainPanel.java =================================================================== --- trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/FileTransferMainPanel.java 2008-10-23 05:16:05 UTC (rev 2242) +++ trunk/current/src/cog/modules/transfer-gui/src/org/globus/ogce/beans/filetransfer/gui/FileTransferMainPanel.java 2008-10-24 16:03:13 UTC (rev 2243) @@ -605,24 +605,27 @@ //----------------invode rft to transfer the file-------------------------------------- Properties prop = getRFTProperties("rft.properties"); - String rftEnabled = prop.getProperty("rft_enabled"); - - //using RFT - if ("true".equals(rftEnabled)) { - String fromHost = fromRemote.getHost(); - String fromPort = Integer.toString(fromRemote.getPort()); - String toHost = toRemote.getHost(); - String toPort = Integer.toString(toRemote.getPort()); - String destSN = toRemote.getSubject(); - String sourceSN = ((GridClient)fromRemote).getSubject(); - RFTWorker worker = new RFTWorker(prop, from, fromHost, fromPort, - to, toHost, toPort, sourceSN, destSN); - worker.start(); + if (null != prop) { + String rftEnabled = prop.getProperty("rft_enabled"); + + //using RFT + if ("true".equals(rftEnabled)) { + String fromHost = fromRemote.getHost(); + String fromPort = Integer.toString(fromRemote.getPort()); + String toHost = toRemote.getHost(); + String toPort = Integer.toString(toRemote.getPort()); + String destSN = toRemote.getSubject(); + String sourceSN = ((GridClient)fromRemote).getSubject(); + RFTWorker worker = new RFTWorker(prop, from, fromHost, fromPort, + to, toHost, toPort, sourceSN, destSN); + worker.start(); + } else { + new AlertThread(this).start(); + } } else { new AlertThread(this).start(); } - //----------------invoke rft end------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-10-23 05:16:10
|
Revision: 2242 http://cogkit.svn.sourceforge.net/cogkit/?rev=2242&view=rev Author: hategan Date: 2008-10-23 05:16:05 +0000 (Thu, 23 Oct 2008) Log Message: ----------- oops; forgot to update that method, which may cause commands not to time out when they should Modified Paths: -------------- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java =================================================================== --- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java 2008-10-21 21:53:56 UTC (rev 2241) +++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/service/commands/Command.java 2008-10-23 05:16:05 UTC (rev 2242) @@ -140,8 +140,7 @@ public void executeAsync(KarajanChannel channel, Callback cb) throws ProtocolException { this.cb = cb; - channel.registerCommand(this); - send(); + send(channel, true); } public void executeAsync(KarajanChannel channel) throws ProtocolException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 2241 http://cogkit.svn.sourceforge.net/cogkit/?rev=2241&view=rev Author: hategan Date: 2008-10-21 21:53:56 +0000 (Tue, 21 Oct 2008) Log Message: ----------- grr; apparently some fault causes can be null? Modified Paths: -------------- trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java Modified: trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java =================================================================== --- trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2008-10-20 21:46:02 UTC (rev 2240) +++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2008-10-21 21:53:56 UTC (rev 2241) @@ -388,6 +388,9 @@ public void stateChanged(GramJob job) { boolean cleanup = false; StateEnumeration state = job.getState(); + if (logger.isInfoEnabled()) { + logger.info("Job state changed: " + state.getValue()); + } if (state.equals(StateEnumeration.Active)) { this.task.setStatus(Status.ACTIVE); } @@ -448,8 +451,10 @@ private String getCauses(FaultType f) { StringBuffer sb = new StringBuffer(); for (int i = 1; i < f.getFaultCause().length; i++) { - sb.append(f.getFaultCause(i).getDescription()[0]); - sb.append("\n"); + if (f.getFaultCause(i) != null) { + sb.append(f.getFaultCause(i).getDescription()[0]); + sb.append("\n"); + } } return sb.toString(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 2240 http://cogkit.svn.sourceforge.net/cogkit/?rev=2240&view=rev Author: hategan Date: 2008-10-20 21:46:02 +0000 (Mon, 20 Oct 2008) Log Message: ----------- debugging Modified Paths: -------------- trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/CoasterTaskHandler.java Modified: trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/CoasterTaskHandler.java =================================================================== --- trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/CoasterTaskHandler.java 2008-10-20 21:45:51 UTC (rev 2239) +++ trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/CoasterTaskHandler.java 2008-10-20 21:46:02 UTC (rev 2240) @@ -59,6 +59,14 @@ InvalidSecurityContextException, InvalidServiceContactException, TaskSubmissionException { try { + if (logger.isInfoEnabled()) { + logger + .info("Submitting " + + task.getIdentity() + + " to " + + task.getService(0).getServiceContact() + .getContact()); + } task.setStatus(Status.SUBMITTING); String contact = task.getService(0).getServiceContact() .getContact(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-10-20 21:45:56
|
Revision: 2239 http://cogkit.svn.sourceforge.net/cogkit/?rev=2239&view=rev Author: hategan Date: 2008-10-20 21:45:51 +0000 (Mon, 20 Oct 2008) Log Message: ----------- shut down workers concurrently Modified Paths: -------------- trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Worker.java Modified: trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Worker.java =================================================================== --- trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Worker.java 2008-10-20 21:45:32 UTC (rev 2238) +++ trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Worker.java 2008-10-20 21:45:51 UTC (rev 2239) @@ -21,6 +21,7 @@ import org.globus.cog.karajan.workflow.service.channels.ChannelContext; import org.globus.cog.karajan.workflow.service.channels.ChannelManager; import org.globus.cog.karajan.workflow.service.channels.KarajanChannel; +import org.globus.cog.karajan.workflow.service.commands.Command; import org.globus.cog.karajan.workflow.service.commands.ShutdownCommand; public class Worker implements StatusListener { @@ -158,14 +159,15 @@ return this.channelContext; } - public void shutdown() { + public ShutdownCallback shutdown() { try { logger.info("Shutting down worker: " + this); KarajanChannel channel = ChannelManager.getManager() .reserveChannel(channelContext); ShutdownCommand sc = new ShutdownCommand(); - sc.execute(channel); - logger.info("Worker shut down: " + this); + ShutdownCallback stc = new ShutdownCallback(); + sc.executeAsync(channel, stc); + return stc; } catch (Exception e) { logger @@ -179,6 +181,7 @@ catch (Exception ee) { logger.info("Failed to cancel worker task", ee); } + return null; } } @@ -195,4 +198,32 @@ shutdownAfter(1); } } + + public static class ShutdownCallback implements Command.Callback { + private boolean done; + + public void errorReceived(Command cmd, String msg, Exception t) { + logger.info("Worker shut down failed: " + this + ". " + msg, t); + synchronized(this) { + done = true; + notifyAll(); + } + } + + public void replyReceived(Command cmd) { + logger.info("Worker shut down: " + this); + synchronized(this) { + done = true; + notifyAll(); + } + } + + public void waitFor() throws InterruptedException { + synchronized(this) { + while(!done) { + wait(); + } + } + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-10-20 21:45:42
|
Revision: 2238 http://cogkit.svn.sourceforge.net/cogkit/?rev=2238&view=rev Author: hategan Date: 2008-10-20 21:45:32 +0000 (Mon, 20 Oct 2008) Log Message: ----------- shut down workers concurrently Modified Paths: -------------- trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/WorkerManager.java Modified: trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/WorkerManager.java =================================================================== --- trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/WorkerManager.java 2008-10-20 21:44:41 UTC (rev 2237) +++ trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/WorkerManager.java 2008-10-20 21:45:32 UTC (rev 2238) @@ -29,6 +29,7 @@ import org.apache.log4j.Logger; import org.globus.cog.abstraction.coaster.service.LocalTCPService; +import org.globus.cog.abstraction.coaster.service.job.manager.Worker.ShutdownCallback; import org.globus.cog.abstraction.impl.common.AbstractionFactory; import org.globus.cog.abstraction.impl.common.ProviderMethodException; import org.globus.cog.abstraction.impl.common.StatusImpl; @@ -141,7 +142,7 @@ logger.info("Got allocation request: " + req); } } - + try { startWorker(new Seconds(req.maxWallTime.getSeconds()) .multiply(OVERALLOCATION_FACTOR) @@ -189,7 +190,7 @@ copyAttributes(t, prototype, maxWallTime); t.setRequiredService(1); t.setService(0, buildService(prototype)); - synchronized(this) { + synchronized (this) { if (!startingTasks.contains(prototype)) { return; } @@ -454,25 +455,38 @@ } public void shutdown() { - synchronized (this) { - Iterator i; - i = ready.values().iterator(); - while (i.hasNext()) { - Worker wr = (Worker) i.next(); - wr.shutdown(); - } - i = new ArrayList(requested.values()).iterator(); - while (i.hasNext()) { - Worker wr = (Worker) i.next(); - try { - handler.cancel(wr.getWorkerTask()); + try { + synchronized (this) { + Iterator i; + List callbacks = new ArrayList(); + i = ready.values().iterator(); + while (i.hasNext()) { + Worker wr = (Worker) i.next(); + callbacks.add(wr.shutdown()); } - catch (Exception e) { - logger.warn("Failed to cancel queued worker task " - + wr.getWorkerTask(), e); + i = callbacks.iterator(); + while (i.hasNext()) { + ShutdownCallback cb = (ShutdownCallback) i.next(); + if (cb != null) { + cb.waitFor(); + } } + i = new ArrayList(requested.values()).iterator(); + while (i.hasNext()) { + Worker wr = (Worker) i.next(); + try { + handler.cancel(wr.getWorkerTask()); + } + catch (Exception e) { + logger.warn("Failed to cancel queued worker task " + + wr.getWorkerTask(), e); + } + } } } + catch (InterruptedException e) { + logger.warn("Interrupted", e); + } } private void startInfoThread() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-10-20 21:44:47
|
Revision: 2237 http://cogkit.svn.sourceforge.net/cogkit/?rev=2237&view=rev Author: hategan Date: 2008-10-20 21:44:41 +0000 (Mon, 20 Oct 2008) Log Message: ----------- log job data Modified Paths: -------------- trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java Modified: trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java =================================================================== --- trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java 2008-10-20 21:43:53 UTC (rev 2236) +++ trunk/current/src/cog/modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/SubmitJobCommand.java 2008-10-20 21:44:41 UTC (rev 2237) @@ -13,6 +13,7 @@ import java.io.IOException; import java.util.Iterator; +import org.apache.log4j.Logger; import org.globus.cog.abstraction.interfaces.ExecutionService; import org.globus.cog.abstraction.interfaces.JobSpecification; import org.globus.cog.abstraction.interfaces.Service; @@ -21,6 +22,8 @@ import org.globus.cog.karajan.workflow.service.commands.Command; public class SubmitJobCommand extends Command { + public static final Logger logger = Logger.getLogger(SubmitJobCommand.class); + public static final String NAME = "SUBMITJOB"; private Task t; @@ -47,7 +50,8 @@ //thing needs to be done to communicate with the perl client JobSpecification spec = (JobSpecification) t.getSpecification(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); - add(baos, "identity", t.getIdentity().getValue()); + String identity = t.getIdentity().getValue(); + add(baos, "identity", identity); add(baos, "executable", spec.getExecutable()); add(baos, "directory", spec.getDirectory()); add(baos, "stdin", spec.getStdInput()); @@ -83,6 +87,9 @@ add(baos, "jm", "fork"); } baos.close(); + if (logger.isDebugEnabled()) { + logger.debug("Job data: " + baos.toString()); + } addOutData(baos.toByteArray()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |