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

Claus Ibsen updated CAMEL-4208:
-------------------------------

    Description: 
Camel context stop throwing exception while trying to shut down on google app 
engine via        ctx.stop();

Test case:
Start apache camel on Google app engine via start method as follows upon 
stopping context, exception occurs:
-----------------------------------------------
{code}
        public void stop() throws Exception {
                ctx.stop();
        }

        public void start() throws Exception {
                ctx = new GaeDefaultCamelContext();
                ctx.disableJMX();
                MyRegistry r = new MyRegistry();/*myregistry code is below*/
                r.init();
                ctx.setRegistry(r);
                tmpl = ctx.createProducerTemplate();
                ctx.start();
        }

        public static class MyRegistry extends SimpleRegistry{
                public void init(){
                        put("direct",new DirectComponent());
                        put("browse", new BrowseComponent());
                        put("class", new ClassComponent());
                        put("bean", new BeanComponent());
                        put("dataset", new DataSetComponent());
                        put("mock", new MockComponent());
                        put("language", new LanguageComponent());
                        put("ref", new RefComponent());
                        put("vm", new VmComponent());
                        put("log", new LogComponent());
                        put("properties", new PropertiesComponent());
                        
                        
                }

{code}
------------------------------------------

{code}
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:393)
        at 
java.security.AccessController.checkPermission(AccessController.java:553)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
        at 
com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
        at 
java.util.concurrent.ThreadPoolExecutor.checkShutdownAccess(ThreadPoolExecutor.java:711)
        at 
java.util.concurrent.ThreadPoolExecutor.shutdownNow(ThreadPoolExecutor.java:1379)
        at 
java.util.concurrent.Executors$DelegatedExecutorService.shutdownNow(Executors.java:631)
        at 
org.apache.camel.impl.DefaultExecutorServiceStrategy.shutdownNow(DefaultExecutorServiceStrategy.java:352)
        at 
org.apache.camel.impl.DefaultShutdownStrategy.doShutdown(DefaultShutdownStrategy.java:304)
        at 
org.apache.camel.impl.ServiceSupport.shutdown(ServiceSupport.java:175)
        at 
org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:174)
        at 
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1571)
        at 
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1593)
        at 
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1581)
        at 
org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:1484)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:100)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:124)
{code}

  was:
Camel context stop throwing exception while trying to shut down on google app 
engine via        ctx.stop();

Test case:
Start apache camel on Google app engine via start method as follows upon 
stopping context, exception occurs:
-----------------------------------------------
        public void stop() throws Exception {
                ctx.stop();
        }

        public void start() throws Exception {
                ctx = new GaeDefaultCamelContext();
                ctx.disableJMX();
                MyRegistry r = new MyRegistry();/*myregistry code is below*/
                r.init();
                ctx.setRegistry(r);
                tmpl = ctx.createProducerTemplate();
                ctx.start();
        }

        public static class MyRegistry extends SimpleRegistry{
                public void init(){
                        put("direct",new DirectComponent());
                        put("browse", new BrowseComponent());
                        put("class", new ClassComponent());
                        put("bean", new BeanComponent());
                        put("dataset", new DataSetComponent());
                        put("mock", new MockComponent());
                        put("language", new LanguageComponent());
                        put("ref", new RefComponent());
                        put("vm", new VmComponent());
                        put("log", new LogComponent());
                        put("properties", new PropertiesComponent());
                        
                        
                }
------------------------------------------
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:393)
        at 
java.security.AccessController.checkPermission(AccessController.java:553)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
        at 
com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
        at 
java.util.concurrent.ThreadPoolExecutor.checkShutdownAccess(ThreadPoolExecutor.java:711)
        at 
java.util.concurrent.ThreadPoolExecutor.shutdownNow(ThreadPoolExecutor.java:1379)
        at 
java.util.concurrent.Executors$DelegatedExecutorService.shutdownNow(Executors.java:631)
        at 
org.apache.camel.impl.DefaultExecutorServiceStrategy.shutdownNow(DefaultExecutorServiceStrategy.java:352)
        at 
org.apache.camel.impl.DefaultShutdownStrategy.doShutdown(DefaultShutdownStrategy.java:304)
        at 
org.apache.camel.impl.ServiceSupport.shutdown(ServiceSupport.java:175)
        at 
org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:174)
        at 
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1571)
        at 
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1593)
        at 
org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1581)
        at 
org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:1484)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:100)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:124)



> Camel context (GaeDefaultCamelContext) stop method call throwing exception 
> while trying to shut down on google app engine via         ctx.stop(); 
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4208
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4208
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-gae
>    Affects Versions: 2.7.2
>         Environment: Google app engine sdk 1.5.1, Camel core - 2.7.2, 
> came-gae - 2.7.2
>            Reporter: sumit
>
> Camel context stop throwing exception while trying to shut down on google app 
> engine via      ctx.stop();
> Test case:
> Start apache camel on Google app engine via start method as follows upon 
> stopping context, exception occurs:
> -----------------------------------------------
> {code}
>       public void stop() throws Exception {
>               ctx.stop();
>       }
>       public void start() throws Exception {
>               ctx = new GaeDefaultCamelContext();
>               ctx.disableJMX();
>               MyRegistry r = new MyRegistry();/*myregistry code is below*/
>               r.init();
>               ctx.setRegistry(r);
>               tmpl = ctx.createProducerTemplate();
>               ctx.start();
>       }
>       public static class MyRegistry extends SimpleRegistry{
>               public void init(){
>                       put("direct",new DirectComponent());
>                       put("browse", new BrowseComponent());
>                       put("class", new ClassComponent());
>                       put("bean", new BeanComponent());
>                       put("dataset", new DataSetComponent());
>                       put("mock", new MockComponent());
>                       put("language", new LanguageComponent());
>                       put("ref", new RefComponent());
>                       put("vm", new VmComponent());
>                       put("log", new LogComponent());
>                       put("properties", new PropertiesComponent());
>                       
>                       
>               }
> {code}
> ------------------------------------------
> {code}
> at 
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:393)
>       at 
> java.security.AccessController.checkPermission(AccessController.java:553)
>       at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>       at 
> com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
>       at 
> java.util.concurrent.ThreadPoolExecutor.checkShutdownAccess(ThreadPoolExecutor.java:711)
>       at 
> java.util.concurrent.ThreadPoolExecutor.shutdownNow(ThreadPoolExecutor.java:1379)
>       at 
> java.util.concurrent.Executors$DelegatedExecutorService.shutdownNow(Executors.java:631)
>       at 
> org.apache.camel.impl.DefaultExecutorServiceStrategy.shutdownNow(DefaultExecutorServiceStrategy.java:352)
>       at 
> org.apache.camel.impl.DefaultShutdownStrategy.doShutdown(DefaultShutdownStrategy.java:304)
>       at 
> org.apache.camel.impl.ServiceSupport.shutdown(ServiceSupport.java:175)
>       at 
> org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:174)
>       at 
> org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1571)
>       at 
> org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1593)
>       at 
> org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1581)
>       at 
> org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:1484)
>       at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:100)
>       at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:124)
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to