Author: bcarothers
Date: 2009-05-06 17:11:42 -0400 (Wed, 06 May 2009)
New Revision: 894
Added:
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/config/run.cmd
Modified:
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/assembly/basic.xml
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/java/org/jboss/example/dna/sequencer/SequencingClient.java
Log:
Backed DNA-396 patches from trunk into 0.4 branch
Modified:
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/assembly/basic.xml
===================================================================
---
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/assembly/basic.xml 2009-05-06
20:53:31 UTC (rev 893)
+++
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/assembly/basic.xml 2009-05-06
21:11:42 UTC (rev 894)
@@ -35,6 +35,10 @@
<fileMode>0744</fileMode>
</file>
<file>
+ <source>src/main/config/run.cmd</source>
+ <fileMode>0744</fileMode>
+ </file>
+ <file>
<source>src/main/resources/jackrabbitConfig.xml</source>
<fileMode>0644</fileMode>
</file>
Added: tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/config/run.cmd
===================================================================
--- tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/config/run.cmd
(rev 0)
+++
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/config/run.cmd 2009-05-06
21:11:42 UTC (rev 894)
@@ -0,0 +1 @@
+java -Djava.ext.dirs=./lib -cp dna-example-sequencers-0.5-SNAPSHOT.jar
org.jboss.example.dna.sequencer.SequencingClient %*
Modified:
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/java/org/jboss/example/dna/sequencer/SequencingClient.java
===================================================================
---
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/java/org/jboss/example/dna/sequencer/SequencingClient.java 2009-05-06
20:53:31 UTC (rev 893)
+++
tags/dna-0.4/docs/examples/gettingstarted/sequencers/src/main/java/org/jboss/example/dna/sequencer/SequencingClient.java 2009-05-06
21:11:42 UTC (rev 894)
@@ -316,6 +316,11 @@
String nodePath = this.userInterface.getRepositoryPath("/a/b/" +
filename);
String mimeType = getMimeType(url);
+ if (mimeType == null) {
+ System.err.println("Could not determine mime type for file. Cancelling
upload.");
+ return;
+ }
+
// Now use the JCR API to upload the file ...
Session session = createSession();
JcrTools tools = this.executionContext.getTools();
@@ -565,7 +570,7 @@
if (filename.endsWith(".ras")) return "image/x-cmu-raster";
if (filename.endsWith(".mp3")) return "audio/mpeg";
if (filename.endsWith(".java")) return "text/x-java-source";
- throw new SystemFailureException("Unknown mime type for " + file);
+ return null;
}
}
Show replies by date