Author: ningjiang
Date: Sun Jun 22 19:37:25 2008
New Revision: 670436
URL: http://svn.apache.org/viewvc?rev=670436&view=rev
Log:
Fixed the CS errors in camel-core
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeFormatter.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultInstrumentationAgent.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/InstrumentationLifecycleStrategy.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Logger.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/ExchangeFormatter.java
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/CamelChoiceWithManagementTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
Sun Jun 22 19:37:25 2008
@@ -21,7 +21,12 @@
import java.util.concurrent.Callable;
import org.apache.camel.model.RouteType;
-import org.apache.camel.spi.*;
+import org.apache.camel.spi.ExchangeConverter;
+import org.apache.camel.spi.Injector;
+import org.apache.camel.spi.InterceptStrategy;
+import org.apache.camel.spi.Language;
+import org.apache.camel.spi.LifecycleStrategy;
+import org.apache.camel.spi.Registry;
/**
* Interface used to represent the context used to configure routes and the
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeFormatter.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeFormatter.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeFormatter.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeFormatter.java
Sun Jun 22 19:37:25 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,19 +16,19 @@
*/
package org.apache.camel.impl;
-import org.apache.camel.processor.interceptor.ExchangeFormatter;
import org.apache.camel.Exchange;
+import org.apache.camel.processor.interceptor.ExchangeFormatter;
/**
* A default [EMAIL PROTECTED] ExchangeFormatter} which just uses the [EMAIL
PROTECTED] org.apache.camel.Exchange#toString()} method
- *
+ *
* @version $Revision: 1.1 $
*/
public class DefaultExchangeFormatter implements ExchangeFormatter {
- protected static final DefaultExchangeFormatter instance = new
DefaultExchangeFormatter();
+ protected static final DefaultExchangeFormatter INSTANCE = new
DefaultExchangeFormatter();
public static DefaultExchangeFormatter getInstance() {
- return instance;
+ return INSTANCE;
}
public Object format(Exchange exchange) {
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
Sun Jun 22 19:37:25 2008
@@ -16,16 +16,16 @@
*/
package org.apache.camel.impl;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+
import org.apache.camel.AsyncCallback;
import org.apache.camel.Exchange;
import org.apache.camel.spi.Synchronization;
import org.apache.camel.spi.UnitOfWork;
import org.apache.camel.util.UuidGenerator;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-
/**
* The default implementation of [EMAIL PROTECTED] UnitOfWork}
*
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultInstrumentationAgent.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultInstrumentationAgent.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultInstrumentationAgent.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultInstrumentationAgent.java
Sun Jun 22 19:37:25 2008
@@ -74,37 +74,37 @@
protected void finalizeSettings() {
if (registryPort == null) {
- registryPort =
Integer.getInteger(JmxSystemPropertyKeys.REGISTRY_PORT,
- DEFAULT_REGISTRY_PORT);
+ registryPort =
Integer.getInteger(JmxSystemPropertyKeys.REGISTRY_PORT,
+ DEFAULT_REGISTRY_PORT);
}
-
+
if (connectorPort == null) {
- connectorPort =
Integer.getInteger(JmxSystemPropertyKeys.CONNECTOR_PORT,
+ connectorPort =
Integer.getInteger(JmxSystemPropertyKeys.CONNECTOR_PORT,
DEFAULT_CONNECTION_PORT);
}
-
+
if (mBeanServerDefaultDomain == null) {
- mBeanServerDefaultDomain =
+ mBeanServerDefaultDomain =
System.getProperty(JmxSystemPropertyKeys.DOMAIN,
DEFAULT_DOMAIN);
}
-
+
if (mBeanObjectDomainName == null) {
- mBeanObjectDomainName =
+ mBeanObjectDomainName =
System.getProperty(JmxSystemPropertyKeys.MBEAN_DOMAIN,
DEFAULT_DOMAIN);
}
-
+
if (serviceUrlPath == null) {
- serviceUrlPath =
- System.getProperty(JmxSystemPropertyKeys.SERVICE_URL_PATH,
+ serviceUrlPath =
+ System.getProperty(JmxSystemPropertyKeys.SERVICE_URL_PATH,
DEFAULT_SERVICE_URL_PATH);
}
-
+
if (createConnector == null) {
createConnector =
Boolean.getBoolean(JmxSystemPropertyKeys.CREATE_CONNECTOR);
}
-
+
if (usePlatformMBeanServer == null) {
- usePlatformMBeanServer =
+ usePlatformMBeanServer =
Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS);
}
}
@@ -113,19 +113,19 @@
public void setRegistryPort(Integer value) {
registryPort = value;
}
-
+
public void setConnectorPort(Integer value) {
connectorPort = value;
}
-
+
public void setMBeanServerDefaultDomain(String value) {
mBeanServerDefaultDomain = value;
}
-
+
public void setMBeanObjectDomainName(String value) {
mBeanObjectDomainName = value;
}
-
+
public void setServiceUrlPath(String value) {
serviceUrlPath = value;
}
@@ -145,7 +145,7 @@
public void register(Object obj, ObjectName name) throws JMException {
register(obj, name, false);
}
-
+
public void register(Object obj, ObjectName name, boolean
forceRegistration) throws JMException {
try {
registerMBeanWithServer(obj, name, forceRegistration);
@@ -173,13 +173,13 @@
protected void doStart() throws Exception {
assembler = new MetadataMBeanInfoAssembler();
assembler.setAttributeSource(new AnnotationJmxAttributeSource());
-
+
// create mbean server if is has not be injected.
if (server == null) {
finalizeSettings();
createMBeanServer();
}
-
+
if (LOG.isDebugEnabled()) {
LOG.debug("Starting JMX agent on server: " + getMBeanServer());
}
@@ -254,8 +254,8 @@
try {
hostName = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException uhe) {
- LOG.info("Cannot determine localhost name. Using default: " +
- DEFAULT_REGISTRY_PORT, uhe);
+ LOG.info("Cannot determine localhost name. Using default: "
+ + DEFAULT_REGISTRY_PORT, uhe);
hostName = DEFAULT_HOST;
}
} else {
@@ -278,13 +278,12 @@
protected MBeanServer findOrCreateMBeanServer() {
// return platform mbean server if the option is specified.
- if (Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS) ||
- usePlatformMBeanServer) {
+ if (Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS) ||
usePlatformMBeanServer) {
return ManagementFactory.getPlatformMBeanServer();
}
// look for the first mbean server that has match default domain name
- List<MBeanServer> servers =
+ List<MBeanServer> servers =
(List<MBeanServer>)MBeanServerFactory.findMBeanServer(null);
for (MBeanServer server : servers) {
@@ -298,47 +297,46 @@
}
protected void createJmxConnector(String host) throws IOException {
- try {
- LocateRegistry.createRegistry(registryPort);
- if (LOG.isDebugEnabled()) {
- LOG.debug("created RMI regisry on port " + registryPort);
- }
- } catch (RemoteException ex) {
- // The registry may had been created
+ try {
+ LocateRegistry.createRegistry(registryPort);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("created RMI regisry on port " + registryPort);
}
+ } catch (RemoteException ex) {
+ // The registry may had been created
+ }
- // Create an RMI connector and start it
- JMXServiceURL url;
-
- if (connectorPort > 0) {
- url = new JMXServiceURL("service:jmx:rmi://" + host + ":"
- + connectorPort + "/jndi/rmi://" + host + ":"
- + registryPort + serviceUrlPath);
- } else {
- url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" +
host + ":"
- + registryPort + serviceUrlPath);
- }
- cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null,
server);
+ // Create an RMI connector and start it
+ JMXServiceURL url;
+
+ if (connectorPort > 0) {
+ url = new JMXServiceURL("service:jmx:rmi://" + host + ":" +
connectorPort + "/jndi/rmi://" + host
+ + ":" + registryPort + serviceUrlPath);
+ } else {
+ url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + host +
":" + registryPort
+ + serviceUrlPath);
+ }
+ cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null,
server);
- // Start the connector server asynchronously (in a separate
thread).
- Thread connectorThread = new Thread() {
- public void run() {
- try {
- cs.start();
- } catch (IOException ioe) {
- LOG.warn("Could not start jmx connector thread.", ioe);
- }
+ // Start the connector server asynchronously (in a separate thread).
+ Thread connectorThread = new Thread() {
+ public void run() {
+ try {
+ cs.start();
+ } catch (IOException ioe) {
+ LOG.warn("Could not start jmx connector thread.", ioe);
}
- };
- connectorThread.setName("JMX Connector Thread [" + url + "]");
- connectorThread.start();
- LOG.info("JMX connector thread started on " + url);
+ }
+ };
+ connectorThread.setName("JMX Connector Thread [" + url + "]");
+ connectorThread.start();
+ LOG.info("JMX connector thread started on " + url);
}
public String getMBeanObjectDomainName() {
return mBeanObjectDomainName;
}
-
+
public void setServer(MBeanServer value) {
server = value;
}
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/InstrumentationLifecycleStrategy.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/InstrumentationLifecycleStrategy.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/InstrumentationLifecycleStrategy.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/InstrumentationLifecycleStrategy.java
Sun Jun 22 19:37:25 2008
@@ -42,9 +42,9 @@
/**
* JMX agent that registeres Camel lifecycle events in JMX.
- *
+ *
* @version $Revision$
- *
+ *
*/
public class InstrumentationLifecycleStrategy implements LifecycleStrategy {
private static final transient Log LOG =
LogFactory.getLog(InstrumentationProcessor.class);
@@ -52,7 +52,7 @@
private InstrumentationAgent agent;
private CamelNamingStrategy namingStrategy;
private boolean initialized;
-
+
// A map (Endpoint -> InstrumentationProcessor) to facilitate
// adding per-route interceptor and registering ManagedRoute MBean
private Map<Endpoint, InstrumentationProcessor> interceptorMap =
@@ -67,7 +67,7 @@
}
/**
* Constructor for camel context that has been started.
- *
+ *
* @param agent
* @param context
*/
@@ -94,27 +94,27 @@
}
public void onEndpointAdd(Endpoint<? extends Exchange> endpoint) {
-
+
// the agent hasn't been started
if (!initialized) {
return;
}
-
- try {
- ManagedEndpoint me = new ManagedEndpoint(endpoint);
- agent.register(me, getNamingStrategy().getObjectName(me));
+
+ try {
+ ManagedEndpoint me = new ManagedEndpoint(endpoint);
+ agent.register(me, getNamingStrategy().getObjectName(me));
} catch (JMException e) {
LOG.warn("Could not register Endpoint MBean", e);
}
}
public void onRoutesAdd(Collection<Route> routes) {
-
+
// the agent hasn't been started
if (!initialized) {
return;
}
-
+
for (Route route : routes) {
try {
ManagedRoute mr = new ManagedRoute(route);
@@ -150,12 +150,12 @@
}
public void onRouteContextCreate(RouteContext routeContext) {
-
+
// the agent hasn't been started
if (!initialized) {
return;
}
-
+
// Create a map (ProcessorType -> PerformanceCounter)
// to be passed to InstrumentationInterceptStrategy.
Map<ProcessorType, PerformanceCounter> counterMap =
@@ -179,10 +179,10 @@
}
routeContext.addInterceptStrategy(new
InstrumentationInterceptStrategy(counterMap));
-
+
routeContext.setErrorHandlerWrappingStrategy(
new InstrumentationErrorHandlerWrappingStrategy(counterMap));
-
+
// Add an InstrumentationProcessor at the beginning of each route and
// set up the interceptorMap for onRoutesAdd() method to register the
// ManagedRoute MBeans.
@@ -194,12 +194,12 @@
}
Endpoint endpoint = routeType.getInputs().get(0).getEndpoint();
-
+
List<ProcessorType<?>> exceptionHandlers = new
ArrayList<ProcessorType<?>>();
List<ProcessorType<?>> outputs = new ArrayList<ProcessorType<?>>();
-
+
// separate out the exception handers in the outputs
- for (ProcessorType<?> output: routeType.getOutputs()) {
+ for (ProcessorType<?> output : routeType.getOutputs()) {
if (output instanceof ExceptionType) {
exceptionHandlers.add(output);
} else {
@@ -207,21 +207,21 @@
}
}
- // clearing the outputs
+ // clearing the outputs
routeType.clearOutput();
-
+
// add exception handlers as top children
routeType.getOutputs().addAll(exceptionHandlers);
// add an interceptor
InstrumentationProcessor processor = new
InstrumentationProcessor();
- routeType.intercept(processor);
-
+ routeType.intercept(processor);
+
// add the output
for (ProcessorType<?> processorType : outputs) {
routeType.addOutput(processorType);
}
-
+
interceptorMap.put(endpoint, processor);
}
@@ -234,7 +234,7 @@
public void setNamingStrategy(CamelNamingStrategy strategy) {
this.namingStrategy = strategy;
}
-
+
public void setAgent(InstrumentationAgent agent) {
this.agent = agent;
}
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java
Sun Jun 22 19:37:25 2008
@@ -16,11 +16,15 @@
*/
package org.apache.camel.model;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
import org.apache.camel.Processor;
import org.apache.camel.spi.RouteContext;
-import javax.xml.bind.annotation.*;
-
/**
* Represents an XML <process/> element
*
@@ -43,8 +47,8 @@
@Override
public String toString() {
- return "Processor[" +
- ((ref != null) ? "ref: " + ref : processor)
+ return "Processor["
+ + ((ref != null) ? "ref: " + ref : processor)
+ "]";
}
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Logger.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Logger.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Logger.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Logger.java
Sun Jun 22 19:37:25 2008
@@ -27,7 +27,7 @@
/**
* A [EMAIL PROTECTED] Processor} which just logs to a [EMAIL PROTECTED] Log}
object which can be used
* as an exception handler instead of using a dead letter queue.
- *
+ *
* @version $Revision$
*/
public class Logger implements Processor {
@@ -56,7 +56,7 @@
this(LogFactory.getLog(logName), level);
}
- public Logger(Log log,ExchangeFormatter formatter) {
+ public Logger(Log log, ExchangeFormatter formatter) {
this(log);
this.formatter = formatter;
}
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/ExchangeFormatter.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/ExchangeFormatter.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/ExchangeFormatter.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/ExchangeFormatter.java
Sun Jun 22 19:37:25 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceFormatter.java
Sun Jun 22 19:37:25 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -29,8 +28,8 @@
private boolean showProperties = true;
private boolean showHeaders = true;
private boolean showBody = true;
- private boolean showExchangeId = false;
- private boolean showBreadCrumb = false;
+ private boolean showExchangeId;
+ private boolean showBreadCrumb;
public Object format(TraceInterceptor interceptor, Exchange exchange) {
Message in = exchange.getIn();
@@ -40,9 +39,9 @@
+ (showNode ? interceptor.getNode() + " " : "")
+ exchange.getPattern()
+ (showExchangeId ? " Id: " + exchange.getExchangeId() : "")
- + ((showProperties) ? " Properties:" +
exchange.getProperties() : "")
- + ((showHeaders) ? " Headers:" + in.getHeaders() : "")
- + ((showBody) ? " Body:" + getBodyAsString(in) : "")
+ + (showProperties ? " Properties:" + exchange.getProperties()
: "")
+ + (showHeaders ? " Headers:" + in.getHeaders() : "")
+ + (showBody ? " Body:" + getBodyAsString(in) : "")
+ (exception != null ? " Exception: " + exception : "");
}
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/CamelChoiceWithManagementTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/CamelChoiceWithManagementTest.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/CamelChoiceWithManagementTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/CamelChoiceWithManagementTest.java
Sun Jun 22 19:37:25 2008
@@ -13,7 +13,7 @@
* 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.management;
import org.apache.camel.ContextTestSupport;
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
Sun Jun 22 19:37:25 2008
@@ -30,9 +30,9 @@
import org.apache.camel.component.mock.MockEndpoint;
/**
- * This test verifies JMX is enabled by default and it uses local mbean
+ * This test verifies JMX is enabled by default and it uses local mbean
* server to conduct the test as connector server is not enabled by default.
- *
+ *
* @version $Revision$
*
*/
@@ -40,10 +40,10 @@
protected String domainName = DefaultInstrumentationAgent.DEFAULT_DOMAIN;
protected MBeanServerConnection mbsc;
- protected long sleepForConnection = 0;
+ protected long sleepForConnection;
public void testMBeansRegistered() throws Exception {
- if (!Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS)) {
+ if (!Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS)) {
assertEquals(domainName, mbsc.getDefaultDomain());
}
@@ -77,7 +77,7 @@
verifyCounter(mbsc, new ObjectName(domainName + ":type=route,*"));
verifyCounter(mbsc, new ObjectName(domainName + ":type=processor,*"));
-
+
}
private void verifyCounter(MBeanServerConnection beanServer, ObjectName
name) throws Exception {
@@ -124,10 +124,10 @@
totalProcessingTime);
assertTrue(totalProcessingTime > 0);
- assertNotNull("Expected first completion time to be available",
+ assertNotNull("Expected first completion time to be available",
beanServer.getAttribute(pcob, "FirstExchangeCompletionTime"));
-
- assertNotNull("Expected last completion time to be available",
+
+ assertNotNull("Expected last completion time to be available",
beanServer.getAttribute(pcob, "LastExchangeCompletionTime"));
}
@@ -149,11 +149,11 @@
@SuppressWarnings("unchecked")
protected void releaseMBeanServers() {
- List<MBeanServer> servers =
+ List<MBeanServer> servers =
(List<MBeanServer>)MBeanServerFactory.findMBeanServer(null);
for (MBeanServer server : servers) {
- MBeanServerFactory.releaseMBeanServer(server);
+ MBeanServerFactory.releaseMBeanServer(server);
}
}
@@ -168,7 +168,7 @@
@SuppressWarnings("unchecked")
protected MBeanServerConnection getMBeanConnection() throws Exception {
if (mbsc == null) {
- List<MBeanServer> servers =
+ List<MBeanServer> servers =
(List<MBeanServer>)MBeanServerFactory.findMBeanServer(null);
for (MBeanServer server : servers) {
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
Sun Jun 22 19:37:25 2008
@@ -24,15 +24,15 @@
/**
* Test that verifies JMX connector server can be connected by
* a client.
- *
+ *
* @version $Revision$
*
*/
public class JmxInstrumentationWithConnectorTest extends
JmxInstrumentationUsingDefaultsTest {
- protected JMXConnector clientConnector;
protected static final String JMXSERVICEURL =
"service:jmx:rmi:///jndi/rmi://localhost:2000/jmxrmi";
+ protected JMXConnector clientConnector;
@Override
protected void setUp() throws Exception {
@@ -46,7 +46,7 @@
protected void tearDown() throws Exception {
System.clearProperty(JmxSystemPropertyKeys.REGISTRY_PORT);
System.clearProperty(JmxSystemPropertyKeys.CREATE_CONNECTOR);
-
+
if (clientConnector != null) {
try {
clientConnector.close();
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java?rev=670436&r1=670435&r2=670436&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TraceInterceptorTest.java
Sun Jun 22 19:37:25 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -20,8 +19,8 @@
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
-import org.apache.camel.processor.interceptor.Debugger;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.processor.interceptor.Debugger;
/**
* @version $Revision: 1.1 $