[jira] [Assigned] (CAMEL-1077) tcp client mode / server mode determined by to or from elements limits usability.

2015-02-09 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned CAMEL-1077:
---

Assignee: Willem Jiang

 tcp client mode / server mode determined by to or from elements limits 
 usability.
 -

 Key: CAMEL-1077
 URL: https://issues.apache.org/jira/browse/CAMEL-1077
 Project: Camel
  Issue Type: Improvement
  Components: camel-mina
Affects Versions: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0
Reporter: Jeff Vienneau
Assignee: Willem Jiang

 Internally, 
 MinaProducer is coded to create a Mina connector (client mode socket).
 MinaConsumer is coded to create a Mina acceptor (server mode socket).
 Additionally, it appears a producer (client mode socket) is created for a 
 to route mapping and a consumer (server mode socket) is created for a 
 from route mapping.
 This means an endpoint cannot be created in which the session is initiated by 
 a client and messages are routed to the client. 
 The opposite is also true, an endpoint with a from route mapping cannot 
 establish a connection to a tcp server.
 This is a major limitation, as we do not often have control over the systems 
 with which we are interfacing.
 Perhaps, the mina::tcp URI could have a parameter the sets the socket mode: 
 tcp.mode=server or tcp.mode=client.
 Hope this make sense, thanks!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CAMEL-8322) Camel Toolbox - Include component options in json schema

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-8322.

Resolution: Fixed

 Camel Toolbox - Include component options in json schema
 

 Key: CAMEL-8322
 URL: https://issues.apache.org/jira/browse/CAMEL-8322
 Project: Camel
  Issue Type: Sub-task
  Components: camel-core, tooling
Reporter: Claus Ibsen
Assignee: Claus Ibsen
 Fix For: 2.15.0


 We have all the endpoint options, but do not have for the component itself.
 We should generate those based on getter/setter which is how you configure 
 components.
 Then the apt plugin can discover and generate that information also.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CAMEL-7999) Camel Toolbox - Easy information about all Camel components and the release for tooling

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-7999:
---
Description: 
A Camel release contains many components, and we have the ability to let 
components document which options they offer.

Though there is currently a few shortcomings that can be improved

- the component json schema is currently runtime generated, which requires to 
load the component and create an instance of it. Instead we should build-time 
generate it, which we do today with the camel apt compiler plugin. *DONE*

- we should include documentation about the option from the javadoc, that 
allows end users to fully document a component using plain java getter/settr 
with javadocs, and add those @UriParam annotations for the apt compiler to 
detect and leverage *DONE*

- add a module that embeds all these json schema files in a single module, and 
also other information, such as the xml schemas, and what else can be handy. 
Then there is a single module as a one stop shop for tooling and whatnot to 
gather information about a Camel release. There is a new camel-catalog module 
that contains this now. *DONE*

- allow at runtime to explain an endpoint uri what the options in use are, eg 
as we got the json schema, we can add mbeans that can explain those options, 
than we can use in tooling, JMX, karaf commands etc. And also IDE editors etc 
*DONE*

- add JMX/Java API to explain a EIP and also get a tabular data with a list of 
all EIPs and their data. *DONE*

- enrich the dsl xml to inject javadoc for the eips into the xml schema, so we 
have documented in the xsd directly that any tooling can use. We have a old 
ticket about this. But the apt compiler plugin can detect the @JAXB annotations 
in the model and extract the javadoc, and generate a json schema with, and then 
we can load those and enrich into the generated xsd, or enrich into the jaxb 
model generator, or something.

- migrate more Camel components to include javadoc as documentation for their 
options

- figure out how to specify a default value in the json schema. Unfortunately 
the apt plugin cannot grab that from the source code. So the only solution I 
can think of now is to add an attribute to the @UriParam where you can specify 
that, eg this is also what I have seen others do. There is now a defaultValue 
attribute on UriParam to be used. *DONE*

- add component summary to component json file so we have a description of what 
the component does *DONE*

- add attribute to @UriEndpoint to link it to the component class, so we can 
include the class name of the component in the json schema, which allows Camel 
to link from component class - schema. eg the point is that if people define a 
component as activemq we do not know its the jms schema that has its 
documentation. Though we can infer this by the component class name. And 
alternative is for a component to have an api to return its original schema 
name etc. So activemq can say jms etc. We can resolve this by iterating the 
component data, and find the FQN of the components. *DONE*

- add @UriComponent annotation to component class which allows end users to 
provide meta-data about the component. Currently we grab a summary of what the 
component does from the maven pom.xml. Though this annotation prepares us for 
being able to scan the component class as well for which option it provides, so 
we can have out of the box documentation for that also. We detect getter/setter 
pairs as component options, and the apt plugin generates those in the schema. 
Use @Metadata to configure the options. *DONE*

- add JMX/Java API to explain a component and also get a tabular data with a 
list of all components and that data. *DONE*

- improve karaf commands to use the component information to show that also 
*DONE*

- add name of karaf feature of the component, eg its 99% came-xxx, but there 
may be some exceptions. We can likely add a property to the maven plugin that 
generates component.properties to include the karaf feature name as the 
artifactId by default. But allow to set a property in the pom.xml in case there 
is another name, or no karaf feature

- add support for @UriPath in apt plugin *DONE*

- javadoc documentation is not acessible from components which extend other 
components (eg javadoc from source code of parent components). For example 
camel-ftp extending file in camel-core etc. Added description to @UriParam to 
be used for this purpose. *DONE*

- add support for associating label(s) to a endpoint so we can group the 
various Camel components. A bit like this page: 
http://camel.apache.org/component-list-grouped.html *DONE*

- rename @Label to something more generic like @Metadata or something, so we 
can introduce new attributes for new stuff. For example a link which refers to 
the project website, or an icon to refer to an icon that symbol the component, 
etc. 

[jira] [Comment Edited] (CAMEL-8125) PropertyInject gives NullPointerException

2015-02-09 Thread Daniel Pocock (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14312313#comment-14312313
 ] 

Daniel Pocock edited comment on CAMEL-8125 at 2/9/15 3:04 PM:
--

Just another observation on this for Camel 2.13 users and a workaround:

- if I instantiate the PropertiesComponent as a spring bean like this:

bean id=properties 
class=org.apache.camel.component.properties.PropertiesComponent
property name=location 
 value=file:${project.home}/properties/
/bean

then I have the NullPointerException problem and can't inject properties into 
my RouteBuilder.

If I instantiate the PropertiesComponent this way:

camelContext id=camel ... 
propertyPlaceholder id=properties 
location=file:${project.home}/properties/


then I can use the PropertyInject annotation without the NullPointerException.

I tried manually instantiating the RouteBuilder as a Spring bean and then 
putting a reference to it in my camelContext/ but that didn't help resolve 
the issue.  I'm currently using the packageorg.example.project/package 
element without camelContext/ to automatically find and instantiate my 
RouteBuilder and as long as I set propertyPlaceholder/ it seems OK.



was (Author: daniel.pocock):
Just another observation on this for Camel 2.13 users and a workaround:

- if I instantiate the PropertiesComponent as a spring bean like this:

bean id=properties 
class=org.apache.camel.component.properties.PropertiesComponent
property name=location value=file:${project.home}/properties/
/bean

then I have the NullPointerException problem and can't inject properties into 
my RouteBuilder.

If I instantiate the PropertiesComponent this way:

camelContext id=camel ... 
propertyPlaceholder id=properties 
location=file:${project.home}/properties/


then I can use the PropertyInject annotation without the NullPointerException.

I tried manually instantiating the RouteBuilder as a Spring bean and then 
putting a reference to it in my camelContext/ but that didn't help resolve 
the issue.  I'm currently using the packageorg.example.project/package 
element without camelContext/ to automatically find and instantiate my 
RouteBuilder and as long as I set propertyPlaceholder/ it seems OK.


 PropertyInject gives NullPointerException
 -

 Key: CAMEL-8125
 URL: https://issues.apache.org/jira/browse/CAMEL-8125
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.14.0
 Environment: Linux, JDK1.7, standalone Camel/Spring J2SE process 
 running in Eclipse
Reporter: Daniel Pocock
Assignee: Claus Ibsen
Priority: Minor
 Fix For: 2.14.1, 2.15.0


 Using the annotation @PropertyInject on a field of the RouteBuilder class 
 gives a NullPointerException
 public class RouteBuilder extends SpringRouteBuilder {
   
   @PropertyInject(foo.bar)
   private String fooBar;
 ...
 }
 Using the {{ }} notation in endpoint URIs is working though.
   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CAMEL-8328) camel-spring-boot - A fatjar unit test fails

2015-02-09 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-8328:
--

 Summary: camel-spring-boot - A fatjar unit test fails
 Key: CAMEL-8328
 URL: https://issues.apache.org/jira/browse/CAMEL-8328
 Project: Camel
  Issue Type: Task
  Components: camel-spring-boot
Affects Versions: 2.15.0
Reporter: Claus Ibsen
Assignee: Henryk Konsek
 Fix For: 2.15.0


See
https://builds.apache.org/job/Camel.trunk.fulltest/org.apache.camel$camel-spring-boot/2156/testReport/junit/org.apache.camel.spring.boot.fatjarrouter/StandaloneFatJarRouterTest/shouldStartCamelRoute/


Henryk, when you have a little moment, then it would be great if you had a look 
at that failing test. Maybe its due spring-boot upgrade causing the test to 
fail. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8299) Let BulkRequest return the whole BulkResponse

2015-02-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313638#comment-14313638
 ] 

Claus Ibsen commented on CAMEL-8299:


I added the old behavior, and added a new operation named BULK that returns the 
BulkResponse object. Then we have both behaviors.

 Let BulkRequest return the whole BulkResponse
 -

 Key: CAMEL-8299
 URL: https://issues.apache.org/jira/browse/CAMEL-8299
 Project: Camel
  Issue Type: Improvement
  Components: camel-elasticsearch
Reporter: Willem Jiang
Assignee: Willem Jiang
 Fix For: 2.15.0


 I found out that I needed to get more information from the bulk-request 
 result. elasticsearch provides the BulkResponse with the full info. returning 
 the full BulkResponse allows the caller to tell the reason of index failures 
 and more.
 Here is the [PR|https://github.com/apache/camel/pull/373] for it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CAMEL-8299) Let BulkRequest return the whole BulkResponse

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-8299.

Resolution: Fixed

 Let BulkRequest return the whole BulkResponse
 -

 Key: CAMEL-8299
 URL: https://issues.apache.org/jira/browse/CAMEL-8299
 Project: Camel
  Issue Type: Improvement
  Components: camel-elasticsearch
Reporter: Willem Jiang
Assignee: Willem Jiang
 Fix For: 2.15.0


 I found out that I needed to get more information from the bulk-request 
 result. elasticsearch provides the BulkResponse with the full info. returning 
 the full BulkResponse allows the caller to tell the reason of index failures 
 and more.
 Here is the [PR|https://github.com/apache/camel/pull/373] for it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8299) Let BulkRequest return the whole BulkResponse

2015-02-09 Thread Ziv Segal (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313656#comment-14313656
 ] 

Ziv Segal commented on CAMEL-8299:
--

@Claus, Sorry for the unit-test break. I'm not familiar with the PR submit 
procedure, I will take a note of that and make sure the test runs before next 
PR. 

I didn't though this PR will get merged as-is, I wanted to raise the issue and 
have a discussion on what is the right approach. I also asked for a feedback 
from the latest committer in this file here: 
https://github.com/apache/camel/commit/69de2e3dd8f9d0e61b3a9e6e5495e406c9159909#commitcomment-9381453

First, I can fix the specific broken unit-test. than, If you can please make it 
clear what is the best way to fix the backward compatibility issue, I will be 
glad to fix that as well. 

please let me know how to proceed.

 Let BulkRequest return the whole BulkResponse
 -

 Key: CAMEL-8299
 URL: https://issues.apache.org/jira/browse/CAMEL-8299
 Project: Camel
  Issue Type: Improvement
  Components: camel-elasticsearch
Reporter: Willem Jiang
Assignee: Willem Jiang
 Fix For: 2.15.0


 I found out that I needed to get more information from the bulk-request 
 result. elasticsearch provides the BulkResponse with the full info. returning 
 the full BulkResponse allows the caller to tell the reason of index failures 
 and more.
 Here is the [PR|https://github.com/apache/camel/pull/373] for it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8299) Let BulkRequest return the whole BulkResponse

2015-02-09 Thread Ziv Segal (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313657#comment-14313657
 ] 

Ziv Segal commented on CAMEL-8299:
--

OK, thanks!

 Let BulkRequest return the whole BulkResponse
 -

 Key: CAMEL-8299
 URL: https://issues.apache.org/jira/browse/CAMEL-8299
 Project: Camel
  Issue Type: Improvement
  Components: camel-elasticsearch
Reporter: Willem Jiang
Assignee: Willem Jiang
 Fix For: 2.15.0


 I found out that I needed to get more information from the bulk-request 
 result. elasticsearch provides the BulkResponse with the full info. returning 
 the full BulkResponse allows the caller to tell the reason of index failures 
 and more.
 Here is the [PR|https://github.com/apache/camel/pull/373] for it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8299) Let BulkRequest return the whole BulkResponse

2015-02-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313623#comment-14313623
 ] 

Claus Ibsen commented on CAMEL-8299:


This broke the old behavior. Instead there should be an option to indicate if 
you want the response object or the ids as before. This also breaks an unit test
https://builds.apache.org/job/Camel.trunk.fulltest/org.apache.camel$camel-elasticsearch/2156/testReport/junit/org.apache.camel.component.elasticsearch/ElasticsearchComponentTest/bulkRequestBody/

 Let BulkRequest return the whole BulkResponse
 -

 Key: CAMEL-8299
 URL: https://issues.apache.org/jira/browse/CAMEL-8299
 Project: Camel
  Issue Type: Improvement
  Components: camel-elasticsearch
Reporter: Willem Jiang
Assignee: Willem Jiang
 Fix For: 2.15.0


 I found out that I needed to get more information from the bulk-request 
 result. elasticsearch provides the BulkResponse with the full info. returning 
 the full BulkResponse allows the caller to tell the reason of index failures 
 and more.
 Here is the [PR|https://github.com/apache/camel/pull/373] for it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CAMEL-8327) ContextTestSupport does not support weaveByType in test cases

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-8327:
---
Affects Version/s: 2.14.1

 ContextTestSupport does not support weaveByType in test cases
 -

 Key: CAMEL-8327
 URL: https://issues.apache.org/jira/browse/CAMEL-8327
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.13.3, 2.14.1
Reporter: Jamie goodyear
Assignee: Claus Ibsen
Priority: Minor
 Fix For: 2.13.4, 2.14.2, 2.15.0


 Update AdviceWithTypeTest test class to contain the below. On Camel-2.13.2 
 and below the test case would pass, on 2.13.3 and above the test case fails.
 {code:title=AdviceWithTypeTest.java|borderStyle=solid}
 public void testUnknownType2() throws Exception {

 context.getRouteDefinitions().get(0).adviceWith(context, new 
 AdviceWithRouteBuilder() {
 @Override
 public void configure() throws Exception {
 weaveByType(ChoiceDefinition.class).replace().to(mock:baz);
 }
 });

 getMockEndpoint(mock:baz).expectedMessageCount(1);
 template.sendBody(direct:start, World);
 assertMockEndpointsSatisfied();
 }
  
  
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 @Override
 public void configure() throws Exception {
 // START SNIPPET: e5
 from(direct:start)
 .transform(simple(Hello ${body}))
 .log(Got ${body})
 .to(mock:result)
 .choice()
 .when(header(foo).isEqualTo(bar))
.to(mock:resultA)
 .otherwise()
.to(mock:resultB);
 // END SNIPPET: e5
 }
 };
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CAMEL-8327) ContextTestSupport does not support weaveByType in test cases

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-8327:
--

Assignee: Claus Ibsen

 ContextTestSupport does not support weaveByType in test cases
 -

 Key: CAMEL-8327
 URL: https://issues.apache.org/jira/browse/CAMEL-8327
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.13.3
Reporter: Jamie goodyear
Assignee: Claus Ibsen
Priority: Minor
 Fix For: 2.13.4, 2.14.2, 2.15.0


 Update AdviceWithTypeTest test class to contain the below. On Camel-2.13.2 
 and below the test case would pass, on 2.13.3 and above the test case fails.
 {code:title=AdviceWithTypeTest.java|borderStyle=solid}
 public void testUnknownType2() throws Exception {

 context.getRouteDefinitions().get(0).adviceWith(context, new 
 AdviceWithRouteBuilder() {
 @Override
 public void configure() throws Exception {
 weaveByType(ChoiceDefinition.class).replace().to(mock:baz);
 }
 });

 getMockEndpoint(mock:baz).expectedMessageCount(1);
 template.sendBody(direct:start, World);
 assertMockEndpointsSatisfied();
 }
  
  
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 @Override
 public void configure() throws Exception {
 // START SNIPPET: e5
 from(direct:start)
 .transform(simple(Hello ${body}))
 .log(Got ${body})
 .to(mock:result)
 .choice()
 .when(header(foo).isEqualTo(bar))
.to(mock:resultA)
 .otherwise()
.to(mock:resultB);
 // END SNIPPET: e5
 }
 };
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CAMEL-8327) ContextTestSupport does not support weaveByType in test cases

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-8327:
---
Component/s: camel-core

 ContextTestSupport does not support weaveByType in test cases
 -

 Key: CAMEL-8327
 URL: https://issues.apache.org/jira/browse/CAMEL-8327
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.13.3
Reporter: Jamie goodyear
 Fix For: 2.13.4, 2.14.2, 2.15.0


 Update AdviceWithTypeTest test class to contain the below. On Camel-2.13.2 
 and below the test case would pass, on 2.13.3 and above the test case fails.
 {code:title=AdviceWithTypeTest.java|borderStyle=solid}
 public void testUnknownType2() throws Exception {

 context.getRouteDefinitions().get(0).adviceWith(context, new 
 AdviceWithRouteBuilder() {
 @Override
 public void configure() throws Exception {
 weaveByType(ChoiceDefinition.class).replace().to(mock:baz);
 }
 });

 getMockEndpoint(mock:baz).expectedMessageCount(1);
 template.sendBody(direct:start, World);
 assertMockEndpointsSatisfied();
 }
  
  
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 @Override
 public void configure() throws Exception {
 // START SNIPPET: e5
 from(direct:start)
 .transform(simple(Hello ${body}))
 .log(Got ${body})
 .to(mock:result)
 .choice()
 .when(header(foo).isEqualTo(bar))
.to(mock:resultA)
 .otherwise()
.to(mock:resultB);
 // END SNIPPET: e5
 }
 };
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CAMEL-8327) ContextTestSupport does not support weaveByType in test cases

2015-02-09 Thread Jamie goodyear (JIRA)
Jamie goodyear created CAMEL-8327:
-

 Summary: ContextTestSupport does not support weaveByType in test 
cases
 Key: CAMEL-8327
 URL: https://issues.apache.org/jira/browse/CAMEL-8327
 Project: Camel
  Issue Type: Bug
Affects Versions: 2.13.3
Reporter: Jamie goodyear
 Fix For: 2.13.4, 2.14.2


Update AdviceWithTypeTest test class to contain the below. On Camel-2.13.2 and 
below the test case would pass, on 2.13.3 and above the test case fails.

{code:title=AdviceWithTypeTest.java|borderStyle=solid}
public void testUnknownType2() throws Exception {
   
context.getRouteDefinitions().get(0).adviceWith(context, new 
AdviceWithRouteBuilder() {
@Override
public void configure() throws Exception {
weaveByType(ChoiceDefinition.class).replace().to(mock:baz);
}
});
   
getMockEndpoint(mock:baz).expectedMessageCount(1);
template.sendBody(direct:start, World);
assertMockEndpointsSatisfied();
}
 
 
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
// START SNIPPET: e5
from(direct:start)
.transform(simple(Hello ${body}))
.log(Got ${body})
.to(mock:result)
.choice()
.when(header(foo).isEqualTo(bar))
   .to(mock:resultA)
.otherwise()
   .to(mock:resultB);
// END SNIPPET: e5
}
};
}
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CAMEL-8325) Spring Boot and CDI integration don't detect duplicate routes, should support earlier context configuration

2015-02-09 Thread Christian Bauer (JIRA)
Christian Bauer created CAMEL-8325:
--

 Summary: Spring Boot and CDI integration don't detect duplicate 
routes, should support earlier context configuration
 Key: CAMEL-8325
 URL: https://issues.apache.org/jira/browse/CAMEL-8325
 Project: Camel
  Issue Type: Improvement
  Components: camel-cdi, camel-spring-boot
Affects Versions: 2.14.1
Reporter: Christian Bauer


See discussion:

http://mail-archives.apache.org/mod_mbox/camel-users/201502.mbox/%3C8713C0A9-5CB3-45AC-871F-F58ECC28C71E%40christianbauer.name%3E

Most users in both Spring Booth and CDI environments probably rely on 
auto-discovery of routes, so duplicate route identifiers are a common mistake 
and should be detected. For this to work, routes have to be added before the 
CamelContext is started. 

This affects both Spring Boot and CDI integration, where the routes are added 
after CamelContext start, which results in replacement of duplicates without 
error.

The CDI integration code is actually worse than the Spring Boot code, since 
users have no chance of customizing the CamelContext with a 
CamelContextConfiguration. In the Spring Boot integration there is at least 
that option available to access the CamelContext after it has started, although 
that still doesn't give you access to the important configuration options such 
as ManagementStrategy.

I recommend in both Spring Boot and CDI integration to share a (new?) 
CamelContextConfiguration interface with methods beforeContextStart(CamelContxt 
ctx) and afterContextStart(CamelContext ctx). Instances of that type should be 
auto-discovered so the user has a chance to edit the CamelContext.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CAMEL-8327) ContextTestSupport does not support weaveByType in test cases

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-8327.

Resolution: Fixed

Thanks for reporting. As a workaround you can use any of the other weaveBy to 
match the choice, such as by id = choice1

 ContextTestSupport does not support weaveByType in test cases
 -

 Key: CAMEL-8327
 URL: https://issues.apache.org/jira/browse/CAMEL-8327
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.13.3, 2.14.1
Reporter: Jamie goodyear
Assignee: Claus Ibsen
Priority: Minor
 Fix For: 2.13.4, 2.14.2, 2.15.0


 Update AdviceWithTypeTest test class to contain the below. On Camel-2.13.2 
 and below the test case would pass, on 2.13.3 and above the test case fails.
 {code:title=AdviceWithTypeTest.java|borderStyle=solid}
 public void testUnknownType2() throws Exception {

 context.getRouteDefinitions().get(0).adviceWith(context, new 
 AdviceWithRouteBuilder() {
 @Override
 public void configure() throws Exception {
 weaveByType(ChoiceDefinition.class).replace().to(mock:baz);
 }
 });

 getMockEndpoint(mock:baz).expectedMessageCount(1);
 template.sendBody(direct:start, World);
 assertMockEndpointsSatisfied();
 }
  
  
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 @Override
 public void configure() throws Exception {
 // START SNIPPET: e5
 from(direct:start)
 .transform(simple(Hello ${body}))
 .log(Got ${body})
 .to(mock:result)
 .choice()
 .when(header(foo).isEqualTo(bar))
.to(mock:resultA)
 .otherwise()
.to(mock:resultB);
 // END SNIPPET: e5
 }
 };
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8288) Attach Lucene Documents to the Results(Hits) if header contains RETURN_LUCENE_DOCS=true

2015-02-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313747#comment-14313747
 ] 

ASF GitHub Bot commented on CAMEL-8288:
---

Github user krantiparisa closed the pull request at:

https://github.com/apache/camel/pull/382


 Attach Lucene Documents to the Results(Hits) if header contains 
 RETURN_LUCENE_DOCS=true
 ---

 Key: CAMEL-8288
 URL: https://issues.apache.org/jira/browse/CAMEL-8288
 Project: Camel
  Issue Type: Improvement
  Components: camel-lucene
Reporter: Kranti Parisa
Assignee: Claus Ibsen
Priority: Minor
 Fix For: 2.15.0


 Current Hits result only contains the lucene docId, score and assuming there 
 will be a field with the name contents. 
 This feature will allow specifying a new header value 
 {code}
  .setHeader(RETURN_LUCENE_DOCS,constant(true))
 {code}
 and return the actual lucene documents part of the Hits for further 
 processing. This will allow us to retrieve any field from the actual lucene 
 document. 
 Both Lucene component and LuceneQueryProcessor should support this new header.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8326) Project created from camel-blueprint-archetype does not work

2015-02-09 Thread Charles Moulliard (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313757#comment-14313757
 ] 

Charles Moulliard commented on CAMEL-8326:
--

When camel:run is launched with the option use Blueprint, then the Camel Main 
class part of camel-test-blueprint project uses the PoJoSR framework and not 
Karaf with Pax WEB. Here is how the Main class of the project 
camel-test-blueprint calls the Camel to create the Bundle Context :

https://github.com/apache/camel/blob/master/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/Main.java#L136
 
https://github.com/apache/camel/blob/master/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java#L105

 Project created from camel-blueprint-archetype does not work
 

 Key: CAMEL-8326
 URL: https://issues.apache.org/jira/browse/CAMEL-8326
 Project: Camel
  Issue Type: Bug
  Components: osgi, tooling
Affects Versions: 2.13.3, 2.14.1
Reporter: Charles Moulliard

 When we launch the camel:run maven goal created from a project created using 
 the archetype :
 org.apache.camel.archetypes:camel-archetype-blueprint (Creates a new Camel 
 project with OSGi blueprint support. Ready to be deployed in OSGi.)
 then it fails
 {code}
 [mel.test.blueprint.Main.main()] MainSupportINFO  Apache 
 Camel 2.14.1 starting
 [mel.test.blueprint.Main.main()] Activator  INFO  Camel 
 activator starting
 [mel.test.blueprint.Main.main()] Activator  INFO  Camel 
 activator started
 [mel.test.blueprint.Main.main()] BlueprintExtender  INFO  No 
 quiesce support is available, so blueprint components will not participate in 
 quiesce operations
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  Test 
 bundle headers: Bundle-ManifestVersion=2, Bundle-Name=System Bundle, 
 Bundle-SymbolicName=de.kalpatec.pojosr.framework, Bundle-Vendor=kalpatec, 
 Bundle-Version=0.2.1
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.packageadmin.PackageAdmin], bundle: 
 de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.camel.spi.LanguageResolver], bundle: 
 org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], 
 bundle: org.apache.camel.camel-blueprint [4], symbolicName: 
 org.apache.camel.camel-blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.cm.ManagedServiceFactory], bundle: 
 org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.felix.cm.PersistenceManager], bundle: 
 org.apache.felix.configadmin [25], symbolicName: org.apache.felix.configadmin
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.camel.spi.DataFormatResolver], bundle: 
 org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], 
 bundle: org.apache.aries.blueprint [13], symbolicName: 
 org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.camel.camel-blueprint [4], symbolicName: 
 org.apache.camel.camel-blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   

[jira] [Commented] (CAMEL-8197) Create Maven plugin to inject EIP documentation into the spring and blueprint XML DSL

2015-02-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313766#comment-14313766
 ] 

Claus Ibsen commented on CAMEL-8197:


[~nkukhar] this is great work.

Is there more work needed, or is it complete?

 Create Maven plugin to inject EIP documentation into the spring and blueprint 
 XML DSL
 -

 Key: CAMEL-8197
 URL: https://issues.apache.org/jira/browse/CAMEL-8197
 Project: Camel
  Issue Type: Sub-task
  Components: eip, tooling
Reporter: Claus Ibsen
Assignee: Willem Jiang
 Fix For: 2.15.0


 So we can include documentation out of the box in the XSD schema files, which 
 allows end users to better work with Camel, as their IDE editors can show the 
 documentation in the IDE.
 To do this we need to
 1)
 Create a new Maven plugin at
 https://github.com/apache/camel/tree/master/tooling/maven
 which can be inspired by
 https://github.com/apache/camel/tree/master/tooling/maven/camel-package-maven-plugin
 2)
 Run this plugin in camel-spring and camel-blueprint, so it can read the 
 camel-spring.xsd, camel-blueprint.xsd file, and inject documentation.
 3)
 Parse the XSD maybe using SAX, and inject the documentation.
 For each xs:element in the top of the schema file
 http://camel.apache.org/schema/spring/camel-spring.xsd
 Then use the name, eg (name=split)
 {code}
 xs:element name=split type=tns:splitDefinition/
 {code}
 To find the split.json file in camel-core. Then the json file has the 
 documentation for that type (including inherited types).
 So for the split definition
 {code}
 xs:complexType name=splitDefinition
 xs:complexContent
 xs:extension base=tns:expressionNode
 xs:sequence/
 xs:attribute name=parallelProcessing type=xs:boolean/
 xs:attribute name=strategyRef type=xs:string/
 xs:attribute name=strategyMethodName type=xs:string/
 xs:attribute name=strategyMethodAllowNull type=xs:boolean/
 xs:attribute name=executorServiceRef type=xs:string/
 xs:attribute name=streaming type=xs:boolean/
 xs:attribute name=stopOnException type=xs:boolean/
 xs:attribute name=timeout type=xs:long/
 xs:attribute name=onPrepareRef type=xs:string/
 xs:attribute name=shareUnitOfWork type=xs:boolean/
 xs:anyAttribute namespace=##other processContents=skip/
 /xs:extension
 /xs:complexContent
 /xs:complexType
 {code}
 We can find the description of these attributes, and elements from the json 
 file.
 For example for the streaming attribute we have
 {code}
  streaming: { kind: attribute: required: false, type: boolean, 
 javaType: java.lang.Boolean, description: The splitter should use 
 streaming -- exchanges are being sent as the data for them becomes available. 
 This improves throughput and memory usage but it has a drawback: - the sent 
 exchanges will no longer contain the link org.apache.camel.ExchangeSPLIT_SIZE 
 header property
 {code}
 Then add the needed xs:annotation to document it. 
 http://www.w3schools.com/schema/el_annotation.asp
 Which should be
 {code}
 xs:annotation
   xs:documentation xml:lang=en
 The splitter should use streaming -- exchanges are being sent as the data for 
 them becomes available. This improves throughput and memory usage but it has 
 a drawback: - the sent exchanges will no longer contain the link 
 org.apache.camel.ExchangeSPLIT_SIZE header property  
   /xs:documentation
 /xs:annotation
 {code}
 Notice that the xsd will become bigger due the verbosity of how to annotate 
 xsd fields. 
 Mind that sometimes there is not yet documentation, so check for not empty 
 value.
 To parse the json file, then use this class from camel-core
 {code}
 ListMapString, String rows = 
 JsonSchemaHelper.parseJsonSchema(properties, json, true);
 {code}
 Then you have a map with key/value for all those values.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8326) Project created from camel-blueprint-archetype does not work

2015-02-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313764#comment-14313764
 ] 

Claus Ibsen commented on CAMEL-8326:


Works fine for me, just created using Camel 2.14.1 and 2.15-SNAPSHOT

Here is 2.14.1
{code}
davsclaus:~/Documents/workspace/blue/$ mvn camel:run
[INFO] Scanning for projects...
[INFO]
[INFO] 
[INFO] Building A Camel Blueprint Route 1.0-SNAPSHOT
[INFO] 
[INFO]
[INFO]  camel-maven-plugin:2.14.1:run (default-cli)  test-compile @ blue 
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ blue ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ blue ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
blue ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ blue 
---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO]  camel-maven-plugin:2.14.1:run (default-cli)  test-compile @ blue 
[INFO]
[INFO] --- camel-maven-plugin:2.14.1:run (default-cli) @ blue ---
Downloading: 
https://repo.maven.apache.org/maven2/org/apache/deltaspike/core/deltaspike-core-api/1.0.2/deltaspike-core-api-1.0.2.pom
Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/deltaspike/core/deltaspike-core-api/1.0.2/deltaspike-core-api-1.0.2.pom
 (2 KB at 2.0 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/org/apache/deltaspike/core/deltaspike-core-impl/1.0.2/deltaspike-core-impl-1.0.2.pom
Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/deltaspike/core/deltaspike-core-impl/1.0.2/deltaspike-core-impl-1.0.2.pom
 (3 KB at 19.9 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/org/apache/deltaspike/core/deltaspike-core-api/1.0.2/deltaspike-core-api-1.0.2.jar
Downloading: 
https://repo.maven.apache.org/maven2/org/apache/deltaspike/core/deltaspike-core-impl/1.0.2/deltaspike-core-impl-1.0.2.jar
Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/deltaspike/core/deltaspike-core-impl/1.0.2/deltaspike-core-impl-1.0.2.jar
 (120 KB at 551.3 KB/sec)
Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/deltaspike/core/deltaspike-core-api/1.0.2/deltaspike-core-api-1.0.2.jar
 (210 KB at 562.6 KB/sec)
[INFO] Using org.apache.camel.test.blueprint.Main to initiate a CamelContext
[INFO] Starting Camel ...
[mel.test.blueprint.Main.main()] MainSupportINFO  Apache 
Camel 2.14.1 starting
[mel.test.blueprint.Main.main()] Activator  INFO  Camel 
activator starting
[mel.test.blueprint.Main.main()] Activator  INFO  Camel 
activator started
[mel.test.blueprint.Main.main()] BlueprintExtender  INFO  No 
quiesce support is available, so blueprint components will not participate in 
quiesce operations
[ Blueprint Extender: 1] BlueprintContainerImpl INFO  Bundle 
blue is waiting for namespace handlers 
[http://camel.apache.org/schema/blueprint]
[ Blueprint Extender: 1] BlueprintCamelContext  INFO  Apache 
Camel 2.14.1 (CamelContext: blueprintContext) is starting
[ Blueprint Extender: 1] ManagedManagementStrategy  INFO  JMX is 
enabled
[ Blueprint Extender: 1] BlueprintCamelContext  INFO  
AllowUseOriginalMessage is enabled. If access to the original message is not 
needed, then its recommended to turn this option off as it may improve 
performance.
[ Blueprint Extender: 1] BlueprintCamelContext  INFO  
StreamCaching is not in use. If using streams then its recommended to enable 
stream caching. See more details at http://camel.apache.org/stream-caching.html
[ Blueprint Extender: 1] BlueprintCamelContext  INFO  Route: 
timerToLog started and consuming from: Endpoint[timer://foo?period=5000]
[ Blueprint Extender: 1] BlueprintCamelContext  INFO  Total 1 
routes, of which 1 is started.
[ Blueprint Extender: 1] BlueprintCamelContext  INFO  Apache 
Camel 2.14.1 (CamelContext: blueprintContext) started in 0.345 seconds
[ntext) thread #0 - timer://foo] timerToLog INFO  The 
message contains Hi from Camel at 2015-02-10 08:49:16
[ntext) thread #0 - timer://foo] timerToLog INFO  The 
message contains Hi from Camel at 2015-02-10 08:49:21
^C[  Thread-1] MainSupport$HangupInterceptor  INFO  
Received hang up - stopping the main instance.
[  Thread-1] BlueprintCamelContext  INFO  Apache 
Camel 2.14.1 (CamelContext: 

[jira] [Commented] (CAMEL-8226) Deprecated feature dataSourceRef not working correctly

2015-02-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313767#comment-14313767
 ] 

ASF GitHub Bot commented on CAMEL-8226:
---

GitHub user igarashitm opened a pull request:

https://github.com/apache/camel/pull/388

CAMEL-8226 Deprecated feature dataSourceRef not working correctly

If you try to create more than one of endpoint from SqlComponent with 
specifying dataSourceRef option, it doesn't remove dataSourceRef option from 
URL on 2nd attempt as dataSource object is already populated on 1st attempt, 
causes org.apache.camel.ResolveEndpointFailedException

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/igarashitm/camel CAMEL-8226

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/388.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #388


commit 2ccb7b87a650df1e18498df715148db2f2029631
Author: Tomohisa Igarashi tm.igara...@gmail.com
Date:   2015-02-10T07:45:36Z

CAMEL-8226 Deprecated feature dataSourceRef not working correctly

If you try to create more than one of endpoint from SqlComponent with 
specifying dataSourceRef option, it doesn't remove dataSourceRef option from 
URL on 2nd attempt as dataSource object is already populated on 1st attempt, 
causes org.apache.camel.ResolveEndpointFailedException




 Deprecated feature dataSourceRef not working correctly
 --

 Key: CAMEL-8226
 URL: https://issues.apache.org/jira/browse/CAMEL-8226
 Project: Camel
  Issue Type: Bug
  Components: camel-sql
Affects Versions: 2.14.1
Reporter: Benjamin Graf

 If several sql endpoints are defined using dataSourceRef attribute the latest 
 one will not get dataSourceRef removed in createEndpoint causing validation 
 exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8325) Spring Boot and CDI integration don't detect duplicate routes, should support earlier context configuration

2015-02-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313646#comment-14313646
 ] 

Claus Ibsen commented on CAMEL-8325:


[~hekonsek] another ticket if you have time to look at camel-spring-boot.

 Spring Boot and CDI integration don't detect duplicate routes, should support 
 earlier context configuration
 ---

 Key: CAMEL-8325
 URL: https://issues.apache.org/jira/browse/CAMEL-8325
 Project: Camel
  Issue Type: Improvement
  Components: camel-cdi, camel-spring-boot
Affects Versions: 2.14.1
Reporter: Christian Bauer

 See discussion:
 http://mail-archives.apache.org/mod_mbox/camel-users/201502.mbox/%3C8713C0A9-5CB3-45AC-871F-F58ECC28C71E%40christianbauer.name%3E
 Most users in both Spring Booth and CDI environments probably rely on 
 auto-discovery of routes, so duplicate route identifiers are a common mistake 
 and should be detected. For this to work, routes have to be added before the 
 CamelContext is started. 
 This affects both Spring Boot and CDI integration, where the routes are added 
 after CamelContext start, which results in replacement of duplicates without 
 error.
 The CDI integration code is actually worse than the Spring Boot code, since 
 users have no chance of customizing the CamelContext with a 
 CamelContextConfiguration. In the Spring Boot integration there is at least 
 that option available to access the CamelContext after it has started, 
 although that still doesn't give you access to the important configuration 
 options such as ManagementStrategy.
 I recommend in both Spring Boot and CDI integration to share a (new?) 
 CamelContextConfiguration interface with methods 
 beforeContextStart(CamelContxt ctx) and afterContextStart(CamelContext ctx). 
 Instances of that type should be auto-discovered so the user has a chance to 
 edit the CamelContext.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-8326) Project created from camel-blueprint-archetype does not work

2015-02-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14313645#comment-14313645
 ] 

Claus Ibsen commented on CAMEL-8326:


What version of Karaf do you use? 

 Project created from camel-blueprint-archetype does not work
 

 Key: CAMEL-8326
 URL: https://issues.apache.org/jira/browse/CAMEL-8326
 Project: Camel
  Issue Type: Bug
  Components: osgi, tooling
Affects Versions: 2.13.3, 2.14.1
Reporter: Charles Moulliard

 When we launch the camel:run maven goal created from a project created using 
 the archetype :
 org.apache.camel.archetypes:camel-archetype-blueprint (Creates a new Camel 
 project with OSGi blueprint support. Ready to be deployed in OSGi.)
 then it fails
 {code}
 [mel.test.blueprint.Main.main()] MainSupportINFO  Apache 
 Camel 2.14.1 starting
 [mel.test.blueprint.Main.main()] Activator  INFO  Camel 
 activator starting
 [mel.test.blueprint.Main.main()] Activator  INFO  Camel 
 activator started
 [mel.test.blueprint.Main.main()] BlueprintExtender  INFO  No 
 quiesce support is available, so blueprint components will not participate in 
 quiesce operations
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  Test 
 bundle headers: Bundle-ManifestVersion=2, Bundle-Name=System Bundle, 
 Bundle-SymbolicName=de.kalpatec.pojosr.framework, Bundle-Vendor=kalpatec, 
 Bundle-Version=0.2.1
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.packageadmin.PackageAdmin], bundle: 
 de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.camel.spi.LanguageResolver], bundle: 
 org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], 
 bundle: org.apache.camel.camel-blueprint [4], symbolicName: 
 org.apache.camel.camel-blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.cm.ManagedServiceFactory], bundle: 
 org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.felix.cm.PersistenceManager], bundle: 
 org.apache.felix.configadmin [25], symbolicName: org.apache.felix.configadmin
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.camel.spi.DataFormatResolver], bundle: 
 org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], 
 bundle: org.apache.aries.blueprint [13], symbolicName: 
 org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.camel.camel-blueprint [4], symbolicName: 
 org.apache.camel.camel-blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle: 
 org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.url.URLStreamHandlerService], bundle: 
 org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.cm.ConfigurationAdmin], bundle: 
 org.apache.felix.configadmin 

[jira] [Updated] (CAMEL-8326) Project created from camel-blueprint-archetype does not work

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-8326:
---
Component/s: tooling
 osgi

 Project created from camel-blueprint-archetype does not work
 

 Key: CAMEL-8326
 URL: https://issues.apache.org/jira/browse/CAMEL-8326
 Project: Camel
  Issue Type: Bug
  Components: osgi, tooling
Affects Versions: 2.13.3, 2.14.1
Reporter: Charles Moulliard

 When we launch the camel:run maven goal created from a project created using 
 the archetype :
 org.apache.camel.archetypes:camel-archetype-blueprint (Creates a new Camel 
 project with OSGi blueprint support. Ready to be deployed in OSGi.)
 then it fails
 {code}
 [mel.test.blueprint.Main.main()] MainSupportINFO  Apache 
 Camel 2.14.1 starting
 [mel.test.blueprint.Main.main()] Activator  INFO  Camel 
 activator starting
 [mel.test.blueprint.Main.main()] Activator  INFO  Camel 
 activator started
 [mel.test.blueprint.Main.main()] BlueprintExtender  INFO  No 
 quiesce support is available, so blueprint components will not participate in 
 quiesce operations
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  Test 
 bundle headers: Bundle-ManifestVersion=2, Bundle-Name=System Bundle, 
 Bundle-SymbolicName=de.kalpatec.pojosr.framework, Bundle-Vendor=kalpatec, 
 Bundle-Version=0.2.1
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.packageadmin.PackageAdmin], bundle: 
 de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.camel.spi.LanguageResolver], bundle: 
 org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], 
 bundle: org.apache.camel.camel-blueprint [4], symbolicName: 
 org.apache.camel.camel-blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.cm.ManagedServiceFactory], bundle: 
 org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.felix.cm.PersistenceManager], bundle: 
 org.apache.felix.configadmin [25], symbolicName: org.apache.felix.configadmin
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.camel.spi.DataFormatResolver], bundle: 
 org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], 
 bundle: org.apache.aries.blueprint [13], symbolicName: 
 org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.camel.camel-blueprint [4], symbolicName: 
 org.apache.camel.camel-blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
 org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle: 
 org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.url.URLStreamHandlerService], bundle: 
 org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
 [mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
 ServiceReference: [org.osgi.service.cm.ConfigurationAdmin], bundle: 
 org.apache.felix.configadmin [25], symbolicName: org.apache.felix.configadmin

[jira] [Updated] (CAMEL-8327) ContextTestSupport does not support weaveByType in test cases

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-8327:
---
Fix Version/s: 2.15.0

 ContextTestSupport does not support weaveByType in test cases
 -

 Key: CAMEL-8327
 URL: https://issues.apache.org/jira/browse/CAMEL-8327
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.13.3
Reporter: Jamie goodyear
 Fix For: 2.13.4, 2.14.2, 2.15.0


 Update AdviceWithTypeTest test class to contain the below. On Camel-2.13.2 
 and below the test case would pass, on 2.13.3 and above the test case fails.
 {code:title=AdviceWithTypeTest.java|borderStyle=solid}
 public void testUnknownType2() throws Exception {

 context.getRouteDefinitions().get(0).adviceWith(context, new 
 AdviceWithRouteBuilder() {
 @Override
 public void configure() throws Exception {
 weaveByType(ChoiceDefinition.class).replace().to(mock:baz);
 }
 });

 getMockEndpoint(mock:baz).expectedMessageCount(1);
 template.sendBody(direct:start, World);
 assertMockEndpointsSatisfied();
 }
  
  
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 @Override
 public void configure() throws Exception {
 // START SNIPPET: e5
 from(direct:start)
 .transform(simple(Hello ${body}))
 .log(Got ${body})
 .to(mock:result)
 .choice()
 .when(header(foo).isEqualTo(bar))
.to(mock:resultA)
 .otherwise()
.to(mock:resultB);
 // END SNIPPET: e5
 }
 };
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CAMEL-8327) ContextTestSupport does not support weaveByType in test cases

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-8327:
---
Priority: Minor  (was: Major)

 ContextTestSupport does not support weaveByType in test cases
 -

 Key: CAMEL-8327
 URL: https://issues.apache.org/jira/browse/CAMEL-8327
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.13.3
Reporter: Jamie goodyear
Priority: Minor
 Fix For: 2.13.4, 2.14.2, 2.15.0


 Update AdviceWithTypeTest test class to contain the below. On Camel-2.13.2 
 and below the test case would pass, on 2.13.3 and above the test case fails.
 {code:title=AdviceWithTypeTest.java|borderStyle=solid}
 public void testUnknownType2() throws Exception {

 context.getRouteDefinitions().get(0).adviceWith(context, new 
 AdviceWithRouteBuilder() {
 @Override
 public void configure() throws Exception {
 weaveByType(ChoiceDefinition.class).replace().to(mock:baz);
 }
 });

 getMockEndpoint(mock:baz).expectedMessageCount(1);
 template.sendBody(direct:start, World);
 assertMockEndpointsSatisfied();
 }
  
  
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 @Override
 public void configure() throws Exception {
 // START SNIPPET: e5
 from(direct:start)
 .transform(simple(Hello ${body}))
 .log(Got ${body})
 .to(mock:result)
 .choice()
 .when(header(foo).isEqualTo(bar))
.to(mock:resultA)
 .otherwise()
.to(mock:resultB);
 // END SNIPPET: e5
 }
 };
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CAMEL-7999) Camel Toolbox - Easy information about all Camel components and the release for tooling

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-7999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-7999:
---
Description: 
A Camel release contains many components, and we have the ability to let 
components document which options they offer.

Though there is currently a few shortcomings that can be improved

- the component json schema is currently runtime generated, which requires to 
load the component and create an instance of it. Instead we should build-time 
generate it, which we do today with the camel apt compiler plugin. *DONE*

- we should include documentation about the option from the javadoc, that 
allows end users to fully document a component using plain java getter/settr 
with javadocs, and add those @UriParam annotations for the apt compiler to 
detect and leverage *DONE*

- add a module that embeds all these json schema files in a single module, and 
also other information, such as the xml schemas, and what else can be handy. 
Then there is a single module as a one stop shop for tooling and whatnot to 
gather information about a Camel release. There is a new camel-catalog module 
that contains this now. *DONE*

- allow at runtime to explain an endpoint uri what the options in use are, eg 
as we got the json schema, we can add mbeans that can explain those options, 
than we can use in tooling, JMX, karaf commands etc. And also IDE editors etc 
*DONE*

- add JMX/Java API to explain a EIP and also get a tabular data with a list of 
all EIPs and their data. *DONE*

- enrich the dsl xml to inject javadoc for the eips into the xml schema, so we 
have documented in the xsd directly that any tooling can use. We have a old 
ticket about this. But the apt compiler plugin can detect the @JAXB annotations 
in the model and extract the javadoc, and generate a json schema with, and then 
we can load those and enrich into the generated xsd, or enrich into the jaxb 
model generator, or something.

- migrate more Camel components to include javadoc as documentation for their 
options *DONE* for all camel-core. Other components will be migrated over time.

- figure out how to specify a default value in the json schema. Unfortunately 
the apt plugin cannot grab that from the source code. So the only solution I 
can think of now is to add an attribute to the @UriParam where you can specify 
that, eg this is also what I have seen others do. There is now a defaultValue 
attribute on UriParam to be used. *DONE*

- add component summary to component json file so we have a description of what 
the component does *DONE*

- add attribute to @UriEndpoint to link it to the component class, so we can 
include the class name of the component in the json schema, which allows Camel 
to link from component class - schema. eg the point is that if people define a 
component as activemq we do not know its the jms schema that has its 
documentation. Though we can infer this by the component class name. And 
alternative is for a component to have an api to return its original schema 
name etc. So activemq can say jms etc. We can resolve this by iterating the 
component data, and find the FQN of the components. *DONE*

- add @UriComponent annotation to component class which allows end users to 
provide meta-data about the component. Currently we grab a summary of what the 
component does from the maven pom.xml. Though this annotation prepares us for 
being able to scan the component class as well for which option it provides, so 
we can have out of the box documentation for that also. We detect getter/setter 
pairs as component options, and the apt plugin generates those in the schema. 
Use @Metadata to configure the options. *DONE*

- add JMX/Java API to explain a component and also get a tabular data with a 
list of all components and that data. *DONE*

- improve karaf commands to use the component information to show that also 
*DONE*

- add name of karaf feature of the component, eg its 99% came-xxx, but there 
may be some exceptions. We can likely add a property to the maven plugin that 
generates component.properties to include the karaf feature name as the 
artifactId by default. But allow to set a property in the pom.xml in case there 
is another name, or no karaf feature

- add support for @UriPath in apt plugin *DONE*

- javadoc documentation is not acessible from components which extend other 
components (eg javadoc from source code of parent components). For example 
camel-ftp extending file in camel-core etc. Added description to @UriParam to 
be used for this purpose. *DONE*

- add support for associating label(s) to a endpoint so we can group the 
various Camel components. A bit like this page: 
http://camel.apache.org/component-list-grouped.html *DONE*

- rename @Label to something more generic like @Metadata or something, so we 
can introduce new attributes for new stuff. For example a link which refers to 
the project 

[jira] [Resolved] (CAMEL-8023) Add javadoc documentation to camel-core endpoints so we have documentation out of the box

2015-02-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-8023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-8023.

Resolution: Fixed

 Add javadoc documentation to camel-core endpoints so we have documentation 
 out of the box
 -

 Key: CAMEL-8023
 URL: https://issues.apache.org/jira/browse/CAMEL-8023
 Project: Camel
  Issue Type: Sub-task
  Components: camel-core
Reporter: Claus Ibsen
Assignee: Willem Jiang
 Fix For: 2.15.0


 See parent ticket.
 For each of the components in camel-core, we need to document each @UriParam 
 option. This is done by adding javadoc to the setter method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CAMEL-8326) Project created from camel-blueprint-archetype does not work

2015-02-09 Thread Charles Moulliard (JIRA)
Charles Moulliard created CAMEL-8326:


 Summary: Project created from camel-blueprint-archetype does not 
work
 Key: CAMEL-8326
 URL: https://issues.apache.org/jira/browse/CAMEL-8326
 Project: Camel
  Issue Type: Bug
Affects Versions: 2.14.1, 2.13.3
Reporter: Charles Moulliard


When we launch the camel:run maven goal created from a project created using 
the archetype :

org.apache.camel.archetypes:camel-archetype-blueprint (Creates a new Camel 
project with OSGi blueprint support. Ready to be deployed in OSGi.)

then it fails

{code}
[mel.test.blueprint.Main.main()] MainSupportINFO  Apache 
Camel 2.14.1 starting
[mel.test.blueprint.Main.main()] Activator  INFO  Camel 
activator starting
[mel.test.blueprint.Main.main()] Activator  INFO  Camel 
activator started
[mel.test.blueprint.Main.main()] BlueprintExtender  INFO  No 
quiesce support is available, so blueprint components will not participate in 
quiesce operations
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  Test 
bundle headers: Bundle-ManifestVersion=2, Bundle-Name=System Bundle, 
Bundle-SymbolicName=de.kalpatec.pojosr.framework, Bundle-Vendor=kalpatec, 
Bundle-Version=0.2.1
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.osgi.service.packageadmin.PackageAdmin], bundle: 
de.kalpatec.pojosr.framework [0], symbolicName: de.kalpatec.pojosr.framework
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.camel.spi.LanguageResolver], bundle: 
org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], 
bundle: org.apache.camel.camel-blueprint [4], symbolicName: 
org.apache.camel.camel-blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.osgi.service.cm.ManagedServiceFactory], bundle: 
org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.felix.cm.PersistenceManager], bundle: 
org.apache.felix.configadmin [25], symbolicName: org.apache.felix.configadmin
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.camel.spi.DataFormatResolver], bundle: 
org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.osgi.service.blueprint.container.BlueprintContainer], 
bundle: org.apache.aries.blueprint [13], symbolicName: 
org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
org.apache.camel.camel-blueprint [4], symbolicName: 
org.apache.camel.camel-blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.aries.blueprint.NamespaceHandler], bundle: 
org.apache.aries.blueprint [13], symbolicName: org.apache.aries.blueprint
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.camel.spi.TypeConverterLoader], bundle: 
org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.osgi.service.url.URLStreamHandlerService], bundle: 
org.apache.felix.fileinstall [26], symbolicName: org.apache.felix.fileinstall
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.osgi.service.cm.ConfigurationAdmin], bundle: 
org.apache.felix.configadmin [25], symbolicName: org.apache.felix.configadmin
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  
ServiceReference: [org.apache.camel.spi.ComponentResolver], bundle: 
org.apache.camel.camel-core [2], symbolicName: org.apache.camel.camel-core
[mel.test.blueprint.Main.main()] CamelBlueprintHelper   WARN  

[jira] [Commented] (CAMEL-8125) PropertyInject gives NullPointerException

2015-02-09 Thread Daniel Pocock (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14312313#comment-14312313
 ] 

Daniel Pocock commented on CAMEL-8125:
--

Just another observation on this for Camel 2.13 users and a workaround:

- if I instantiate the PropertiesComponent as a spring bean like this:

bean id=properties 
class=org.apache.camel.component.properties.PropertiesComponent
property name=location value=file:${project.home}/properties/
/bean

then I have the NullPointerException problem and can't inject properties into 
my RouteBuilder.

If I instantiate the PropertiesComponent this way:

camelContext id=camel ... 
propertyPlaceholder id=properties 
location=file:${project.home}/properties/


then I can use the PropertyInject annotation without the NullPointerException.

I tried manually instantiating the RouteBuilder as a Spring bean and then 
putting a reference to it in my camelContext/ but that didn't help resolve 
the issue.  I'm currently using the packageorg.example.project/package 
element without camelContext/ to automatically find and instantiate my 
RouteBuilder and as long as I set propertyPlaceholder/ it seems OK.


 PropertyInject gives NullPointerException
 -

 Key: CAMEL-8125
 URL: https://issues.apache.org/jira/browse/CAMEL-8125
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.14.0
 Environment: Linux, JDK1.7, standalone Camel/Spring J2SE process 
 running in Eclipse
Reporter: Daniel Pocock
Assignee: Claus Ibsen
Priority: Minor
 Fix For: 2.14.1, 2.15.0


 Using the annotation @PropertyInject on a field of the RouteBuilder class 
 gives a NullPointerException
 public class RouteBuilder extends SpringRouteBuilder {
   
   @PropertyInject(foo.bar)
   private String fooBar;
 ...
 }
 Using the {{ }} notation in endpoint URIs is working though.
   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CAMEL-8125) PropertyInject gives NullPointerException

2015-02-09 Thread Daniel Pocock (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14312313#comment-14312313
 ] 

Daniel Pocock edited comment on CAMEL-8125 at 2/9/15 3:05 PM:
--

Just another observation on this for Camel 2.13 users and a workaround:

- if I instantiate the PropertiesComponent as a spring bean like this:

bean id=properties 
class=org.apache.camel.component.properties.PropertiesComponent
property name=location 
   value=file:${project.home}/properties/
/bean

then I have the NullPointerException problem and can't inject properties into 
my RouteBuilder.

If I instantiate the PropertiesComponent this way:

camelContext id=camel ... 
propertyPlaceholder id=properties 
location=file:${project.home}/properties/


then I can use the PropertyInject annotation without the NullPointerException.

I tried manually instantiating the RouteBuilder as a Spring bean and then 
putting a reference to it in my camelContext/ but that didn't help resolve 
the issue.  I'm currently using the packageorg.example.project/package 
element without camelContext/ to automatically find and instantiate my 
RouteBuilder and as long as I set propertyPlaceholder/ it seems OK.



was (Author: daniel.pocock):
Just another observation on this for Camel 2.13 users and a workaround:

- if I instantiate the PropertiesComponent as a spring bean like this:

bean id=properties 
class=org.apache.camel.component.properties.PropertiesComponent
property name=location 
 value=file:${project.home}/properties/
/bean

then I have the NullPointerException problem and can't inject properties into 
my RouteBuilder.

If I instantiate the PropertiesComponent this way:

camelContext id=camel ... 
propertyPlaceholder id=properties 
location=file:${project.home}/properties/


then I can use the PropertyInject annotation without the NullPointerException.

I tried manually instantiating the RouteBuilder as a Spring bean and then 
putting a reference to it in my camelContext/ but that didn't help resolve 
the issue.  I'm currently using the packageorg.example.project/package 
element without camelContext/ to automatically find and instantiate my 
RouteBuilder and as long as I set propertyPlaceholder/ it seems OK.


 PropertyInject gives NullPointerException
 -

 Key: CAMEL-8125
 URL: https://issues.apache.org/jira/browse/CAMEL-8125
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.14.0
 Environment: Linux, JDK1.7, standalone Camel/Spring J2SE process 
 running in Eclipse
Reporter: Daniel Pocock
Assignee: Claus Ibsen
Priority: Minor
 Fix For: 2.14.1, 2.15.0


 Using the annotation @PropertyInject on a field of the RouteBuilder class 
 gives a NullPointerException
 public class RouteBuilder extends SpringRouteBuilder {
   
   @PropertyInject(foo.bar)
   private String fooBar;
 ...
 }
 Using the {{ }} notation in endpoint URIs is working though.
   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)