servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r636633 - in /servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean: BeanComponent.java BeanXBeanDeployer.java
Date Thu, 13 Mar 2008 05:45:58 GMT
Author: ffang
Date: Wed Mar 12 22:45:57 2008
New Revision: 636633

URL: http://svn.apache.org/viewvc?rev=636633&view=rev
Log:
[SM-1271]apply patch on behalf of Callum Haig

Added:
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanXBeanDeployer.java
  (with props)
Modified:
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java

Modified: servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java?rev=636633&r1=636632&r2=636633&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java
(original)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanComponent.java
Wed Mar 12 22:45:57 2008
@@ -23,7 +23,9 @@
 
 import javax.jbi.servicedesc.ServiceEndpoint;
 
+import org.apache.servicemix.common.BaseServiceUnitManager;
 import org.apache.servicemix.common.DefaultComponent;
+import org.apache.servicemix.common.Deployer;
 import org.apache.servicemix.common.Endpoint;
 import org.apache.servicemix.jbi.util.IntrospectionSupport;
 import org.apache.servicemix.jbi.util.URISupport;
@@ -45,6 +47,14 @@
     private String[] searchPackages;
     private ApplicationContext applicationContext;
 
+    /* (non-Javadoc)
+     * @see org.servicemix.common.BaseComponent#createServiceUnitManager()
+     */
+    @Override
+    public BaseServiceUnitManager createServiceUnitManager() {
+        Deployer[] deployers = new Deployer[] {new BeanXBeanDeployer(this) };
+        return new BaseServiceUnitManager(this, deployers);
+    }
 
     public BeanEndpoint[] getEndpoints() {
         return endpoints;

Added: servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanXBeanDeployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanXBeanDeployer.java?rev=636633&view=auto
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanXBeanDeployer.java
(added)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanXBeanDeployer.java
Wed Mar 12 22:45:57 2008
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.bean;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.servicemix.common.xbean.BaseXBeanDeployer;
+import org.apache.servicemix.common.xbean.ParentBeanFactoryPostProcessor;
+
+public class BeanXBeanDeployer extends BaseXBeanDeployer {
+
+    public BeanXBeanDeployer(BeanComponent component) {
+        super(component, BeanEndpoint.class);
+    }
+
+    protected List getBeanFactoryPostProcessors(String serviceUnitRootPath) {
+        Map beans = new HashMap();
+        beans.put("context", component.getComponentContext());
+        List processors = new ArrayList(super.getBeanFactoryPostProcessors(serviceUnitRootPath));
+        processors.add(new ParentBeanFactoryPostProcessor(beans));
+        return processors;
+    }
+}

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanXBeanDeployer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx3/trunk/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanXBeanDeployer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message