JBoss-OSGI SVN: r89472 - projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-27 11:33:29 -0400 (Wed, 27 May 2009)
New Revision: 89472
Modified:
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java
Log:
Process old before new
Modified: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java 2009-05-27 15:31:37 UTC (rev 89471)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java 2009-05-27 15:33:29 UTC (rev 89472)
@@ -61,28 +61,13 @@
{
List<BundleInfo> currScan = Arrays.asList(scanner.getBundles());
+ processOldDeployments(currScan);
+
processNewDeployments(currScan);
- processOldDeployments(currScan);
lastScan = currScan;
}
- static Bundle getInstalledBundle(BundleContext context, String symbolicName)
- {
- Bundle bundle = null;
-
- for (Bundle aux : context.getBundles())
- {
- if (aux.getSymbolicName().equals(symbolicName))
- {
- bundle = aux;
- break;
- }
- }
-
- return bundle;
- }
-
private void processNewDeployments(List<BundleInfo> currScan)
{
List<BundleInfo> diff = new ArrayList<BundleInfo>();
@@ -150,4 +135,20 @@
}
}
}
+
+ static Bundle getInstalledBundle(BundleContext context, String symbolicName)
+ {
+ Bundle bundle = null;
+
+ for (Bundle aux : context.getBundles())
+ {
+ if (aux.getSymbolicName().equals(symbolicName))
+ {
+ bundle = aux;
+ break;
+ }
+ }
+
+ return bundle;
+ }
}
\ No newline at end of file
16 years, 7 months
JBoss-OSGI SVN: r89471 - in projects/jboss-osgi/trunk: bundles and 6 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-27 11:31:37 -0400 (Wed, 27 May 2009)
New Revision: 89471
Added:
projects/jboss-osgi/trunk/bundles/hotdeploy/
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/HotDeployActivator.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java
Removed:
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/logging/
Modified:
projects/jboss-osgi/trunk/blueprint/pom.xml
projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml
projects/jboss-osgi/trunk/bundles/jndi/pom.xml
projects/jboss-osgi/trunk/bundles/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Add hot deployment
Modified: projects/jboss-osgi/trunk/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/pom.xml 2009-05-27 15:27:22 UTC (rev 89470)
+++ projects/jboss-osgi/trunk/blueprint/pom.xml 2009-05-27 15:31:37 UTC (rev 89471)
@@ -50,7 +50,7 @@
<!--
Name: framework-knopflerfish
- Descr: Setup for Equinox framework integration testing
+ Descr: Setup for Knopflerfish framework integration testing
-->
<profile>
<id>framework-knopflerfish</id>
Copied: projects/jboss-osgi/trunk/bundles/hotdeploy (from rev 89459, projects/jboss-osgi/trunk/bundles/logging)
Modified: projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/logging/pom.xml 2009-05-27 09:46:37 UTC (rev 89459)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml 2009-05-27 15:31:37 UTC (rev 89471)
@@ -2,13 +2,13 @@
<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">
<modelVersion>4.0.0</modelVersion>
- <name>JBossOSGi Bundles - Logging</name>
+ <name>JBossOSGi Bundles - HotDeployment</name>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-logging</artifactId>
+ <artifactId>jboss-osgi-hotdeploy</artifactId>
<packaging>bundle</packaging>
- <version>1.0.0.Beta2</version>
+ <version>1.0.0</version>
<!-- Parent -->
<parent>
@@ -19,9 +19,11 @@
<!-- Dependencies -->
<dependencies>
+
+ <!-- Bundle dependencies -->
<dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
<scope>provided</scope>
</dependency>
@@ -47,10 +49,13 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.service.logging.LoggingActivator</Bundle-Activator>
- <Private-Package>org.jboss.osgi.service.logging</Private-Package>
+ <Bundle-Activator>org.jboss.osgi.service.hotdeploy.internal.HotDeployActivator</Bundle-Activator>
+ <Private-Package>org.jboss.osgi.service.hotdeploy.internal</Private-Package>
+ <Export-Package>
+ org.jboss.osgi.service.hotdeploy;version=${version}
+ </Export-Package>
<Import-Package>
- org.jboss.logging,
+ org.jboss.osgi.common.log,
org.osgi.framework,
org.osgi.service.log,
org.osgi.util.tracker
Added: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java 2009-05-27 15:31:37 UTC (rev 89471)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.service.hotdeploy;
+
+import java.net.URL;
+
+import org.osgi.framework.Bundle;
+
+//$Id$
+
+/**
+ * An abstraction of a bundle in the scan folder
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 27-May-2009
+ */
+public class BundleInfo
+{
+ public enum State
+ {
+ NEW, INSTALLED, ACTIVE, UNINSTALLED
+ };
+
+ private URL location;
+ private String symbolicName;
+ private State state;
+
+ public BundleInfo(URL bundleURL, String symbolicName, Bundle bundle)
+ {
+ this.symbolicName = symbolicName;
+ this.location = bundleURL;
+ this.state = State.NEW;
+
+ if (bundle != null)
+ {
+ int bundleState = bundle.getState();
+ switch (bundleState)
+ {
+ case Bundle.INSTALLED:
+ case Bundle.RESOLVED:
+ case Bundle.STARTING:
+ case Bundle.STOPPING:
+ state = State.INSTALLED;
+ break;
+
+ case Bundle.ACTIVE:
+ state = State.ACTIVE;
+ break;
+
+ case Bundle.UNINSTALLED:
+ state = State.UNINSTALLED;
+ break;
+ }
+ }
+ }
+
+ public URL getLocation()
+ {
+ return location;
+ }
+
+ public State getState()
+ {
+ return state;
+ }
+
+ public String getSymbolicName()
+ {
+ return symbolicName;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if ((obj instanceof BundleInfo) == false)
+ return false;
+
+ BundleInfo other = (BundleInfo)obj;
+ return symbolicName.equals(other.symbolicName);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return toString().hashCode();
+ }
+
+ public String toString()
+ {
+ return "[" + state + "," + symbolicName + "]";
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java 2009-05-27 15:31:37 UTC (rev 89471)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.service.hotdeploy;
+
+//$Id$
+
+import java.net.URL;
+
+/**
+ * The DeploymentScanner service
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 27-May-2009
+ */
+public interface DeploymentScanner
+{
+ /**
+ * The property that names the scan location: org.jboss.osgi.hotdeploy.scan
+ */
+ String PROPERTY_SCAN_LOCATION = "org.jboss.osgi.hotdeploy.scan";
+
+ /**
+ * The property to defines the scan interval: org.jboss.osgi.hotdeploy.interval
+ */
+ String PROPERTY_SCAN_INTERVAL = "org.jboss.osgi.hotdeploy.interval";
+
+ /**
+ * Get the scan location URL.
+ *
+ * This is can be specified by setting the {@link PROPERTY_SCAN_LOCATION} property.
+ */
+ URL getScanLocation();
+
+ /**
+ * The number of scans since the service started
+ */
+ long getScanCount();
+
+ /**
+ * The number of milliseconds between scans
+ * Defaults to 2000ms
+ */
+ long getScanInterval();
+
+ /**
+ * Run a directory scan
+ */
+ void scan();
+
+ /**
+ * Returns the array of bundles currently known to the deployemtn scanner.
+ */
+ BundleInfo[] getBundles();
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java 2009-05-27 15:31:37 UTC (rev 89471)
@@ -0,0 +1,153 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.service.hotdeploy.internal;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.service.hotdeploy.BundleInfo;
+import org.jboss.osgi.service.hotdeploy.DeploymentScanner;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.service.log.LogService;
+
+/**
+ * A DeploymentScanner helper
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 27-May-2009
+ */
+public class DeploymentScannerHelper
+{
+ private LogServiceTracker log;
+ private BundleContext context;
+ private DeploymentScanner scanner;
+ private List<BundleInfo> lastScan;
+
+ public DeploymentScannerHelper(BundleContext context, DeploymentScanner scanner)
+ {
+ this.log = new LogServiceTracker(context);
+ this.context = context;
+ this.scanner = scanner;
+
+ this.lastScan = Arrays.asList(scanner.getBundles());
+ }
+
+ public void scan()
+ {
+ List<BundleInfo> currScan = Arrays.asList(scanner.getBundles());
+
+ processNewDeployments(currScan);
+ processOldDeployments(currScan);
+
+ lastScan = currScan;
+ }
+
+ static Bundle getInstalledBundle(BundleContext context, String symbolicName)
+ {
+ Bundle bundle = null;
+
+ for (Bundle aux : context.getBundles())
+ {
+ if (aux.getSymbolicName().equals(symbolicName))
+ {
+ bundle = aux;
+ break;
+ }
+ }
+
+ return bundle;
+ }
+
+ private void processNewDeployments(List<BundleInfo> currScan)
+ {
+ List<BundleInfo> diff = new ArrayList<BundleInfo>();
+
+ // Detect NEW bundles that are not in the last scan
+ for (BundleInfo info : currScan)
+ {
+ if (lastScan.contains(info) == false)
+ diff.add(info);
+ }
+
+ for (BundleInfo info : diff)
+ {
+ if (info.getState() == BundleInfo.State.NEW)
+ {
+ Bundle bundle = null;
+ try
+ {
+ log.log(LogService.LOG_INFO, "Install: " + info.getSymbolicName());
+ bundle = context.installBundle(info.getLocation().toExternalForm());
+ }
+ catch (BundleException ex)
+ {
+ log.log(LogService.LOG_ERROR, "Cannot install bundle", ex);
+ }
+
+ if (bundle != null)
+ {
+ try
+ {
+ log.log(LogService.LOG_INFO, "Start: " + info.getSymbolicName());
+ bundle.start();
+ }
+ catch (BundleException ex)
+ {
+ log.log(LogService.LOG_ERROR, "Cannot start bundle", ex);
+ }
+ }
+ }
+ }
+ }
+
+ private void processOldDeployments(List<BundleInfo> currScan)
+ {
+ List<BundleInfo> diff = new ArrayList<BundleInfo>();
+
+ // Detect OLD bundles that are not in the current scan
+ for (BundleInfo info : lastScan)
+ {
+ if (currScan.contains(info) == false)
+ diff.add(info);
+ }
+
+ for (BundleInfo info : diff)
+ {
+ Bundle bundle = getInstalledBundle(context, info.getSymbolicName());
+ try
+ {
+ log.log(LogService.LOG_INFO, "Uninstall: " + info.getSymbolicName());
+ bundle.uninstall();
+ }
+ catch (BundleException ex)
+ {
+ log.log(LogService.LOG_ERROR, "Cannot uninstall bundle", ex);
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java 2009-05-27 15:31:37 UTC (rev 89471)
@@ -0,0 +1,195 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.service.hotdeploy.internal;
+
+//$Id$
+
+import static org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+import org.jboss.osgi.service.hotdeploy.BundleInfo;
+import org.jboss.osgi.service.hotdeploy.DeploymentScanner;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The DeploymentScanner service
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 27-May-2009
+ */
+public class DeploymentScannerImpl implements DeploymentScanner
+{
+ private BundleContext context;
+
+ private long scanInterval;
+ private File scanLocation;
+ private long scanCount;
+
+ private ScannerThread scannerThread;
+ private DeploymentScannerHelper scanHelper;
+
+ public DeploymentScannerImpl(BundleContext context)
+ {
+ this.context = context;
+
+ initScanner(context);
+ }
+
+ public void start()
+ {
+ scanHelper = new DeploymentScannerHelper(context, this);
+ scannerThread = new ScannerThread(context, this);
+ scannerThread.start();
+ }
+
+ public void stop()
+ {
+ if (scannerThread != null)
+ {
+ scannerThread.stopScan();
+ scannerThread = null;
+ }
+ }
+
+ public void scan()
+ {
+ scanHelper.scan();
+ scanCount++;
+ }
+
+ public BundleInfo[] getBundles()
+ {
+ List<BundleInfo> bundles = new ArrayList<BundleInfo>();
+ for (File file : scanLocation.listFiles())
+ {
+ String symbolicName = getSymbolicName(file);
+ Bundle bundle = DeploymentScannerHelper.getInstalledBundle(context, symbolicName);
+ BundleInfo bundleInfo = new BundleInfo(toURL(file), symbolicName, bundle);
+ bundles.add(bundleInfo);
+ }
+ BundleInfo[] arr = new BundleInfo[bundles.size()];
+ return bundles.toArray(arr);
+ }
+
+ public long getScanCount()
+ {
+ return scanCount;
+ }
+
+ public long getScanInterval()
+ {
+ return scanInterval;
+ }
+
+ public URL getScanLocation()
+ {
+ return toURL(scanLocation.getAbsolutePath());
+ }
+
+ private void initScanner(BundleContext context)
+ {
+ scanInterval = 2000;
+
+ String interval = context.getProperty(PROPERTY_SCAN_INTERVAL);
+ if (interval != null)
+ scanInterval = new Long(interval);
+
+ String scanLoc = context.getProperty(PROPERTY_SCAN_LOCATION);
+ if (scanLoc == null)
+ throw new IllegalStateException("Cannot obtain value for property: '" + PROPERTY_SCAN_LOCATION + "'");
+
+ // Check if the prop is already an URL
+ try
+ {
+ URL scanURL = new URL(scanLoc);
+ scanLocation = new File(scanURL.getPath());
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Check if the prop is an existing dir
+ File scanFile = new File(scanLoc);
+ if (scanFile.exists() == false)
+ throw new IllegalStateException("Scan location does not exist: " + scanLoc);
+
+ // Check if the scan location is a directory
+ if (scanFile.isDirectory() == false)
+ throw new IllegalStateException("Scan location is not a directory: " + scanLoc);
+
+ scanLocation = scanFile;
+ }
+
+ private String getSymbolicName(File file)
+ {
+ try
+ {
+ JarFile jarFile = new JarFile(file);
+ Manifest manifest = jarFile.getManifest();
+ Attributes attribs = manifest.getMainAttributes();
+ String symbolicName = attribs.getValue(BUNDLE_SYMBOLICNAME);
+ if (symbolicName == null)
+ throw new IllegalStateException("Cannot obtain '" + BUNDLE_SYMBOLICNAME + "' from: " + file);
+
+ return symbolicName;
+ }
+ catch (IOException ex)
+ {
+ throw new IllegalStateException("Cannot obtain '" + BUNDLE_SYMBOLICNAME + "' from: " + file, ex);
+ }
+ }
+
+ private URL toURL(File file)
+ {
+ try
+ {
+ return file.toURL();
+ }
+ catch (MalformedURLException ex)
+ {
+ throw new IllegalArgumentException("Invalid URL: " + file);
+ }
+ }
+
+ private URL toURL(String urlStr)
+ {
+ try
+ {
+ return new URL(urlStr);
+ }
+ catch (MalformedURLException ex)
+ {
+ throw new IllegalArgumentException("Invalid URL: " + urlStr);
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/HotDeployActivator.java (from rev 89459, projects/jboss-osgi/trunk/bundles/logging/src/main/java/org/jboss/osgi/service/logging/LoggingActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/HotDeployActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/HotDeployActivator.java 2009-05-27 15:31:37 UTC (rev 89471)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.service.hotdeploy.internal;
+
+//$Id$
+
+import org.jboss.osgi.service.hotdeploy.DeploymentScanner;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The {@link DeploymentScanner} service activator
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 27-May-2009
+ */
+public class HotDeployActivator implements BundleActivator
+{
+ private DeploymentScannerImpl service;
+
+ public void start(BundleContext context)
+ {
+ service = new DeploymentScannerImpl(context);
+ context.registerService(DeploymentScanner.class.getName(), service, null);
+
+ service.start();
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (service != null)
+ {
+ service.stop();
+ service = null;
+ }
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java 2009-05-27 15:31:37 UTC (rev 89471)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.service.hotdeploy.internal;
+
+//$Id$
+
+import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.service.hotdeploy.DeploymentScanner;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+
+/**
+ * A simple scanner thread
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 27-May-2009
+ */
+public class ScannerThread extends Thread
+{
+ private LogService log;
+
+ private DeploymentScanner scanner;
+ private boolean active = true;
+
+ public ScannerThread(BundleContext context, DeploymentScanner scanner)
+ {
+ this.log = new LogServiceTracker(context);
+ this.scanner = scanner;
+ }
+
+ @Override
+ public void run()
+ {
+ try
+ {
+ while (active == true)
+ {
+ sleep(scanner.getScanInterval());
+ try
+ {
+ scanner.scan();
+ }
+ catch (RuntimeException ex)
+ {
+ log.log(LogService.LOG_ERROR, "Hot deployment error", ex);
+ }
+ }
+ }
+ catch (InterruptedException ex)
+ {
+ // ignore
+ }
+ }
+
+ public void stopScan()
+ {
+ active = false;
+ interrupt();
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/bundles/jndi/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/jndi/pom.xml 2009-05-27 15:27:22 UTC (rev 89470)
+++ projects/jboss-osgi/trunk/bundles/jndi/pom.xml 2009-05-27 15:31:37 UTC (rev 89471)
@@ -42,7 +42,7 @@
<scope>provided</scope>
</dependency>
- <!-- Bundles -->
+ <!-- Bundle dependencies -->
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common</artifactId>
Modified: projects/jboss-osgi/trunk/bundles/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/pom.xml 2009-05-27 15:27:22 UTC (rev 89470)
+++ projects/jboss-osgi/trunk/bundles/pom.xml 2009-05-27 15:31:37 UTC (rev 89471)
@@ -21,6 +21,7 @@
<!-- jboss-osgi -->
<module>common</module>
<module>logging</module>
+ <module>hotdeploy</module>
<module>jmx</module>
<module>jndi</module>
<module>microcontainer</module>
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-05-27 15:27:22 UTC (rev 89470)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-05-27 15:31:37 UTC (rev 89471)
@@ -202,7 +202,7 @@
<!--
Name: framework-knopflerfish
- Descr: Setup for Equinox framework integration testing
+ Descr: Setup for Knopflerfish framework integration testing
-->
<profile>
<id>framework-knopflerfish</id>
16 years, 7 months
JBoss-OSGI SVN: r89460 - projects/jboss-osgi/trunk/husky/testsuite.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-27 06:55:13 -0400 (Wed, 27 May 2009)
New Revision: 89460
Modified:
projects/jboss-osgi/trunk/husky/testsuite/pom.xml
Log:
Disable Husky tests on Knopflerfish
Modified: projects/jboss-osgi/trunk/husky/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/pom.xml 2009-05-27 09:46:37 UTC (rev 89459)
+++ projects/jboss-osgi/trunk/husky/testsuite/pom.xml 2009-05-27 10:55:13 UTC (rev 89460)
@@ -119,4 +119,33 @@
</plugins>
</build>
+ <!-- Profiles -->
+ <profiles>
+
+ <!--
+ Name: framework-knopflerfish
+ Descr: Setup for Knopflerfish framework integration testing
+ -->
+ <profile>
+ <id>framework-knopflerfish</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>knopflerfish</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
</project>
16 years, 7 months
JBoss-OSGI SVN: r89459 - in projects/jboss-osgi/trunk: 3rdparty/jbossxb and 8 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-27 05:46:37 -0400 (Wed, 27 May 2009)
New Revision: 89459
Added:
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/DocumentBuilderFactoryOSGi.java
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/SAXParserFactoryOSGi.java
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory
Modified:
projects/jboss-osgi/trunk/3rdparty/jboss-common-core/pom.xml
projects/jboss-osgi/trunk/3rdparty/jbossxb/.classpath
projects/jboss-osgi/trunk/3rdparty/jbossxb/pom.xml
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java
projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java
projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/JNPServer.java
projects/jboss-osgi/trunk/distribution/runtime/bin/run.conf
Log:
Initialize SAXParserFactory in JBossXB
Modified: projects/jboss-osgi/trunk/3rdparty/jboss-common-core/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jboss-common-core/pom.xml 2009-05-27 08:21:11 UTC (rev 89458)
+++ projects/jboss-osgi/trunk/3rdparty/jboss-common-core/pom.xml 2009-05-27 09:46:37 UTC (rev 89459)
@@ -56,7 +56,10 @@
<Embed-Dependency>
jboss-common-core;inline=false,
</Embed-Dependency>
- <_exportcontents>*</_exportcontents>
+ <_exportcontents>
+ org.jboss.net.*;version=${version.jboss.common.core},
+ org.jboss.util*;version=${version.jboss.common.core},
+ </_exportcontents>
</instructions>
</configuration>
</plugin>
Modified: projects/jboss-osgi/trunk/3rdparty/jbossxb/.classpath
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/.classpath 2009-05-27 08:21:11 UTC (rev 89458)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/.classpath 2009-05-27 09:46:37 UTC (rev 89459)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Modified: projects/jboss-osgi/trunk/3rdparty/jbossxb/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/pom.xml 2009-05-27 08:21:11 UTC (rev 89458)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/pom.xml 2009-05-27 09:46:37 UTC (rev 89459)
@@ -37,11 +37,6 @@
<!-- Provided Dependencies -->
<dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-common</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
@@ -76,7 +71,6 @@
com.wutka.dtd,
org.apache.xerces.*,
org.jboss.logging,
- org.jboss.osgi.common.log,
org.jboss.util*,
org.osgi.framework,
org.osgi.service.log,
Modified: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java 2009-05-27 08:21:11 UTC (rev 89458)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java 2009-05-27 09:46:37 UTC (rev 89459)
@@ -23,10 +23,13 @@
//$Id$
-import org.jboss.osgi.common.log.LogServiceTracker;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.parser.sax.SaxJBossXBParser;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogService;
/**
* A {@link BundleActivator} that initializes the JBossXB bundle
@@ -36,11 +39,27 @@
*/
public class Activator implements BundleActivator
{
- private LogService log;
+ // Provide logging
+ final Logger log = Logger.getLogger(Activator.class);
public void start(BundleContext context) throws Exception
{
- log = new LogServiceTracker(context);
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ String saxFactory = SAXParserFactory.newInstance().getClass().getName();
+ String domFactory = DocumentBuilderFactory.newInstance().getClass().getName();
+ log.info("JBossXB started: SAXParserFactory=" + saxFactory + ",DocumentBuilderFactory=" + domFactory);
+
+ // SaxJBossXBParser initializes the SAXParserFactory in a static block
+ // using SAXParserFactory.newInstance(), which internally uses the TCCL
+ new SaxJBossXBParser();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
}
public void stop(BundleContext context) throws Exception
Added: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/DocumentBuilderFactoryOSGi.java
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/DocumentBuilderFactoryOSGi.java (rev 0)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/DocumentBuilderFactoryOSGi.java 2009-05-27 09:46:37 UTC (rev 89459)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.jbossxb.internal;
+
+//$Id$
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl;
+import org.jboss.logging.Logger;
+
+/**
+ * A {@link DocumentBuilderFactory}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 13-May-2009
+ */
+public class DocumentBuilderFactoryOSGi extends DocumentBuilderFactoryImpl
+{
+ // Provide logging
+ final Logger log = Logger.getLogger(DocumentBuilderFactoryOSGi.class);
+
+ public DocumentBuilderFactoryOSGi()
+ {
+ log.debug("Using OSGi DocumentBuilderFactory");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/DocumentBuilderFactoryOSGi.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/SAXParserFactoryOSGi.java
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/SAXParserFactoryOSGi.java (rev 0)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/SAXParserFactoryOSGi.java 2009-05-27 09:46:37 UTC (rev 89459)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.jbossxb.internal;
+
+//$Id$
+
+import javax.xml.parsers.SAXParserFactory;
+
+import org.apache.xerces.jaxp.SAXParserFactoryImpl;
+import org.jboss.logging.Logger;
+
+/**
+ * A {@link SAXParserFactory}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 13-May-2009
+ */
+public class SAXParserFactoryOSGi extends SAXParserFactoryImpl
+{
+ // Provide logging
+ final Logger log = Logger.getLogger(SAXParserFactoryOSGi.class);
+
+ public SAXParserFactoryOSGi()
+ {
+ log.debug("Using OSGi SAXParserFactory");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/SAXParserFactoryOSGi.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory (rev 0)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory 2009-05-27 09:46:37 UTC (rev 89459)
@@ -0,0 +1 @@
+org.jboss.osgi.jbossxb.internal.DocumentBuilderFactoryOSGi
\ No newline at end of file
Added: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory (rev 0)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory 2009-05-27 09:46:37 UTC (rev 89459)
@@ -0,0 +1 @@
+org.jboss.osgi.jbossxb.internal.SAXParserFactoryOSGi
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java 2009-05-27 08:21:11 UTC (rev 89458)
+++ projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java 2009-05-27 09:46:37 UTC (rev 89459)
@@ -62,19 +62,17 @@
try
{
- InetAddress bindAddress = InetAddress.getByName(host);
-
// check to see if registry already created
rmiRegistry = LocateRegistry.getRegistry(host, rmiPort);
try
{
rmiRegistry.list();
- log.log(LogService.LOG_DEBUG, "RMI Registry running at host=" + host + ",port=" + rmiPort);
+ log.log(LogService.LOG_DEBUG, "RMI registry running at host=" + host + ",port=" + rmiPort);
}
catch (RemoteException e)
{
- log.log(LogService.LOG_DEBUG, "No RMI Registry running at host=" + host + ",port=" + rmiPort + ". Will create one.");
- rmiRegistry = LocateRegistry.createRegistry(rmiPort, null, new DefaultSocketFactory(bindAddress));
+ log.log(LogService.LOG_DEBUG, "No RMI registry running at host=" + host + ",port=" + rmiPort + ". Will create one.");
+ rmiRegistry = LocateRegistry.createRegistry(rmiPort, null, new DefaultSocketFactory(InetAddress.getByName(host)));
shutdownRegistry = true;
}
@@ -108,9 +106,9 @@
try
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-
+
jmxConnectorServer.start();
-
+
log.log(LogService.LOG_INFO, "JMXConnectorServer started: " + serviceURL);
}
catch (IOException ex)
@@ -129,13 +127,13 @@
try
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-
+
jmxConnectorServer.stop();
-
+
// Shutdown the registry if this service created it
if (shutdownRegistry == true)
{
- log.log(LogService.LOG_DEBUG, "Shutdown RMI Registry");
+ log.log(LogService.LOG_DEBUG, "Shutdown RMI registry");
UnicastRemoteObject.unexportObject(rmiRegistry, true);
}
Modified: projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/JNPServer.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/JNPServer.java 2009-05-27 08:21:11 UTC (rev 89458)
+++ projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/JNPServer.java 2009-05-27 09:46:37 UTC (rev 89459)
@@ -23,8 +23,16 @@
//$Id$
+import java.net.InetAddress;
+import java.rmi.NoSuchObjectException;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.rmi.server.UnicastRemoteObject;
+
import javax.naming.NamingException;
+import org.jboss.net.sockets.DefaultSocketFactory;
import org.jboss.osgi.common.log.LogServiceTracker;
import org.jnp.interfaces.Naming;
import org.jnp.server.Main;
@@ -48,6 +56,9 @@
private Main namingMain;
private Naming namingServer;
+
+ private boolean shutdownRegistry;
+ private Registry rmiRegistry;
public JNPServer(BundleContext context, String host, int jndiPort, int rmiPort)
{
@@ -61,6 +72,20 @@
{
try
{
+ // check to see if registry already created
+ rmiRegistry = LocateRegistry.getRegistry(host, rmiPort);
+ try
+ {
+ rmiRegistry.list();
+ log.log(LogService.LOG_DEBUG, "RMI registry running at host=" + host + ",port=" + rmiPort);
+ }
+ catch (RemoteException e)
+ {
+ log.log(LogService.LOG_DEBUG, "No RMI registry running at host=" + host + ",port=" + rmiPort + ". Will create one.");
+ rmiRegistry = LocateRegistry.createRegistry(rmiPort, null, new DefaultSocketFactory(InetAddress.getByName(host)));
+ shutdownRegistry = true;
+ }
+
namingMain = new Main();
namingMain.setNamingInfo(getNamingBean());
@@ -71,7 +96,7 @@
namingMain.setRmiPort(rmiPort);
namingMain.start();
- log.log(LogService.LOG_DEBUG, "Naming server started");
+ log.log(LogService.LOG_INFO, "JNDI started: JNP=" + host + ":" + jndiPort + ", RMI=" + host + ":" + rmiPort);
}
catch (Exception ex)
{
@@ -88,6 +113,21 @@
namingServer = null;
log.log(LogService.LOG_DEBUG, "Naming server stopped");
}
+
+ // Shutdown the registry if this service created it
+ if (shutdownRegistry == true)
+ {
+ log.log(LogService.LOG_DEBUG, "Shutdown RMI registry");
+ try
+ {
+ UnicastRemoteObject.unexportObject(rmiRegistry, true);
+ }
+ catch (NoSuchObjectException ex)
+ {
+ log.log(LogService.LOG_WARNING, "Cannot shotdown RMI registry", ex);
+ }
+ }
+
}
private NamingBean getNamingBean()
Modified: projects/jboss-osgi/trunk/distribution/runtime/bin/run.conf
===================================================================
--- projects/jboss-osgi/trunk/distribution/runtime/bin/run.conf 2009-05-27 08:21:11 UTC (rev 89458)
+++ projects/jboss-osgi/trunk/distribution/runtime/bin/run.conf 2009-05-27 09:46:37 UTC (rev 89459)
@@ -29,7 +29,7 @@
fi
# Sample JPDA settings for remote socket debuging
-JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
+#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"
# Sample JPDA settings for shared memory debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"
16 years, 7 months
JBoss-OSGI SVN: r89457 - in projects/jboss-osgi/trunk/runtime: knopflerfish/src/main/resources and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-27 03:22:02 -0400 (Wed, 27 May 2009)
New Revision: 89457
Modified:
projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml
Log:
Add husky testing to equinox and knopflerfish
Modified: projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-27 06:56:42 UTC (rev 89456)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-27 07:22:02 UTC (rev 89457)
@@ -31,6 +31,7 @@
org.jboss.logging,
org.jboss.osgi.spi.service,
org.jboss.osgi.spi.management,
+ org.jboss.osgi.spi.testing,
org.osgi.framework; version=1.4,
org.osgi.service.packageadmin; version=1.2,
org.osgi.service.startlevel; version=1.1,
@@ -48,6 +49,11 @@
<entry><key>org.jboss.osgi.service.remote.log.sender</key><value>true</value></entry>
<entry><key>org.jboss.osgi.service.remote.log.host</key><value>localhost</value></entry>
<entry><key>org.jboss.osgi.service.remote.log.port</key><value>5400</value></entry>
+ <!--
+ Husky socket connector properties
+ -->
+ <entry><key>org.jboss.osgi.husky.runtime.connector.host</key><value>${jboss.bind.address}</value></entry>
+ <entry><key>org.jboss.osgi.husky.runtime.connector.port</key><value>5401</value></entry>
</map>
</property>
</bean>
Modified: projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-27 06:56:42 UTC (rev 89456)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-27 07:22:02 UTC (rev 89457)
@@ -30,6 +30,7 @@
org.jboss.logging,
org.jboss.osgi.spi.service,
org.jboss.osgi.spi.management,
+ org.jboss.osgi.spi.testing,
org.osgi.framework; version=1.4,
org.osgi.service.packageadmin; version=1.2,
org.osgi.service.startlevel; version=1.1,
@@ -47,6 +48,11 @@
<entry><key>org.jboss.osgi.service.remote.log.sender</key><value>true</value></entry>
<entry><key>org.jboss.osgi.service.remote.log.host</key><value>localhost</value></entry>
<entry><key>org.jboss.osgi.service.remote.log.port</key><value>5400</value></entry>
+ <!--
+ Husky socket connector properties
+ -->
+ <entry><key>org.jboss.osgi.husky.runtime.connector.host</key><value>${jboss.bind.address}</value></entry>
+ <entry><key>org.jboss.osgi.husky.runtime.connector.port</key><value>5401</value></entry>
</map>
</property>
</bean>
16 years, 7 months
JBoss-OSGI SVN: r89456 - in projects/jboss-osgi/trunk: blueprint and 14 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-27 02:56:42 -0400 (Wed, 27 May 2009)
New Revision: 89456
Added:
projects/jboss-osgi/trunk/.project
projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/LogServiceTracker.java
projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/SystemLogService.java
Modified:
projects/jboss-osgi/trunk/
projects/jboss-osgi/trunk/blueprint/impl/.project
projects/jboss-osgi/trunk/blueprint/impl/pom.xml
projects/jboss-osgi/trunk/blueprint/pom.xml
projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/husky/harness/.project
projects/jboss-osgi/trunk/husky/harness/pom.xml
projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Extender.java
projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/JMXConnector.java
projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/SocketConnector.java
projects/jboss-osgi/trunk/husky/pom.xml
projects/jboss-osgi/trunk/husky/testsuite/pom.xml
projects/jboss-osgi/trunk/husky/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/repository/api/pom.xml
projects/jboss-osgi/trunk/repository/pom.xml
projects/jboss-osgi/trunk/runtime/microcontainer/.project
projects/jboss-osgi/trunk/runtime/microcontainer/osgi-int/.classpath
projects/jboss-osgi/trunk/runtime/microcontainer/osgi-int/pom.xml
projects/jboss-osgi/trunk/runtime/microcontainer/pom.xml
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java
Log:
Cleanup husky dependencies
Property changes on: projects/jboss-osgi/trunk
___________________________________________________________________
Name: svn:ignore
- .classpath
.project
autoinstall.xml
target
+ autoinstall.xml
target
Added: projects/jboss-osgi/trunk/.project
===================================================================
--- projects/jboss-osgi/trunk/.project (rev 0)
+++ projects/jboss-osgi/trunk/.project 2009-05-27 06:56:42 UTC (rev 89456)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: projects/jboss-osgi/trunk/blueprint/impl/.project
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/.project 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/blueprint/impl/.project 2009-05-27 06:56:42 UTC (rev 89456)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-osgi-blueprint-impl</name>
+ <name>jboss-osgi-blueprint</name>
<comment></comment>
<projects>
</projects>
Modified: projects/jboss-osgi/trunk/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/blueprint/impl/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -4,12 +4,12 @@
<name>JBossOSGi Blueprint - Implementation</name>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-blueprint-impl</artifactId>
+ <artifactId>jboss-osgi-blueprint</artifactId>
<packaging>bundle</packaging>
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-blueprint</artifactId>
+ <artifactId>jboss-osgi-blueprint-parent</artifactId>
<version>1.0.0.Alpha1</version>
</parent>
Modified: projects/jboss-osgi/trunk/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/blueprint/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -4,7 +4,7 @@
<name>JBossOSGi Blueprint</name>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-blueprint</artifactId>
+ <artifactId>jboss-osgi-blueprint-parent</artifactId>
<packaging>pom</packaging>
<version>1.0.0.Alpha1</version>
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-blueprint</artifactId>
+ <artifactId>jboss-osgi-blueprint-parent</artifactId>
<version>1.0.0.Alpha1</version>
</parent>
@@ -28,10 +28,6 @@
<artifactId>jboss-osgi-runtime-felix</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky-harness</artifactId>
- </dependency>
<!-- OSGi Dependencies -->
<dependency>
@@ -51,7 +47,7 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-blueprint-impl</artifactId>
+ <artifactId>jboss-osgi-blueprint</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -71,7 +67,7 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky-harness</artifactId>
+ <artifactId>jboss-osgi-husky</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -16,10 +16,10 @@
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<includes>
<include>*:jboss-osgi-apache-xerces:jar</include>
- <include>*:jboss-osgi-blueprint-impl:jar</include>
+ <include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
- <include>*:jboss-osgi-husky-harness:jar</include>
+ <include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-logging:jar</include>
Modified: projects/jboss-osgi/trunk/husky/harness/.project
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/.project 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/husky/harness/.project 2009-05-27 06:56:42 UTC (rev 89456)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-osgi-husky-harness</name>
+ <name>jboss-osgi-husky</name>
<comment></comment>
<projects>
</projects>
Modified: projects/jboss-osgi/trunk/husky/harness/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/husky/harness/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -18,13 +18,13 @@
<name>JBossOSGi Husky - Harness</name>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky-harness</artifactId>
+ <artifactId>jboss-osgi-husky</artifactId>
<packaging>bundle</packaging>
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky</artifactId>
+ <artifactId>jboss-osgi-husky-parent</artifactId>
<version>1.0.0</version>
</parent>
@@ -35,13 +35,6 @@
<artifactId>junit</artifactId>
</dependency>
- <!-- Bundle Dependencies -->
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-common</artifactId>
- <scope>provided</scope>
- </dependency>
-
<!-- Provided Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
Added: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/LogServiceTracker.java
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/LogServiceTracker.java (rev 0)
+++ projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/LogServiceTracker.java 2009-05-27 06:56:42 UTC (rev 89456)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.husky.internal;
+
+//$Id$
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * A combined ServiceTracker/LogService that bundles can use to access the registered LogService.
+ *
+ * If a LogService is registered, the LogServiceTracker delegates to that LogService.
+ * If there is no LogService registered, the LogServiceTracker delegates to the {@link SystemLogService}
+ *
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 11-Apr-2009
+ */
+public class LogServiceTracker extends ServiceTracker implements LogService
+{
+ private LogService log;
+
+ public LogServiceTracker(BundleContext context)
+ {
+ super(context, LogService.class.getName(), null);
+ log = new SystemLogService(context);
+ open();
+ }
+
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ log = (LogService)super.addingService(reference);
+ return log;
+ }
+
+ @Override
+ public void removedService(ServiceReference reference, Object service)
+ {
+ super.removedService(reference, service);
+ log = new SystemLogService(context);
+ }
+
+ public void log(int level, String message)
+ {
+ log.log(level, message);
+ }
+
+ public void log(int level, String message, Throwable exception)
+ {
+ log.log(level, message, exception);
+ }
+
+ public void log(ServiceReference sr, int level, String message)
+ {
+ log.log(sr, level, message);
+ }
+
+ public void log(ServiceReference sr, int level, String message, Throwable exception)
+ {
+ log.log(sr, level, message, exception);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/LogServiceTracker.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/SystemLogService.java
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/SystemLogService.java (rev 0)
+++ projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/SystemLogService.java 2009-05-27 06:56:42 UTC (rev 89456)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.husky.internal;
+
+//$Id$
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+
+/**
+ * A basic LogService that writes to System.out
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 11-Apr-2009
+ */
+public class SystemLogService implements LogService
+{
+ private BundleContext context;
+
+ public SystemLogService(BundleContext context)
+ {
+ this.context = context;
+ }
+
+ public void log(int level, String message)
+ {
+ logInternal(null, level, message, null);
+ }
+
+ public void log(int level, String message, Throwable exception)
+ {
+ logInternal(null, level, message, exception);
+ }
+
+ public void log(ServiceReference sr, int level, String message)
+ {
+ logInternal(sr, level, message, null);
+ }
+
+ public void log(ServiceReference sr, int level, String message, Throwable exception)
+ {
+ logInternal(sr, level, message, exception);
+ }
+
+ private void logInternal(ServiceReference sref, int level, String message, Throwable exception)
+ {
+ long time = System.currentTimeMillis();
+ Bundle bundle = context.getBundle();
+
+ String bndStr = bundle.getSymbolicName();
+
+ String srefStr = null;
+ if (sref != null && sref.getBundle() != null)
+ srefStr = sref.getBundle().getSymbolicName();
+
+ String t = new SimpleDateFormat("dd-MMM-yyyy HH:mm.ss.SSS").format(new Date(time));
+ String l = " " + logLevel(level);
+ String s = srefStr != null ? ",sref=" + srefStr : "";
+ String b = ",bnd=" + bndStr;
+ String m = ",msg=" + message;
+ String e = exception != null ? ",ex=" + exception : "";
+
+ System.out.println("[" + t + l + b + s + m + e + "]");
+
+ if (exception != null)
+ exception.printStackTrace(System.out);
+ }
+
+ private String logLevel(int level)
+ {
+ String logLevel;
+ switch (level)
+ {
+ case LogService.LOG_DEBUG:
+ logLevel = "DEBUG";
+ break;
+ case LogService.LOG_INFO:
+ logLevel = "INFO";
+ break;
+ case LogService.LOG_WARNING:
+ logLevel = "WARN";
+ break;
+ case LogService.LOG_ERROR:
+ logLevel = "ERROR";
+ break;
+ default:
+ logLevel = "Level=" + level;
+ }
+ return logLevel;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/internal/SystemLogService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Extender.java
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Extender.java 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/Extender.java 2009-05-27 06:56:42 UTC (rev 89456)
@@ -23,7 +23,7 @@
// $Id$
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.husky.internal.LogServiceTracker;
import org.jboss.osgi.husky.runtime.Connector;
import org.jboss.osgi.husky.runtime.junit.JUnitPackageListener;
import org.osgi.framework.Bundle;
Modified: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/JMXConnector.java
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/JMXConnector.java 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/JMXConnector.java 2009-05-27 06:56:42 UTC (rev 89456)
@@ -29,8 +29,8 @@
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
-import org.jboss.osgi.common.log.LogServiceTracker;
import org.jboss.osgi.husky.internal.AbstractConnector;
+import org.jboss.osgi.husky.internal.LogServiceTracker;
import org.jboss.osgi.husky.runtime.Connector;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
Modified: projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/SocketConnector.java
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/SocketConnector.java 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/husky/harness/src/main/java/org/jboss/osgi/husky/runtime/osgi/SocketConnector.java 2009-05-27 06:56:42 UTC (rev 89456)
@@ -30,8 +30,8 @@
import java.net.Socket;
import java.util.Properties;
-import org.jboss.osgi.common.log.LogServiceTracker;
import org.jboss.osgi.husky.internal.AbstractConnector;
+import org.jboss.osgi.husky.internal.LogServiceTracker;
import org.jboss.osgi.husky.internal.Util;
import org.jboss.osgi.husky.runtime.Connector;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/trunk/husky/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/husky/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -19,7 +19,7 @@
<description>JBoss OSGi Test Support</description>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky</artifactId>
+ <artifactId>jboss-osgi-husky-parent</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
Modified: projects/jboss-osgi/trunk/husky/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/husky/testsuite/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -24,7 +24,7 @@
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky</artifactId>
+ <artifactId>jboss-osgi-husky-parent</artifactId>
<version>1.0.0</version>
</parent>
@@ -60,7 +60,7 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky-harness</artifactId>
+ <artifactId>jboss-osgi-husky</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Modified: projects/jboss-osgi/trunk/husky/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/scripts/assembly-bundles.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/husky/testsuite/scripts/assembly-bundles.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -17,7 +17,7 @@
<includes>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
- <include>*:jboss-osgi-husky-harness:jar</include>
+ <include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-logging:jar</include>
<include>*:org.apache.felix.log:jar</include>
<include>*:org.osgi.compendium:jar</include>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -79,7 +79,7 @@
<!-- JBoss OSGi Dependencies -->
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-blueprint-impl</artifactId>
+ <artifactId>jboss-osgi-blueprint</artifactId>
<version>${version.jboss.osgi.blueprint}</version>
</dependency>
<dependency>
@@ -94,7 +94,7 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky-harness</artifactId>
+ <artifactId>jboss-osgi-husky</artifactId>
<version>${version.jboss.osgi.husky}</version>
</dependency>
<dependency>
Modified: projects/jboss-osgi/trunk/repository/api/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/repository/api/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/repository/api/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -7,7 +7,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-repository</artifactId>
+ <artifactId>jboss-osgi-repository-parent</artifactId>
<version>1.0.0.Beta2</version>
</parent>
Modified: projects/jboss-osgi/trunk/repository/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/repository/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/repository/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<name>JBossOSGi Repository</name>
- <artifactId>jboss-osgi-repository</artifactId>
+ <artifactId>jboss-osgi-repository-parent</artifactId>
<packaging>pom</packaging>
<version>1.0.0.Beta2</version>
Modified: projects/jboss-osgi/trunk/runtime/microcontainer/.project
===================================================================
--- projects/jboss-osgi/trunk/runtime/microcontainer/.project 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/runtime/microcontainer/.project 2009-05-27 06:56:42 UTC (rev 89456)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-osgi-microcontainer</name>
+ <name>jboss-osgi-runtime-microcontainer-parent</name>
<comment></comment>
<projects>
</projects>
Modified: projects/jboss-osgi/trunk/runtime/microcontainer/osgi-int/.classpath
===================================================================
--- projects/jboss-osgi/trunk/runtime/microcontainer/osgi-int/.classpath 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/runtime/microcontainer/osgi-int/.classpath 2009-05-27 06:56:42 UTC (rev 89456)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/javacc"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
Modified: projects/jboss-osgi/trunk/runtime/microcontainer/osgi-int/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/microcontainer/osgi-int/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/runtime/microcontainer/osgi-int/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -2,12 +2,12 @@
<modelVersion>4.0.0</modelVersion>
<name>JBossOSGi Runtime - Microcontainer Facade</name>
- <artifactId>jboss-osgi-runtime-microcontainer-facade</artifactId>
+ <artifactId>jboss-osgi-runtime-microcontainer</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-microcontainer</artifactId>
+ <artifactId>jboss-osgi-runtime-microcontainer-parent</artifactId>
<version>1.0.0.Beta2</version>
</parent>
Modified: projects/jboss-osgi/trunk/runtime/microcontainer/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/microcontainer/pom.xml 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/runtime/microcontainer/pom.xml 2009-05-27 06:56:42 UTC (rev 89456)
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<name>JBossOSGi Runtime - Microcontainer</name>
- <artifactId>jboss-osgi-runtime-microcontainer</artifactId>
+ <artifactId>jboss-osgi-runtime-microcontainer-parent</artifactId>
<packaging>pom</packaging>
<version>1.0.0.Beta2</version>
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java 2009-05-27 06:56:42 UTC (rev 89456)
@@ -35,6 +35,6 @@
{
public BlueprintCapability()
{
- addBundle("bundles/jboss-osgi-blueprint-impl.jar");
+ addBundle("bundles/jboss-osgi-blueprint.jar");
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java 2009-05-27 06:47:31 UTC (rev 89455)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java 2009-05-27 06:56:42 UTC (rev 89456)
@@ -33,6 +33,6 @@
{
public HuskyCapability()
{
- addBundle("bundles/jboss-osgi-husky-harness.jar");
+ addBundle("bundles/jboss-osgi-husky.jar");
}
}
\ No newline at end of file
16 years, 7 months
JBoss-OSGI SVN: r89454 - in projects/jboss-osgi/trunk: runtime/felix/src/main/resources and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-27 00:52:47 -0400 (Wed, 27 May 2009)
New Revision: 89454
Modified:
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
Log:
LogService reports back to localhost
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-05-27 04:34:18 UTC (rev 89453)
+++ projects/jboss-osgi/trunk/pom.xml 2009-05-27 04:52:47 UTC (rev 89454)
@@ -657,10 +657,6 @@
<value>org.apache.xerces.parsers.XIncludeAwareParserConfiguration</value>
</property>
<property>
- <name>jboss.bind.address</name>
- <value>${jboss.bind.address}</value>
- </property>
- <property>
<name>jboss.osgi.framework.properties</name>
<value>${jboss.osgi.framework.properties}</value>
</property>
@@ -721,10 +717,6 @@
<value>org.apache.xerces.parsers.XIncludeAwareParserConfiguration</value>
</property>
<property>
- <name>jboss.bind.address</name>
- <value>${jboss.bind.address}</value>
- </property>
- <property>
<name>jboss.osgi.framework.properties</name>
<value>${jboss.osgi.framework.properties}</value>
</property>
Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-27 04:34:18 UTC (rev 89453)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-27 04:52:47 UTC (rev 89454)
@@ -54,7 +54,7 @@
Setup remote logging
-->
<entry><key>org.jboss.osgi.service.remote.log.sender</key><value>true</value></entry>
- <entry><key>org.jboss.osgi.service.remote.log.host</key><value>${jboss.bind.address}</value></entry>
+ <entry><key>org.jboss.osgi.service.remote.log.host</key><value>localhost</value></entry>
<entry><key>org.jboss.osgi.service.remote.log.port</key><value>5400</value></entry>
<!--
Husky socket connector properties
16 years, 7 months
JBoss-OSGI SVN: r89453 - in projects/jboss-osgi/trunk: blueprint and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-27 00:34:18 -0400 (Wed, 27 May 2009)
New Revision: 89453
Modified:
projects/jboss-osgi/trunk/blueprint/pom.xml
projects/jboss-osgi/trunk/pom.xml
Log:
Skip blueprint tests for equinox and knopflerfish
Modified: projects/jboss-osgi/trunk/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/pom.xml 2009-05-27 03:10:46 UTC (rev 89452)
+++ projects/jboss-osgi/trunk/blueprint/pom.xml 2009-05-27 04:34:18 UTC (rev 89453)
@@ -21,4 +21,57 @@
<module>testsuite</module>
</modules>
+ <!-- Profiles -->
+ <profiles>
+
+ <!--
+ Name: framework-equinox
+ Descr: Setup for Equinox framework integration testing
+ -->
+ <profile>
+ <id>framework-equinox</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>equinox</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: framework-knopflerfish
+ Descr: Setup for Equinox framework integration testing
+ -->
+ <profile>
+ <id>framework-knopflerfish</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>knopflerfish</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
</project>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-05-27 03:10:46 UTC (rev 89452)
+++ projects/jboss-osgi/trunk/pom.xml 2009-05-27 04:34:18 UTC (rev 89453)
@@ -657,6 +657,10 @@
<value>org.apache.xerces.parsers.XIncludeAwareParserConfiguration</value>
</property>
<property>
+ <name>jboss.bind.address</name>
+ <value>${jboss.bind.address}</value>
+ </property>
+ <property>
<name>jboss.osgi.framework.properties</name>
<value>${jboss.osgi.framework.properties}</value>
</property>
@@ -717,6 +721,10 @@
<value>org.apache.xerces.parsers.XIncludeAwareParserConfiguration</value>
</property>
<property>
+ <name>jboss.bind.address</name>
+ <value>${jboss.bind.address}</value>
+ </property>
+ <property>
<name>jboss.osgi.framework.properties</name>
<value>${jboss.osgi.framework.properties}</value>
</property>
16 years, 7 months
JBoss-OSGI SVN: r89450 - projects/jboss-osgi/trunk/runtime/felix/src/main/resources.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-26 16:48:51 -0400 (Tue, 26 May 2009)
New Revision: 89450
Modified:
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
Log:
Allow husky testing in jbossas
Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-26 19:33:54 UTC (rev 89449)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-05-26 20:48:51 UTC (rev 89450)
@@ -25,6 +25,7 @@
<entry>
<key>org.osgi.framework.system.packages.extra</key>
<value>
+ org.apache.xerces.dom,
org.jboss.logging,
org.jboss.osgi.jndi,
org.jboss.osgi.jmx,
@@ -32,6 +33,9 @@
org.jboss.osgi.spi,
org.jboss.osgi.spi.logging,
org.jboss.osgi.spi.management,
+ org.jboss.osgi.spi.testing,
+ org.jboss.xb.binding;version=2.0,
+ org.jboss.xb.binding.sunday.unmarshalling;version=2.0,
<!-- needed by jboss-remoting -->
org.apache.log4j,
@@ -50,8 +54,13 @@
Setup remote logging
-->
<entry><key>org.jboss.osgi.service.remote.log.sender</key><value>true</value></entry>
- <entry><key>org.jboss.osgi.service.remote.log.host</key><value>localhost</value></entry>
+ <entry><key>org.jboss.osgi.service.remote.log.host</key><value>${jboss.bind.address}</value></entry>
<entry><key>org.jboss.osgi.service.remote.log.port</key><value>5400</value></entry>
+ <!--
+ Husky socket connector properties
+ -->
+ <entry><key>org.jboss.osgi.husky.runtime.connector.host</key><value>${jboss.bind.address}</value></entry>
+ <entry><key>org.jboss.osgi.husky.runtime.connector.port</key><value>5401</value></entry>
</map>
</property>
<property name="autoStart">
16 years, 7 months
JBoss-OSGI SVN: r89449 - in projects/jboss-osgi/trunk: blueprint/testsuite and 14 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-05-26 15:33:54 -0400 (Tue, 26 May 2009)
New Revision: 89449
Added:
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties
Removed:
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-framework.properties
projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-framework.properties
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-framework.properties
Modified:
projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/BlueprintContextTestCase.java
projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/husky/testsuite/.project
projects/jboss-osgi/trunk/husky/testsuite/pom.xml
projects/jboss-osgi/trunk/husky/testsuite/src/test/java/org/jboss/test/osgi/husky/context/ContextTestCase.java
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerBootstrapProvider.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/MicrocontainerCapability.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/trailblazer/.settings/org.eclipse.jdt.core.prefs
Log:
Use default runtime for husky and blueprint tests
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-05-26 19:33:54 UTC (rev 89449)
@@ -45,13 +45,13 @@
<!-- Bundle Dependencies -->
<dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-blueprint-impl</artifactId>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.log</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.log</artifactId>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-blueprint-impl</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -66,17 +66,22 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-jaxb</artifactId>
+ <artifactId>jboss-osgi-common-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-husky-harness</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-jmx</artifactId>
+ <artifactId>jboss-osgi-jaxb</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-husky-harness</artifactId>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jmx</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -86,12 +91,12 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-xml-binding</artifactId>
+ <artifactId>jboss-osgi-microcontainer</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-common-core</artifactId>
+ <artifactId>jboss-osgi-xml-binding</artifactId>
<scope>provided</scope>
</dependency>
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml 2009-05-26 19:33:54 UTC (rev 89449)
@@ -23,6 +23,7 @@
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-logging:jar</include>
+ <include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
<include>*:org.apache.felix.log:jar</include>
<include>*:org.osgi.compendium:jar</include>
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/BlueprintContextTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/BlueprintContextTestCase.java 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/BlueprintContextTestCase.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -28,14 +28,18 @@
import org.jboss.osgi.husky.BridgeFactory;
import org.jboss.osgi.husky.annotation.ProvideContext;
+import org.jboss.osgi.spi.testing.AbstractBundle;
+import org.jboss.osgi.spi.testing.BlueprintCapability;
+import org.jboss.osgi.spi.testing.HuskyCapability;
+import org.jboss.osgi.spi.testing.JMXCapability;
+import org.jboss.osgi.spi.testing.MicrocontainerCapability;
import org.jboss.osgi.spi.testing.OSGiRuntime;
-import org.jboss.osgi.spi.testing.OSGiTestHelper;
+import org.jboss.osgi.spi.testing.OSGiTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
import org.osgi.framework.ServiceReference;
import org.osgi.service.blueprint.context.BlueprintContext;
@@ -45,33 +49,42 @@
* @author thomas.diesler(a)jboss.com
* @since 13-May-2009
*/
-public class BlueprintContextTestCase
+public class BlueprintContextTestCase extends OSGiTest
{
@ProvideContext
public BundleContext context;
- private OSGiTestHelper helper;
private OSGiRuntime runtime;
+ private AbstractBundle bundle;
@Before
- public void setUp() throws BundleException
+ public void setUp() throws Exception
{
+ super.setUp();
+
if (context == null)
{
- helper = new OSGiTestHelper();
- runtime = helper.getEmbeddedRuntime();
+ runtime = getDefaultRuntime();
+ runtime.addCapability(new JMXCapability());
+ runtime.addCapability(new HuskyCapability());
+ runtime.addCapability(new MicrocontainerCapability());
+ runtime.addCapability(new BlueprintCapability());
- runtime.installBundle("context-basic.jar").start();
+ bundle = runtime.installBundle("context-basic.jar");
+ bundle.start();
}
}
@After
- public void tearDown()
+ public void tearDown() throws Exception
{
if (context == null)
{
+ bundle.uninstall();
runtime.shutdown();
}
+
+ super.tearDown();
}
@Test
Copied: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties (from rev 89423, projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-framework.properties)
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties (rev 0)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-05-26 19:33:54 UTC (rev 89449)
@@ -0,0 +1,39 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id$
+#
+
+# The OSGiFramework implementation
+org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
+
+# Properties to configure the Framework
+org.osgi.framework.storage=${test.archive.directory}/../osgi-store
+org.osgi.framework.storage.clean=onFirstInit
+
+# Framework bootdelegation
+# org.osgi.framework.bootdelegation=org.osgi.service.log
+
+# Extra System Packages
+org.osgi.framework.system.packages.extra=\
+ org.jboss.logging, \
+ org.jboss.osgi.spi, \
+ org.jboss.osgi.spi.management, \
+ org.jboss.osgi.spi.testing, \
+ org.jboss.virtual, \
+ org.jboss.virtual.plugins.registry, \
+ org.jboss.virtual.plugins.context.jar, \
+ org.jboss.virtual.plugins.vfs.helpers, \
+ org.jboss.virtual.protocol, \
+ org.osgi.framework; version\=1.4
+
+# Bundles that need to be installed with the Framework automatically
+org.jboss.osgi.spi.framework.autoInstall=\
+ file://${test.archive.directory}/bundles/org.osgi.compendium.jar
+
+# Bundles that need to be started automatically
+org.jboss.osgi.spi.framework.autoStart=\
+ file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
+
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-framework.properties
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-framework.properties 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-framework.properties 2009-05-26 19:33:54 UTC (rev 89449)
@@ -1,40 +0,0 @@
-#
-# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
-#
-# $Id$
-#
-
-# The OSGiFramework implementation
-org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
-
-# Properties to configure the Framework
-org.osgi.framework.storage=${test.archive.directory}/../osgi-store
-org.osgi.framework.storage.clean=onFirstInit
-
-# Framework bootdelegation
-# org.osgi.framework.bootdelegation=org.osgi.service.log
-
-# Extra System Packages
-org.osgi.framework.system.packages.extra=\
- org.jboss.logging, \
- org.jboss.osgi.spi, \
- org.jboss.osgi.spi.testing, \
- org.osgi.framework; version\=1.4
-
-# Bundles that need to be installed with the Framework automatically
-org.jboss.osgi.spi.framework.autoInstall=\
- file://${test.archive.directory}/bundles/org.osgi.compendium.jar
-
-# Bundles that need to be started automatically
-org.jboss.osgi.spi.framework.autoStart=\
- file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-logging.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-jmx.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-husky-harness.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common-core.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-apache-xerces.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-jaxb.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-xml-binding.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-blueprint-impl.jar
-
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-felix.properties 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-felix.properties 2009-05-26 19:33:54 UTC (rev 89449)
@@ -31,6 +31,10 @@
org.jboss.osgi.service.remote.log.host=${jboss.bind.address}
org.jboss.osgi.service.remote.log.port=5400
+# Husky socket connector properties
+org.jboss.osgi.husky.runtime.connector.host=${jboss.bind.address}
+org.jboss.osgi.husky.runtime.connector.port=5401
+
# Extra System Packages
org.osgi.framework.system.packages.extra=\
org.jboss.logging, \
@@ -38,6 +42,7 @@
org.jboss.osgi.spi, \
org.jboss.osgi.spi.logging, \
org.jboss.osgi.spi.management, \
+ org.jboss.osgi.spi.testing, \
org.jboss.virtual, \
org.jboss.virtual.plugins.registry, \
org.jboss.virtual.plugins.context.jar, \
Modified: projects/jboss-osgi/trunk/husky/testsuite/.project
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/.project 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/husky/testsuite/.project 2009-05-26 19:33:54 UTC (rev 89449)
@@ -17,7 +17,7 @@
</buildCommand>
</buildSpec>
<natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
Modified: projects/jboss-osgi/trunk/husky/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/pom.xml 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/husky/testsuite/pom.xml 2009-05-26 19:33:54 UTC (rev 89449)
@@ -116,75 +116,7 @@
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>org.jboss.osgi.husky.Invoker</name>
- <value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
- </property>
- <property>
- <name>log4j.output.dir</name>
- <value>${project.build.directory}</value>
- </property>
- <property>
- <name>test.archive.directory</name>
- <value>${project.build.directory}/test-libs</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
</plugins>
</build>
- <profiles>
-
- <!--
- Name: remote-tesing
- Descr: Setup for remote testing
- <profile>
- <id>remote-tesing</id>
- <activation>
- <property>
- <name>target.container</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>org.jboss.osgi.husky.Invoker</name>
- <value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
- </property>
- <property>
- <name>org.jboss.osgi.husky.runtime.connector.host</name>
- <value>localhost</value>
- </property>
- <property>
- <name>org.jboss.osgi.husky.runtime.connector.port</name>
- <value>5401</value>
- </property>
- <property>
- <name>log4j.output.dir</name>
- <value>${project.build.directory}</value>
- </property>
- <property>
- <name>test.archive.directory</name>
- <value>${project.build.directory}/test-libs</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- -->
-
- </profiles>
-
-
</project>
Modified: projects/jboss-osgi/trunk/husky/testsuite/src/test/java/org/jboss/test/osgi/husky/context/ContextTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/src/test/java/org/jboss/test/osgi/husky/context/ContextTestCase.java 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/husky/testsuite/src/test/java/org/jboss/test/osgi/husky/context/ContextTestCase.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -27,6 +27,7 @@
import org.jboss.osgi.husky.BridgeFactory;
import org.jboss.osgi.husky.annotation.ProvideContext;
+import org.jboss.osgi.spi.testing.AbstractBundle;
import org.jboss.osgi.spi.testing.HuskyCapability;
import org.jboss.osgi.spi.testing.JMXCapability;
import org.jboss.osgi.spi.testing.OSGiRuntime;
@@ -49,28 +50,29 @@
@ProvideContext
public BundleContext context;
- private OSGiTestHelper helper;
private OSGiRuntime runtime;
+ private AbstractBundle bundle;
@Before
public void setUp() throws BundleException
{
if (context == null)
{
- helper = new OSGiTestHelper();
- runtime = helper.getEmbeddedRuntime();
+ runtime = new OSGiTestHelper().getDefaultRuntime();
runtime.addCapability(new JMXCapability());
runtime.addCapability(new HuskyCapability());
- runtime.installBundle("context-basic.jar").start();
+ bundle = runtime.installBundle("context-basic.jar");
+ bundle.start();
}
}
@After
- public void tearDown()
+ public void tearDown() throws BundleException
{
if (context == null)
{
+ bundle.uninstall();
runtime.shutdown();
}
}
Copied: projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-felix.properties (from rev 89409, projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-framework.properties)
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-felix.properties (rev 0)
+++ projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-05-26 19:33:54 UTC (rev 89449)
@@ -0,0 +1,36 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id$
+#
+
+# The OSGiFramework implementation
+org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
+
+# Properties to configure the Framework
+org.osgi.framework.storage=${basedir}/target/osgi-store
+org.osgi.framework.storage.clean=onFirstInit
+
+# Husky socket connector properties
+org.jboss.osgi.husky.runtime.connector.host=localhost
+org.jboss.osgi.husky.runtime.connector.port=5401
+
+# Framework bootdelegation
+# org.osgi.framework.bootdelegation=org.osgi.service.log
+
+# Extra System Packages
+org.osgi.framework.system.packages.extra=\
+ org.jboss.logging, \
+ org.jboss.osgi.spi, \
+ org.jboss.osgi.spi.testing, \
+ org.osgi.framework; version\=1.4
+
+# Bundles that need to be installed with the Framework automatically
+org.jboss.osgi.spi.framework.autoInstall=\
+ file://${test.archive.directory}/bundles/org.osgi.compendium.jar
+
+# Bundles that need to be started automatically
+org.jboss.osgi.spi.framework.autoStart=\
+ file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-framework.properties
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-framework.properties 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-framework.properties 2009-05-26 19:33:54 UTC (rev 89449)
@@ -1,36 +0,0 @@
-#
-# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
-#
-# $Id$
-#
-
-# The OSGiFramework implementation
-org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
-
-# Properties to configure the Framework
-org.osgi.framework.storage=${basedir}/target/osgi-store
-org.osgi.framework.storage.clean=onFirstInit
-
-# Husky socket connector properties
-org.jboss.osgi.husky.runtime.connector.host=localhost
-org.jboss.osgi.husky.runtime.connector.port=5401
-
-# Framework bootdelegation
-# org.osgi.framework.bootdelegation=org.osgi.service.log
-
-# Extra System Packages
-org.osgi.framework.system.packages.extra=\
- org.jboss.logging, \
- org.jboss.osgi.spi, \
- org.jboss.osgi.spi.testing, \
- org.osgi.framework; version\=1.4
-
-# Bundles that need to be installed with the Framework automatically
-org.jboss.osgi.spi.framework.autoInstall=\
- file://${test.archive.directory}/bundles/org.osgi.compendium.jar
-
-# Bundles that need to be started automatically
-org.jboss.osgi.spi.framework.autoStart=\
- file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/pom.xml 2009-05-26 19:33:54 UTC (rev 89449)
@@ -24,13 +24,7 @@
<!-- Properties -->
<properties>
- <surefire.husky.invoker>-Dorg.jboss.osgi.husky.Invoker=org.jboss.osgi.husky.internal.OSGiInvoker</surefire.husky.invoker>
- <surefire.log4j.output.dir>-Dlog4j.output.dir=${project.build.directory}</surefire.log4j.output.dir>
- <surefire.protocol.handlers>-Djava.protocol.handler.pkgs=org.jboss.net.protocol\|org.jboss.virtual.protocol</surefire.protocol.handlers>
- <surefire.test.archive.dir>-Dtest.archive.directory=${project.build.directory}/test-libs</surefire.test.archive.dir>
<surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/resources/tst.policy</surefire.security.args>
- <surefire.xerces.parser.config>-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeAwareParserConfiguration</surefire.xerces.parser.config>
- <surefire.common.args>${surefire.husky.invoker} ${surefire.log4j.output.dir} ${surefire.protocol.handlers} ${surefire.test.archive.dir} ${surefire.xerces.parser.config}</surefire.common.args>
<version.aqute.bnd>0.0.323</version.aqute.bnd>
<version.equinox>3.4.2</version.equinox>
@@ -396,7 +390,6 @@
<configuration>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
<failIfNoTests>false</failIfNoTests>
- <argLine>${surefire.common.args}</argLine>
</configuration>
</plugin>
</plugins>
@@ -481,8 +474,15 @@
<!-- DistributionManagement -->
<distributionManagement>
<!--
- Add this to your ~/.m2/settings.xml <servers> <server> <id>jbpm.dyndns.org</id> <username>yourname</username> <privateKey>/home/yourname/.ssh/id_rsa</privateKey>
- <passphrase>yourpass</passphrase> </server> </servers>
+ Add this to your ~/.m2/settings.xml
+ <servers>
+ <server>
+ <id>jbpm.dyndns.org</id>
+ <username>yourname</username>
+ <privateKey>/home/yourname/.ssh/id_rsa</privateKey>
+ <passphrase>yourpass</passphrase>
+ </server>
+ </servers>
-->
<repository>
<id>repository.jboss.org</id>
@@ -557,6 +557,197 @@
</profile>
<!--
+ Name: framework-default
+ Descr: Setup for default framework integration testing
+ -->
+ <profile>
+ <id>framework-default</id>
+ <activation>
+ <property>
+ <name>!framework</name>
+ </property>
+ </activation>
+ <properties>
+ <jboss.osgi.framework.properties>jboss-osgi-felix.properties</jboss.osgi.framework.properties>
+ </properties>
+ </profile>
+
+ <!--
+ Name: framework-felix
+ Descr: Setup for Felix framework integration testing
+ -->
+ <profile>
+ <id>framework-felix</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>felix</value>
+ </property>
+ </activation>
+ <properties>
+ <jboss.osgi.framework.properties>jboss-osgi-felix.properties</jboss.osgi.framework.properties>
+ </properties>
+ </profile>
+
+ <!--
+ Name: framework-equinox
+ Descr: Setup for Equinox framework integration testing
+ -->
+ <profile>
+ <id>framework-equinox</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>equinox</value>
+ </property>
+ </activation>
+ <properties>
+ <jboss.osgi.framework.properties>jboss-osgi-equinox.properties</jboss.osgi.framework.properties>
+ </properties>
+ </profile>
+
+ <!--
+ Name: framework-knopflerfish
+ Descr: Setup for Equinox framework integration testing
+ -->
+ <profile>
+ <id>framework-knopflerfish</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>knopflerfish</value>
+ </property>
+ </activation>
+ <properties>
+ <jboss.osgi.framework.properties>jboss-osgi-knopflerfish.properties</jboss.osgi.framework.properties>
+ </properties>
+ </profile>
+
+ <!--
+ Name: embedded-testing
+ Descr: Setup for embedded integration testing
+ -->
+ <profile>
+ <id>embedded-testing</id>
+ <activation>
+ <property>
+ <name>!target.container</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>java.protocol.handler.pkgs</name>
+ <value>org.jboss.net.protocol|org.jboss.virtual.protocol</value>
+ </property>
+ <property>
+ <name>jndi.server.port</name>
+ <value>1199</value>
+ </property>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${project.build.directory}</value>
+ </property>
+ <property>
+ <name>org.apache.xerces.xni.parser.XMLParserConfiguration</name>
+ <value>org.apache.xerces.parsers.XIncludeAwareParserConfiguration</value>
+ </property>
+ <property>
+ <name>jboss.osgi.framework.properties</name>
+ <value>${jboss.osgi.framework.properties}</value>
+ </property>
+ <property>
+ <name>org.jboss.osgi.husky.Invoker</name>
+ <value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
+ </property>
+ <property>
+ <name>test.archive.directory</name>
+ <value>${project.build.directory}/test-libs</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: remote-testing
+ Descr: Setup for remote integration testing
+ -->
+ <profile>
+ <id>remote-testing</id>
+ <activation>
+ <property>
+ <name>target.container</name>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-client</artifactId>
+ <scope>test</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>java.protocol.handler.pkgs</name>
+ <value>org.jboss.net.protocol|org.jboss.virtual.protocol</value>
+ </property>
+ <property>
+ <name>jndi.server.port</name>
+ <value>1099</value>
+ </property>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${project.build.directory}</value>
+ </property>
+ <property>
+ <name>org.apache.xerces.xni.parser.XMLParserConfiguration</name>
+ <value>org.apache.xerces.parsers.XIncludeAwareParserConfiguration</value>
+ </property>
+ <property>
+ <name>jboss.osgi.framework.properties</name>
+ <value>${jboss.osgi.framework.properties}</value>
+ </property>
+ <property>
+ <name>org.jboss.osgi.husky.Invoker</name>
+ <value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
+ </property>
+ <property>
+ <name>org.jboss.osgi.husky.runtime.connector.host</name>
+ <value>${jboss.bind.address}</value>
+ </property>
+ <property>
+ <name>org.jboss.osgi.husky.runtime.connector.port</name>
+ <value>5401</value>
+ </property>
+ <property>
+ <name>target.container</name>
+ <value>${target.container}</value>
+ </property>
+ <property>
+ <name>test.archive.directory</name>
+ <value>${project.build.directory}/test-libs</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
Name: jboss501
Descr: Setup for jboss501 integration testing
-->
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -81,6 +81,11 @@
*/
public class PropertiesBootstrapProvider implements OSGiBootstrapProvider
{
+ /** The default framework property: jboss.osgi.framework.properties */
+ public static final String OSGI_FRAMEWORK_CONFIG = "jboss.osgi.framework.properties";
+ /** The default framework config: jboss-osgi-framework.properties */
+ public static final String DEFAULT_OSGI_FRAMEWORK_PROPERTIES = "jboss-osgi-framework.properties";
+
/** The OSGi framework integration class: org.jboss.osgi.spi.framework.impl */
public static final String PROP_OSGI_FRAMEWORK_IMPL = "org.jboss.osgi.spi.framework.impl";
/** The OSGi framework integration class: org.jboss.osgi.spi.framework.autoInstall */
@@ -96,15 +101,6 @@
internalProps.add(PROP_OSGI_FRAMEWORK_AUTO_START);
}
- /** The default framework beans property: jboss.osgi.bootstrap.config */
- public static final String OSGI_BOOTSTRAP_CONFIG = "jboss.osgi.bootstrap.config";
- /** The default framework beans: jboss-osgi-bootstrap-beans.xml */
- public static final String DEFAULT_OSGI_BOOTSTRAP_PROPERTIES = "jboss-osgi-bootstrap.properties";
- /** The default framework beans property: jboss.osgi.framework.config */
- public static final String OSGI_FRAMEWORK_CONFIG = "jboss.osgi.framework.config";
- /** The default framework beans: jboss-osgi-beans.xml */
- public static final String DEFAULT_OSGI_FRAMEWORK_PROPERTIES = "jboss-osgi-framework.properties";
-
private OSGiFramework framework;
private boolean configured;
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerBootstrapProvider.java 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerBootstrapProvider.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -42,12 +42,12 @@
*/
public class MicrocontainerBootstrapProvider extends AbstractInstanceProvider implements OSGiBootstrapProvider
{
- /** The default framework beans property: jboss.osgi.bootstrap.config */
- public static final String OSGI_BOOTSTRAP_CONFIG = "jboss.osgi.bootstrap.config";
+ /** The default framework beans property: jboss.osgi.bootstrap.beans */
+ public static final String OSGI_BOOTSTRAP_BEANS = "jboss.osgi.bootstrap.beans";
/** The default framework beans: jboss-osgi-bootstrap-beans.xml */
public static final String DEFAULT_OSGI_BOOTSTRAP_XML = "jboss-osgi-bootstrap-beans.xml";
- /** The default framework beans property: jboss.osgi.framework.config */
- public static final String OSGI_FRAMEWORK_CONFIG = "jboss.osgi.framework.config";
+ /** The default framework beans property: jboss.osgi.framework.beans */
+ public static final String OSGI_FRAMEWORK_BEANS = "jboss.osgi.framework.beans";
/** The default framework beans: jboss-osgi-beans.xml */
public static final String DEFAULT_OSGI_FRAMEWORK_XML = "jboss-osgi-beans.xml";
@@ -123,14 +123,14 @@
private void configureWithDefaultBeans()
{
- String defaultFrameworkBeans = System.getProperty(OSGI_FRAMEWORK_CONFIG, DEFAULT_OSGI_FRAMEWORK_XML);
+ String defaultFrameworkBeans = System.getProperty(OSGI_FRAMEWORK_BEANS, DEFAULT_OSGI_FRAMEWORK_XML);
configure(defaultFrameworkBeans);
}
private void bootstrapKernel()
{
// Deploy the bootstrap beans if DEFAULT_BOOTSTRAP_BEANS is on the classpath
- String defaultBootstrapBeans = System.getProperty(OSGI_BOOTSTRAP_CONFIG, DEFAULT_OSGI_BOOTSTRAP_XML);
+ String defaultBootstrapBeans = System.getProperty(OSGI_BOOTSTRAP_BEANS, DEFAULT_OSGI_BOOTSTRAP_XML);
URL urlBootstrap = Thread.currentThread().getContextClassLoader().getResource(defaultBootstrapBeans);
if (urlBootstrap != null)
deployer.deploy(urlBootstrap);
Added: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java (rev 0)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.testing;
+
+//$Id$
+
+
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 05-May-2009
+ */
+public class BlueprintCapability extends Capability
+{
+ public BlueprintCapability()
+ {
+ addBundle("bundles/jboss-osgi-blueprint-impl.jar");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/BlueprintCapability.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HuskyCapability.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -23,9 +23,6 @@
//$Id$
-import java.util.Properties;
-
-
/**
* [TODO]
*
@@ -36,10 +33,6 @@
{
public HuskyCapability()
{
- Properties props = getProperties();
- //props.setProperty("org.jboss.osgi.jmx.host", System.getProperty("jboss.bind.address", "localhost"));
- //props.setProperty("org.jboss.osgi.jmx.rmi.port", "1198");
-
addBundle("bundles/jboss-osgi-husky-harness.jar");
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/MicrocontainerCapability.java 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/MicrocontainerCapability.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -36,6 +36,7 @@
{
addBundle("bundles/jboss-osgi-apache-xerces.jar");
addBundle("bundles/jboss-osgi-jaxb.jar");
+ addBundle("bundles/jboss-osgi-common-core.jar");
addBundle("bundles/jboss-osgi-xml-binding.jar");
addBundle("bundles/jboss-osgi-microcontainer.jar");
}
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -44,7 +44,7 @@
// Provide logging
final Logger log = Logger.getLogger(OSGiTest.class);
- private OSGiTestHelper helper;
+ private OSGiTestHelper helper = new OSGiTestHelper();
public OSGiTest()
{
@@ -56,7 +56,6 @@
public void setUp() throws Exception
{
log.debug("### START " + getLongName());
- helper = new OSGiTestHelper();
}
@After
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java 2009-05-26 19:33:54 UTC (rev 89449)
@@ -87,10 +87,13 @@
for (String location : capability.getBundles())
{
- AbstractBundle bundle = installBundle(location);
- bundle.start();
+ if (bundles.get(location) == null)
+ {
+ AbstractBundle bundle = installBundle(location);
+ bundle.start();
- bundles.put(location, bundle);
+ bundles.put(location, bundle);
+ }
}
capabilities.add(capability);
}
@@ -106,15 +109,18 @@
for (String location : bundleLocations)
{
- AbstractBundle bundle = bundles.get(location);
- try
+ AbstractBundle bundle = bundles.remove(location);
+ if (bundle != null)
{
- bundle.uninstall();
+ try
+ {
+ bundle.uninstall();
+ }
+ catch (BundleException ex)
+ {
+ log.error("Cannot uninstall bundle: " + bundle);
+ }
}
- catch (BundleException ex)
- {
- log.error("Cannot uninstall bundle: " + bundle);
- }
}
}
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-05-26 19:33:54 UTC (rev 89449)
@@ -22,9 +22,6 @@
<!-- Properties -->
<properties>
- <surefire.runtime.equinox>-Djboss.osgi.framework.config=jboss-osgi-equinox.properties</surefire.runtime.equinox>
- <surefire.runtime.felix>-Djboss.osgi.framework.config=jboss-osgi-felix.properties</surefire.runtime.felix>
- <surefire.runtime.knopflerfish>-Djboss.osgi.framework.config=jboss-osgi-knopflerfish.properties</surefire.runtime.knopflerfish>
</properties>
<!-- Dependencies -->
@@ -126,14 +123,6 @@
<filtering>true</filtering>
</testResource>
</testResources>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Djndi.server.port=1199</argLine>
- </configuration>
- </plugin>
- </plugins>
</build>
<!-- Profiles -->
@@ -150,25 +139,12 @@
<name>!framework</name>
</property>
</activation>
- <properties>
- <surefire.framework.profile.args>${surefire.common.args} ${surefire.runtime.felix}</surefire.framework.profile.args>
- </properties>
<dependencies>
<dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-runtime-felix</artifactId>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>${surefire.framework.profile.args}</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<!--
@@ -183,25 +159,12 @@
<value>felix</value>
</property>
</activation>
- <properties>
- <surefire.framework.profile.args>${surefire.common.args} ${surefire.runtime.felix}</surefire.framework.profile.args>
- </properties>
<dependencies>
<dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-runtime-felix</artifactId>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>${surefire.framework.profile.args}</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<!--
@@ -216,9 +179,6 @@
<value>equinox</value>
</property>
</activation>
- <properties>
- <surefire.framework.profile.args>${surefire.common.args} ${surefire.runtime.equinox}</surefire.framework.profile.args>
- </properties>
<dependencies>
<dependency>
<groupId>org.jboss.osgi</groupId>
@@ -230,7 +190,6 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${surefire.framework.profile.args}</argLine>
<includes>
<!-- Minimal bootstrap testing -->
<include>org/jboss/test/osgi/bootstrap/BootstrapTestCase.*</include>
@@ -253,9 +212,6 @@
<value>knopflerfish</value>
</property>
</activation>
- <properties>
- <surefire.framework.profile.args>${surefire.common.args} ${surefire.runtime.knopflerfish}</surefire.framework.profile.args>
- </properties>
<dependencies>
<dependency>
<groupId>org.jboss.osgi</groupId>
@@ -267,7 +223,6 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${surefire.framework.profile.args}</argLine>
<includes>
<!-- Minimal bootstrap testing -->
<include>org/jboss/test/osgi/bootstrap/BootstrapTestCase.*</include>
@@ -294,7 +249,6 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${surefire.framework.profile.args} -Djndi.server.port=1199</argLine>
<excludes>
<!-- Exclude tests that require remote access -->
<exclude>org/jboss/test/osgi/jbossas/**</exclude>
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/.settings/org.eclipse.jdt.core.prefs 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/.settings/org.eclipse.jdt.core.prefs 2009-05-26 19:33:54 UTC (rev 89449)
@@ -1,5 +1,12 @@
-#Wed Feb 04 11:13:20 CET 2009
+#Tue May 26 20:05:29 CEST 2009
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
Copied: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties (from rev 89409, projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-framework.properties)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties 2009-05-26 19:33:54 UTC (rev 89449)
@@ -0,0 +1,51 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id$
+#
+
+# The OSGiFramework implementation
+org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
+
+# Properties to configure the Framework
+org.osgi.framework.storage=${basedir}/target/osgi-store
+org.osgi.framework.storage.clean=onFirstInit
+
+# Framework bootdelegation
+org.osgi.framework.bootdelegation=org.osgi.service.log
+
+# Extra System Packages
+org.osgi.framework.system.packages.extra=\
+ org.jboss.logging, \
+ org.jboss.net.protocol, \
+ org.jboss.osgi.spi, \
+ org.jboss.osgi.spi.logging, \
+ org.jboss.osgi.spi.management, \
+ org.jboss.virtual, \
+ org.jboss.virtual.plugins.registry, \
+ org.jboss.virtual.plugins.context.jar, \
+ org.jboss.virtual.plugins.vfs.helpers, \
+ org.jboss.virtual.protocol, \
+ org.osgi.framework;version\=1.4, \
+ org.apache.log4j, \
+ org.jboss.util, \
+ org.jboss.util.id, \
+ org.jboss.util.threadpool, \
+ org.jboss.util.propertyeditor
+
+# These are needed by jboss-remoting
+# org.apache.log4j, \
+# org.jboss.util, \
+# org.jboss.util.id, \
+# org.jboss.util.threadpool, \
+# org.jboss.util.propertyeditor
+
+# Bundles that need to be installed with the Framework automatically
+org.jboss.osgi.spi.framework.autoInstall=\
+ file://${test.archive.directory}/bundles/org.osgi.compendium.jar
+
+# Bundles that need to be started automatically
+org.jboss.osgi.spi.framework.autoStart=\
+ file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-framework.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-framework.properties 2009-05-26 19:02:34 UTC (rev 89448)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-framework.properties 2009-05-26 19:33:54 UTC (rev 89449)
@@ -1,51 +0,0 @@
-#
-# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
-#
-# $Id$
-#
-
-# The OSGiFramework implementation
-org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
-
-# Properties to configure the Framework
-org.osgi.framework.storage=${basedir}/target/osgi-store
-org.osgi.framework.storage.clean=onFirstInit
-
-# Framework bootdelegation
-org.osgi.framework.bootdelegation=org.osgi.service.log
-
-# Extra System Packages
-org.osgi.framework.system.packages.extra=\
- org.jboss.logging, \
- org.jboss.net.protocol, \
- org.jboss.osgi.spi, \
- org.jboss.osgi.spi.logging, \
- org.jboss.osgi.spi.management, \
- org.jboss.virtual, \
- org.jboss.virtual.plugins.registry, \
- org.jboss.virtual.plugins.context.jar, \
- org.jboss.virtual.plugins.vfs.helpers, \
- org.jboss.virtual.protocol, \
- org.osgi.framework;version\=1.4, \
- org.apache.log4j, \
- org.jboss.util, \
- org.jboss.util.id, \
- org.jboss.util.threadpool, \
- org.jboss.util.propertyeditor
-
-# These are needed by jboss-remoting
-# org.apache.log4j, \
-# org.jboss.util, \
-# org.jboss.util.id, \
-# org.jboss.util.threadpool, \
-# org.jboss.util.propertyeditor
-
-# Bundles that need to be installed with the Framework automatically
-org.jboss.osgi.spi.framework.autoInstall=\
- file://${test.archive.directory}/bundles/org.osgi.compendium.jar
-
-# Bundles that need to be started automatically
-org.jboss.osgi.spi.framework.autoStart=\
- file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file
16 years, 7 months