camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubertus Willuhn (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9789) CamelContext.getEndpoint should not start endpoint if Camel is starting up
Date Tue, 05 Apr 2016 08:57:25 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15225917#comment-15225917
] 

Hubertus Willuhn commented on CAMEL-9789:
-----------------------------------------

*UPDATE*:

I tried out different things with the new Camel Version 2.17.0 and the new Camel-Spring-Boot-Starter
POM.
This leads to a invalid JavaConfig Classes on my side.

My config classes in Camel 2.16.0 looks like:

{code}
// my base config class
public abstract class BaseCamelConfig extends CamelConfiguration
{
    ... // Constants definitions

	@Override
	protected void setupCamelContext(CamelContext camelContext) throws Exception
	{
		super.setupCamelContext(camelContext);

		if(camelContext instanceof SpringCamelContext)
			((SpringCamelContext) camelContext).setName("Import");

		// currently no stream caching at all
		//this.setupStreamCache(camelContext);
		this.setupThreadPools(camelContext);
	}

       ... // functions
}
{code}

{code}
// project specific config class
@Configuration
@EnableAutoConfiguration
@ComponentScan ({"**.core", "**.camel", "**.imp"})
//@PropertySource("classpath:application.properties")
public class CamelConfig extends BaseCamelConfig
{
{code}

This works fine with Camel 2.16.1 but in Camel 2.17.0 the app crashes with above error.

Changing the configuration to this, works in both versions (mainly copied from [http://camel.apache.org/spring-boot.html]):

{code}
// my new base config class
public abstract class BaseCamelConfig
{
     ...

	@Bean
	public CamelContextConfiguration contextConfiguration()
	{
		return new CamelContextConfiguration()
		{
			@Override
			public void beforeApplicationStart(CamelContext camelContext)
			{
				if(camelContext instanceof SpringCamelContext)
					((SpringCamelContext) camelContext).setName("Import");

				setupThreadPools(camelContext);
			}
		};
	}
    ...
}
{code}

> CamelContext.getEndpoint should not start endpoint if Camel is starting up
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-9789
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9789
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.18.0
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Quartz2-Endpoint-Exception-td5780221.html



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

Mime
View raw message