Coder Social home page Coder Social logo

hellocamel's Introduction

HelloCamel Camel OSGi example

This project demonstrates a minimal Camel project that creates an OSGi bundle, has a unit test and a test client that uses Camel. The Camel route is simple: an HTTP request-response service that prefixes 'Hello ' to the String body sent to it. The goal of this project is to provide a good starter project for creating your own more complicated and useful Camel Routes that can be deployed in JBoss Fuse

Requirements:

Building

To build

mvn clean install

As part of the basic build it will run a standalone unit test every time. Once you deploy this project to JBoss Fuse, you may see a build error where the unit test tries to start Camel, and it fails because it can't acquire the localhost port 8888 (because your running route in JBoss Fuse would be using it). To build without running the unit test

mvn clean install -Dmaven.test.skip=true

Running from the command line

To test Standalone, you can start the Camel route using the included camel-maven-plugin, which will start all Spring based camel context files located in META-INF/spring (like this projects)

mvn camel:run

To run the standalone client, which will call the service with the string 'Scott', and print the response (which should be 'Hello Scott') to stdout

mvn exec:java

Deploying to JBoss Fuse

To install in JBoss Fuse

<JBoss Fuse Home>/bin/fuse

In JBoss Fuse Console

karaf@root> features:install camel-jetty
karaf@root> osgi:install -s mvn:com.fusesource.byexample.hellocamel/HelloCamel/1.0.0

Once you've started the service - the '-s' option to osgi:install will start the bundle once installed - you can test using the standalone client

mvn exec:java

hellocamel's People

Contributors

gertv avatar kevinearls avatar scranton avatar vklevko avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.