Author: davsclaus
Date: Thu Dec 25 01:41:06 2008
New Revision: 729409
URL: http://svn.apache.org/viewvc?rev=729409&view=rev
Log:
fixed spelling and logs when Camel is stopping
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/DeleteFileProcessStrategy.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
(contents, props changed)
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java
(contents, props changed)
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ComponentResolver.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderWithHandledExceptionTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyExceptionThrowingProcessor.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadRenameStrategyTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelHandledExampleTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ResolveEndpointFailedException.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
Thu Dec 25 01:41:06 2008
@@ -17,7 +17,7 @@
package org.apache.camel;
/**
- * A runtime exception thrown if an {...@link Endpoint} can not be resolved
via URI
+ * A runtime exception thrown if an {...@link Endpoint} cannot be resolved via
URI
*
* @version $Revision$
*/
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
Thu Dec 25 01:41:06 2008
@@ -167,7 +167,7 @@
});
} else {
- LOG.warn(endpoint + " can not process file: " + target);
+ LOG.warn(endpoint + " cannot process file: " + target);
}
} catch (Exception e) {
handleException(e);
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
Thu Dec 25 01:41:06 2008
@@ -107,7 +107,7 @@
Consumer result = new FileConsumer(this, processor);
if (isDelete() && (getMoveNamePrefix() != null || getMoveNamePostfix()
!= null || getExpression() != null)) {
- throw new IllegalArgumentException("You cannot set delet and a
moveNamePrefix, moveNamePostfix or expression option");
+ throw new IllegalArgumentException("You cannot set delete=true and
a moveNamePrefix, moveNamePostfix or expression option");
}
// if noop=true then idempotent should also be configured
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java
Thu Dec 25 01:41:06 2008
@@ -74,7 +74,7 @@
}
boolean renamed = tempTarget.renameTo(target);
if (!renamed) {
- throw new IOException("Can not rename file from: " +
tempTarget + " to: " + target);
+ throw new IOException("Cannot rename file from: " + tempTarget
+ " to: " + target);
}
}
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/DeleteFileProcessStrategy.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/DeleteFileProcessStrategy.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/DeleteFileProcessStrategy.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/DeleteFileProcessStrategy.java
Thu Dec 25 01:41:06 2008
@@ -46,7 +46,7 @@
}
boolean deleted = file.delete();
if (!deleted) {
- throw new IOException("Can not delete file: " + file);
+ throw new IOException("Cannot delete file: " + file);
}
// must commit to release the lock
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
Thu Dec 25 01:41:06 2008
@@ -1,127 +1,127 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.file.strategy;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileChannel;
-import java.nio.channels.FileLock;
-
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.component.file.ExclusiveReadLockStrategy;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Acquires exclusive read lock to the given file. Will wait until the lock is
granted.
- * After granting the read lock it is released, we just want to make sure that
when we start
- * consuming the file its not currently in progress of being written by third
party.
- */
-public class FileLockExclusiveReadLockStrategy implements
ExclusiveReadLockStrategy {
- private static final transient Log LOG =
LogFactory.getLog(FileLockExclusiveReadLockStrategy.class);
- private long timeout;
-
- public boolean acquireExclusiveReadLock(File file) {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Waiting for exclusive read lock to file: " + file);
- }
-
- FileChannel channel = null;
- try {
- // try to acquire rw lock on the file before we can consume it
- channel = new RandomAccessFile(file, "rw").getChannel();
-
- long start = System.currentTimeMillis();
- boolean exclusive = false;
-
- while (!exclusive) {
- // timeout check
- if (timeout > 0) {
- long delta = System.currentTimeMillis() - start;
- if (delta > timeout) {
- LOG.debug("Could not acquire read lock within " +
timeout + " millis. Will skip the file: " + file);
- // we could not get the lock within the timeout
period, so return false
- return false;
- }
- }
-
- // get the lock using either try lock or not depending on if
we are using timeout or not
- FileLock lock = null;
- try {
- lock = timeout > 0 ? channel.tryLock() : channel.lock();
- } catch (IllegalStateException ex) {
- // Also catch the OverlappingFileLockException here
- // Do nothing here
- }
- if (lock != null) {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Acquired exclusive read lock: " + lock + "
to file: " + file);
- }
- // just release it now we dont want to hold it during the
rest of the processing
- lock.release();
- exclusive = true;
- } else {
- sleep();
- }
- }
- } catch (IOException e) {
- // must handle IOException as some apps on Windows etc. will still
somehow hold a lock to a file
- // such as AntiVirus or MS Office that has special locks for it's
supported files
- if (timeout == 0) {
- // if not using timeout, then we cant retry, so rethrow
- throw new RuntimeCamelException(e);
- }
- if (LOG.isDebugEnabled()) {
- LOG.debug("Can not acquire read lock. Will try again.", e);
- }
- sleep();
- } finally {
- // must close channel
- ObjectHelper.close(channel, "while acquiring exclusive read lock
for file: " + file, LOG);
- }
-
- return true;
- }
-
- private void sleep() {
- LOG.trace("Exclusive read lock not granted. Sleeping for 1000
millis.");
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // ignore
- }
- }
-
- public long getTimeout() {
- return timeout;
- }
-
- /**
- * Sets an optional timeout period.
- * <p/>
- * If the readlock could not be granted within the timeperiod then the
wait is stopped and the
- * {...@link #acquireExclusiveReadLock(java.io.File)} returns
<tt>false</tt>.
- *
- * @param timeout period in millis
- */
- public void setTimeout(long timeout) {
- this.timeout = timeout;
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.file.strategy;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.channels.FileChannel;
+import java.nio.channels.FileLock;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.file.ExclusiveReadLockStrategy;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Acquires exclusive read lock to the given file. Will wait until the lock is
granted.
+ * After granting the read lock it is released, we just want to make sure that
when we start
+ * consuming the file its not currently in progress of being written by third
party.
+ */
+public class FileLockExclusiveReadLockStrategy implements
ExclusiveReadLockStrategy {
+ private static final transient Log LOG =
LogFactory.getLog(FileLockExclusiveReadLockStrategy.class);
+ private long timeout;
+
+ public boolean acquireExclusiveReadLock(File file) {
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Waiting for exclusive read lock to file: " + file);
+ }
+
+ FileChannel channel = null;
+ try {
+ // try to acquire rw lock on the file before we can consume it
+ channel = new RandomAccessFile(file, "rw").getChannel();
+
+ long start = System.currentTimeMillis();
+ boolean exclusive = false;
+
+ while (!exclusive) {
+ // timeout check
+ if (timeout > 0) {
+ long delta = System.currentTimeMillis() - start;
+ if (delta > timeout) {
+ LOG.debug("Could not acquire read lock within " +
timeout + " millis. Will skip the file: " + file);
+ // we could not get the lock within the timeout
period, so return false
+ return false;
+ }
+ }
+
+ // get the lock using either try lock or not depending on if
we are using timeout or not
+ FileLock lock = null;
+ try {
+ lock = timeout > 0 ? channel.tryLock() : channel.lock();
+ } catch (IllegalStateException ex) {
+ // Also catch the OverlappingFileLockException here
+ // Do nothing here
+ }
+ if (lock != null) {
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Acquired exclusive read lock: " + lock + "
to file: " + file);
+ }
+ // just release it now we dont want to hold it during the
rest of the processing
+ lock.release();
+ exclusive = true;
+ } else {
+ sleep();
+ }
+ }
+ } catch (IOException e) {
+ // must handle IOException as some apps on Windows etc. will still
somehow hold a lock to a file
+ // such as AntiVirus or MS Office that has special locks for it's
supported files
+ if (timeout == 0) {
+ // if not using timeout, then we cant retry, so rethrow
+ throw new RuntimeCamelException(e);
+ }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cannot acquire read lock. Will try again.", e);
+ }
+ sleep();
+ } finally {
+ // must close channel
+ ObjectHelper.close(channel, "while acquiring exclusive read lock
for file: " + file, LOG);
+ }
+
+ return true;
+ }
+
+ private void sleep() {
+ LOG.trace("Exclusive read lock not granted. Sleeping for 1000
millis.");
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // ignore
+ }
+ }
+
+ public long getTimeout() {
+ return timeout;
+ }
+
+ /**
+ * Sets an optional timeout period.
+ * <p/>
+ * If the readlock could not be granted within the timeperiod then the
wait is stopped and the
+ * {...@link #acquireExclusiveReadLock(java.io.File)} returns
<tt>false</tt>.
+ *
+ * @param timeout period in millis
+ */
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+
+}
Propchange:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java
Thu Dec 25 01:41:06 2008
@@ -1,98 +1,98 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.file.strategy;
-
-import java.io.File;
-
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.component.file.ExclusiveReadLockStrategy;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Acquires exclusive read lock to the given file. Will wait until the lock is
granted.
- * After granting the read lock it is realeased, we just want to make sure
that when we start
- * consuming the file its not currently in progress of being written by third
party.
- */
-public class FileRenameExclusiveReadLockStrategy implements
ExclusiveReadLockStrategy {
- private static final transient Log LOG =
LogFactory.getLog(FileRenameExclusiveReadLockStrategy.class);
- private long timeout;
-
- public boolean acquireExclusiveReadLock(File file) {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Waiting for exclusive read lock to file: " + file);
- }
-
- // the trick is to try to rename the file, if we can rename then we
have exclusive read
- // since its a remote file we can not use java.nio to get a RW lock
- String originalName = file.getName();
- File tempFile = new File(file.getParent(), originalName +
".camelExclusiveReadLock");
-
- long start = System.currentTimeMillis();
-
- boolean exclusive = false;
- while (!exclusive) {
- // timeout check
- if (timeout > 0) {
- long delta = System.currentTimeMillis() - start;
- if (delta > timeout) {
- LOG.debug("Could not acquire read lock within " + timeout
+ " millis. Will skip the file: " + file);
- // we could not get the lock within the timeout period, so
return false
- return false;
- }
- }
-
- exclusive = file.renameTo(tempFile);
- if (exclusive) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Acquired exclusive read lock to file: " + file);
- }
- // rename it back so we can read it
- tempFile.renameTo(file);
- } else {
- sleep();
- }
- }
-
- return true;
- }
-
- private void sleep() {
- LOG.trace("Exclusive read lock not granted. Sleeping for 1000
millis.");
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // ignore
- }
- }
-
- public long getTimeout() {
- return timeout;
- }
-
- /**
- * Sets an optional timeout period.
- * <p/>
- * If the readlock could not be granted within the timeperiod then the
wait is stopped and the
- * {...@link #acquireExclusiveReadLock(java.io.File)} returns
<tt>false</tt>.
- *
- * @param timeout period in millis
- */
- public void setTimeout(long timeout) {
- this.timeout = timeout;
- }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.file.strategy;
+
+import java.io.File;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.file.ExclusiveReadLockStrategy;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Acquires exclusive read lock to the given file. Will wait until the lock is
granted.
+ * After granting the read lock it is realeased, we just want to make sure
that when we start
+ * consuming the file its not currently in progress of being written by third
party.
+ */
+public class FileRenameExclusiveReadLockStrategy implements
ExclusiveReadLockStrategy {
+ private static final transient Log LOG =
LogFactory.getLog(FileRenameExclusiveReadLockStrategy.class);
+ private long timeout;
+
+ public boolean acquireExclusiveReadLock(File file) {
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Waiting for exclusive read lock to file: " + file);
+ }
+
+ // the trick is to try to rename the file, if we can rename then we
have exclusive read
+ // since its a remote file we cannot use java.nio to get a RW lock
+ String originalName = file.getName();
+ File tempFile = new File(file.getParent(), originalName +
".camelExclusiveReadLock");
+
+ long start = System.currentTimeMillis();
+
+ boolean exclusive = false;
+ while (!exclusive) {
+ // timeout check
+ if (timeout > 0) {
+ long delta = System.currentTimeMillis() - start;
+ if (delta > timeout) {
+ LOG.debug("Could not acquire read lock within " + timeout
+ " millis. Will skip the file: " + file);
+ // we could not get the lock within the timeout period, so
return false
+ return false;
+ }
+ }
+
+ exclusive = file.renameTo(tempFile);
+ if (exclusive) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Acquired exclusive read lock to file: " + file);
+ }
+ // rename it back so we can read it
+ tempFile.renameTo(file);
+ } else {
+ sleep();
+ }
+ }
+
+ return true;
+ }
+
+ private void sleep() {
+ LOG.trace("Exclusive read lock not granted. Sleeping for 1000
millis.");
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // ignore
+ }
+ }
+
+ public long getTimeout() {
+ return timeout;
+ }
+
+ /**
+ * Sets an optional timeout period.
+ * <p/>
+ * If the readlock could not be granted within the timeperiod then the
wait is stopped and the
+ * {...@link #acquireExclusiveReadLock(java.io.File)} returns
<tt>false</tt>.
+ *
+ * @param timeout period in millis
+ */
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+}
Propchange:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java
Thu Dec 25 01:41:06 2008
@@ -92,7 +92,7 @@
}
boolean mkdir = parent.mkdirs();
if (!mkdir) {
- throw new IOException("Can not create directory: " + parent);
+ throw new IOException("Cannot create directory: " + parent);
}
}
@@ -101,7 +101,7 @@
}
boolean renamed = from.renameTo(to);
if (!renamed) {
- throw new IOException("Can not rename file from: " + from + " to:
" + to);
+ throw new IOException("Cannot rename file from: " + from + " to: "
+ to);
}
return to;
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java
Thu Dec 25 01:41:06 2008
@@ -43,7 +43,7 @@
public StringSource(String text) {
if (text == null) {
- throw new NullPointerException("text can not be null");
+ throw new NullPointerException("text cannot be null");
}
this.text = text;
}
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
Thu Dec 25 01:41:06 2008
@@ -620,7 +620,7 @@
LOG.info("Apache Camel " + getVersion() + " (CamelContext:" +
getName() + ") is starting");
if (getTrace()) {
- // only add a new tracer if not already configued
+ // only add a new tracer if not already configured
if (Tracer.getTracer(this) == null) {
Tracer tracer = new Tracer();
// lets see if we have a formatter if so use it
@@ -633,7 +633,7 @@
}
if (getDelay() > 0) {
- // only add a new delayer if not already configued
+ // only add a new delayer if not already configured
if (Delayer.getDelayer(this) == null) {
addInterceptStrategy(new Delayer(getDelay()));
}
@@ -664,12 +664,14 @@
}
protected void doStop() throws Exception {
+ LOG.info("Apache Camel " + getVersion() + " (CamelContext:" +
getName() + ") is stopping");
stopServices(servicesToClose);
if (components != null) {
for (Component component : components.values()) {
stopServices(component);
}
}
+ LOG.info("Apache Camel " + getVersion() + " (CamelContext:" +
getName() + ") stopped");
}
protected void startRoutes(Collection<Route> routeList) throws Exception {
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ComponentResolver.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ComponentResolver.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ComponentResolver.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ComponentResolver.java
Thu Dec 25 01:41:06 2008
@@ -32,7 +32,7 @@
*
* @param name the component name to resolve
* @param context the context to load the component if it can be resolved
- * @return the component which is added to the context or null if it can
not be resolved
+ * @return the component which is added to the context or null if it
cannot be resolved
* @throws Exception is thrown if the the component could not be loaded
*/
Component resolveComponent(String name, CamelContext context) throws
Exception;
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderTest.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderTest.java
Thu Dec 25 01:41:06 2008
@@ -203,7 +203,7 @@
if ("Hello NPE".equals(s)) {
throw new NullPointerException();
} else if ("Hello IO".equals(s)) {
- throw new ConnectException("Forced for testing -
can not connect to remote server");
+ throw new ConnectException("Forced for testing -
cannot connect to remote server");
} else if ("Hello Exception".equals(s)) {
throw new CamelExchangeException("Forced for
testing", exchange);
} else if ("Hello business".equals(s)) {
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderWithHandledExceptionTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderWithHandledExceptionTest.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderWithHandledExceptionTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderWithHandledExceptionTest.java
Thu Dec 25 01:41:06 2008
@@ -98,7 +98,7 @@
throw new NullPointerException();
} else if ("Hello IOE".equals(s)) {
// specialized IOException
- throw new ConnectException("Forced for testing -
can not connect to remote server");
+ throw new ConnectException("Forced for testing -
cannot connect to remote server");
}
exchange.getOut().setBody("Hello World");
}
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyExceptionThrowingProcessor.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyExceptionThrowingProcessor.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyExceptionThrowingProcessor.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyExceptionThrowingProcessor.java
Thu Dec 25 01:41:06 2008
@@ -28,7 +28,7 @@
if ("Hello NPE".equals(s)) {
throw new NullPointerException();
} else if ("Hello IO".equals(s)) {
- throw new ConnectException("Forced for testing - can not connect
to remote server");
+ throw new ConnectException("Forced for testing - cannot connect to
remote server");
}
exchange.getOut().setBody("Hello World");
}
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadRenameStrategyTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadRenameStrategyTest.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadRenameStrategyTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadRenameStrategyTest.java
Thu Dec 25 01:41:06 2008
@@ -132,7 +132,7 @@
private class MySlowFileProcessor implements Processor {
public void process(Exchange exchange) throws Exception {
- LOG.info("Creating a slow fil ...");
+ LOG.info("Creating a slow file ...");
File file = new File("./target/exclusiveread/slowfile/hello.txt");
FileOutputStream fos = new FileOutputStream(file);
FileLock lock = fos.getChannel().lock();
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelHandledExampleTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelHandledExampleTest.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelHandledExampleTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelHandledExampleTest.java
Thu Dec 25 01:41:06 2008
@@ -104,13 +104,13 @@
* @param payload the in payload
* @param out the out headers
* @return the out payload
- * @throws OrderFailedException is thrown if the order can not be
processed
+ * @throws OrderFailedException is thrown if the order cannot be
processed
*/
public Object handleOrder(@Headers Map in, @Body String payload,
@OutHeaders Map out)
throws OrderFailedException {
out.put("customerid", in.get("customerid"));
if ("Order: kaboom".equals(payload)) {
- throw new OrderFailedException("Can not order: kaboom");
+ throw new OrderFailedException("Cannot order: kaboom");
} else {
out.put("orderid", "123");
return "Order OK";
@@ -134,7 +134,7 @@
// START SNIPPET: e3
/**
- * Exception thrown if the order can not be processed
+ * Exception thrown if the order cannot be processed
*/
public static class OrderFailedException extends Exception {
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
Thu Dec 25 01:41:06 2008
@@ -175,7 +175,7 @@
assertMockEndpointsSatisfied();
for (Exchange exchange : resultEndpoint.getReceivedExchanges()) {
assertNotNull(exchange.getIn().getHeader(Splitter.SPLIT_COUNTER));
- //this header can not be set when streaming is used
+ //this header cannot be set when streaming is used
assertNull(exchange.getIn().getHeader(Splitter.SPLIT_SIZE));
}
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformTest.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformTest.java
Thu Dec 25 01:41:06 2008
@@ -42,7 +42,7 @@
from("direct:start").process(new Processor() {
public void process(Exchange exchange) throws Exception {
- throw new MyFunctionalException("Sorry you can not do
this");
+ throw new MyFunctionalException("Sorry you cannot do
this");
}
});
}
@@ -68,14 +68,14 @@
from("direct:start").process(new Processor() {
public void process(Exchange exchange) throws Exception {
- throw new MyFunctionalException("Sorry you can not do
this again to me");
+ throw new MyFunctionalException("Sorry you cannot do
this again to me");
}
});
}
});
Object out = template.requestBody("direct:start", "Hello World");
- assertEquals("Sorry you can not do this again to me", out);
+ assertEquals("Sorry you cannot do this again to me", out);
}
public void testOnExceptionSimpleLangaugeExceptionMessage() throws
Exception {
@@ -90,7 +90,7 @@
// using the simple language where we want insert the
exception message
onException(MyFunctionalException.class)
.handled(true)
- .transform().simple("Error reported:
${exception.message} - can not process this message.");
+ .transform().simple("Error reported:
${exception.message} - cannot process this message.");
// END SNIPPET: e3
from("direct:start").process(new Processor() {
@@ -102,7 +102,7 @@
});
Object out = template.requestBody("direct:start", "Hello World");
- assertEquals("Error reported: Out of order - can not process this
message.", out);
+ assertEquals("Error reported: Out of order - cannot process this
message.", out);
}
}
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java?rev=729409&r1=729408&r2=729409&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
Thu Dec 25 01:41:06 2008
@@ -57,7 +57,7 @@
from("direct:start").process(new Processor() {
public void process(Exchange exchange) throws Exception {
- throw new MyFunctionalException("Sorry you can not do
this");
+ throw new MyFunctionalException("Sorry you cannot do
this");
}
});
}