camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulli...@apache.org
Subject svn commit: r1245658 - /camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/CdiCamelContext.java
Date Fri, 17 Feb 2012 17:15:47 GMT
Author: cmoulliard
Date: Fri Feb 17 17:15:46 2012
New Revision: 1245658

URL: http://svn.apache.org/viewvc?rev=1245658&view=rev
Log:
Simplify code

Modified:
    camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/CdiCamelContext.java

Modified: camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/CdiCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/CdiCamelContext.java?rev=1245658&r1=1245657&r2=1245658&view=diff
==============================================================================
--- camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/CdiCamelContext.java
(original)
+++ camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/CdiCamelContext.java
Fri Feb 17 17:15:46 2012
@@ -16,32 +16,21 @@
  */
 package org.apache.camel.component.cdi;
 
-import org.apache.camel.CamelContext;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.spi.Registry;
 
-import javax.enterprise.inject.Produces;
-import javax.inject.Named;
-
 /**
  * CDI Camel Context class
- * Register the CDIBeasnManager to lookup CDI Beans
- * Can be used to produce a SimpleDefaultContext
+ * Register the CDI BeanManager to lookup CDI Beans
  */
 public class CdiCamelContext extends DefaultCamelContext {
 
     private final Registry registry;
-    private final CamelContext context;
 
     public CdiCamelContext() {
         this.registry = new CdiBeanRegistry();
-        this.context = new DefaultCamelContext(registry);
-
+        super.setRegistry(registry);
     }
 
-    @Named("simpleContext") @Produces
-    public DefaultCamelContext createContext() throws Exception {
-        return (DefaultCamelContext) context;
-    }
 
 }
\ No newline at end of file



Mime
View raw message