org.ow2.jonas.camel.example.jms
Class ExampleJMS

java.lang.Object
  extended by org.apache.camel.builder.BuilderSupport
      extended by org.apache.camel.builder.RouteBuilder
          extended by org.ow2.jonas.camel.component.RouteBuilderComponent
              extended by org.ow2.jonas.camel.example.jms.ExampleJMS
All Implemented Interfaces:
org.apache.camel.RoutesBuilder

public class ExampleJMS
extends org.ow2.jonas.camel.component.RouteBuilderComponent

A simple example on how to use the camel service on JOnAS 5.

Author:
Guillaume Renault

Field Summary
 
Fields inherited from class org.ow2.jonas.camel.component.RouteBuilderComponent
bundleContext, camelContextName, camelService, registryReplacements, TRACE_LOGGER_NAME, traceDestination
 
Constructor Summary
ExampleJMS(org.osgi.framework.BundleContext bundleContext)
          Constructor: saves the BundleContext.
 
Method Summary
 void configure()
          Add routes to the CAMEL context.
 void start()
          Saves the $JONAS_BASE/logs directory, calls RouteBuilderComponent.start() and launches a self-test.
 void test()
          Test the route.
 
Methods inherited from class org.ow2.jonas.camel.component.RouteBuilderComponent
configureCamelComponents, getConfigurationFolder, getFileEndpointFile, getRouteName, setCamelService, stop
 
Methods inherited from class org.apache.camel.builder.RouteBuilder
addRoutes, addRoutesToCamelContext, checkInitialized, configureRoute, configureRoutes, createContainer, errorHandler, from, from, from, from, fromF, getContext, getRouteCollection, includeRoutes, intercept, interceptFrom, interceptFrom, interceptSendToEndpoint, onCompletion, onException, onException, populateRoutes, setErrorHandlerBuilder, setRouteCollection, toString
 
Methods inherited from class org.apache.camel.builder.BuilderSupport
bean, bean, bean, bean, body, body, constant, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, defaultErrorHandler, endpoint, endpoint, endpoints, endpoints, exceptionMessage, faultBody, faultBodyAs, getErrorHandlerBuilder, header, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, noErrorHandler, outBody, outBody, property, regexReplaceAll, regexReplaceAll, sendTo, setContext, systemProperty, systemProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExampleJMS

public ExampleJMS(org.osgi.framework.BundleContext bundleContext)
Constructor: saves the BundleContext.

Method Detail

start

public void start()
           throws java.lang.Throwable
Saves the $JONAS_BASE/logs directory, calls RouteBuilderComponent.start() and launches a self-test.

Overrides:
start in class org.ow2.jonas.camel.component.RouteBuilderComponent
Throws:
java.lang.Throwable

configure

public void configure()
               throws java.lang.Exception
Add routes to the CAMEL context.

Overrides:
configure in class org.ow2.jonas.camel.component.RouteBuilderComponent
Throws:
java.lang.Exception

test

public void test()
          throws java.lang.Exception
Test the route.

Throws:
java.lang.Exception


Copyright © 2010 OW2 Consortium. All Rights Reserved.