[jira] [Commented] (CAMEL-7632) Add streaming mode to camel-splunk consumer

2014-07-29 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-7632:


We need to update the docs about this
http://camel.apache.org/splunk

 Add streaming mode to camel-splunk consumer
 ---

 Key: CAMEL-7632
 URL: https://issues.apache.org/jira/browse/CAMEL-7632
 Project: Camel
  Issue Type: New Feature
Reporter: Dmitri Medvedev
Assignee: Willem Jiang
Priority: Minor
 Fix For: 2.14.0


 camel-splunk consumer runs out of memory when splunk resultset is large.
 This is because it accumulates all results in an array list before returning
 them.
 One possible way to address this is to add streaming support to the component.
 Here is the patch for streaming mode:
 https://github.com/dmitrimedvedev/camel/commit/7e4b5e9b206c7a969e6012d9afa40ac7024ee515
 https://github.com/dmitrimedvedev/camel/commit/f7063f760f5abf867fa2a6bbbd187220c941fa00



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CAMEL-7619) Rest DSL - Add support for json/xml bindings

2014-07-29 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-7619.


Resolution: Fixed

We have binding for xml/json now and its configurable to use any of the 
supported data formats of Camel.

 Rest DSL - Add support for json/xml bindings
 

 Key: CAMEL-7619
 URL: https://issues.apache.org/jira/browse/CAMEL-7619
 Project: Camel
  Issue Type: Sub-task
  Components: camel-core
Affects Versions: 2.14.0
Reporter: Claus Ibsen
Assignee: Claus Ibsen
 Fix For: 2.14.0


 see parent ticket
 So we can plugin json bindings such as jackson etc.
 And for xml, we can plugin jaxb etc.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CAMEL-7646) Remove cyclic package dependency in xmlsecurity component

2014-07-29 Thread Franz Forsthofer (JIRA)
Franz Forsthofer created CAMEL-7646:
---

 Summary: Remove cyclic package dependency in xmlsecurity component
 Key: CAMEL-7646
 URL: https://issues.apache.org/jira/browse/CAMEL-7646
 Project: Camel
  Issue Type: Bug
  Components: camel-xmlsecurity
Reporter: Franz Forsthofer
 Fix For: 2.14.0
 Attachments: 0001-xmlsecurity-cyclic-package-dependency-removed.patch

Code cleanup for xmlsecurity component: remove cyclic package dependency



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CAMEL-7644) Scala camel DSL creates numerous DefaultCamelContext instances

2014-07-29 Thread Bob Browning (JIRA)

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

Bob Browning updated CAMEL-7644:


Description: 
Since the camel DSL is invoked prior to 
`.addRoutesToCamelContext(CamelContext)` being invoked there is no camel 
context set on the delegate java RouteBuilder which causes it to create a new 
context when the first dsl method is invoked.

With the implementation of CAMEL-7327 introduced in 2.13.1 which stores created 
camel contexts in a set in `Container.Instance#CONTEXT`; this causes instances 
of DefaultCamelContext to be leaked, they are never removed from the static 
set. This is especially aparrent during unit testing.

The following test shows that an additional context is registered for the scala 
route builder as opposed to java. Verification of the leak can be requires 
profiler and capturing of heap after termination of the test case (in 
ParentRunner.java).

{code:java}
package org.apache.camel.scala.dsl.builder;

import com.google.common.collect.Sets;

import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.spi.Container;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.lang.ref.WeakReference;
import java.util.Set;

import static org.junit.Assert.assertEquals;

public class BuggyScalaTest implements Container {

  SetCamelContext managed = Sets.newHashSet();

  @Before
  public void setUp() throws Exception {
Container.Instance.set(this);
  }

  @After
  public void tearDown() throws Exception {
Container.Instance.set(null);
  }

  @Test
  public void testNameJava() throws Exception {
DefaultCamelContext defaultCamelContext = new DefaultCamelContext();
defaultCamelContext.addRoutes(new RouteBuilder() {
  @Override
  public void configure() throws Exception {
from(direct:start).log(a message);
  }
});
defaultCamelContext.start();

ProducerTemplate producerTemplate = 
defaultCamelContext.createProducerTemplate();
producerTemplate.start();
producerTemplate.sendBody(direct:start, );
producerTemplate.stop();
defaultCamelContext.stop();

assertEquals(1, managed.size());
  }

  @Test
  public void testNameScala() throws Exception {
DefaultCamelContext defaultCamelContext = new DefaultCamelContext();
defaultCamelContext.addRoutes(new SimpleRouteBuilder());
defaultCamelContext.start();

ProducerTemplate producerTemplate = 
defaultCamelContext.createProducerTemplate();
producerTemplate.start();
producerTemplate.sendBody(direct:start, );
producerTemplate.stop();
defaultCamelContext.stop();

assertEquals(1, managed.size()); // will equal 2
  }

  @Override
  public void manage(CamelContext camelContext) {
managed.add(camelContext);
  }
}
{code}

{code:java}
  package com.pressassociation.camel

  import org.apache.camel.scala.dsl.builder.RouteBuilder

  class SimpleRouteBuilder extends RouteBuilder {
from(direct:start).log(a message)
  }
{code}

  was:
Since the camel DSL is invoked prior to 
`.addRoutesToCamelContext(CamelContext)` being invoked there is no camel 
context set on the delegate java RouteBuilder which causes it to create a new 
context when the first dsl method is invoked.

With the implementation of CAMEL-7327 introduced in 2.13.1 which stores created 
camel contexts in a set in `Container.Instance#CONTEXT`; this causes instances 
of DefaultCamelContext to be leaked, they are never removed from the static 
set. This is especially aparrent during unit testing.


 Scala camel DSL creates numerous DefaultCamelContext instances
 --

 Key: CAMEL-7644
 URL: https://issues.apache.org/jira/browse/CAMEL-7644
 Project: Camel
  Issue Type: Bug
  Components: camel-scala
Affects Versions: 2.13.1
Reporter: Bob Browning
Assignee: Willem Jiang

 Since the camel DSL is invoked prior to 
 `.addRoutesToCamelContext(CamelContext)` being invoked there is no camel 
 context set on the delegate java RouteBuilder which causes it to create a new 
 context when the first dsl method is invoked.
 With the implementation of CAMEL-7327 introduced in 2.13.1 which stores 
 created camel contexts in a set in `Container.Instance#CONTEXT`; this causes 
 instances of DefaultCamelContext to be leaked, they are never removed from 
 the static set. This is especially aparrent during unit testing.
 The following test shows that an additional context is registered for the 
 scala route builder as opposed to java. Verification of the leak can be 
 requires profiler and capturing of heap after termination of the test case 
 (in ParentRunner.java).
 {code:java}
 package 

[jira] [Updated] (CAMEL-7644) Scala camel DSL creates numerous DefaultCamelContext instances

2014-07-29 Thread Bob Browning (JIRA)

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

Bob Browning updated CAMEL-7644:


Description: 
Since the camel DSL is invoked prior to 
`.addRoutesToCamelContext(CamelContext)` being invoked there is no camel 
context set on the delegate java RouteBuilder which causes it to create a new 
context when the first dsl method is invoked.

With the implementation of CAMEL-7327 introduced in 2.13.1 which stores created 
camel contexts in a set in `Container.Instance#CONTEXT`; this causes instances 
of DefaultCamelContext to be leaked, they are never removed from the static 
set. This is especially aparrent during unit testing.

The following test shows that an additional context is registered for the scala 
route builder as opposed to java. Verification of the leak can be requires 
profiler and capturing of heap after termination of the test case (in 
ParentRunner.java).

{code:java}
package org.apache.camel.scala.dsl.builder;

import com.google.common.collect.Sets;

import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.spi.Container;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.lang.ref.WeakReference;
import java.util.Set;

import static org.junit.Assert.assertEquals;

public class BuggyScalaTest implements Container {

  SetCamelContext managed = Sets.newHashSet();

  @Before
  public void setUp() throws Exception {
Container.Instance.set(this);
  }

  @After
  public void tearDown() throws Exception {
Container.Instance.set(null);
  }

  @Test
  public void testNameJava() throws Exception {
DefaultCamelContext defaultCamelContext = new DefaultCamelContext();
defaultCamelContext.addRoutes(new RouteBuilder() {
  @Override
  public void configure() throws Exception {
from(direct:start).log(a message);
  }
});
defaultCamelContext.start();

ProducerTemplate producerTemplate = 
defaultCamelContext.createProducerTemplate();
producerTemplate.start();
producerTemplate.sendBody(direct:start, );
producerTemplate.stop();
defaultCamelContext.stop();

assertEquals(1, managed.size());
  }

  @Test
  public void testNameScala() throws Exception {
DefaultCamelContext defaultCamelContext = new DefaultCamelContext();
defaultCamelContext.addRoutes(new SimpleRouteBuilder());
defaultCamelContext.start();

ProducerTemplate producerTemplate = 
defaultCamelContext.createProducerTemplate();
producerTemplate.start();
producerTemplate.sendBody(direct:start, );
producerTemplate.stop();
defaultCamelContext.stop();

assertEquals(1, managed.size()); // will equal 2
  }

  @Override
  public void manage(CamelContext camelContext) {
managed.add(camelContext);
  }
}
{code}

{code:java}
  package org.apache.camel.scala.dsl.builder

  import org.apache.camel.scala.dsl.builder.RouteBuilder

  class SimpleRouteBuilder extends RouteBuilder {
from(direct:start).log(a message)
  }
{code}

  was:
Since the camel DSL is invoked prior to 
`.addRoutesToCamelContext(CamelContext)` being invoked there is no camel 
context set on the delegate java RouteBuilder which causes it to create a new 
context when the first dsl method is invoked.

With the implementation of CAMEL-7327 introduced in 2.13.1 which stores created 
camel contexts in a set in `Container.Instance#CONTEXT`; this causes instances 
of DefaultCamelContext to be leaked, they are never removed from the static 
set. This is especially aparrent during unit testing.

The following test shows that an additional context is registered for the scala 
route builder as opposed to java. Verification of the leak can be requires 
profiler and capturing of heap after termination of the test case (in 
ParentRunner.java).

{code:java}
package org.apache.camel.scala.dsl.builder;

import com.google.common.collect.Sets;

import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.spi.Container;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.lang.ref.WeakReference;
import java.util.Set;

import static org.junit.Assert.assertEquals;

public class BuggyScalaTest implements Container {

  SetCamelContext managed = Sets.newHashSet();

  @Before
  public void setUp() throws Exception {
Container.Instance.set(this);
  }

  @After
  public void tearDown() throws Exception {
Container.Instance.set(null);
  }

  @Test
  public void testNameJava() throws Exception {
DefaultCamelContext defaultCamelContext = new DefaultCamelContext();
defaultCamelContext.addRoutes(new RouteBuilder() {
  @Override
  public void 

[jira] [Resolved] (CAMEL-7648) Using scheduler=blueprint does not work in OSGi

2014-07-29 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-7648.


Resolution: Fixed

 Using scheduler=blueprint does not work in OSGi
 ---

 Key: CAMEL-7648
 URL: https://issues.apache.org/jira/browse/CAMEL-7648
 Project: Camel
  Issue Type: Improvement
  Components: camel-blueprint, camel-core
Affects Versions: 2.13.2
Reporter: Claus Ibsen
Assignee: Claus Ibsen
 Fix For: 2.13.3, 2.14.0


 See CAMEL-7647
 Loading does not work in OSGi as the classloader is the end user bundle 
 context, and not from camel-core which is the one we need to load that class.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CAMEL-7647) camel-blueprint - Add logic to detect consumer scheduler for quartz2/spring

2014-07-29 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-7647.


   Resolution: Fixed
Fix Version/s: 2.13.3

 camel-blueprint - Add logic to detect consumer scheduler for quartz2/spring
 ---

 Key: CAMEL-7647
 URL: https://issues.apache.org/jira/browse/CAMEL-7647
 Project: Camel
  Issue Type: Improvement
  Components: camel-blueprint
Reporter: Claus Ibsen
Assignee: Claus Ibsen
Priority: Minor
 Fix For: 2.13.3, 2.14.0


 We have logic in camel-blueprint to detect which components/data formats etc 
 are in use.
 But if people define a route that uses a quartz2 scheduler
 http://camel.apache.org/polling-consumer.html
 Then we should detect this, so we can add a reference to the quartz2 
 component etc.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CAMEL-7646) Remove cyclic package dependency in xmlsecurity component

2014-07-29 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-7646.


Resolution: Fixed
  Assignee: Claus Ibsen

Thanks

 Remove cyclic package dependency in xmlsecurity component
 -

 Key: CAMEL-7646
 URL: https://issues.apache.org/jira/browse/CAMEL-7646
 Project: Camel
  Issue Type: Bug
  Components: camel-xmlsecurity
Reporter: Franz Forsthofer
Assignee: Claus Ibsen
 Fix For: 2.14.0

 Attachments: 0001-xmlsecurity-cyclic-package-dependency-removed.patch


 Code cleanup for xmlsecurity component: remove cyclic package dependency



--
This message was sent by Atlassian JIRA
(v6.2#6252)