{"id":41678,"date":"2015-07-13T10:00:09","date_gmt":"2015-07-13T07:00:09","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=41678"},"modified":"2015-07-12T12:42:58","modified_gmt":"2015-07-12T09:42:58","slug":"using-camel-routes-in-java-ee-components","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html","title":{"rendered":"Using Camel Routes In Java EE Components"},"content":{"rendered":"<p>I&#8217;ve been working with Camel since a while now and I really like it&#8217;s simplicity. Using it on top of Java EE always was a little bit of a challenge and one of the recent talks I gave about how to do this and the different methods of bootstrapping Camel in Java EE actually proposes to use the <a href=\"https:\/\/github.com\/wildfly-extras\/wildfly-camel\/\" target=\"_blank\">WildFly-Camel Subsystem<\/a>. In an ongoing series I am going to explore the different ways of doing this and provide a bunch of examples which are still missing from the talk. I&#8217;m happy to receive your feedback and requests in the comments or via <a href=\"http:\/\/www.twitter.com\/myfear\" target=\"_blank\">@myfear<\/a> on twitter.<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<h2>Getting Started With Camel On WildFly 8.2\u00a0<\/h2>\n<p>The Wildfly-Camel Subsystem provides Apache Camel integration with the WildFly Application Server. It allows you to add Camel Routes as part of the WildFly configuration. Routes can be deployed as part of Java EE applications. Java EE components can access the Camel Core API and various Camel Component APIs. Your Enterprise Integration Solution can be architected as a combination of Java EE and Camel functionality.<\/p>\n<p>Remark: Latest WildFly 9 is expected to be supported by the 3.x release of WildFly-Camel.<\/p>\n<h2>Getting Ready\u00a0<\/h2>\n<p>Download and unzip <a href=\"http:\/\/wildfly.org\/downloads\/\" target=\"_blank\">WildFly 8.2.0.Final<\/a> to a folder of your choice. Download and unzip the <a href=\"https:\/\/github.com\/wildfly-extras\/wildfly-camel\/releases\" target=\"_blank\">wildfly-camel patch<\/a> (2.3.0) to the wildfly folder. \u00a0Start WildFly with<\/p>\n<pre class=\" brush:java\">bin\/standalone[.bat|.sh] -c standalone-camel.xml<\/pre>\n<p>One of the fastest ways to get up and running is with Docker and the <a href=\"https:\/\/registry.hub.docker.com\/u\/wildflyext\/wildfly-camel\/\" target=\"_blank\">WildFly Camel image<\/a>. This image comes bundled with WildFly 8.1 and the Camel subsystem already installed.<\/p>\n<h2>Defining And Using A Camel Context<\/h2>\n<p>The CamelContext represents a single Camel routing rulebase. You use the CamelContext in a similar way to the Spring ApplicationContext. It contains all the routes for your application. You can have as many CamelContexts as necessary, as long as they have different names. WildFly-Camel let&#8217;s you define them as a) in the <a href=\"http:\/\/wildflyext.gitbooks.io\/wildfly-camel\/content\/features\/context-definitions.html\" target=\"_blank\">standalone-camel.xml and domain.xml<\/a> as part of the subsystem definition itself and b) or deploy them in a<a href=\"http:\/\/wildflyext.gitbooks.io\/wildfly-camel\/content\/features\/context-deployments.html\" target=\"_blank\">supported deployment artifact which contains a -camel-context.xml<\/a>\u00a0 suffixed file and c) it can be provided as together with it&#8217;s routes via a <a href=\"http:\/\/wildflyext.gitbooks.io\/wildfly-camel\/content\/javaee\/cdi.html\" target=\"_blank\">RouteBilder and the CDI integration<\/a>.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>A defined CamelContext can be consumed in two different ways: a) <a href=\"http:\/\/wildflyext.gitbooks.io\/wildfly-camel\/content\/javaee\/cdi.html\" target=\"_blank\">@Injected via Camel-CDI<\/a> or b) accessed from the <a href=\"http:\/\/wildflyext.gitbooks.io\/wildfly-camel\/content\/javaee\/jndi.html\" target=\"_blank\">JNDI tree<\/a>.<\/p>\n<h2>The Example Context And Route<\/h2>\n<p>For the following examples I use a context with an associated route which is provided via CDI and a RouteBuilder. It is an application scoped bean which is automatically started with the application start. The @ContextName annotation gives a specific name to the CamelContext.<\/p>\n<pre class=\" brush:java\">@ApplicationScoped\r\n@Startup\r\n@ContextName(\"cdi-context\")\r\npublic class HelloRouteBuilder extends RouteBuilder {\r\n\r\n    @Inject\r\n    HelloBean helloBean;\r\n\r\n    @Override\r\n    public void configure() throws Exception {\r\n        from(\"direct:start\").transform(body().prepend(helloBean.sayHello()).append(\" user.\"));\r\n    }\r\n}<\/pre>\n<p>The route itself isn&#8217;t exactly challenging. It takes an empty message body from direct:start and prepends the output from a CDI bean-method &#8220;sayHello&#8221; and appends the string &#8221; user.&#8221; to it. For reference, the complete code can be found on <a href=\"https:\/\/github.com\/myfear\/camel-javaee\" target=\"_blank\">my GitHub account<\/a>. So, all we need to find out next is, how to use this route in the various Java EE component specifications.<\/p>\n<h2>Using Camel From CDI<\/h2>\n<p>Camel supports CDI since version 2.10. Before and outside the subsystem, it needed to be bootstrapped. This is no longer necessary and you can just use a deployed or defined CamelContext in a @Named CDI bean by simply @Injecting it by name:<\/p>\n<pre class=\" brush:java\">@Inject\r\n    @ContextName(\"cdi-context\")\r\n    private CamelContext context;<\/pre>\n<h2>Using Camel From JSF, JAX-RS and EJBs<\/h2>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/hello_jsf.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-41689\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/hello_jsf.png\" alt=\"hello_jsf\" width=\"405\" height=\"76\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/hello_jsf.png 405w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/hello_jsf-300x56.png 300w\" sizes=\"(max-width: 405px) 100vw, 405px\" \/><\/a><\/p>\n<p>With the knowledge about how to use a CamelContext in CDI, you would assume, that it is easy to just do the same from JSF and alike. This is not true. You actually can&#8217;t inject it into either ManagedBeans or even CDI Beans which are bound to a JSF component. Plus it&#8217;s not working in EJBs. I haven&#8217;t looked into it detailed, but assume it has something to do with scopes. A reasonable workaround and in fact, a better application design is to put the complete Camel logic into a separate CDI bean and just inject this.<\/p>\n<pre class=\" brush:java\">@Named\r\npublic class HelloCamel {\r\n\r\n    @Inject\r\n    @ContextName(\"cdi-context\")\r\n    private CamelContext context;\r\n\r\n    private final static Logger LOGGER = Logger.getLogger(HelloCamel.class.getName());\r\n\r\n    public String doSomeWorkFor(String name) {\r\n\r\n        ProducerTemplate producer = context.createProducerTemplate();\r\n        String result = producer.requestBody(\"direct:start\", name, String.class);\r\n        LOGGER.log(Level.INFO, result);\r\n        return result;\r\n    }\r\n}<\/pre>\n<p>The <a href=\"http:\/\/camel.apache.org\/producertemplate.html\" target=\"_blank\">ProducerTemplate<\/a> interface allows you to send message exchanges to endpoints in a variety of different ways to make it easy to work with Camel Endpoint instances from Java code. In this particular case, it just starts the route and puts a String into the body which represents the name of the component I&#8217;m using it from.<\/p>\n<p>The CDI Bean, which acts as a backing-bean for the component just uses it:<\/p>\n<pre class=\" brush:java\">@Inject\r\n    HelloCamel helloCamel;\r\n\r\n    public String getName() {\r\n        return helloCamel.doSomeWorkFor(\"JSF\");\r\n    }<\/pre>\n<p>The return String is &#8220;Hello JSF user.&#8221; Which also is written to the WildFly server log. The same approach is the best for all the other Java EE components.<\/p>\n<h2>Using Camel From EJBs<\/h2>\n<p>If you&#8217;re using EJBs as your man application component model, it is also very reasonable to just use the JNDI approach:<\/p>\n<pre class=\" brush:java\">CamelContext camelctx =\u00a0\r\n                (CamelContext) inicxt.lookup(\"java:jboss\/camel\/context\/cdi-context\");<\/pre>\n<h2>Hawtio &#8211; A Camel Console<\/h2>\n<p>Another hidden gem in the subsystem is the bundling of the <a href=\"http:\/\/hawt.io\/\" target=\"_blank\">Hawtio<\/a> console. It is a modular web console for managing your Java stuff and has an Apache Camel plugin which visualizes your contexts and routes. Remember, that it is automatically configured for security and you need to add a management user before you&#8217;re able to access it.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/AwsDockerReverseProxy.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-41658\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/AwsDockerReverseProxy.png\" alt=\"AwsDockerReverseProxy\" width=\"800\" height=\"500\" \/><\/a><\/p>\n<h2>Further Reading &amp; Help<\/h2>\n<ul>\n<li><a href=\"https:\/\/webchat.freenode.net\/?channels=wildfly-camel\" target=\"_blank\">Talk to the Developers on Freenode<\/a><\/li>\n<li><a href=\"http:\/\/wildflyext.gitbooks.io\/wildfly-camel\/content\/index.html\" target=\"_blank\">WildFly-Camel Subystem Documentation<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/wildfly-extras\/\" target=\"_blank\">WildFly Camel On GitHub<\/a><\/li>\n<li><a href=\"http:\/\/camel.apache.org\/\" target=\"_blank\">Apache Camel Website<\/a><\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/blog.eisele.net\/2015\/07\/using-camel-routes-in-java-ee-components.html\">Using Camel Routes In Java EE Components<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\/\">JCG partner<\/a> Markus Eisele at the <a href=\"http:\/\/blog.eisele.net\/\">Enterprise Software Development with Java <\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been working with Camel since a while now and I really like it&#8217;s simplicity. Using it on top of Java EE always was a little bit of a challenge and one of the recent talks I gave about how to do this and the different methods of bootstrapping Camel in Java EE actually proposes &hellip;<\/p>\n","protected":false},"author":92,"featured_media":52,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[357],"class_list":["post-41678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-camel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using Camel Routes In Java EE Components - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"I&#039;ve been working with Camel since a while now and I really like it&#039;s simplicity. Using it on top of Java EE always was a little bit of a challenge and\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Camel Routes In Java EE Components - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"I&#039;ve been working with Camel since a while now and I really like it&#039;s simplicity. Using it on top of Java EE always was a little bit of a challenge and\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/eisele.markus\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-13T07:00:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-camel-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Markus Eisele\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/myfear\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Markus Eisele\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html\"},\"author\":{\"name\":\"Markus Eisele\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/83c0139425aee143ae0d269868475066\"},\"headline\":\"Using Camel Routes In Java EE Components\",\"datePublished\":\"2015-07-13T07:00:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html\"},\"wordCount\":883,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-camel-logo.jpg\",\"keywords\":[\"Apache Camel\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html\",\"name\":\"Using Camel Routes In Java EE Components - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-camel-logo.jpg\",\"datePublished\":\"2015-07-13T07:00:09+00:00\",\"description\":\"I've been working with Camel since a while now and I really like it's simplicity. Using it on top of Java EE always was a little bit of a challenge and\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-camel-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-camel-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/using-camel-routes-in-java-ee-components.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Using Camel Routes In Java EE Components\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/83c0139425aee143ae0d269868475066\",\"name\":\"Markus Eisele\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g\",\"caption\":\"Markus Eisele\"},\"description\":\"Markus is a Developer Advocate at Red Hat and focuses on JBoss Middleware. He is working with Java EE servers from different vendors since more than 14 years and talks about his favorite topics around Java EE on conferences all over the world. He has been a principle consultant and worked with different customers on all kinds of Java EE related applications and solutions. Beside that he has always been a prolific blogger, writer and tech editor for different Java EE related books. He is an active member of the German DOAG e.V. and it's representative on the iJUG e.V. As a Java Champion and former ACE Director he is well known in the community. Follow him on Twitter @myfear.\",\"sameAs\":[\"http:\\\/\\\/blog.eisele.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/eisele.markus\",\"http:\\\/\\\/de.linkedin.com\\\/in\\\/markuseisele\\\/en\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/myfear\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/markus-eisele\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Camel Routes In Java EE Components - Java Code Geeks","description":"I've been working with Camel since a while now and I really like it's simplicity. Using it on top of Java EE always was a little bit of a challenge and","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html","og_locale":"en_US","og_type":"article","og_title":"Using Camel Routes In Java EE Components - Java Code Geeks","og_description":"I've been working with Camel since a while now and I really like it's simplicity. Using it on top of Java EE always was a little bit of a challenge and","og_url":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/eisele.markus","article_published_time":"2015-07-13T07:00:09+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-camel-logo.jpg","type":"image\/jpeg"}],"author":"Markus Eisele","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/myfear","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Markus Eisele","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html"},"author":{"name":"Markus Eisele","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/83c0139425aee143ae0d269868475066"},"headline":"Using Camel Routes In Java EE Components","datePublished":"2015-07-13T07:00:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html"},"wordCount":883,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-camel-logo.jpg","keywords":["Apache Camel"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html","url":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html","name":"Using Camel Routes In Java EE Components - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-camel-logo.jpg","datePublished":"2015-07-13T07:00:09+00:00","description":"I've been working with Camel since a while now and I really like it's simplicity. Using it on top of Java EE always was a little bit of a challenge and","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-camel-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-camel-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/using-camel-routes-in-java-ee-components.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Using Camel Routes In Java EE Components"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/83c0139425aee143ae0d269868475066","name":"Markus Eisele","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/231f7cefb75b74a4fb2ef22cd99fe55d2a9323ceca56e8bc9b19533bae3dac6a?s=96&d=mm&r=g","caption":"Markus Eisele"},"description":"Markus is a Developer Advocate at Red Hat and focuses on JBoss Middleware. He is working with Java EE servers from different vendors since more than 14 years and talks about his favorite topics around Java EE on conferences all over the world. He has been a principle consultant and worked with different customers on all kinds of Java EE related applications and solutions. Beside that he has always been a prolific blogger, writer and tech editor for different Java EE related books. He is an active member of the German DOAG e.V. and it's representative on the iJUG e.V. As a Java Champion and former ACE Director he is well known in the community. Follow him on Twitter @myfear.","sameAs":["http:\/\/blog.eisele.net\/","https:\/\/www.facebook.com\/eisele.markus","http:\/\/de.linkedin.com\/in\/markuseisele\/en","https:\/\/x.com\/http:\/\/twitter.com\/myfear"],"url":"https:\/\/www.javacodegeeks.com\/author\/markus-eisele"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/41678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/92"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=41678"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/41678\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/52"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=41678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=41678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=41678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}