camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1342282 - in /camel/branches/camel-2.9.x: ./ components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/ components/camel-core-xml/src/main/java/org/apache/camel/core/xml/ components/camel-core-xml/src/main/java/org/apache...
Date Thu, 24 May 2012 14:17:26 GMT
Author: davsclaus
Date: Thu May 24 14:17:25 2012
New Revision: 1342282

URL: http://svn.apache.org/viewvc?rev=1342282&view=rev
Log:
CAMEL-5299: Injecting blueprint container for blueprint namespace for the SSL stuff.

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
    camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java
    camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelThreadPoolFactoryBean.java
    camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java
    camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java
    camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-18.xml

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1342278

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java?rev=1342282&r1=1342281&r2=1342282&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
Thu May 24 14:17:25 2012
@@ -321,6 +321,9 @@ public class CamelNamespaceHandler imple
         factory2.setId(".camelBlueprint.factory." + id);
         factory2.setFactoryComponent(factory);
         factory2.setFactoryMethod("call");
+        factory2.setInitMethod("afterPropertiesSet");
+        factory2.setDestroyMethod("destroy");
+        factory2.addProperty("blueprintContainer", createRef(context, "blueprintContainer"));
 
         MutableBeanMetadata ctx = context.createMetadata(MutableBeanMetadata.class);
         ctx.setId(id);
@@ -355,6 +358,9 @@ public class CamelNamespaceHandler imple
         factory2.setId(".camelBlueprint.factory." + id);
         factory2.setFactoryComponent(factory);
         factory2.setFactoryMethod("call");
+        factory2.setInitMethod("afterPropertiesSet");
+        factory2.setDestroyMethod("destroy");
+        factory2.addProperty("blueprintContainer", createRef(context, "blueprintContainer"));
 
         MutableBeanMetadata ctx = context.createMetadata(MutableBeanMetadata.class);
         ctx.setId(id);
@@ -389,6 +395,9 @@ public class CamelNamespaceHandler imple
         factory2.setId(".camelBlueprint.factory." + id);
         factory2.setFactoryComponent(factory);
         factory2.setFactoryMethod("call");
+        factory2.setInitMethod("afterPropertiesSet");
+        factory2.setDestroyMethod("destroy");
+        factory2.addProperty("blueprintContainer", createRef(context, "blueprintContainer"));
 
         MutableBeanMetadata ctx = context.createMetadata(MutableBeanMetadata.class);
         ctx.setId(id);
@@ -608,6 +617,7 @@ public class CamelNamespaceHandler imple
         }
 
         public Object afterInit(Object bean, String beanName, BeanCreator beanCreator, BeanMetadata
beanMetadata) {
+            // we cannot inject CamelContextAware beans as the CamelContext may not be ready
             return bean;
         }
 

Modified: camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java?rev=1342282&r1=1342281&r2=1342282&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java
Thu May 24 14:17:25 2012
@@ -137,8 +137,6 @@ public abstract class AbstractCamelRedel
         return answer;
     }
 
-    protected abstract CamelContext getCamelContextWithId(String camelContextId);
-
     public Class<RedeliveryPolicy> getObjectType() {
         return RedeliveryPolicy.class;
     }

Modified: camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelThreadPoolFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelThreadPoolFactoryBean.java?rev=1342282&r1=1342281&r2=1342282&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelThreadPoolFactoryBean.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelThreadPoolFactoryBean.java
Thu May 24 14:17:25 2012
@@ -86,8 +86,6 @@ public abstract class AbstractCamelThrea
         return answer;
     }
 
-    protected abstract CamelContext getCamelContextWithId(String camelContextId);
-
     public Class<ExecutorService> getObjectType() {
         return ExecutorService.class;
     }

Modified: camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java?rev=1342282&r1=1342281&r2=1342282&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java
Thu May 24 14:17:25 2012
@@ -58,7 +58,8 @@ public abstract class AbstractBaseSSLCon
     
     private T createInstanceInternal() throws Exception {
         T newInstance = createInstance();
-        
+        newInstance.setCamelContext(getCamelContext());
+
         if (cipherSuites != null) {
             CipherSuitesParameters cipherSuitesInstance = new CipherSuitesParameters();
             cipherSuitesInstance.getCipherSuite().addAll(cipherSuites.getCipherSuite());
@@ -82,7 +83,7 @@ public abstract class AbstractBaseSSLCon
         if (sessionTimeout != null) {
             newInstance.setSessionTimeout(sessionTimeout);
         }
-        
+
         return newInstance;
     }
     

Modified: camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java?rev=1342282&r1=1342281&r2=1342282&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java
(original)
+++ camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java
Thu May 24 14:17:25 2012
@@ -36,10 +36,10 @@ import static org.ops4j.pax.swissbox.tin
  * @version 
  */
 @RunWith(JUnit4TestRunner.class)
-@Ignore("Fix me")
 public class CamelBlueprint8Test extends OSGiBlueprintTestSupport {
 
     @Test
+    @Ignore("Fix me")
     public void testEndpointInjection() throws Exception {
         getInstalledBundle("CamelBlueprintTestBundle10").start();
         BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle10)",
10000);
@@ -91,12 +91,12 @@ public class CamelBlueprint8Test extends
         Option[] options = combine(
                 getDefaultCamelKarafOptions(),
 
-                bundle(newBundle()
-                        .add("OSGI-INF/blueprint/test.xml", OSGiBlueprintTestSupport.class.getResource("blueprint-10.xml"))
-                        .add(TestProducer.class)
-                        .set(Constants.BUNDLE_SYMBOLICNAME, "CamelBlueprintTestBundle10")
-                        .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
-                        .build()).noStart(),
+//                bundle(newBundle()
+//                        .add("OSGI-INF/blueprint/test.xml", OSGiBlueprintTestSupport.class.getResource("blueprint-10.xml"))
+//                        .add(TestProducer.class)
+//                        .set(Constants.BUNDLE_SYMBOLICNAME, "CamelBlueprintTestBundle10")
+//                        .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
+//                        .build()).noStart(),
 
 
                 bundle(newBundle()

Modified: camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-18.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-18.xml?rev=1342282&r1=1342281&r2=1342282&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-18.xml
(original)
+++ camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-18.xml
Thu May 24 14:17:25 2012
@@ -23,7 +23,7 @@
       <argument ref="sslContextParameters"/>
     </bean>
     
-    <sslContextParameters xmlns="http://camel.apache.org/schema/blueprint"
+    <sslContextParameters xmlns="http://camel.apache.org/schema/blueprint" camelContextId="test"
       id="sslContextParameters"
       sessionTimeout="1"
       secureSocketProtocol="TLS">



Mime
View raw message