incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnutt...@apache.org
Subject svn commit: r983994 - in /incubator/aries/trunk/application/application-runtime-framework-management: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/aries/ src/main/java/org/apache/aries/applicati...
Date Tue, 10 Aug 2010 13:29:45 GMT
Author: mnuttall
Date: Tue Aug 10 13:29:44 2010
New Revision: 983994

URL: http://svn.apache.org/viewvc?rev=983994&view=rev
Log:
ARIES-359: Isolated application support. From a patch by Chris Wilkinson. 

Added:
    incubator/aries/trunk/application/application-runtime-framework-management/pom.xml
    incubator/aries/trunk/application/application-runtime-framework-management/src/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/FrameworkConstants.java
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/resources/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/resources/OSGI-INF/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/resources/OSGI-INF/blueprint/
    incubator/aries/trunk/application/application-runtime-framework-management/src/main/resources/OSGI-INF/blueprint/bundle-framework-management.xml
Modified:
    incubator/aries/trunk/application/application-runtime-framework-management/   (props changed)

Propchange: incubator/aries/trunk/application/application-runtime-framework-management/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Aug 10 13:29:44 2010
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Added: incubator/aries/trunk/application/application-runtime-framework-management/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-runtime-framework-management/pom.xml?rev=983994&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-runtime-framework-management/pom.xml (added)
+++ incubator/aries/trunk/application/application-runtime-framework-management/pom.xml Tue
Aug 10 13:29:44 2010
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <artifactId>application</artifactId>
+        <groupId>org.apache.aries.application</groupId>
+        <version>0.2-incubating-SNAPSHOT</version>
+    </parent>
+    
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.aries.application.runtime.framework.management</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Aries Bundle Framework Manager provider</name>
+    <description>
+        A bundle framework manager implementation
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.application</groupId>
+            <artifactId>org.apache.aries.application.api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.application</groupId>
+            <artifactId>org.apache.aries.application.runtime.framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.application</groupId>
+            <artifactId>org.apache.aries.application.utils</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.testsupport</groupId>
+            <artifactId>org.apache.aries.testsupport.unit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+  
+</project>

Added: incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java?rev=983994&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
(added)
+++ incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/BundleFrameworkManagerImpl.java
Tue Aug 10 13:29:44 2010
@@ -0,0 +1,229 @@
+/*
+ * 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 WARRANTIESOR 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.aries.application.runtime.framework.management;
+
+import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
+import static org.apache.aries.application.utils.AppConstants.LOG_EXCEPTION;
+import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.aries.application.Content;
+import org.apache.aries.application.DeploymentMetadata;
+import org.apache.aries.application.management.AriesApplication;
+import org.apache.aries.application.management.BundleFramework;
+import org.apache.aries.application.management.BundleFrameworkFactory;
+import org.apache.aries.application.management.BundleFrameworkManager;
+import org.apache.aries.application.management.ContextException;
+import org.apache.aries.application.management.BundleRepository.BundleSuggestion;
+import org.apache.aries.application.utils.runtime.InstallUtils;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BundleFrameworkManagerImpl implements BundleFrameworkManager
+{
+  private static final Logger LOGGER = LoggerFactory.getLogger(BundleFrameworkManagerImpl.class);
+
+  BundleContext _ctx;
+  BundleFramework _sharedBundleFramework;
+  BundleFrameworkFactory _bundleFrameworkFactory;
+  Map<Bundle, BundleFramework> _frameworks = new HashMap<Bundle, BundleFramework>();
+
+  public void setBundleContext(BundleContext ctx)
+  {
+    _ctx = ctx;
+  }
+
+  public void setBundleFrameworkFactory(BundleFrameworkFactory bff)
+  {
+    _bundleFrameworkFactory = bff;
+  }
+
+  public void init()
+  {
+    try {
+      _sharedBundleFramework = SharedBundleFramework.getSharedBundleFramework(_ctx,
+          _bundleFrameworkFactory);
+      _frameworks.put(_sharedBundleFramework.getFrameworkBundle(), _sharedBundleFramework);
+    } catch (ContextException e) {
+      LOGGER.error(LOG_EXCEPTION, e);
+    }
+  }
+
+  public BundleFramework getBundleFramework(Bundle frameworkBundle)
+  {
+    return _frameworks.get(frameworkBundle);
+  }
+
+  public Bundle installIsolatedBundles(Collection<BundleSuggestion> bundlesToInstall,
+      AriesApplication app) throws BundleException
+  {
+    // We need to create a new isolated framework for this content and install
+    // the bundles to it
+    BundleFramework isolatedFramework = isolatedInstall(bundlesToInstall, app);
+
+    _frameworks.put(isolatedFramework.getFrameworkBundle(), isolatedFramework);
+
+    return isolatedFramework.getFrameworkBundle();
+  }
+
+  public Collection<Bundle> installSharedBundles(Collection<BundleSuggestion>
bundlesToInstall,
+      AriesApplication app) throws BundleException
+  {
+    Collection<Bundle> installedBundles = new ArrayList<Bundle>();
+
+    // Shared bundle : Install to the shared bundle framework
+    for (BundleSuggestion suggestion : bundlesToInstall)
+      installedBundles.add(_sharedBundleFramework.install(suggestion, app));
+
+    return installedBundles;
+  }
+
+  private BundleFramework isolatedInstall(
+      Collection<BundleSuggestion> bundlesToBeInstalled, 
+      AriesApplication app)
+      throws BundleException
+  {
+    LOGGER.debug(LOG_ENTRY, "isolatedInstall", new Object[] { bundlesToBeInstalled, app });
+
+    BundleFramework bundleFramework = null;
+    BundleContext parentCtx = _sharedBundleFramework.getIsolatedBundleContext();
+    DeploymentMetadata deploymentMF = app.getDeploymentMetadata();
+
+    /**
+     * Set up framework config properties
+     */
+    Properties frameworkConfig = new Properties();
+    frameworkConfig.put("osgi.console", "0");
+
+    String osgiFrameworkLocation = parentCtx.getProperty(FrameworkConstants.OSGI_FRAMEWORK);
+    if (osgiFrameworkLocation != null) {
+      frameworkConfig.put(FrameworkConstants.OSGI_FRAMEWORK, osgiFrameworkLocation);
+
+      // let's only set javax.transaction as system extra packages because of the split package.

+      // It is reasonable to do so because we always flow userTransaction service into child
framework anyway.
+      frameworkConfig.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, "javax.transaction;version=1.1.0");
+    }
+
+    /**
+     * Set up BundleManifest for the framework bundle
+     */
+    Properties frameworkBundleManifest = new Properties();
+    frameworkBundleManifest.put(Constants.BUNDLE_SYMBOLICNAME, deploymentMF.getApplicationSymbolicName());
+    frameworkBundleManifest.put(Constants.BUNDLE_VERSION, deploymentMF.getApplicationVersion().toString());
+
+    // Extract the import packages and remove anything we already have available in the current
framework
+    Collection<Content> imports = 
+      InstallUtils.calculateImports(
+          deploymentMF.getImportPackage(), 
+          InstallUtils.getExportPackages(_sharedBundleFramework.getIsolatedBundleContext()));
+    
+    if (imports != null && !imports.isEmpty())
+    {
+      String importString = imports.toString();
+      importString = importString.substring(1, importString.length()-1); // Remove [ and
] characters
+      frameworkBundleManifest.put(Constants.IMPORT_PACKAGE, importString);
+    }
+    
+    /**
+     * Install and start the new isolated bundle framework
+     */
+    bundleFramework = 
+      _bundleFrameworkFactory.createBundleFramework(
+          parentCtx, 
+          deploymentMF.getApplicationSymbolicName() + " " + deploymentMF.getApplicationVersion(),

+          frameworkConfig, 
+          frameworkBundleManifest);
+
+    // We should now have a bundleFramework
+    if (bundleFramework != null) {
+
+      boolean frameworkStarted = false;
+      try {
+        // Start the empty framework bundle
+        bundleFramework.init();
+        frameworkStarted = true;
+      } catch (BundleException e) {
+        // This may fail if the framework bundle has exports but we will retry later
+      }
+
+      /**
+       * Install the bundles into the new framework
+       */
+      
+      List<Bundle> installedBundles = new ArrayList<Bundle>();
+      BundleContext frameworkBundleContext = bundleFramework.getIsolatedBundleContext();
+      if (frameworkBundleContext != null) {
+        for (BundleSuggestion suggestion : bundlesToBeInstalled)
+          installedBundles.add(bundleFramework.install(suggestion, app));
+      }
+      
+      // Finally, start the whole lot
+      if (!frameworkStarted)
+        bundleFramework.init();
+    }
+
+    LOGGER.debug(LOG_EXIT, "isolatedInstall", bundleFramework);
+
+    return bundleFramework;
+  }
+
+  public BundleFramework getSharedBundleFramework()
+  {
+    return _sharedBundleFramework;
+  }
+
+  public void uninstallBundle(Bundle b) throws BundleException
+  {
+    BundleFramework framework = getBundleFramework(b);
+    if (framework != null) framework.close();
+  }
+
+  public void startBundle(Bundle b) throws BundleException
+  {
+    BundleFramework framework = getBundleFramework(b);
+    if (framework != null) // App Content
+    {
+      for (Bundle bundle : framework.getBundles())
+        framework.start(bundle);
+    } else // Shared bundle
+      _sharedBundleFramework.start(b);
+  }
+
+  public void stopBundle(Bundle b) throws BundleException
+  {
+    BundleFramework framework = getBundleFramework(b);
+    if (framework != null) // App Content
+    {
+      for (Bundle bundle : framework.getBundles())
+        framework.stop(bundle);
+    }
+    // Do not stop shared bundles
+  }
+}

Added: incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/FrameworkConstants.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/FrameworkConstants.java?rev=983994&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/FrameworkConstants.java
(added)
+++ incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/FrameworkConstants.java
Tue Aug 10 13:29:44 2010
@@ -0,0 +1,26 @@
+/*
+ * 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 WARRANTIESOR 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.aries.application.runtime.framework.management;
+
+public interface FrameworkConstants
+{
+  public static final String OSGI_FRAMEWORK = "osgi.framework"; 
+  
+}

Added: incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java?rev=983994&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java
(added)
+++ incubator/aries/trunk/application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java
Tue Aug 10 13:29:44 2010
@@ -0,0 +1,123 @@
+/*
+ * 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.aries.application.runtime.framework.management;
+
+import java.util.Properties;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.aries.application.management.BundleFramework;
+import org.apache.aries.application.management.BundleFrameworkFactory;
+import org.apache.aries.application.management.ContextException;
+
+import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
+import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
+import static org.apache.aries.application.utils.AppConstants.LOG_EXCEPTION;
+
+public class SharedBundleFramework
+{  
+  private static final Logger LOGGER = LoggerFactory.getLogger(SharedBundleFramework.class);
+  
+  private static BundleFramework sharedFramework;
+  private static final String SHARED_BUNDLE_FRAMEWORK = "shared.bundle.framework";
+
+  /**
+   * This is not the right way to make blueprint usable by applications, but it is all
+   * we have time to make work. I have locked down the version ranges so that this can
+   * be fixed properly in the future. NB The org.osgi.service.blueprint
+   * package is deliberately unversioned as it is not part of the osgi compendium.
+   */
+  private static final String RUNTIME_PACKAGES = "org.osgi.service.blueprint,org.osgi.service.blueprint.container;version=\"[1.0.0,1.0.1]\",org.osgi.service.blueprint.reflect;version=\"[1.0.0,1.0.1]\",org.apache.aries.transaction.exception;version=\"[0.1,1.0.0)\"";
+
+  /**
+   * create using any bundle context in EBA App framework
+   * as we want to create a child framework under EBA App framework
+   * @param bc
+   * @throws BundleException
+   * @throws InvalidSyntaxException
+   */
+  private static void createSharedBundleFramework(BundleContext bc,
+      BundleFrameworkFactory bundleFrameworkFactory) throws ContextException
+  {
+    LOGGER.debug(LOG_ENTRY, "createSharedBundleFramework", new Object[] {bc, bundleFrameworkFactory});
+
+    try {
+      // Set up the isolated framework
+      Properties frameworkConfig = new Properties();
+      frameworkConfig.put("osgi.console", "0");
+
+      String osgiFrameworkLocation = bc.getProperty(FrameworkConstants.OSGI_FRAMEWORK);
+      if (osgiFrameworkLocation != null) {
+
+        frameworkConfig.put(FrameworkConstants.OSGI_FRAMEWORK, osgiFrameworkLocation);
+        if (bc.getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA) != null)
+        {
+          frameworkConfig.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, bc
+            .getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA));
+        }
+      }
+      
+      Properties compositeManifest = new Properties();
+      compositeManifest.put(Constants.BUNDLE_SYMBOLICNAME, SHARED_BUNDLE_FRAMEWORK);
+
+      //Add blueprint so that it is available to applications.
+      compositeManifest.put(Constants.IMPORT_PACKAGE, RUNTIME_PACKAGES);
+
+      sharedFramework = bundleFrameworkFactory.createBundleFramework(bc, SHARED_BUNDLE_FRAMEWORK,
+          frameworkConfig, compositeManifest);
+
+      sharedFramework.init();
+      
+    } catch (BundleException e) {
+      LOGGER.debug(LOG_EXIT, "createSharedBundleFramework", e);
+      throw new ContextException(
+          "Unable to create or start the shared framework composite bundle " + sharedFramework,
e);
+    }
+
+    LOGGER.debug(LOG_EXIT, "createSharedBundleFramework");
+  }
+
+  /**
+   * pass in the EBA framework bundle context and get the shared bundle
+   * framework associated with the bundle context
+   * @param bc      any bundle context in EBA framework
+   * @return        the composite bundle associated with the shared bundle framework
+   * @throws BundleException
+   * @throws InvalidSyntaxException
+   * @throws SharedFrameworkCreationException
+   */
+  public synchronized static BundleFramework getSharedBundleFramework(BundleContext bc,
+      BundleFrameworkFactory bff) throws ContextException
+  {
+    LOGGER.debug(LOG_ENTRY, "getSharedBundleFramework", new Object[] {bc, bff});
+    
+    if (sharedFramework == null) {
+      createSharedBundleFramework(bc, bff);
+    }
+    
+    LOGGER.debug(LOG_EXIT, "getSharedBundleFramework", sharedFramework);
+
+    return sharedFramework;
+  }
+}

Added: incubator/aries/trunk/application/application-runtime-framework-management/src/main/resources/OSGI-INF/blueprint/bundle-framework-management.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-runtime-framework-management/src/main/resources/OSGI-INF/blueprint/bundle-framework-management.xml?rev=983994&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-runtime-framework-management/src/main/resources/OSGI-INF/blueprint/bundle-framework-management.xml
(added)
+++ incubator/aries/trunk/application/application-runtime-framework-management/src/main/resources/OSGI-INF/blueprint/bundle-framework-management.xml
Tue Aug 10 13:29:44 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+  
+  <bean id="equinox-bundle-framework-manager" class="org.apache.aries.application.runtime.framework.management.BundleFrameworkManagerImpl"
init-method="init">
+      <property name="bundleFrameworkFactory" ref="bundle-framework-factory"/>
+      <property name="bundleContext" ref="blueprintBundleContext"/>
+  </bean>
+
+  <service interface="org.apache.aries.application.management.BundleFrameworkManager"
+            ref="equinox-bundle-framework-manager"
+            ranking="-1"/>
+            
+  <reference id="bundle-framework-factory" interface="org.apache.aries.application.management.BundleFrameworkFactory"/>
+
+</blueprint>



Mime
View raw message