JBoss-OSGI SVN: r87323 - in projects/jboss-osgi/trunk: bundle/remotelog/src/main/java/org/jboss/osgi/service and 11 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-15 05:51:24 -0400 (Wed, 15 Apr 2009)
New Revision: 87323
Added:
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/NotImplementedException.java
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogActivator.java
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogReaderService.java
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/service/
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/service/microcontainer/
Removed:
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remlog/
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/mc/
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/package.html
Modified:
projects/jboss-osgi/trunk/bundle/remotelog/pom.xml
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogEntry.java
projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java
projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/service/microcontainer/MicrocontainerService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java
Log:
Clarify package structure of SPI provided services
Modified: projects/jboss-osgi/trunk/bundle/remotelog/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/remotelog/pom.xml 2009-04-15 09:44:13 UTC (rev 87322)
+++ projects/jboss-osgi/trunk/bundle/remotelog/pom.xml 2009-04-15 09:51:24 UTC (rev 87323)
@@ -78,8 +78,8 @@
<configuration>
<instructions>
<Bundle-SymbolicName>org.jboss.osgi.service.remote.log</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.service.remlog.RemoteLogActivator</Bundle-Activator>
- <Export-Package>org.jboss.osgi.service.remlog;version=${version}</Export-Package>
+ <Bundle-Activator>org.jboss.osgi.service.remotelog.RemoteLogActivator</Bundle-Activator>
+ <Export-Package>org.jboss.osgi.service.remotelog;version=${version}</Export-Package>
<Import-Package>
org.osgi.framework,
org.osgi.service.log,
Copied: projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/NotImplementedException.java (from rev 87317, projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remlog/NotImplementedException.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/NotImplementedException.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/NotImplementedException.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -0,0 +1,43 @@
+/*
+ * 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.remotelog;
+
+// $Id$
+
+/**
+ * A RuntimeException that should be thrown for unimplemented features
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Jun-2008
+ */
+@SuppressWarnings("serial")
+public class NotImplementedException extends RuntimeException
+{
+ public NotImplementedException()
+ {
+ }
+
+ public NotImplementedException(String message)
+ {
+ super(message);
+ }
+}
Copied: projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogActivator.java (from rev 87317, projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogActivator.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -0,0 +1,113 @@
+/*
+ * 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.remotelog;
+
+//$Id$
+
+import java.util.Properties;
+
+import org.jboss.osgi.service.remotelog.internal.RemoteLogReaderServiceImpl;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Jan-2009
+ */
+public class RemoteLogActivator implements BundleActivator
+{
+ public static final String REMOTE_LOG_SENDER = "org.jboss.osgi.service.remote.log.sender";
+ public static final String REMOTE_LOG_READER = "org.jboss.osgi.service.remote.log.reader";
+ public static final String REMOTE_LOG_HOST = "org.jboss.osgi.service.remote.log.host";
+ public static final String REMOTE_LOG_PORT = "org.jboss.osgi.service.remote.log.port";
+
+ private Boolean isReader = Boolean.FALSE;
+ private Boolean isSender = Boolean.FALSE;
+ private RemoteLogReaderServiceImpl readerService;
+ private ServiceRegistration readerRegistration;
+ private RemoteLogListener remoteSender;
+
+ public void start(BundleContext context)
+ {
+ String readerProp = context.getProperty(REMOTE_LOG_READER);
+ String senderProp = context.getProperty(REMOTE_LOG_SENDER);
+ String hostProp = context.getProperty(REMOTE_LOG_HOST);
+ String portProp = context.getProperty(REMOTE_LOG_PORT);
+
+ if (readerProp != null)
+ isReader = Boolean.valueOf(readerProp);
+
+ if (senderProp != null)
+ isSender = Boolean.valueOf(senderProp);
+
+ String host = hostProp != null ? hostProp : "localhost";
+ String port = portProp != null ? portProp : "5400";
+
+ Properties props = new Properties();
+ props.put(REMOTE_LOG_HOST, host);
+ props.put(REMOTE_LOG_PORT, port);
+
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
+ if (isReader == true)
+ {
+ readerService = new RemoteLogReaderServiceImpl(context, props);
+ readerRegistration = context.registerService(RemoteLogReaderService.class.getName(), readerService, props);
+ readerService.start();
+ }
+
+ if (isSender == true)
+ {
+ remoteSender = new RemoteLogListener(context, props);
+ remoteSender.start();
+ }
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ if (isReader == true)
+ {
+ readerRegistration.unregister();
+ readerRegistration = null;
+
+ readerService.stop();
+ readerService = null;
+ }
+
+ if (isSender == true)
+ {
+ remoteSender.stop();
+ remoteSender = null;
+ }
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java (from rev 87317, projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogListener.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -0,0 +1,117 @@
+/*
+ * 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.remotelog;
+
+//$Id$
+
+import java.util.Properties;
+
+import org.jboss.osgi.service.remotelog.internal.RemoteLogEntry;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvokerLocator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogListener;
+import org.osgi.service.log.LogReaderService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Apr-2009
+ */
+public class RemoteLogListener implements LogListener
+{
+ private BundleContext context;
+ private ServiceTracker tracker;
+ private String host;
+ private Integer port;
+
+ private Client remotingClient;
+
+ public RemoteLogListener(BundleContext context, Properties props)
+ {
+ this.context = context;
+ this.host = props.getProperty(RemoteLogActivator.REMOTE_LOG_HOST);
+ this.port = new Integer(props.getProperty(RemoteLogActivator.REMOTE_LOG_PORT));
+
+ // Get the remoting client
+ try
+ {
+ String locatorURI = "socket://" + host + ":" + port;
+ InvokerLocator locator = new InvokerLocator(locatorURI);
+ remotingClient = new Client(locator);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ public void start()
+ {
+ final LogListener logListener = this;
+ tracker = new ServiceTracker(context, LogReaderService.class.getName(), null)
+ {
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ LogReaderService logReader = (LogReaderService)super.addingService(reference);
+ logReader.addLogListener(logListener);
+ return logReader;
+ }
+ };
+ tracker.open();
+ }
+
+ public void stop()
+ {
+ System.out.println("remotingClient.disconnect");
+ remotingClient.disconnect();
+
+ LogReaderService logReader = (LogReaderService)tracker.getService();
+ if (logReader != null)
+ logReader.removeLogListener(this);
+ }
+
+ public void logged(LogEntry entry)
+ {
+ RemoteLogEntry remoteEntry = new RemoteLogEntry(entry);
+ try
+ {
+ if (remotingClient.isConnected() == false)
+ {
+ System.out.println("remotingClient.connect");
+ remotingClient.connect();
+ }
+
+ System.out.println("invoke: " + remoteEntry);
+ remotingClient.invoke(remoteEntry);
+ }
+ catch (Throwable ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogReaderService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogReaderService.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogReaderService.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -0,0 +1,36 @@
+/*
+ * 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.remotelog;
+
+//$Id$
+
+import org.osgi.service.log.LogReaderService;
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Apr-2009
+ */
+public interface RemoteLogReaderService extends LogReaderService
+{
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/RemoteLogReaderService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal (from rev 87317, projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remlog/internal)
Modified: projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogEntry.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java 2009-04-15 08:43:19 UTC (rev 87317)
+++ projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogEntry.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -19,7 +19,7 @@
* 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.remlog.internal;
+package org.jboss.osgi.service.remotelog.internal;
// $Id$
@@ -32,7 +32,7 @@
import java.util.Dictionary;
import java.util.Enumeration;
-import org.jboss.osgi.service.remlog.NotImplementedException;
+import org.jboss.osgi.service.remotelog.NotImplementedException;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
Modified: projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java 2009-04-15 08:43:19 UTC (rev 87317)
+++ projects/jboss-osgi/trunk/bundle/remotelog/src/main/java/org/jboss/osgi/service/remotelog/internal/RemoteLogReaderServiceImpl.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -19,7 +19,7 @@
* 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.remlog.internal;
+package org.jboss.osgi.service.remotelog.internal;
//$Id$
@@ -30,9 +30,9 @@
import javax.management.MBeanServer;
-import org.jboss.osgi.service.remlog.NotImplementedException;
-import org.jboss.osgi.service.remlog.RemoteLogActivator;
-import org.jboss.osgi.service.remlog.RemoteLogReaderService;
+import org.jboss.osgi.service.remotelog.NotImplementedException;
+import org.jboss.osgi.service.remotelog.RemoteLogActivator;
+import org.jboss.osgi.service.remotelog.RemoteLogReaderService;
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.ServerInvocationHandler;
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-04-15 09:44:13 UTC (rev 87322)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-15 09:51:24 UTC (rev 87323)
@@ -17,7 +17,7 @@
javax.management,
javax.xml.parsers,
org.jboss.logging,
- org.jboss.osgi.service,
+ org.jboss.osgi.spi.service,
org.jboss.osgi.spi.management,
org.osgi.framework; version=1.4,
org.osgi.service.packageadmin; version=1.2,
@@ -40,7 +40,7 @@
</bean>
<!-- A Service that gives access to the Microcontainer Kernel -->
- <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.mc.MicrocontainerService">
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.spi.service.microcontainer.MicrocontainerService">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></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-04-15 09:44:13 UTC (rev 87322)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-15 09:51:24 UTC (rev 87323)
@@ -16,7 +16,7 @@
javax.management,
javax.xml.parsers,
org.jboss.logging,
- org.jboss.osgi.service.mc,
+ org.jboss.osgi.spi.service.microcontainer,
org.jboss.osgi.spi.management,
org.osgi.framework; version=1.4,
org.osgi.service.packageadmin; version=1.2,
@@ -62,7 +62,7 @@
</bean>
<!-- A Service that gives access to the Microcontainer Kernel -->
- <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.mc.MicrocontainerService">
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.spi.service.microcontainer.MicrocontainerService">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
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-04-15 09:44:13 UTC (rev 87322)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-15 09:51:24 UTC (rev 87323)
@@ -16,7 +16,7 @@
javax.management,
javax.xml.parsers,
org.jboss.logging,
- org.jboss.osgi.service,
+ org.jboss.osgi.spi.service,
org.jboss.osgi.spi.management,
org.osgi.framework; version=1.4,
org.osgi.service.packageadmin; version=1.2,
@@ -39,7 +39,7 @@
</bean>
<!-- A Service that gives access to the Microcontainer Kernel -->
- <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.mc.MicrocontainerService">
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.spi.service.microcontainer.MicrocontainerService">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
Deleted: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/package.html
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/package.html 2009-04-15 09:44:13 UTC (rev 87322)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/package.html 2009-04-15 09:51:24 UTC (rev 87323)
@@ -1,5 +0,0 @@
-<html>
-<body>
-A collection of SPI provided services.
-</body>
-</html>
Copied: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/service/microcontainer (from rev 87316, projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/mc)
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/service/microcontainer/MicrocontainerService.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/mc/MicrocontainerService.java 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/service/microcontainer/MicrocontainerService.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -19,7 +19,7 @@
* 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.mc;
+package org.jboss.osgi.spi.service.microcontainer;
//$Id$
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-15 09:44:13 UTC (rev 87322)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -27,7 +27,7 @@
import org.jboss.osgi.common.log.LogEntryCache;
import org.jboss.osgi.common.log.LogEntryFilter;
-import org.jboss.osgi.service.remlog.RemoteLogReaderService;
+import org.jboss.osgi.service.remotelog.RemoteLogReaderService;
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiFramework;
import org.jboss.osgi.spi.framework.RemoteBundle;
@@ -72,10 +72,12 @@
tracker.open();
// Install the RemoteLogReaderService in the local OSGiFramework.
+ // The 'org.jboss.osgi.service.remote.log.reader' property must be set to 'true'
installBundle(sysContext, "bundles/jboss-osgi-remotelog.jar", true);
// Deploy the RemoteLogListener to the remote OSGiFramework.
- deployBundle("bundles/jboss-osgi-service-remote-log.jar");
+ // The 'org.jboss.osgi.service.remote.log.sender' property must be set to 'true'
+ deployBundle("bundles/jboss-osgi-remotelog.jar");
// Deploy the test bundle
RemoteBundle bundleA = deployBundle("example/example-log-bundleA.jar");
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java 2009-04-15 09:44:13 UTC (rev 87322)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java 2009-04-15 09:51:24 UTC (rev 87323)
@@ -26,8 +26,8 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
-import org.jboss.osgi.service.mc.MicrocontainerService;
import org.jboss.osgi.spi.management.ObjectNameFactory;
+import org.jboss.osgi.spi.service.microcontainer.MicrocontainerService;
import org.jboss.test.osgi.service.microcontainer.bundle.Foo;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceEvent;
17 years, 3 months
JBoss-OSGI SVN: r87317 - in projects/jboss-osgi/trunk: build/distribution and 53 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-15 04:43:19 -0400 (Wed, 15 Apr 2009)
New Revision: 87317
Added:
projects/jboss-osgi/trunk/bundle/logging/
projects/jboss-osgi/trunk/bundle/remotelog/
projects/jboss-osgi/trunk/bundle/target/
projects/jboss-osgi/trunk/bundle/target/pom-transformed.xml
projects/jboss-osgi/trunk/bundle/webconsole/
projects/jboss-osgi/trunk/service/logging/bin/
projects/jboss-osgi/trunk/service/logging/bin/src/
projects/jboss-osgi/trunk/service/logging/bin/src/main/
projects/jboss-osgi/trunk/service/logging/bin/src/main/java/
projects/jboss-osgi/trunk/service/logging/bin/src/main/java/org/
projects/jboss-osgi/trunk/service/logging/bin/src/main/java/org/jboss/
projects/jboss-osgi/trunk/service/logging/bin/src/main/java/org/jboss/osgi/
projects/jboss-osgi/trunk/service/logging/bin/src/main/java/org/jboss/osgi/service/
projects/jboss-osgi/trunk/service/logging/bin/src/main/java/org/jboss/osgi/service/logging/
projects/jboss-osgi/trunk/service/remote-log/bin/
projects/jboss-osgi/trunk/service/remote-log/bin/src/
projects/jboss-osgi/trunk/service/remote-log/bin/src/main/
projects/jboss-osgi/trunk/service/remote-log/bin/src/main/java/
projects/jboss-osgi/trunk/service/remote-log/bin/src/main/java/org/
projects/jboss-osgi/trunk/service/remote-log/bin/src/main/java/org/jboss/
projects/jboss-osgi/trunk/service/remote-log/bin/src/main/java/org/jboss/osgi/
projects/jboss-osgi/trunk/service/remote-log/bin/src/main/java/org/jboss/osgi/service/
projects/jboss-osgi/trunk/service/remote-log/bin/src/main/java/org/jboss/osgi/service/remlog/
projects/jboss-osgi/trunk/service/remote-log/bin/src/main/java/org/jboss/osgi/service/remlog/internal/
projects/jboss-osgi/trunk/service/webconsole/bin/
projects/jboss-osgi/trunk/service/webconsole/bin/src/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/apache/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/apache/felix/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/apache/felix/webconsole/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/apache/felix/webconsole/internal/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/apache/felix/webconsole/internal/servlet/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/jboss/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/jboss/osgi/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/jboss/osgi/service/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/jboss/osgi/service/webconsole/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/jboss/osgi/service/webconsole/internal/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/java/org/jboss/osgi/service/webconsole/internal/plugins/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/resources/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/resources/OSGI-INF/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/resources/OSGI-INF/metatype/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/resources/res/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/resources/res/imgs/
projects/jboss-osgi/trunk/service/webconsole/bin/src/main/resources/res/ui/
projects/jboss-osgi/trunk/target/
projects/jboss-osgi/trunk/target/pom-transformed.xml
Removed:
projects/jboss-osgi/trunk/service/.project
projects/jboss-osgi/trunk/service/.settings/
projects/jboss-osgi/trunk/service/logging/.classpath
projects/jboss-osgi/trunk/service/logging/.settings/
projects/jboss-osgi/trunk/service/logging/pom.xml
projects/jboss-osgi/trunk/service/logging/src/
projects/jboss-osgi/trunk/service/pom.xml
projects/jboss-osgi/trunk/service/remote-log/.classpath
projects/jboss-osgi/trunk/service/remote-log/.settings/
projects/jboss-osgi/trunk/service/remote-log/pom.xml
projects/jboss-osgi/trunk/service/remote-log/src/
projects/jboss-osgi/trunk/service/webconsole/.classpath
projects/jboss-osgi/trunk/service/webconsole/.settings/
projects/jboss-osgi/trunk/service/webconsole/pom.xml
projects/jboss-osgi/trunk/service/webconsole/src/
Modified:
projects/jboss-osgi/trunk/build/distribution/pom.xml
projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/bundle/common/pom.xml
projects/jboss-osgi/trunk/bundle/logging/pom.xml
projects/jboss-osgi/trunk/bundle/pom.xml
projects/jboss-osgi/trunk/bundle/remotelog/pom.xml
projects/jboss-osgi/trunk/bundle/webconsole/pom.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/runtime/equinox/pom.xml
projects/jboss-osgi/trunk/runtime/felix/pom.xml
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/pom.xml
projects/jboss-osgi/trunk/service/remote-log/.project
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
Log:
Migrate services to bundles
Modified: projects/jboss-osgi/trunk/build/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -41,45 +41,45 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-deployer</artifactId>
+ <artifactId>jboss-osgi-logging</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-deployer</artifactId>
+ <artifactId>jboss-osgi-logging</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-spi</artifactId>
+ <artifactId>jboss-osgi-runtime-deployer</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-spi</artifactId>
+ <artifactId>jboss-osgi-runtime-deployer</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-webconsole</artifactId>
+ <artifactId>jboss-osgi-runtime-spi</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-webconsole</artifactId>
+ <artifactId>jboss-osgi-runtime-spi</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-logging</artifactId>
+ <artifactId>jboss-osgi-webconsole</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-logging</artifactId>
+ <artifactId>jboss-osgi-webconsole</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
</dependency>
Modified: projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -117,8 +117,8 @@
<include name="jboss-osgi-runtime-deployer.jar" />
<include name="jboss-osgi-runtime-felix.jar" />
<include name="jboss-osgi-runtime-spi.jar" />
- <include name="jboss-osgi-service-logging.jar" />
- <include name="jboss-osgi-service-webconsole.jar" />
+ <include name="jboss-osgi-logging.jar" />
+ <include name="jboss-osgi-webconsole.jar" />
<include name="org.apache.felix.framework.jar" />
<include name="org.apache.felix.configadmin.jar" />
<include name="org.apache.felix.http.jetty.jar" />
@@ -133,8 +133,8 @@
<include name="jboss-osgi-runtime-deployer-sources.jar" />
<include name="jboss-osgi-runtime-felix-sources.jar" />
<include name="jboss-osgi-runtime-spi-sources.jar" />
- <include name="jboss-osgi-service-logging-sources.jar" />
- <include name="jboss-osgi-service-webconsole-sources.jar" />
+ <include name="jboss-osgi-logging-sources.jar" />
+ <include name="jboss-osgi-webconsole-sources.jar" />
</fileset>
</pack>
@@ -168,8 +168,8 @@
<include name="org.apache.felix.log.jar" />
<include name="org.apache.felix.metatype.jar" />
<include name="jboss-osgi-common.jar" />
- <include name="jboss-osgi-service-logging.jar" />
- <include name="jboss-osgi-service-webconsole.jar" />
+ <include name="jboss-osgi-logging.jar" />
+ <include name="jboss-osgi-webconsole.jar" />
</fileset>
<!-- Felix Integration -->
@@ -244,8 +244,8 @@
<include name="org.apache.felix.log.jar" />
<include name="org.apache.felix.metatype.jar" />
<include name="jboss-osgi-common.jar" />
- <include name="jboss-osgi-service-logging.jar" />
- <include name="jboss-osgi-service-webconsole.jar" />
+ <include name="jboss-osgi-logging.jar" />
+ <include name="jboss-osgi-webconsole.jar" />
</fileset>
<!-- Felix Integration -->
Modified: projects/jboss-osgi/trunk/bundle/common/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/bundle/common/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -37,10 +37,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
- <Bundle-Name>JBossOSGi Common</Bundle-Name>
- <Bundle-Vendor>JBoss, a division of RedHat</Bundle-Vendor>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Version>${version}</Bundle-Version>
<Export-Package>
org.jboss.osgi.common,
org.jboss.osgi.common.log
Copied: projects/jboss-osgi/trunk/bundle/logging (from rev 87316, projects/jboss-osgi/trunk/service/logging)
Property changes on: projects/jboss-osgi/trunk/bundle/logging
___________________________________________________________________
Name: svn:ignore
+ target
Name: svn:mergeinfo
+
Modified: projects/jboss-osgi/trunk/bundle/logging/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/logging/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/bundle/logging/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -2,16 +2,16 @@
<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 - Service Logging</name>
+ <name>JBossOSGi - Bundle Logging</name>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-logging</artifactId>
+ <artifactId>jboss-osgi-logging</artifactId>
<packaging>bundle</packaging>
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service</artifactId>
+ <artifactId>jboss-osgi-bundle</artifactId>
<version>1.0.0.Beta1</version>
</parent>
@@ -36,6 +36,11 @@
<artifactId>jboss-logging-spi</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
+ <version>${version}</version>
+ </dependency>
</dependencies>
<build>
Modified: projects/jboss-osgi/trunk/bundle/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/bundle/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -11,8 +11,12 @@
<version>1.0.0.Beta1</version>
</parent>
+ <!-- Modules -->
<modules>
<module>common</module>
+ <module>logging</module>
+ <module>remotelog</module>
+ <module>webconsole</module>
</modules>
</project>
Copied: projects/jboss-osgi/trunk/bundle/remotelog (from rev 87316, projects/jboss-osgi/trunk/service/remote-log)
Modified: projects/jboss-osgi/trunk/bundle/remotelog/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/bundle/remotelog/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -2,16 +2,16 @@
<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 - Service Remote Logging</name>
+ <name>JBossOSGi - Bundle Remote Logging</name>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-remote-log</artifactId>
+ <artifactId>jboss-osgi-remotelog</artifactId>
<packaging>bundle</packaging>
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service</artifactId>
+ <artifactId>jboss-osgi-bundle</artifactId>
<version>1.0.0.Beta1</version>
</parent>
Added: projects/jboss-osgi/trunk/bundle/target/pom-transformed.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/target/pom-transformed.xml (rev 0)
+++ projects/jboss-osgi/trunk/bundle/target/pom-transformed.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -0,0 +1,22 @@
+<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 - Bundle</name>
+ <artifactId>jboss-osgi-bundle</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Beta1</version>
+ </parent>
+
+ <!-- Modules -->
+ <modules>
+ <module>common</module>
+ <module>logging</module>
+ <module>remotelog</module>
+ <module>webconsole</module>
+ </modules>
+
+</project>
Property changes on: projects/jboss-osgi/trunk/bundle/target/pom-transformed.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/bundle/webconsole (from rev 87316, projects/jboss-osgi/trunk/service/webconsole)
Property changes on: projects/jboss-osgi/trunk/bundle/webconsole
___________________________________________________________________
Name: svn:ignore
+ target
Name: svn:mergeinfo
+
Modified: projects/jboss-osgi/trunk/bundle/webconsole/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/webconsole/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/bundle/webconsole/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,16 +1,16 @@
<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 - Service WebConsole</name>
- <description>JBossOSGi - WebConsole Service</description>
+ <name>JBossOSGi - Bundle WebConsole</name>
+ <description>JBossOSGi - WebConsole</description>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-webconsole</artifactId>
+ <artifactId>jboss-osgi-webconsole</artifactId>
<packaging>bundle</packaging>
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi</artifactId>
+ <artifactId>jboss-osgi-bundle</artifactId>
<version>1.0.0.Beta1</version>
</parent>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -15,7 +15,7 @@
<version>4</version>
</parent>
- <url>http://www.jboss.org/jbossmc</url>
+ <url>http://www.jboss.org/community/wiki/JBossOSGi</url>
<description>JBossOSGi</description>
<scm>
@@ -30,7 +30,6 @@
<module>repository</module>
<module>runtime</module>
<module>bundle</module>
- <module>service</module>
<module>testsuite</module>
</modules>
Modified: projects/jboss-osgi/trunk/runtime/equinox/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/runtime/equinox/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -17,7 +17,6 @@
<!-- Properties -->
<properties>
- <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/resources/tst.policy</surefire.security.args>
</properties>
<!-- Dependencies -->
@@ -61,30 +60,9 @@
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
- <testResource>
- <directory>src/testsuite/resources</directory>
- </testResource>
</testResources>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src/testsuite</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
@@ -103,16 +81,6 @@
</executions>
</plugin>
<plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>src/testsuite</directory>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
@@ -123,71 +91,8 @@
</plugins>
</build>
+ <!-- Profiles -->
<profiles>
-
- <!--
- Name: framework-equinox
- Descr: Setup for Equinox integration testing
- -->
- <profile>
- <id>framework-equinox</id>
- <activation>
- <property>
- <name>framework</name>
- <value>equinox</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <version>${version}</version>
- <type>zip</type>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <type>zip</type>
- <outputDirectory>src/testsuite</outputDirectory>
- <excludes>test-libs/**</excludes>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <type>zip</type>
- <outputDirectory>target</outputDirectory>
- <includes>test-libs/**</includes>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>org/jboss/test/osgi/equinox/**</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
</profiles>
</project>
Modified: projects/jboss-osgi/trunk/runtime/felix/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -17,7 +17,6 @@
<!-- Properties -->
<properties>
- <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/resources/tst.policy</surefire.security.args>
</properties>
<!-- Dependencies -->
@@ -56,30 +55,9 @@
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
- <testResource>
- <directory>src/testsuite/resources</directory>
- </testResource>
</testResources>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src/testsuite</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
@@ -98,16 +76,6 @@
</executions>
</plugin>
<plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>src/testsuite</directory>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
@@ -120,134 +88,6 @@
<!-- Profiles -->
<profiles>
-
- <!--
- Name: framework-felix
- Descr: Setup for Felix integration testing
- -->
- <profile>
- <id>framework-felix</id>
- <activation>
- <property>
- <name>framework</name>
- <value>felix</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <version>${version}</version>
- <type>zip</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-common</artifactId>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-remote-log</artifactId>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <type>zip</type>
- <outputDirectory>src/testsuite</outputDirectory>
- <excludes>test-libs/**</excludes>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <type>zip</type>
- <outputDirectory>target</outputDirectory>
- <includes>test-libs/**</includes>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <!--
- Name: embedded-tesing
- Descr: Setup for embedded integration testing
- -->
- <profile>
- <id>embedded-tesing</id>
- <activation>
- <property>
- <name>!jboss.bind.address</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- Exclude tests that require remote access -->
- <exclude>org/jboss/test/osgi/deployer/**</exclude>
- <exclude>org/jboss/test/osgi/**/*RemoteTestCase.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <!--
- Name: remote-tesing
- Descr: Setup for remote integration testing
- -->
- <profile>
- <id>remote-tesing</id>
- <activation>
- <property>
- <name>jboss.bind.address</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>
- <argLine>${surefire.security.args}</argLine>
- <excludes>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
</profiles>
</project>
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-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -51,7 +51,7 @@
<list elementClass="java.net.URI">
<value>${jboss.server.home.url}/deploy/osgi/org.osgi.compendium.jar</value>
<value>${jboss.server.home.url}/deploy/osgi/jboss-osgi-common.jar</value>
- <value>${jboss.server.home.url}/deploy/osgi/jboss-osgi-service-logging.jar</value>
+ <value>${jboss.server.home.url}/deploy/osgi/jboss-osgi-logging.jar</value>
</list>
</property>
</bean>
Modified: projects/jboss-osgi/trunk/runtime/knopflerfish/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -17,7 +17,6 @@
<!-- Properties -->
<properties>
- <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/resources/tst.policy</surefire.security.args>
</properties>
<!-- Dependencies -->
@@ -61,30 +60,9 @@
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
- <testResource>
- <directory>src/testsuite/resources</directory>
- </testResource>
</testResources>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src/testsuite</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
@@ -103,16 +81,6 @@
</executions>
</plugin>
<plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>src/testsuite</directory>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
@@ -123,71 +91,8 @@
</plugins>
</build>
+ <!-- Profiles -->
<profiles>
-
- <!--
- Name: framework-knopflerfish
- Descr: Setup for Knopflerfish integration testing
- -->
- <profile>
- <id>framework-knopflerfish</id>
- <activation>
- <property>
- <name>framework</name>
- <value>knopflerfish</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <version>${version}</version>
- <type>zip</type>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <type>zip</type>
- <outputDirectory>src/testsuite</outputDirectory>
- <excludes>test-libs/**</excludes>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testsuite</artifactId>
- <type>zip</type>
- <outputDirectory>target</outputDirectory>
- <includes>test-libs/**</includes>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>org/jboss/test/osgi/knopflerfish/**</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
</profiles>
</project>
Deleted: projects/jboss-osgi/trunk/service/.project
===================================================================
--- projects/jboss-osgi/trunk/service/.project 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/.project 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>jboss-osgi-service</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>
Deleted: projects/jboss-osgi/trunk/service/logging/.classpath
===================================================================
--- projects/jboss-osgi/trunk/service/logging/.classpath 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/logging/.classpath 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <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"/>
-</classpath>
Deleted: projects/jboss-osgi/trunk/service/logging/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/logging/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/logging/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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 - Service Logging</name>
-
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-logging</artifactId>
- <packaging>bundle</packaging>
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service</artifactId>
- <version>1.0.0.Beta1</version>
- </parent>
-
- <!-- Properties -->
- <properties>
- </properties>
-
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>org.jboss.osgi.service.logging</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.service.logging.LoggingServiceActivator</Bundle-Activator>
- <Private-Package>org.jboss.osgi.service.logging</Private-Package>
- <Import-Package>
- org.jboss.logging,
- org.osgi.framework,
- org.osgi.service.log,
- org.osgi.util.tracker
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
Deleted: projects/jboss-osgi/trunk/service/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,20 +0,0 @@
-<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 - Service</name>
- <artifactId>jboss-osgi-service</artifactId>
- <packaging>pom</packaging>
-
- <parent>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta1</version>
- </parent>
-
- <modules>
- <module>logging</module>
- <module>remote-log</module>
- <module>webconsole</module>
- </modules>
-
-</project>
Deleted: projects/jboss-osgi/trunk/service/remote-log/.classpath
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/.classpath 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/remote-log/.classpath 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <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"/>
-</classpath>
Modified: projects/jboss-osgi/trunk/service/remote-log/.project
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/.project 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/remote-log/.project 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-osgi-service-remlog</name>
+ <name>jboss-osgi-service-remote-log</name>
<comment></comment>
<projects>
</projects>
Deleted: projects/jboss-osgi/trunk/service/remote-log/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/remote-log/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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 - Service Remote Logging</name>
-
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-remote-log</artifactId>
- <packaging>bundle</packaging>
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service</artifactId>
- <version>1.0.0.Beta1</version>
- </parent>
-
- <!-- Properties -->
- <properties>
- <version.concurrent>1.3.4</version.concurrent>
- <version.jboss.remoting>2.5.0.SP2</version.jboss.remoting>
- <version.jboss.serialization>1.0.3.GA</version.jboss.serialization>
- </properties>
-
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-spi</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Remoting Dependencies -->
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting-core</artifactId>
- <version>${version.jboss.remoting}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting-socket</artifactId>
- <version>${version.jboss.remoting}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.remoting</groupId>
- <artifactId>jboss-remoting-socket-client</artifactId>
- <version>${version.jboss.remoting}</version>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-serialization</artifactId>
- <version>${version.jboss.serialization}</version>
- </dependency>
- <dependency>
- <groupId>concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <version>${version.concurrent}</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>org.jboss.osgi.service.remote.log</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.service.remlog.RemoteLogActivator</Bundle-Activator>
- <Export-Package>org.jboss.osgi.service.remlog;version=${version}</Export-Package>
- <Import-Package>
- org.osgi.framework,
- org.osgi.service.log,
- org.osgi.util.tracker,
-
- javax.crypto;resolution:=optional,
- javax.crypto.spec;resolution:=optional,
- javax.management,
- javax.naming,
- javax.net,
- javax.net.ssl,
- javax.servlet;resolution:=optional,
- javax.servlet.http;resolution:=optional,
- org.apache.log4j,
- org.jboss.logging,
- org.jboss.mx.util;resolution:=optional,
- org.jboss.remoting;resolution:=optional,
- org.jboss.remoting.*;resolution:=optional,
- org.jboss.util.*,
- org.w3c.dom;resolution:=optional,
-
- <!-- jboss-serialization -->
- gnu.trove;resolution:=optional,
- sun.misc;resolution:=optional,
- sun.reflect;resolution:=optional,
-
- <!-- concurrent -->
- javax.swing;resolution:=optional,
- javax.swing.border;resolution:=optional
- </Import-Package>
- <Embed-Dependency>
- concurrent,
- jboss-remoting-core,
- jboss-remoting-socket,
- jboss-remoting-socket-client,
- jboss-serialization
- </Embed-Dependency>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
Deleted: projects/jboss-osgi/trunk/service/webconsole/.classpath
===================================================================
--- projects/jboss-osgi/trunk/service/webconsole/.classpath 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/webconsole/.classpath 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" 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"/>
-</classpath>
Deleted: projects/jboss-osgi/trunk/service/webconsole/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/webconsole/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/service/webconsole/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -1,145 +0,0 @@
-<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 - Service WebConsole</name>
- <description>JBossOSGi - WebConsole Service</description>
-
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-webconsole</artifactId>
- <packaging>bundle</packaging>
-
- <parent>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta1</version>
- </parent>
-
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.1.1</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.4</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.webconsole</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- <version>20070829</version>
- <scope>compile</scope>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.scr</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.bundlerepository</artifactId>
- <version>1.0.3</version>
- <scope>compile</scope>
- <optional>true</optional>
- </dependency>
- </dependencies>
-
- <!-- Build -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <showDeprecation>false</showDeprecation>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.webconsole</artifactId>
- <type>jar</type>
- <outputDirectory>target/classes</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-Vendor>JBoss, a division of RedHat</Bundle-Vendor>
- <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.service.webconsole.internal.WebConsoleActivator</Bundle-Activator>
- <Export-Package>
- org.apache.felix.webconsole;version=${version.felix.webconsole},
- org.osgi.service.obr
- </Export-Package>
- <Private-Package>
- !org.apache.felix.webconsole,
- org.apache.felix.webconsole.*,
- org.jboss.osgi.service.webconsole.internal,
- org.jboss.osgi.service.webconsole.internal.*
- </Private-Package>
- <Import-Package>
- org.apache.felix.scr;
- org.apache.felix.shell;
- org.osgi.service.*;resolution:=optional,
- javax.portlet;resolution:=optional,*
- </Import-Package>
- <Embed-Dependency>
- <!-- Import/Export-Package parsing, OBR -->
- org.apache.felix.bundlerepository,
- <!-- Required for JSON data transfer -->
- json,
- <!-- File Upload functionality -->
- commons-fileupload,
- <!-- Required by FileUpload and Util -->
- commons-io
- </Embed-Dependency>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
Added: projects/jboss-osgi/trunk/target/pom-transformed.xml
===================================================================
--- projects/jboss-osgi/trunk/target/pom-transformed.xml (rev 0)
+++ projects/jboss-osgi/trunk/target/pom-transformed.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -0,0 +1,457 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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</name>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <packaging>pom</packaging>
+
+ <version>1.0.0.Beta1</version>
+
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>4</version>
+ </parent>
+
+ <url>http://www.jboss.org/community/wiki/JBossOSGi</url>
+ <description>JBossOSGi</description>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/trunk/</developerConnection>
+ <url>http://fisheye.jboss.com/qsearch/JBossOSGi/</url>
+ </scm>
+
+ <!-- Modules -->
+ <modules>
+ <module>microcontainer</module>
+ <module>repository</module>
+ <module>runtime</module>
+ <module>bundle</module>
+ <module>testsuite</module>
+ </modules>
+
+ <!-- Properties -->
+ <properties>
+ <version.aqute.bnd>0.0.315</version.aqute.bnd>
+ <version.equinox>3.4.2</version.equinox>
+ <version.felix.configadmin>1.0.10</version.felix.configadmin>
+ <version.felix.framework>1.4.1</version.felix.framework>
+ <version.felix.http.jetty>0.9.0-20090218-R745505</version.felix.http.jetty>
+ <version.felix.javax.servlet>1.0.0</version.felix.javax.servlet>
+ <version.felix.log>0.9.0-20090211-R743531</version.felix.log>
+ <version.felix.metatype>1.0.2</version.felix.metatype>
+ <version.felix.osgi.core>1.2.0</version.felix.osgi.core>
+ <version.felix.webconsole>1.2.8</version.felix.webconsole>
+ <version.izpack>4.2.0</version.izpack>
+ <version.javax.servlet>2.4</version.javax.servlet>
+ <version.jbossas>5.0.1.GA</version.jbossas>
+ <version.jboss.aop>2.0.1.GA</version.jboss.aop>
+ <version.jboss.common.core>2.2.11.GA</version.jboss.common.core>
+ <version.jboss.deployers>2.0.5.GA</version.jboss.deployers>
+ <version.jboss.jacc>1.1.0.GA</version.jboss.jacc>
+ <version.jboss.jdocbook.plugin>2.1.2</version.jboss.jdocbook.plugin>
+ <version.jboss.jdocbook.style>1.1.0</version.jboss.jdocbook.style>
+ <version.jboss.logging.spi>2.0.5.GA</version.jboss.logging.spi>
+ <version.jboss.logging.log4j>2.0.5.GA</version.jboss.logging.log4j>
+ <version.jboss.metadata>1.0.0.CR11</version.jboss.metadata>
+ <version.jboss.microcontainer>2.0.4.GA</version.jboss.microcontainer>
+ <version.jboss.test>1.0.5.GA</version.jboss.test>
+ <version.junit>4.4</version.junit>
+ <version.knopflerfish>2.2.0</version.knopflerfish>
+ <version.log4j>1.2.14</version.log4j>
+ <version.osgi>r4v41</version.osgi>
+ </properties>
+
+ <!-- DependencyManagement -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>biz.aQute</groupId>
+ <artifactId>bnd</artifactId>
+ <version>0.0.315</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.izpack</groupId>
+ <artifactId>izpack-standalone-compiler</artifactId>
+ <version>4.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>2.2.11.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.aop</groupId>
+ <artifactId>jboss-aop</artifactId>
+ <version>2.0.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-structure-spi</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jacc-api</artifactId>
+ <version>1.1.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <version>5.0.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system-jmx</artifactId>
+ <version>5.0.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-client</artifactId>
+ <version>5.0.1.GA</version>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <version>1.0.0.CR11</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>2.0.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ <version>2.0.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>r4v41</version>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>r4v41</version>
+ </dependency>
+
+ <!-- Equinox Dependencies -->
+ <dependency>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>org.eclipse.osgi</artifactId>
+ <version>3.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>org.eclipse.osgi.services</artifactId>
+ <version>3.4.2</version>
+ </dependency>
+
+ <!-- Felix Dependencies -->
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>javax.servlet</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.configadmin</artifactId>
+ <version>1.0.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ <version>1.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.http.jetty</artifactId>
+ <version>0.9.0-20090218-R745505</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.log</artifactId>
+ <version>0.9.0-20090211-R743531</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.metatype</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.webconsole</artifactId>
+ <version>1.2.8</version>
+ </dependency>
+
+ <!-- Equinox Dependencies -->
+ <dependency>
+ <groupId>org.knopflerfish</groupId>
+ <artifactId>org.knopflerfish.framework</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-test</artifactId>
+ <version>1.0.5.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-impl</artifactId>
+ <version>2.0.5.GA</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+
+ <!-- Plugins -->
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/tags</tagBase>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <!-- PluginManagement -->
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <redirectTestOutputToFile>false</redirectTestOutputToFile>
+ <failIfNoTests>false</failIfNoTests>
+ <systemProperties>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${basedir}/target</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <!-- Repositories -->
+ <repositories>
+ <repository>
+ <id>aQute</id>
+ <url>http://www.aQute.biz/repo</url>
+ </repository>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <!-- PluginRepositories -->
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <!-- Reporting -->
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>dependencies</report>
+ <report>issue-tracking</report>
+ <report>license</report>
+ <report>scm</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>1.0.0</version>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <profiles>
+
+ <!--
+ Name: default
+ Desc: The default profile
+ -->
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <microcontainer.outputDirectory>target/classes</microcontainer.outputDirectory>
+ <microcontainer.testOutputDirectory>target/tests-classes</microcontainer.testOutputDirectory>
+ </properties>
+ </profile>
+
+ <!--
+ Name: distro
+ Desc: Build the distribution
+ -->
+ <profile>
+ <id>distro</id>
+ <modules>
+ <module>build/distribution</module>
+ <module>build/docbook</module>
+ </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: eclipse
+ Desc: The eclipse profile
+ -->
+ <profile>
+ <id>eclipse</id>
+ <build>
+ <defaultGoal>process-test-resources</defaultGoal>
+ <plugins>
+ <plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>eclipse</id>
+ <phase>process-test-resources</phase>
+ <goals>
+ <goal>eclipse</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <buildOutputDirectory>${microcontainer.outputDirectory}</buildOutputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <properties>
+ <microcontainer.outputDirectory>eclipse-target/classes</microcontainer.outputDirectory>
+ <microcontainer.testOutputDirectory>eclipse-target/tests-classes</microcontainer.testOutputDirectory>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>
Property changes on: projects/jboss-osgi/trunk/target/pom-transformed.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -60,7 +60,7 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-remote-log</artifactId>
+ <artifactId>jboss-osgi-remotelog</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
@@ -127,70 +127,86 @@
<profiles>
<!--
- Name: framework-any
- Descr: Create the testsuite.zip and skip tests
- -->
+ Name: framework-default
+ Descr: Setup for default framework integration testing
+ -->
<profile>
- <id>framework-any</id>
+ <id>framework-default</id>
<activation>
<property>
- <name>framework</name>
+ <name>!framework</name>
</property>
</activation>
<dependencies>
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-runtime-felix</artifactId>
+ <version>${version}</version>
</dependency>
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-runtime-felix</artifactId>
+ <version>${version}</version>
+ <classifier>config</classifier>
</dependency>
</dependencies>
+ </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>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-runtime-felix</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-runtime-felix</artifactId>
+ <version>${version}</version>
+ <classifier>config</classifier>
+ </dependency>
+ </dependencies>
+ </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>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-runtime-equinox</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-runtime-equinox</artifactId>
+ <version>${version}</version>
+ <classifier>config</classifier>
+ </dependency>
+ </dependencies>
<build>
<plugins>
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>testsuite</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>scripts/assembly-testsuite.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>target/${project.artifactId}-${project.version}.zip</file>
- <type>zip</type>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
@@ -201,29 +217,40 @@
</profile>
<!--
- Name: framework-default
- Descr: Setup for default framework integration testing
+ Name: framework-knopflerfish
+ Descr: Setup for Equinox framework integration testing
-->
<profile>
- <id>framework-default</id>
+ <id>framework-knopflerfish</id>
<activation>
<property>
<name>!framework</name>
+ <value>knopflerfish</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-felix</artifactId>
+ <artifactId>jboss-osgi-runtime-knopflerfish</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-felix</artifactId>
+ <artifactId>jboss-osgi-runtime-knopflerfish</artifactId>
<version>${version}</version>
<classifier>config</classifier>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
<!--
Modified: projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml 2009-04-15 08:43:19 UTC (rev 87317)
@@ -18,7 +18,7 @@
<include>*:org.apache.felix.log:jar</include>
<include>*:org.osgi.compendium:jar</include>
<include>*:jboss-osgi-common:jar</include>
- <include>*:jboss-osgi-service-remote-log:jar</include>
+ <include>*:jboss-osgi-remotelog:jar</include>
</includes>
<useStrictFiltering>true</useStrictFiltering>
<scope>provided</scope>
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-15 04:02:54 UTC (rev 87316)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-15 08:43:19 UTC (rev 87317)
@@ -72,7 +72,7 @@
tracker.open();
// Install the RemoteLogReaderService in the local OSGiFramework.
- installBundle(sysContext, "bundles/jboss-osgi-service-remote-log.jar", true);
+ installBundle(sysContext, "bundles/jboss-osgi-remotelog.jar", true);
// Deploy the RemoteLogListener to the remote OSGiFramework.
deployBundle("bundles/jboss-osgi-service-remote-log.jar");
@@ -87,7 +87,7 @@
undeployBundle("example/example-log-bundleA.jar");
// Uneploy the RemoteLogListener from the remote OSGiFramework.
- undeployBundle("bundles/jboss-osgi-service-remote-log.jar");
+ undeployBundle("bundles/jboss-osgi-remotelog.jar");
// Verify the received log entries
List<LogEntry> entries = logEntryCache.getLog();
17 years, 3 months
JBoss-OSGI SVN: r87302 - in projects/jboss-osgi/trunk: service/remote-log and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-14 13:51:03 -0400 (Tue, 14 Apr 2009)
New Revision: 87302
Modified:
projects/jboss-osgi/trunk/runtime/felix/pom.xml
projects/jboss-osgi/trunk/service/remote-log/pom.xml
Log:
Fix dependencies when given -Dframework
Modified: projects/jboss-osgi/trunk/runtime/felix/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-14 17:33:06 UTC (rev 87301)
+++ projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-14 17:51:03 UTC (rev 87302)
@@ -140,6 +140,18 @@
<version>${version}</version>
<type>zip</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-service-remote-log</artifactId>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
Modified: projects/jboss-osgi/trunk/service/remote-log/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/pom.xml 2009-04-14 17:33:06 UTC (rev 87301)
+++ projects/jboss-osgi/trunk/service/remote-log/pom.xml 2009-04-14 17:51:03 UTC (rev 87302)
@@ -81,7 +81,6 @@
<Bundle-Activator>org.jboss.osgi.service.remlog.RemoteLogActivator</Bundle-Activator>
<Export-Package>org.jboss.osgi.service.remlog;version=${version}</Export-Package>
<Import-Package>
- org.jboss.osgi.service.log,
org.osgi.framework,
org.osgi.service.log,
org.osgi.util.tracker,
17 years, 3 months
JBoss-OSGI SVN: r87301 - projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-14 13:33:06 -0400 (Tue, 14 Apr 2009)
New Revision: 87301
Modified:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
Log:
Enable RemoteLog test case
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-14 17:26:54 UTC (rev 87300)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-14 17:33:06 UTC (rev 87301)
@@ -23,6 +23,8 @@
//$Id$
+import java.util.List;
+
import org.jboss.osgi.common.log.LogEntryCache;
import org.jboss.osgi.common.log.LogEntryFilter;
import org.jboss.osgi.service.remlog.RemoteLogReaderService;
@@ -33,6 +35,8 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogReaderService;
import org.osgi.service.log.LogService;
import org.osgi.util.tracker.ServiceTracker;
@@ -60,7 +64,7 @@
@Override
public Object addingService(ServiceReference sref)
{
- RemoteLogReaderService service = (RemoteLogReaderService)super.addingService(sref);
+ LogReaderService service = (LogReaderService)super.addingService(sref);
service.addLogListener(logEntryCache);
return service;
}
@@ -79,8 +83,6 @@
// Verify that the bundle is active
assertEquals("Remote bundle ACTIVE", Bundle.ACTIVE, bundleA.getState());
- System.out.println(logEntryCache.getLog());
-
// Undeploy the test bundle
undeployBundle("example/example-log-bundleA.jar");
@@ -88,8 +90,8 @@
undeployBundle("bundles/jboss-osgi-service-remote-log.jar");
// Verify the received log entries
-// List<LogEntry> entries = logEntryCache.getLog();
-// assertEquals("Number of entries", 1, entries.size());
-// assertEquals("[ServiceA] new Service", entries.get(0).getMessage());
+ List<LogEntry> entries = logEntryCache.getLog();
+ assertEquals("Number of entries", 1, entries.size());
+ assertEquals("[ServiceA] new Service", entries.get(0).getMessage());
}
}
\ No newline at end of file
17 years, 3 months
JBoss-OSGI SVN: r87300 - in projects/jboss-osgi/trunk: build/distribution and 25 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-14 13:26:54 -0400 (Tue, 14 Apr 2009)
New Revision: 87300
Added:
projects/jboss-osgi/trunk/bundle/
projects/jboss-osgi/trunk/bundle/common/
projects/jboss-osgi/trunk/bundle/common/.classpath
projects/jboss-osgi/trunk/bundle/common/.project
projects/jboss-osgi/trunk/bundle/common/.settings/
projects/jboss-osgi/trunk/bundle/common/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/trunk/bundle/common/.settings/org.maven.ide.eclipse.prefs
projects/jboss-osgi/trunk/bundle/common/pom.xml
projects/jboss-osgi/trunk/bundle/common/src/
projects/jboss-osgi/trunk/bundle/common/src/main/
projects/jboss-osgi/trunk/bundle/common/src/main/java/
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/StringConstants.java
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryFilter.java
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/internal/
projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/internal/LogEntryImpl.java
projects/jboss-osgi/trunk/bundle/pom.xml
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReaderService.java
Removed:
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/
Modified:
projects/jboss-osgi/trunk/build/distribution/pom.xml
projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/Constants.java
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java
projects/jboss-osgi/trunk/service/webconsole/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java
Log:
Add JBossOSGi Common bundle
Modified: projects/jboss-osgi/trunk/build/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -36,6 +36,11 @@
<dependencies>
<dependency>
<groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-runtime-deployer</artifactId>
<version>${version}</version>
</dependency>
Modified: projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -113,6 +113,7 @@
<!-- JBossOSGi Lib -->
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/lib" override="true">
+ <include name="jboss-osgi-common.jar" />
<include name="jboss-osgi-runtime-deployer.jar" />
<include name="jboss-osgi-runtime-felix.jar" />
<include name="jboss-osgi-runtime-spi.jar" />
@@ -166,6 +167,7 @@
<include name="org.apache.felix.http.jetty.jar" />
<include name="org.apache.felix.log.jar" />
<include name="org.apache.felix.metatype.jar" />
+ <include name="jboss-osgi-common.jar" />
<include name="jboss-osgi-service-logging.jar" />
<include name="jboss-osgi-service-webconsole.jar" />
</fileset>
@@ -241,6 +243,7 @@
<include name="org.apache.felix.http.jetty.jar" />
<include name="org.apache.felix.log.jar" />
<include name="org.apache.felix.metatype.jar" />
+ <include name="jboss-osgi-common.jar" />
<include name="jboss-osgi-service-logging.jar" />
<include name="jboss-osgi-service-webconsole.jar" />
</fileset>
Property changes on: projects/jboss-osgi/trunk/bundle/common
___________________________________________________________________
Name: svn:ignore
+ target
Added: projects/jboss-osgi/trunk/bundle/common/.classpath
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/.classpath (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/.classpath 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <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"/>
+</classpath>
Added: projects/jboss-osgi/trunk/bundle/common/.project
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/.project (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/.project 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-osgi/trunk/bundle/common/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/.settings/org.eclipse.jdt.core.prefs 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,5 @@
+#Tue Apr 14 17:48:49 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
Added: projects/jboss-osgi/trunk/bundle/common/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/.settings/org.maven.ide.eclipse.prefs 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,9 @@
+#Tue Apr 14 17:48:48 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: projects/jboss-osgi/trunk/bundle/common/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/pom.xml (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/pom.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,62 @@
+<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 - Bundle Common</name>
+ <artifactId>jboss-osgi-common</artifactId>
+ <packaging>bundle</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-bundle</artifactId>
+ <version>1.0.0.Beta1</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Name>JBossOSGi Common</Bundle-Name>
+ <Bundle-Vendor>JBoss, a division of RedHat</Bundle-Vendor>
+ <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+ <Bundle-Version>${version}</Bundle-Version>
+ <Export-Package>
+ org.jboss.osgi.common,
+ org.jboss.osgi.common.log
+ </Export-Package>
+ <Private-Package>
+ org.jboss.osgi.common.log.internal
+ </Private-Package>
+ <Import-Package>
+ org.osgi.framework;version=1.4,
+ org.osgi.service.log;version=1.3,
+ org.osgi.util.tracker
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: projects/jboss-osgi/trunk/bundle/common/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/StringConstants.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/StringConstants.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/StringConstants.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,113 @@
+/*
+ * 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.common;
+
+//$Id$
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
+import org.osgi.service.log.LogService;
+
+/**
+ * String representation for common OSGi Constants
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Mar-2009
+ */
+public abstract class StringConstants
+{
+ /**
+ * Return the string representation of a {@link Bundle} state
+ */
+ public static String bundleState(int bundleState)
+ {
+ String retState = "[" + bundleState + "]";
+ if (Bundle.UNINSTALLED == bundleState)
+ retState = "UNINSTALLED";
+ else if (Bundle.INSTALLED == bundleState)
+ retState = "INSTALLED";
+ else if (Bundle.RESOLVED == bundleState)
+ retState = "RESOLVED";
+ else if (Bundle.STARTING == bundleState)
+ retState = "STARTING";
+ else if (Bundle.STOPPING == bundleState)
+ retState = "STOPPING";
+ else if (Bundle.ACTIVE == bundleState)
+ retState = "ACTIVE";
+ return retState;
+ }
+
+ /**
+ * Return the string representation of a {@link BundleEvent} type
+ */
+ public static String bundleEvent(int eventType)
+ {
+ String retType = "[" + eventType + "]";
+ if (BundleEvent.INSTALLED == eventType)
+ retType = "INSTALLED";
+ else if (BundleEvent.LAZY_ACTIVATION == eventType)
+ retType = "LAZY_ACTIVATION";
+ else if (BundleEvent.RESOLVED == eventType)
+ retType = "RESOLVED";
+ else if (BundleEvent.STARTING == eventType)
+ retType = "STARTING";
+ else if (BundleEvent.STARTED == eventType)
+ retType = "STARTED";
+ else if (BundleEvent.STOPPING == eventType)
+ retType = "STOPPING";
+ else if (BundleEvent.STOPPED == eventType)
+ retType = "STOPPED";
+ else if (BundleEvent.UNINSTALLED == eventType)
+ retType = "UNINSTALLED";
+ else if (BundleEvent.UNRESOLVED == eventType)
+ retType = "UNRESOLVED";
+ else if (BundleEvent.UPDATED == eventType)
+ retType = "UPDATED";
+ return retType;
+ }
+
+ /**
+ * Return the string representation of a {@link LogService} level
+ */
+ public static 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;
+ }
+}
Property changes on: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/StringConstants.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,171 @@
+/*
+ * 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.common.log;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.osgi.common.log.internal.LogEntryImpl;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogListener;
+
+/**
+ * A LogListener that caches LogEntry objects for later retrieval.
+ *
+ * The entries can be filtered with a list of {@link LogEntryFilter} instances.
+ * A log entry is cached if it matches at least one of the registered filters.
+ * If there is no filter registered entries are cached unconditionally.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 09-Apr-2009
+ */
+public class LogEntryCache implements LogListener
+{
+ private List<LogEntry> entries = new ArrayList<LogEntry>();
+ private List<LogEntryFilter> filters = new ArrayList<LogEntryFilter>();
+
+ /**
+ * Create a LogEntryCache with a single associated filter
+ */
+ public LogEntryCache(LogEntryFilter filter)
+ {
+ filters.add(filter);
+ }
+
+ /**
+ * Create a LogEntryCache with no associated filters
+ */
+ public LogEntryCache()
+ {
+ }
+
+ /**
+ * Add a LogEntryFilter
+ */
+ public void addFilter(LogEntryFilter filter)
+ {
+ filters.add(filter);
+ }
+
+ /**
+ * Clear the list of cached entries.
+ */
+ public void clear()
+ {
+ synchronized (entries)
+ {
+ entries.clear();
+ }
+ }
+
+ /**
+ * Clear the list of registered filters.
+ */
+ public void clearFilters()
+ {
+ // filters.clear() would need synchronization
+ filters = new ArrayList<LogEntryFilter>();
+ }
+
+ /**
+ * Get the list of cached entries.
+ *
+ * Note, that the LogService delivers LogEntries asynchronously.
+ * Client should not rely on a certain LogEntry already beein delivered
+ * when calling this method.
+ */
+ public List<LogEntry> getLog()
+ {
+ return getLog(false);
+ }
+
+ /**
+ * Get the list of cached entries and optionally clears the list.
+ *
+ * Note, that the LogService delivers LogEntries asynchronously.
+ * Client should not rely on a certain LogEntry already beein delivered
+ * when calling this method.
+ */
+ public List<LogEntry> getLog(boolean clear)
+ {
+ synchronized (entries)
+ {
+ ArrayList<LogEntry> retList = new ArrayList<LogEntry>(entries);
+ if (clear == true)
+ entries.clear();
+
+ return retList;
+ }
+ }
+
+ /**
+ * Listener method called for each LogEntry object created.
+ */
+ public void logged(LogEntry entry)
+ {
+ // Replace entry with a unified wrapper
+ entry = new LogEntryImpl(entry);
+
+ List<LogEntryFilter> snapshot = new ArrayList<LogEntryFilter>(filters);
+ synchronized (entries)
+ {
+ if (snapshot.size() == 0)
+ {
+ entries.add(entry);
+ return;
+ }
+
+ // Add the entry if if matches at least one filter
+ for (LogEntryFilter filter : snapshot)
+ {
+ if (match(filter, entry))
+ {
+ entries.add(entry);
+ break;
+ }
+ }
+ }
+ }
+
+ private boolean match(LogEntryFilter filter, LogEntry entry)
+ {
+ boolean match = entry.getLevel() <= filter.getLevel();
+
+ if (match && filter.getBundleRegex() != null)
+ {
+ String entryBnd = entry.getBundle().getSymbolicName();
+ String filterRegex = filter.getBundleRegex();
+ match = entryBnd.matches(filterRegex);
+ }
+
+ if (match && filter.getMessageRegex() != null)
+ {
+ String entryMsg = entry.getMessage();
+ String filterRegex = filter.getMessageRegex();
+ match = entryMsg.matches(filterRegex);
+ }
+
+ return match;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryFilter.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryFilter.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryFilter.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,97 @@
+/*
+ * 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.common.log;
+
+//$Id$
+
+
+/**
+ * A LogEntry filter that can be used with the LogEntryCache
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 09-Apr-2009
+ */
+public class LogEntryFilter
+{
+ private int level;
+ private String bndRegex;
+ private String msgRegex;
+
+ /**
+ * Create a LogEntryFilter with the associated criteria.
+ *
+ * @param bndRegex A regex that matches a Bundle's SymbolicName
+ * @param level The maximum log level accepted by this filter
+ * @param msgRegex A regex that matches the log message
+ */
+ public LogEntryFilter(String bndRegex, int level, String msgRegex)
+ {
+ this.bndRegex = bndRegex;
+ this.msgRegex = msgRegex;
+ this.level = level < 1 ? Integer.MAX_VALUE : level;
+ }
+
+ /**
+ * Create a LogEntryFilter with the associated criteria.
+ *
+ * @param bndRegex A regex that matches a Bundle's SymbolicName
+ * @param level The maximum log level accepted by this filter
+ */
+ public LogEntryFilter(String bndRegex, int level)
+ {
+ this(bndRegex, level, null);
+ }
+
+ /**
+ * Create a LogEntryFilter with the associated criteria.
+ *
+ * @param bndRegex A regex that matches a Bundle's SymbolicName
+ */
+ public LogEntryFilter(String bndRegex)
+ {
+ this(bndRegex, Integer.MAX_VALUE, null);
+ }
+
+ /**
+ * Get the Bundle Symbolic-Name regex.
+ */
+ public String getBundleRegex()
+ {
+ return bndRegex;
+ }
+
+ /**
+ * Get the log message regex.
+ */
+ public String getMessageRegex()
+ {
+ return msgRegex;
+ }
+
+ /**
+ * Get the log entry maximum log level.
+ */
+ public int getLevel()
+ {
+ return level;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogEntryFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,81 @@
+/*
+ * 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.common.log;
+
+//$Id$
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * A basic LogService that writes to System.out
+ *
+ * @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/bundle/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,77 @@
+/*
+ * 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.common.log;
+
+//$Id$
+
+import org.jboss.osgi.common.log.internal.LogEntryImpl;
+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 sr, int level, String message, Throwable exception)
+ {
+ long time = System.currentTimeMillis();
+ Bundle bundle = context.getBundle();
+
+ System.out.println(new LogEntryImpl(time, bundle, sr, level, message, exception));
+
+ if (exception != null)
+ exception.printStackTrace(System.out);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/internal/LogEntryImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/internal/LogEntryImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/internal/LogEntryImpl.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,137 @@
+/*
+ * 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.common.log.internal;
+
+// $Id$
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogService;
+
+/**
+ * A unified implementation of a LogEntry.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 09-Apr-2009
+ */
+public class LogEntryImpl implements LogEntry
+{
+ private long time;
+ private int level;
+ private Bundle bundle;
+ private ServiceReference sref;
+ private String message;
+ private Throwable exception;
+
+ private String bndStr;
+ private String srefStr;
+
+ public LogEntryImpl(LogEntry le)
+ {
+ this(le.getTime(), le.getBundle(), le.getServiceReference(), le.getLevel(), le.getMessage(), le.getException());
+ }
+
+ public LogEntryImpl(long time, Bundle bundle, ServiceReference sref, int level, String message, Throwable exception)
+ {
+ this.time = time;
+ this.bundle = bundle;
+ this.sref = sref;
+ this.level = level;
+ this.message = message;
+ this.exception = exception;
+
+ if (bundle != null)
+ bndStr = bundle.getSymbolicName();
+
+ if (sref != null && sref.getBundle() != null)
+ srefStr = sref.getBundle().getSymbolicName();
+ }
+
+ public Bundle getBundle()
+ {
+ return bundle;
+ }
+
+ public Throwable getException()
+ {
+ return exception;
+ }
+
+ public int getLevel()
+ {
+ return level;
+ }
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public ServiceReference getServiceReference()
+ {
+ return sref;
+ }
+
+ public long getTime()
+ {
+ return time;
+ }
+
+ 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;
+ }
+
+ @Override
+ public String toString()
+ {
+ 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 : "";
+ return "[" + t + l + b + s + m + e + "]";
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/common/src/main/java/org/jboss/osgi/common/log/internal/LogEntryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/pom.xml (rev 0)
+++ projects/jboss-osgi/trunk/bundle/pom.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,18 @@
+<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 - Bundle</name>
+ <artifactId>jboss-osgi-bundle</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Beta1</version>
+ </parent>
+
+ <modules>
+ <module>common</module>
+ </modules>
+
+</project>
Property changes on: projects/jboss-osgi/trunk/bundle/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/pom.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -29,6 +29,7 @@
<module>microcontainer</module>
<module>repository</module>
<module>runtime</module>
+ <module>bundle</module>
<module>service</module>
<module>testsuite</module>
</modules>
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -30,7 +30,6 @@
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.Constants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -96,8 +95,7 @@
Bundle bundle = systemContext.installBundle(bundleUri.toString());
unit.addAttachment(Bundle.class, bundle);
- String state = Constants.bundleState(bundle.getState());
- log.info("Installed: " + bundle + state);
+ log.info("Installed: " + bundle);
}
}
}
@@ -116,8 +114,7 @@
try
{
bundle.uninstall();
- String state = Constants.bundleState(bundle.getState());
- log.info("Uninstalled: " + bundle + state);
+ log.info("Uninstalled: " + bundle);
}
catch (BundleException ex)
{
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -84,8 +84,7 @@
unresolvedBundles.remove(bundle);
- String state = Constants.bundleState(bundle.getState());
- log.info("Stoped: " + bundle + state);
+ log.info("Stoped: " + bundle);
}
catch (BundleException e)
{
@@ -98,8 +97,7 @@
try
{
bundle.start();
- String state = Constants.bundleState(bundle.getState());
- log.info("Started: " + bundle + state);
+ log.info("Started: " + bundle);
}
catch (BundleException e)
{
@@ -138,8 +136,7 @@
try
{
auxBundle.start();
- String state = Constants.bundleState(bundle.getState());
- log.info("Started: " + bundle + state);
+ log.info("Started: " + bundle);
}
catch (BundleException e)
{
Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -11,8 +11,6 @@
<entry>
<key>org.osgi.framework.system.packages</key>
<value>
- org.jboss.osgi.spi,
- org.jboss.osgi.service.log,
org.osgi.framework; version=1.4,
org.osgi.service.log; version=1.3,
org.osgi.util.tracker; version=1.3,
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-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -16,7 +16,6 @@
javax.management,
javax.xml.parsers,
org.jboss.logging,
- org.jboss.osgi.service.log,
org.jboss.osgi.service.mc,
org.jboss.osgi.spi.management,
org.osgi.framework; version=1.4,
@@ -51,6 +50,7 @@
<property name="autoStart">
<list elementClass="java.net.URI">
<value>${jboss.server.home.url}/deploy/osgi/org.osgi.compendium.jar</value>
+ <value>${jboss.server.home.url}/deploy/osgi/jboss-osgi-common.jar</value>
<value>${jboss.server.home.url}/deploy/osgi/jboss-osgi-service-logging.jar</value>
</list>
</property>
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/Constants.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/Constants.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/Constants.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -23,9 +23,6 @@
//$Id$
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleEvent;
-import org.osgi.service.log.LogService;
/**
* JBossOSGi Constants
@@ -33,10 +30,10 @@
* @author thomas.diesler(a)jboss.com
* @since 04-Mar-2009
*/
-public abstract class Constants
+public interface Constants
{
/** The JBossOSGi domain 'jboss.osgi' */
- public final static String DOMAIN_NAME = "jboss.osgi";
+ String DOMAIN_NAME = "jboss.osgi";
/**
* If set to 'true' bundles can be deployed in any order. Deployed bundle will get started when their dependencies can be resolved.
@@ -44,81 +41,5 @@
*
* The default is 'true'
*/
- public final static String PROPERTY_DEFERRED_START = "org.jboss.osgi.deferred.start";
-
- /**
- * Return the string representation of a {@link Bundle} state
- */
- public static String bundleState(int bundleState)
- {
- String retState = "[" + bundleState + "]";
- if (Bundle.UNINSTALLED == bundleState)
- retState = "UNINSTALLED";
- else if (Bundle.INSTALLED == bundleState)
- retState = "INSTALLED";
- else if (Bundle.RESOLVED == bundleState)
- retState = "RESOLVED";
- else if (Bundle.STARTING == bundleState)
- retState = "STARTING";
- else if (Bundle.STOPPING == bundleState)
- retState = "STOPPING";
- else if (Bundle.ACTIVE == bundleState)
- retState = "ACTIVE";
- return retState;
- }
-
- /**
- * Return the string representation of a {@link BundleEvent} type
- */
- public static String bundleEvent(int eventType)
- {
- String retType = "[" + eventType + "]";
- if (BundleEvent.INSTALLED == eventType)
- retType = "INSTALLED";
- else if (BundleEvent.LAZY_ACTIVATION == eventType)
- retType = "LAZY_ACTIVATION";
- else if (BundleEvent.RESOLVED == eventType)
- retType = "RESOLVED";
- else if (BundleEvent.STARTING == eventType)
- retType = "STARTING";
- else if (BundleEvent.STARTED == eventType)
- retType = "STARTED";
- else if (BundleEvent.STOPPING == eventType)
- retType = "STOPPING";
- else if (BundleEvent.STOPPED == eventType)
- retType = "STOPPED";
- else if (BundleEvent.UNINSTALLED == eventType)
- retType = "UNINSTALLED";
- else if (BundleEvent.UNRESOLVED == eventType)
- retType = "UNRESOLVED";
- else if (BundleEvent.UPDATED == eventType)
- retType = "UPDATED";
- return retType;
- }
-
- /**
- * Return the string representation of a {@link LogService} level
- */
- public static 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;
- }
+ String PROPERTY_DEFERRED_START = "org.jboss.osgi.deferred.start";
}
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -25,7 +25,6 @@
import javax.management.ObjectName;
-import org.jboss.logging.Logger;
import org.jboss.osgi.spi.Constants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
@@ -38,9 +37,6 @@
*/
public class ManagedBundle implements ManagedBundleMBean
{
- // Provide logging
- final Logger log = Logger.getLogger(ManagedBundle.class);
-
private Bundle bundle;
private ObjectName oname;
@@ -78,16 +74,10 @@
public void start() throws BundleException
{
bundle.start();
-
- String state = Constants.bundleState(bundle.getState());
- log.info(bundle.getSymbolicName() + ",state=" + state);
}
public void stop() throws BundleException
{
bundle.stop();
-
- String state = Constants.bundleState(bundle.getState());
- log.info(bundle.getSymbolicName() + ",state=" + state);
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -25,7 +25,6 @@
import java.util.Properties;
-import org.jboss.osgi.service.log.RemoteLogReaderService;
import org.jboss.osgi.service.remlog.internal.RemoteLogReaderServiceImpl;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
Added: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReaderService.java
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReaderService.java (rev 0)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReaderService.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -0,0 +1,36 @@
+/*
+ * 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.remlog;
+
+//$Id$
+
+import org.osgi.service.log.LogReaderService;
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Apr-2009
+ */
+public interface RemoteLogReaderService extends LogReaderService
+{
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReaderService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -30,9 +30,9 @@
import javax.management.MBeanServer;
-import org.jboss.osgi.service.log.RemoteLogReaderService;
import org.jboss.osgi.service.remlog.NotImplementedException;
import org.jboss.osgi.service.remlog.RemoteLogActivator;
+import org.jboss.osgi.service.remlog.RemoteLogReaderService;
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.ServerInvocationHandler;
Modified: projects/jboss-osgi/trunk/service/webconsole/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/webconsole/pom.xml 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/service/webconsole/pom.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -107,8 +107,8 @@
<extensions>true</extensions>
<configuration>
<instructions>
+ <Bundle-Vendor>JBoss, a division of RedHat</Bundle-Vendor>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Vendor>JBoss, a division of RedHat</Bundle-Vendor>
<Bundle-Activator>org.jboss.osgi.service.webconsole.internal.WebConsoleActivator</Bundle-Activator>
<Export-Package>
org.apache.felix.webconsole;version=${version.felix.webconsole},
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -54,6 +54,12 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-service-remote-log</artifactId>
<version>${version}</version>
<scope>provided</scope>
Modified: projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml 2009-04-14 17:26:54 UTC (rev 87300)
@@ -17,6 +17,7 @@
<includes>
<include>*:org.apache.felix.log:jar</include>
<include>*:org.osgi.compendium:jar</include>
+ <include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-service-remote-log:jar</include>
</includes>
<useStrictFiltering>true</useStrictFiltering>
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -23,12 +23,9 @@
//$Id$
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.osgi.service.log.LogEntryCache;
-import org.jboss.osgi.service.log.LogEntryFilter;
-import org.jboss.osgi.service.log.RemoteLogReaderService;
+import org.jboss.osgi.common.log.LogEntryCache;
+import org.jboss.osgi.common.log.LogEntryFilter;
+import org.jboss.osgi.service.remlog.RemoteLogReaderService;
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiFramework;
import org.jboss.osgi.spi.framework.RemoteBundle;
@@ -36,7 +33,6 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
-import org.osgi.service.log.LogEntry;
import org.osgi.service.log.LogService;
import org.osgi.util.tracker.ServiceTracker;
@@ -56,8 +52,7 @@
// Setup the LogEntryCache
final LogEntryCache logEntryCache = new LogEntryCache();
- logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "\\[ServiceActivator\\](.*)"));
- logEntryCache.addFilter(new LogEntryFilter(null, 0, "\\[ServiceA\\](.*)"));
+ logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "\\[ServiceA\\](.*)"));
// Track the RemoteLogReaderService to add the LogEntryCache as LogListener
ServiceTracker tracker = new ServiceTracker(sysContext, RemoteLogReaderService.class.getName(), null)
@@ -84,6 +79,8 @@
// Verify that the bundle is active
assertEquals("Remote bundle ACTIVE", Bundle.ACTIVE, bundleA.getState());
+ System.out.println(logEntryCache.getLog());
+
// Undeploy the test bundle
undeployBundle("example/example-log-bundleA.jar");
@@ -91,12 +88,8 @@
undeployBundle("bundles/jboss-osgi-service-remote-log.jar");
// Verify the received log entries
- List<LogEntry> entries = logEntryCache.getLog();
- Iterator<LogEntry> itLog = entries.iterator();
-
- assertEquals("Number of entries", 3, entries.size());
- assertEquals("[ServiceA] new Service", itLog.next().getMessage());
- assertEquals("[ServiceActivator] BundleEvent STARTED", itLog.next().getMessage());
- assertEquals("[ServiceActivator] BundleEvent STOPPING", itLog.next().getMessage());
+// List<LogEntry> entries = logEntryCache.getLog();
+// assertEquals("Number of entries", 1, entries.size());
+// assertEquals("[ServiceA] new Service", entries.get(0).getMessage());
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -24,11 +24,10 @@
//$Id$
import java.net.URL;
-import java.util.Iterator;
import java.util.List;
-import org.jboss.osgi.service.log.LogEntryCache;
-import org.jboss.osgi.service.log.LogEntryFilter;
+import org.jboss.osgi.common.log.LogEntryCache;
+import org.jboss.osgi.common.log.LogEntryFilter;
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiFramework;
import org.jboss.osgi.spi.junit.OSGiTest;
@@ -56,8 +55,7 @@
// Setup the LogEntryCache
final LogEntryCache logEntryCache = new LogEntryCache();
- logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "\\[ServiceActivator\\](.*)"));
- logEntryCache.addFilter(new LogEntryFilter(null, 0, "\\[ServiceA\\](.*)"));
+ logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "\\[ServiceA\\](.*)"));
// Track the LogReaderService to add the LogEntryCache as LogListener
ServiceTracker tracker = new ServiceTracker(sysContext, LogReaderService.class.getName(), null)
@@ -78,6 +76,11 @@
Bundle logServiceBundle = sysContext.installBundle(testURL.toExternalForm());
logServiceBundle.start();
+ // Install and start JBossOSGi Common
+ testURL = getTestArchiveURL("bundles/jboss-osgi-common.jar");
+ Bundle commonBundle = sysContext.installBundle(testURL.toExternalForm());
+ commonBundle.start();
+
// Install and start the test bundle
testURL = getTestArchiveURL("example/example-log-bundleA.jar");
Bundle bundleA = sysContext.installBundle(testURL.toExternalForm());
@@ -94,11 +97,7 @@
// Verify the received log entries
List<LogEntry> entries = logEntryCache.getLog();
- Iterator<LogEntry> itLog = entries.iterator();
-
- assertEquals("Number of entries", 3, entries.size());
- assertEquals("[ServiceA] new Service", itLog.next().getMessage());
- assertEquals("[ServiceActivator] BundleEvent STARTED", itLog.next().getMessage());
- assertEquals("[ServiceActivator] BundleEvent STOPPING", itLog.next().getMessage());
+ assertEquals("Number of entries", 1, entries.size());
+ assertEquals("[ServiceA] new Service", entries.get(0).getMessage());
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -25,11 +25,9 @@
import static org.osgi.service.log.LogService.LOG_INFO;
-import org.jboss.osgi.service.log.SystemLogService;
+import org.jboss.osgi.common.log.LogServiceTracker;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
/**
* A service that logs some messages to the LogService
@@ -43,28 +41,7 @@
public ServiceA(BundleContext context)
{
- trackLogService(context);
+ log = new LogServiceTracker(context);
log.log(LOG_INFO, "[ServiceA] new Service");
}
-
- private void trackLogService(BundleContext context)
- {
- ServiceTracker tracker = new ServiceTracker(context, LogService.class.getName(), null)
- {
- @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);
- }
- };
- tracker.open();
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java 2009-04-14 16:57:03 UTC (rev 87299)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java 2009-04-14 17:26:54 UTC (rev 87300)
@@ -23,38 +23,13 @@
//$Id$
-import static org.osgi.service.log.LogService.LOG_INFO;
-
-import org.jboss.osgi.service.log.SystemLogService;
-import org.jboss.osgi.spi.Constants;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.BundleListener;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.SynchronousBundleListener;
-import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
public class ServiceActivator implements BundleActivator
{
- private LogService log;
-
public void start(final BundleContext context)
{
- // Track the LogService
- trackLogService(context);
-
- // Register a SynchronousBundleListener
- BundleListener listener = new SynchronousBundleListener()
- {
- public void bundleChanged(BundleEvent event)
- {
- log.log(LOG_INFO, "[ServiceActivator] BundleEvent " + Constants.bundleEvent(event.getType()));
- }
- };
- context.addBundleListener(listener);
-
ServiceA service = new ServiceA(context);
context.registerService(ServiceA.class.getName(), service, null);
}
@@ -64,25 +39,4 @@
// Do Nothing. It is unnecessary to unregister services or Framework listeners
// because they must be clean up by the Framework anyway.
}
-
- private void trackLogService(BundleContext context)
- {
- ServiceTracker tracker = new ServiceTracker(context, LogService.class.getName(), null)
- {
- @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);
- }
- };
- tracker.open();
- }
}
\ No newline at end of file
17 years, 3 months
JBoss-OSGI SVN: r87274 - projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-14 07:56:30 -0400 (Tue, 14 Apr 2009)
New Revision: 87274
Modified:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
Log:
Verify bundle STOPPED log message
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-14 11:27:44 UTC (rev 87273)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-14 11:56:30 UTC (rev 87274)
@@ -23,6 +23,7 @@
//$Id$
+import java.util.Iterator;
import java.util.List;
import org.jboss.osgi.service.log.LogEntryCache;
@@ -55,8 +56,8 @@
// Setup the LogEntryCache
final LogEntryCache logEntryCache = new LogEntryCache();
- logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "BundleEvent(.*)"));
- logEntryCache.addFilter(new LogEntryFilter(null, -1, "\\[ServiceA\\](.*)"));
+ logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "\\[ServiceActivator\\](.*)"));
+ logEntryCache.addFilter(new LogEntryFilter(null, 0, "\\[ServiceA\\](.*)"));
// Track the RemoteLogReaderService to add the LogEntryCache as LogListener
ServiceTracker tracker = new ServiceTracker(sysContext, RemoteLogReaderService.class.getName(), null)
@@ -88,17 +89,14 @@
// Uneploy the RemoteLogListener from the remote OSGiFramework.
undeployBundle("bundles/jboss-osgi-service-remote-log.jar");
-
- System.out.println(logEntryCache.getLog());
// Verify the received log entries
List<LogEntry> entries = logEntryCache.getLog();
- assertEquals("Number of entries", 6, entries.size());
- assertEquals("BundleEvent INSTALLED", entries.get(0).getMessage());
- assertEquals("BundleEvent RESOLVED", entries.get(1).getMessage());
- assertEquals("[ServiceA] addingService: org.apache.felix.log.LogServiceImpl", entries.get(2).getMessage());
- assertEquals("BundleEvent STARTED", entries.get(3).getMessage());
- assertEquals("BundleEvent STOPPED", entries.get(4).getMessage());
- assertEquals("BundleEvent UNINSTALLED", entries.get(5).getMessage());
+ Iterator<LogEntry> itLog = entries.iterator();
+
+ assertEquals("Number of entries", 3, entries.size());
+ assertEquals("[ServiceA] new Service", itLog.next().getMessage());
+ assertEquals("[ServiceActivator] BundleEvent STARTED", itLog.next().getMessage());
+ assertEquals("[ServiceActivator] BundleEvent STOPPING", itLog.next().getMessage());
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java 2009-04-14 11:27:44 UTC (rev 87273)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java 2009-04-14 11:56:30 UTC (rev 87274)
@@ -24,6 +24,7 @@
//$Id$
import java.net.URL;
+import java.util.Iterator;
import java.util.List;
import org.jboss.osgi.service.log.LogEntryCache;
@@ -85,18 +86,19 @@
// Verify that the bundle is active
assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundleA.getState());
- // Verify the received log entries
- List<LogEntry> entries = logEntryCache.getLog(true);
-
- // Verify the the log entries
- assertEquals("Number of entries", 2, entries.size());
- assertEquals("[ServiceA] new Service", entries.get(0).getMessage());
- assertEquals("[ServiceActivator] BundleEvent STARTED", entries.get(1).getMessage());
-
// Uninstall the test bundle
bundleA.uninstall();
// Uninstall the 3rd party LogService
logServiceBundle.uninstall();
+
+ // Verify the received log entries
+ List<LogEntry> entries = logEntryCache.getLog();
+ Iterator<LogEntry> itLog = entries.iterator();
+
+ assertEquals("Number of entries", 3, entries.size());
+ assertEquals("[ServiceA] new Service", itLog.next().getMessage());
+ assertEquals("[ServiceActivator] BundleEvent STARTED", itLog.next().getMessage());
+ assertEquals("[ServiceActivator] BundleEvent STOPPING", itLog.next().getMessage());
}
}
\ No newline at end of file
17 years, 3 months
JBoss-OSGI SVN: r87270 - in projects/jboss-osgi/trunk: runtime/spi/src/main/java/org/jboss/osgi/service/log and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-14 06:12:06 -0400 (Tue, 14 Apr 2009)
New Revision: 87270
Modified:
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/LogEntryCache.java
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/Constants.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java
Log:
Don't rely on framework emmitted events for testing
Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml 2009-04-14 08:18:29 UTC (rev 87269)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml 2009-04-14 10:12:06 UTC (rev 87270)
@@ -11,6 +11,7 @@
<entry>
<key>org.osgi.framework.system.packages</key>
<value>
+ org.jboss.osgi.spi,
org.jboss.osgi.service.log,
org.osgi.framework; version=1.4,
org.osgi.service.log; version=1.3,
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/LogEntryCache.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/LogEntryCache.java 2009-04-14 08:18:29 UTC (rev 87269)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/LogEntryCache.java 2009-04-14 10:12:06 UTC (rev 87270)
@@ -73,8 +73,10 @@
*/
public void clear()
{
- // entries.clear() would need synchronization
- entries = new ArrayList<LogEntry>();
+ synchronized (entries)
+ {
+ entries.clear();
+ }
}
/**
@@ -95,10 +97,29 @@
*/
public List<LogEntry> getLog()
{
- return new ArrayList<LogEntry>(entries);
+ return getLog(false);
}
/**
+ * Get the list of cached entries and optionally clears the list.
+ *
+ * Note, that the LogService delivers LogEntries asynchronously.
+ * Client should not rely on a certain LogEntry already beein delivered
+ * when calling this method.
+ */
+ public List<LogEntry> getLog(boolean clear)
+ {
+ synchronized (entries)
+ {
+ ArrayList<LogEntry> retList = new ArrayList<LogEntry>(entries);
+ if (clear == true)
+ entries.clear();
+
+ return retList;
+ }
+ }
+
+ /**
* Listener method called for each LogEntry object created.
*/
public void logged(LogEntry entry)
@@ -106,20 +127,24 @@
// Replace entry with a unified wrapper
entry = new LogEntryImpl(entry);
- if (filters.size() == 0)
+ List<LogEntryFilter> snapshot = new ArrayList<LogEntryFilter>(filters);
+ synchronized (entries)
{
- entries.add(entry);
- return;
- }
-
- // Add the entry if if matches at least one filter
- for (LogEntryFilter filter : filters)
- {
- if (match(filter, entry))
+ if (snapshot.size() == 0)
{
entries.add(entry);
- break;
+ return;
}
+
+ // Add the entry if if matches at least one filter
+ for (LogEntryFilter filter : snapshot)
+ {
+ if (match(filter, entry))
+ {
+ entries.add(entry);
+ break;
+ }
+ }
}
}
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/Constants.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/Constants.java 2009-04-14 08:18:29 UTC (rev 87269)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/Constants.java 2009-04-14 10:12:06 UTC (rev 87270)
@@ -24,6 +24,7 @@
//$Id$
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
import org.osgi.service.log.LogService;
/**
@@ -46,31 +47,58 @@
public final static String PROPERTY_DEFERRED_START = "org.jboss.osgi.deferred.start";
/**
- * Return the string representation of a bundle state
+ * Return the string representation of a {@link Bundle} state
*/
public static String bundleState(int bundleState)
{
String retState = "[" + bundleState + "]";
-
if (Bundle.UNINSTALLED == bundleState)
- retState = "[UNINSTALLED]";
+ retState = "UNINSTALLED";
else if (Bundle.INSTALLED == bundleState)
- retState = "[INSTALLED]";
+ retState = "INSTALLED";
else if (Bundle.RESOLVED == bundleState)
- retState = "[RESOLVED]";
+ retState = "RESOLVED";
else if (Bundle.STARTING == bundleState)
- retState = "[STARTING]";
+ retState = "STARTING";
else if (Bundle.STOPPING == bundleState)
- retState = "[STOPPING]";
+ retState = "STOPPING";
else if (Bundle.ACTIVE == bundleState)
- retState = "[ACTIVE]";
-
+ retState = "ACTIVE";
return retState;
}
/**
- * Return the string representation of a log level
+ * Return the string representation of a {@link BundleEvent} type
*/
+ public static String bundleEvent(int eventType)
+ {
+ String retType = "[" + eventType + "]";
+ if (BundleEvent.INSTALLED == eventType)
+ retType = "INSTALLED";
+ else if (BundleEvent.LAZY_ACTIVATION == eventType)
+ retType = "LAZY_ACTIVATION";
+ else if (BundleEvent.RESOLVED == eventType)
+ retType = "RESOLVED";
+ else if (BundleEvent.STARTING == eventType)
+ retType = "STARTING";
+ else if (BundleEvent.STARTED == eventType)
+ retType = "STARTED";
+ else if (BundleEvent.STOPPING == eventType)
+ retType = "STOPPING";
+ else if (BundleEvent.STOPPED == eventType)
+ retType = "STOPPED";
+ else if (BundleEvent.UNINSTALLED == eventType)
+ retType = "UNINSTALLED";
+ else if (BundleEvent.UNRESOLVED == eventType)
+ retType = "UNRESOLVED";
+ else if (BundleEvent.UPDATED == eventType)
+ retType = "UPDATED";
+ return retType;
+ }
+
+ /**
+ * Return the string representation of a {@link LogService} level
+ */
public static String logLevel(int level)
{
String logLevel;
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java 2009-04-14 08:18:29 UTC (rev 87269)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java 2009-04-14 10:12:06 UTC (rev 87270)
@@ -55,8 +55,8 @@
// Setup the LogEntryCache
final LogEntryCache logEntryCache = new LogEntryCache();
- logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "BundleEvent(.*)"));
- logEntryCache.addFilter(new LogEntryFilter(null, -1, "\\[ServiceA\\](.*)"));
+ logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "\\[ServiceActivator\\](.*)"));
+ logEntryCache.addFilter(new LogEntryFilter(null, 0, "\\[ServiceA\\](.*)"));
// Track the LogReaderService to add the LogEntryCache as LogListener
ServiceTracker tracker = new ServiceTracker(sysContext, LogReaderService.class.getName(), null)
@@ -82,21 +82,21 @@
Bundle bundleA = sysContext.installBundle(testURL.toExternalForm());
bundleA.start();
- // Stop and uninstall the test bundle
- bundleA.stop();
+ // Verify that the bundle is active
+ assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundleA.getState());
+
+ // Verify the received log entries
+ List<LogEntry> entries = logEntryCache.getLog(true);
+
+ // Verify the the log entries
+ assertEquals("Number of entries", 2, entries.size());
+ assertEquals("[ServiceA] new Service", entries.get(0).getMessage());
+ assertEquals("[ServiceActivator] BundleEvent STARTED", entries.get(1).getMessage());
+
+ // Uninstall the test bundle
bundleA.uninstall();
// Uninstall the 3rd party LogService
logServiceBundle.uninstall();
-
- // Verify the received log entries
- List<LogEntry> entries = logEntryCache.getLog();
- assertEquals("Number of entries", 6, entries.size());
- assertEquals("BundleEvent INSTALLED", entries.get(0).getMessage());
- assertEquals("BundleEvent RESOLVED", entries.get(1).getMessage());
- assertEquals("[ServiceA] addingService: org.apache.felix.log.LogServiceImpl", entries.get(2).getMessage());
- assertEquals("BundleEvent STARTED", entries.get(3).getMessage());
- assertEquals("BundleEvent STOPPED", entries.get(4).getMessage());
- assertEquals("BundleEvent UNINSTALLED", entries.get(5).getMessage());
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java 2009-04-14 08:18:29 UTC (rev 87269)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java 2009-04-14 10:12:06 UTC (rev 87270)
@@ -43,30 +43,28 @@
public ServiceA(BundleContext context)
{
- // Track changes in LogService registration
+ trackLogService(context);
+ log.log(LOG_INFO, "[ServiceA] new Service");
+ }
+
+ private void trackLogService(BundleContext context)
+ {
ServiceTracker tracker = new ServiceTracker(context, LogService.class.getName(), null)
{
@Override
- public Object addingService(ServiceReference sref)
+ public Object addingService(ServiceReference reference)
{
- log = (LogService)super.addingService(sref);
- log.log(sref, LOG_INFO, "[ServiceA] addingService: " + log.getClass().getName());
+ log = (LogService)super.addingService(reference);
return log;
}
@Override
- public void removedService(ServiceReference sref, Object service)
+ public void removedService(ServiceReference reference, Object service)
{
- super.removedService(sref, service);
- log.log(sref, LOG_INFO, "[ServiceA] removedService: " + service.getClass().getName());
+ super.removedService(reference, service);
log = new SystemLogService(context);
}
};
tracker.open();
}
-
- public String echo(String msg)
- {
- return msg;
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java 2009-04-14 08:18:29 UTC (rev 87269)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java 2009-04-14 10:12:06 UTC (rev 87270)
@@ -23,26 +23,66 @@
//$Id$
+import static org.osgi.service.log.LogService.LOG_INFO;
+
+import org.jboss.osgi.service.log.SystemLogService;
+import org.jboss.osgi.spi.Constants;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
public class ServiceActivator implements BundleActivator
{
- private ServiceRegistration registration;
+ private LogService log;
+
+ public void start(final BundleContext context)
+ {
+ // Track the LogService
+ trackLogService(context);
+
+ // Register a SynchronousBundleListener
+ BundleListener listener = new SynchronousBundleListener()
+ {
+ public void bundleChanged(BundleEvent event)
+ {
+ log.log(LOG_INFO, "[ServiceActivator] BundleEvent " + Constants.bundleEvent(event.getType()));
+ }
+ };
+ context.addBundleListener(listener);
- public void start(BundleContext context)
- {
ServiceA service = new ServiceA(context);
- registration = context.registerService(ServiceA.class.getName(), service, null);
+ context.registerService(ServiceA.class.getName(), service, null);
}
public void stop(BundleContext context)
{
- if (registration != null)
+ // Do Nothing. It is unnecessary to unregister services or Framework listeners
+ // because they must be clean up by the Framework anyway.
+ }
+
+ private void trackLogService(BundleContext context)
+ {
+ ServiceTracker tracker = new ServiceTracker(context, LogService.class.getName(), null)
{
- registration.unregister();
- registration = null;
- }
+ @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);
+ }
+ };
+ tracker.open();
}
}
\ No newline at end of file
17 years, 3 months
JBoss-OSGI SVN: r87265 - in projects/jboss-osgi/trunk: service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-14 03:34:47 -0400 (Tue, 14 Apr 2009)
New Revision: 87265
Modified:
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
Log:
WIP
Modified: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java 2009-04-14 07:26:17 UTC (rev 87264)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java 2009-04-14 07:34:47 UTC (rev 87265)
@@ -48,11 +48,25 @@
private String host;
private Integer port;
+ private Client remotingClient;
+
public RemoteLogListener(BundleContext context, Properties props)
{
this.context = context;
this.host = props.getProperty(RemoteLogActivator.REMOTE_LOG_HOST);
this.port = new Integer(props.getProperty(RemoteLogActivator.REMOTE_LOG_PORT));
+
+ // Get the remoting client
+ try
+ {
+ String locatorURI = "socket://" + host + ":" + port;
+ InvokerLocator locator = new InvokerLocator(locatorURI);
+ remotingClient = new Client(locator);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
}
public void start()
@@ -73,6 +87,9 @@
public void stop()
{
+ System.out.println("remotingClient.disconnect");
+ remotingClient.disconnect();
+
LogReaderService logReader = (LogReaderService)tracker.getService();
if (logReader != null)
logReader.removeLogListener(this);
@@ -83,12 +100,14 @@
RemoteLogEntry remoteEntry = new RemoteLogEntry(entry);
try
{
- String locatorURI = "socket://" + host + ":" + port;
- InvokerLocator locator = new InvokerLocator(locatorURI);
- Client remotingClient = new Client(locator);
- remotingClient.connect();
+ if (remotingClient.isConnected() == false)
+ {
+ System.out.println("remotingClient.connect");
+ remotingClient.connect();
+ }
+
+ System.out.println("invoke: " + remoteEntry);
remotingClient.invoke(remoteEntry);
- remotingClient.disconnect();
}
catch (Throwable ex)
{
Modified: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java 2009-04-14 07:26:17 UTC (rev 87264)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java 2009-04-14 07:34:47 UTC (rev 87265)
@@ -106,8 +106,8 @@
{
String t = new SimpleDateFormat("dd-MMM-yyyy HH:mm.ss.SSS").format(new Date(time));
String l = " " + logLevel(level);
- String s = sref != null ? ",sref=" + sref.getBundle().getSymbolicName() : "";
- String b = ",bnd=" + bundle.getSymbolicName();
+ String s = sref != null && sref.getBundle() != null ? ",sref=" + sref.getBundle().getSymbolicName() : "";
+ String b = bundle != null ? ",bnd=" + bundle.getSymbolicName() : "";
String m = ",msg=" + message;
String e = exception != null ? ",ex=" + exception : "";
return "[" + t + l + b + s + m + e + "]";
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-14 07:26:17 UTC (rev 87264)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-14 07:34:47 UTC (rev 87265)
@@ -30,7 +30,9 @@
import org.jboss.osgi.service.log.RemoteLogReaderService;
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.framework.RemoteBundle;
import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogEntry;
@@ -76,24 +78,27 @@
deployBundle("bundles/jboss-osgi-service-remote-log.jar");
// Deploy the test bundle
- deployBundle("example/example-log-bundleA.jar");
+ RemoteBundle bundleA = deployBundle("example/example-log-bundleA.jar");
+ // Verify that the bundle is active
+ assertEquals("Remote bundle ACTIVE", Bundle.ACTIVE, bundleA.getState());
+
// Undeploy the test bundle
undeployBundle("example/example-log-bundleA.jar");
// Uneploy the RemoteLogListener from the remote OSGiFramework.
undeployBundle("bundles/jboss-osgi-service-remote-log.jar");
-// System.out.println(logEntryCache.getLog());
+ System.out.println(logEntryCache.getLog());
// Verify the received log entries
List<LogEntry> entries = logEntryCache.getLog();
assertEquals("Number of entries", 6, entries.size());
-// assertEquals("BundleEvent RESOLVED", entries.get(1).getMessage());
-// assertEquals("BundleEvent INSTALLED", entries.get(0).getMessage());
-// assertEquals("[ServiceA] addingService: org.apache.felix.log.LogServiceImpl", entries.get(2).getMessage());
-// assertEquals("BundleEvent STARTED", entries.get(3).getMessage());
-// assertEquals("BundleEvent STOPPED", entries.get(4).getMessage());
-// assertEquals("BundleEvent UNINSTALLED", entries.get(5).getMessage());
+ assertEquals("BundleEvent INSTALLED", entries.get(0).getMessage());
+ assertEquals("BundleEvent RESOLVED", entries.get(1).getMessage());
+ assertEquals("[ServiceA] addingService: org.apache.felix.log.LogServiceImpl", entries.get(2).getMessage());
+ assertEquals("BundleEvent STARTED", entries.get(3).getMessage());
+ assertEquals("BundleEvent STOPPED", entries.get(4).getMessage());
+ assertEquals("BundleEvent UNINSTALLED", entries.get(5).getMessage());
}
}
\ No newline at end of file
17 years, 3 months
JBoss-OSGI SVN: r87183 - projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-13 09:48:51 -0400 (Mon, 13 Apr 2009)
New Revision: 87183
Added:
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java
Log:
First pass of remote logging service
Added: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java 2009-04-13 13:48:51 UTC (rev 87183)
@@ -0,0 +1,114 @@
+/*
+ * 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.remlog;
+
+//$Id$
+
+import java.util.Properties;
+
+import org.jboss.osgi.service.log.RemoteLogReaderService;
+import org.jboss.osgi.service.remlog.internal.RemoteLogReaderServiceImpl;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Jan-2009
+ */
+public class RemoteLogActivator implements BundleActivator
+{
+ public static final String REMOTE_LOG_SENDER = "org.jboss.osgi.service.remote.log.sender";
+ public static final String REMOTE_LOG_READER = "org.jboss.osgi.service.remote.log.reader";
+ public static final String REMOTE_LOG_HOST = "org.jboss.osgi.service.remote.log.host";
+ public static final String REMOTE_LOG_PORT = "org.jboss.osgi.service.remote.log.port";
+
+ private Boolean isReader = Boolean.FALSE;
+ private Boolean isSender = Boolean.FALSE;
+ private RemoteLogReaderServiceImpl readerService;
+ private ServiceRegistration readerRegistration;
+ private RemoteLogListener remoteSender;
+
+ public void start(BundleContext context)
+ {
+ String readerProp = context.getProperty(REMOTE_LOG_READER);
+ String senderProp = context.getProperty(REMOTE_LOG_SENDER);
+ String hostProp = context.getProperty(REMOTE_LOG_HOST);
+ String portProp = context.getProperty(REMOTE_LOG_PORT);
+
+ if (readerProp != null)
+ isReader = Boolean.valueOf(readerProp);
+
+ if (senderProp != null)
+ isSender = Boolean.valueOf(senderProp);
+
+ String host = hostProp != null ? hostProp : "localhost";
+ String port = portProp != null ? portProp : "5400";
+
+ Properties props = new Properties();
+ props.put(REMOTE_LOG_HOST, host);
+ props.put(REMOTE_LOG_PORT, port);
+
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
+ if (isReader == true)
+ {
+ readerService = new RemoteLogReaderServiceImpl(context, props);
+ readerRegistration = context.registerService(RemoteLogReaderService.class.getName(), readerService, props);
+ readerService.start();
+ }
+
+ if (isSender == true)
+ {
+ remoteSender = new RemoteLogListener(context, props);
+ remoteSender.start();
+ }
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ if (isReader == true)
+ {
+ readerRegistration.unregister();
+ readerRegistration = null;
+
+ readerService.stop();
+ readerService = null;
+ }
+
+ if (isSender == true)
+ {
+ remoteSender.stop();
+ remoteSender = null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 3 months
JBoss-OSGI SVN: r87182 - in projects/jboss-osgi/trunk: runtime/felix/src/main/resources and 14 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-13 09:47:53 -0400 (Mon, 13 Apr 2009)
New Revision: 87182
Added:
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/RemoteLogReaderService.java
projects/jboss-osgi/trunk/service/remote-log/
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java
projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml
Removed:
projects/jboss-osgi/trunk/service/remlog/
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReceiverService.java
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogSenderService.java
projects/jboss-osgi/trunk/testsuite/scripts/assembly-thirdparty-bundles.xml
Modified:
projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml
projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTest.java
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java
projects/jboss-osgi/trunk/service/pom.xml
projects/jboss-osgi/trunk/service/remote-log/pom.xml
projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java
Log:
First pass of remote logging service
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-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -40,7 +40,7 @@
</bean>
<!-- A Service that gives access to the Microcontainer Kernel -->
- <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.mc.MicrocontainerService">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
Modified: projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/jboss-osgi-beans.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -29,6 +29,12 @@
org.jboss.util.propertyeditor,
</value>
</entry>
+ <!--
+ Setup remote logging
+ -->
+ <entry><key>org.jboss.osgi.service.remote.log.reader</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>
</map>
</property>
</bean>
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-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/runtime/felix/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -16,12 +16,23 @@
javax.management,
javax.xml.parsers,
org.jboss.logging,
- org.jboss.osgi.service,
+ org.jboss.osgi.service.log,
+ org.jboss.osgi.service.mc,
org.jboss.osgi.spi.management,
org.osgi.framework; version=1.4,
org.osgi.service.packageadmin; version=1.2,
org.osgi.service.startlevel; version=1.1,
- org.xml.sax
+ org.xml.sax,
+
+ <!-- needed by jboss-remoting -->
+ javax.naming,
+ javax.net,
+ javax.net.ssl,
+ org.apache.log4j,
+ org.jboss.util,
+ org.jboss.util.id,
+ org.jboss.util.threadpool,
+ org.jboss.util.propertyeditor,
</value>
</entry>
<!--
@@ -29,6 +40,12 @@
If set to 'false' bundles must be deployed in the order that is required to start them.
-->
<entry><key>org.jboss.osgi.deferred.start</key><value>true</value></entry>
+ <!--
+ 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.port</key><value>5400</value></entry>
</map>
</property>
<property name="autoStart">
@@ -45,7 +62,7 @@
</bean>
<!-- A Service that gives access to the Microcontainer Kernel -->
- <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.mc.MicrocontainerService">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
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-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/resources/osgi-deployers-jboss-beans.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -39,7 +39,7 @@
</bean>
<!-- A Service that gives access to the Microcontainer Kernel -->
- <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.mc.MicrocontainerService">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
Added: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/RemoteLogReaderService.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/RemoteLogReaderService.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/RemoteLogReaderService.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -0,0 +1,36 @@
+/*
+ * 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.log;
+
+//$Id$
+
+import org.osgi.service.log.LogReaderService;
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Apr-2009
+ */
+public interface RemoteLogReaderService extends LogReaderService
+{
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/service/log/RemoteLogReaderService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTest.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTest.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTest.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -59,6 +59,16 @@
return getDelegate().isTargetJBoss50();
}
+ protected RemoteBundle deployBundle(String archive) throws Exception
+ {
+ return getDelegate().deployBundle(archive);
+ }
+
+ protected void undeployBundle(String archive) throws Exception
+ {
+ getDelegate().undeployBundle(archive);
+ }
+
protected void deploy(String archive) throws Exception
{
getDelegate().deploy(archive);
@@ -69,11 +79,6 @@
getDelegate().deploy(archive);
}
- protected RemoteBundle deployBundle(String bundleName) throws Exception
- {
- return getDelegate().deployBundle(bundleName);
- }
-
protected void undeploy(String archive) throws Exception
{
getDelegate().undeploy(archive);
@@ -84,11 +89,6 @@
getDelegate().undeploy(archive);
}
- protected void undeployBundle(String bundleName) throws Exception
- {
- getDelegate().undeployBundle(bundleName);
- }
-
protected RemoteFramework getRemoteFramework() throws Exception
{
return getDelegate().getRemoteFramework();
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -21,10 +21,14 @@
*/
package org.jboss.osgi.spi.junit;
+import java.io.File;
+import java.io.FileInputStream;
import java.net.URL;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Set;
+import java.util.jar.Attributes;
+import java.util.jar.JarInputStream;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
@@ -40,6 +44,7 @@
import org.jboss.osgi.spi.management.MBeanProxyException;
import org.jboss.osgi.spi.management.ManagedBundleMBean;
import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
+import org.osgi.framework.Constants;
/**
* An integration test helper that deals with test deployment/undeployment, etc.
@@ -143,15 +148,25 @@
}
}
- public RemoteBundle deployBundle(String bundleName) throws Exception
+ public RemoteBundle deployBundle(String archive) throws Exception
{
- deploy(bundleName + ".jar");
- return getRemoteFramework().getBundle(bundleName);
+ File archiveFile = getTestArchiveFile(archive);
+ JarInputStream jarInputStream = new JarInputStream(new FileInputStream(archiveFile));
+ Attributes attribs = jarInputStream.getManifest().getMainAttributes();
+ String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
+ jarInputStream.close();
+
+ if (symbolicName == null)
+ throw new IllegalArgumentException("Cannot obtain Bundle-SymbolicName for: " + archive);
+
+ deploy(archive);
+
+ return getRemoteFramework().getBundle(symbolicName);
}
- public void undeployBundle(String bundleName) throws Exception
+ public void undeployBundle(String archive) throws Exception
{
- undeploy(bundleName + ".jar");
+ undeploy(archive);
}
public RemoteFramework getRemoteFramework() throws Exception
Modified: projects/jboss-osgi/trunk/service/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/pom.xml 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/service/pom.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -13,7 +13,7 @@
<modules>
<module>logging</module>
- <module>remlog</module>
+ <module>remote-log</module>
<module>webconsole</module>
</modules>
Copied: projects/jboss-osgi/trunk/service/remote-log (from rev 87178, projects/jboss-osgi/trunk/service/remlog)
Modified: projects/jboss-osgi/trunk/service/remote-log/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/service/remlog/pom.xml 2009-04-12 22:17:09 UTC (rev 87178)
+++ projects/jboss-osgi/trunk/service/remote-log/pom.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -5,7 +5,7 @@
<name>JBossOSGi - Service Remote Logging</name>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-remlog</artifactId>
+ <artifactId>jboss-osgi-service-remote-log</artifactId>
<packaging>bundle</packaging>
<!-- Parent -->
@@ -25,6 +25,11 @@
<!-- Dependencies -->
<dependencies>
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-runtime-spi</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
@@ -72,14 +77,15 @@
<extensions>true</extensions>
<configuration>
<instructions>
- <Bundle-SymbolicName>org.jboss.osgi.service.remlog</Bundle-SymbolicName>
+ <Bundle-SymbolicName>org.jboss.osgi.service.remote.log</Bundle-SymbolicName>
<Bundle-Activator>org.jboss.osgi.service.remlog.RemoteLogActivator</Bundle-Activator>
<Export-Package>org.jboss.osgi.service.remlog;version=${version}</Export-Package>
<Import-Package>
+ org.jboss.osgi.service.log,
org.osgi.framework,
org.osgi.service.log,
org.osgi.util.tracker,
-
+
javax.crypto;resolution:=optional,
javax.crypto.spec;resolution:=optional,
javax.management,
Deleted: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java
===================================================================
--- projects/jboss-osgi/trunk/service/remlog/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java 2009-04-12 22:17:09 UTC (rev 87178)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogActivator.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -1,90 +0,0 @@
-/*
- * 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.remlog;
-
-//$Id$
-
-import java.util.Properties;
-
-import org.jboss.remoting.transport.ServerFactory;
-import org.jboss.remoting.transport.local.TransportServerFactory;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * [TODO]
- *
- * @author thomas.diesler(a)jboss.com
- * @since 23-Jan-2009
- */
-public class RemoteLogActivator implements BundleActivator
-{
- public static final String REMOTE_LOG_HOST = "org.jboss.osgi.service.remlog.host";
- public static final String REMOTE_LOG_PORT = "org.jboss.osgi.service.remlog.port";
-
- private RemoteLogReceiverService receiverService;
- private ServiceRegistration receiverRegistration;
-
- private RemoteLogSenderService senderService;
- private ServiceRegistration senderRegistration;
-
- public void start(BundleContext context)
- {
- Properties props = new Properties();
- props.put(REMOTE_LOG_HOST, "localhost");
- props.put(REMOTE_LOG_PORT, "5400");
-
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-
- receiverService = new RemoteLogReceiverService(context, props);
- receiverRegistration = context.registerService(RemoteLogReceiverService.class.getName(), receiverService, props);
- receiverService.start();
-
- senderService = new RemoteLogSenderService(context, props);
- senderRegistration = context.registerService(RemoteLogSenderService.class.getName(), senderService, props);
- senderService.start();
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
- }
-
- public void stop(BundleContext context) throws Exception
- {
- receiverRegistration.unregister();
- receiverRegistration = null;
-
- receiverService.stop();
- receiverService = null;
-
- senderRegistration.unregister();
- senderRegistration = null;
-
- senderService.stop();
- senderService = null;
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java (from rev 87178, projects/jboss-osgi/trunk/service/remlog/src/main/java/org/jboss/osgi/service/remlog/RemoteLogSenderService.java)
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java (rev 0)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogListener.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -0,0 +1,98 @@
+/*
+ * 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.remlog;
+
+//$Id$
+
+import java.util.Properties;
+
+import org.jboss.osgi.service.remlog.internal.RemoteLogEntry;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvokerLocator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogListener;
+import org.osgi.service.log.LogReaderService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Apr-2009
+ */
+public class RemoteLogListener implements LogListener
+{
+ private BundleContext context;
+ private ServiceTracker tracker;
+ private String host;
+ private Integer port;
+
+ public RemoteLogListener(BundleContext context, Properties props)
+ {
+ this.context = context;
+ this.host = props.getProperty(RemoteLogActivator.REMOTE_LOG_HOST);
+ this.port = new Integer(props.getProperty(RemoteLogActivator.REMOTE_LOG_PORT));
+ }
+
+ public void start()
+ {
+ final LogListener logListener = this;
+ tracker = new ServiceTracker(context, LogReaderService.class.getName(), null)
+ {
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ LogReaderService logReader = (LogReaderService)super.addingService(reference);
+ logReader.addLogListener(logListener);
+ return logReader;
+ }
+ };
+ tracker.open();
+ }
+
+ public void stop()
+ {
+ LogReaderService logReader = (LogReaderService)tracker.getService();
+ if (logReader != null)
+ logReader.removeLogListener(this);
+ }
+
+ public void logged(LogEntry entry)
+ {
+ RemoteLogEntry remoteEntry = new RemoteLogEntry(entry);
+ try
+ {
+ String locatorURI = "socket://" + host + ":" + port;
+ InvokerLocator locator = new InvokerLocator(locatorURI);
+ Client remotingClient = new Client(locator);
+ remotingClient.connect();
+ remotingClient.invoke(remoteEntry);
+ remotingClient.disconnect();
+ }
+ catch (Throwable ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReceiverService.java
===================================================================
--- projects/jboss-osgi/trunk/service/remlog/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReceiverService.java 2009-04-12 22:17:09 UTC (rev 87178)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReceiverService.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -1,179 +0,0 @@
-/*
- * 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.remlog;
-
-//$Id$
-
-import java.util.Enumeration;
-import java.util.Properties;
-
-import javax.management.MBeanServer;
-
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.ServerInvocationHandler;
-import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-import org.jboss.remoting.transport.Connector;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogEntry;
-import org.osgi.service.log.LogListener;
-import org.osgi.service.log.LogReaderService;
-
-/**
- * [TODO]
- *
- * @author thomas.diesler(a)jboss.com
- * @since 12-Apr-2009
- */
-public class RemoteLogReceiverService implements LogReaderService
-{
- private String host;
- private Integer port;
- private Connector connector;
-
- // String to be returned from invocation handler upon client invocation calls.
- private static final String RESPONSE_VALUE = "This is the return to SampleInvocationHandler invocation";
-
- public RemoteLogReceiverService(BundleContext context, Properties props)
- {
- this.host = props.getProperty(RemoteLogActivator.REMOTE_LOG_HOST);
- this.port = new Integer(props.getProperty(RemoteLogActivator.REMOTE_LOG_PORT));
- }
-
- public void addLogListener(LogListener listener)
- {
- }
-
- public void removeLogListener(LogListener listener)
- {
- }
-
- public Enumeration<LogEntry> getLog()
- {
- throw new NotImplementedException();
- }
-
- public void start()
- {
- String locatorURI = "socket://" + host + ":" + port;
- try
- {
- // create the InvokerLocator based on url string format
- // to indicate the transport, host, and port to use for the
- // server invoker.
- InvokerLocator locator = new InvokerLocator(locatorURI);
- System.out.println("Starting remoting server with locator uri of: " + locatorURI);
- connector = new Connector(locator);
- // creates all the connector's needed resources, such as the server invoker
- connector.create();
-
- // create the handler to receive the invocation request from the client for processing
- SampleInvocationHandler invocationHandler = new SampleInvocationHandler();
- // first parameter is sub-system name. can be any String value.
- connector.addInvocationHandler("sample", invocationHandler);
-
- // start with a new non daemon thread so
- // server will wait for request and not exit
- connector.start();
- }
- catch (Throwable ex)
- {
- ex.printStackTrace();
- }
- }
-
- public void stop()
- {
- try
- {
- if (connector != null)
- connector.stop();
- }
- catch (Throwable ex)
- {
- ex.printStackTrace();
- }
- }
-
- /**
- * Simple invocation handler implementation. This is the code that will be called with the invocation payload from the client.
- */
- public static class SampleInvocationHandler implements ServerInvocationHandler
- {
- /**
- * called to handle a specific invocation
- *
- * @param invocation
- * @return
- * @throws Throwable
- */
- public Object invoke(InvocationRequest invocation) throws Throwable
- {
- // Print out the invocation request
- System.out.println("Invocation request is: " + invocation.getParameter());
- System.out.println("Returning response of: " + RESPONSE_VALUE);
- // Just going to return static string as this is just simple example code.
- return RESPONSE_VALUE;
- }
-
- /**
- * Adds a callback handler that will listen for callbacks from the server invoker handler.
- *
- * @param callbackHandler
- */
- public void addListener(InvokerCallbackHandler callbackHandler)
- {
- // NO OP as do not handling callback listeners in this example
- }
-
- /**
- * Removes the callback handler that was listening for callbacks from the server invoker handler.
- *
- * @param callbackHandler
- */
- public void removeListener(InvokerCallbackHandler callbackHandler)
- {
- // NO OP as do not handling callback listeners in this example
- }
-
- /**
- * set the mbean server that the handler can reference
- *
- * @param server
- */
- public void setMBeanServer(MBeanServer server)
- {
- // NO OP as do not need reference to MBeanServer for this handler
- }
-
- /**
- * set the invoker that owns this handler
- *
- * @param invoker
- */
- public void setInvoker(ServerInvoker invoker)
- {
- // NO OP as do not need reference back to the server invoker
- }
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogSenderService.java
===================================================================
--- projects/jboss-osgi/trunk/service/remlog/src/main/java/org/jboss/osgi/service/remlog/RemoteLogSenderService.java 2009-04-12 22:17:09 UTC (rev 87178)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/RemoteLogSenderService.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -1,108 +0,0 @@
-/*
- * 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.remlog;
-
-//$Id$
-
-import java.util.Properties;
-
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvokerLocator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.log.LogEntry;
-import org.osgi.service.log.LogListener;
-import org.osgi.service.log.LogReaderService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * [TODO]
- *
- * @author thomas.diesler(a)jboss.com
- * @since 12-Apr-2009
- */
-public class RemoteLogSenderService implements LogListener
-{
- private BundleContext context;
- private ServiceTracker tracker;
- private String host;
- private Integer port;
-
- public RemoteLogSenderService(BundleContext context, Properties props)
- {
- this.context = context;
- this.host = props.getProperty(RemoteLogActivator.REMOTE_LOG_HOST);
- this.port = new Integer(props.getProperty(RemoteLogActivator.REMOTE_LOG_PORT));
- }
-
- public void start()
- {
- final LogListener logListener = this;
- tracker = new ServiceTracker(context, LogReaderService.class.getName(), null)
- {
- @Override
- public Object addingService(ServiceReference reference)
- {
- LogReaderService logReader = (LogReaderService)super.addingService(reference);
- logReader.addLogListener(logListener);
- return logReader;
- }
- };
- tracker.open();
- }
-
- public void stop()
- {
- LogReaderService logReader = (LogReaderService)tracker.getService();
- if (logReader != null)
- logReader.removeLogListener(this);
- }
-
- public void logged(LogEntry entry)
- {
- String locatorURI = "socket://" + host + ":" + port;
- try
- {
- makeInvocation(locatorURI);
- }
- catch (Throwable ex)
- {
- ex.printStackTrace();
- }
- }
-
- public void makeInvocation(String locatorURI) throws Throwable
- {
- // create InvokerLocator with the url type string
- // indicating the target remoting server to call upon.
- InvokerLocator locator = new InvokerLocator(locatorURI);
- System.out.println("Calling remoting server with locator uri of: " + locatorURI);
-
- Client remotingClient = new Client(locator);
- remotingClient.connect();
- String request = "Do something";
- System.out.println("Invoking server with request of '" + request + "'");
- Object response = remotingClient.invoke(request);
- remotingClient.disconnect();
- System.out.println("Invocation response: " + response);
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal (from rev 87181, projects/jboss-osgi/trunk/service/remlog/src/main/java/org/jboss/osgi/service/remlog/internal)
Modified: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java
===================================================================
--- projects/jboss-osgi/trunk/service/remlog/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogEntry.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.Serializable;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -45,8 +46,10 @@
* @author thomas.diesler(a)jboss.com
* @since 09-Apr-2009
*/
-public class RemoteLogEntry implements LogEntry
+public class RemoteLogEntry implements LogEntry, Serializable
{
+ private static final long serialVersionUID = 4078248244119704523L;
+
private long time;
private Bundle bundle;
private ServiceReference sref;
@@ -136,8 +139,10 @@
/**
* A dummy Bundle for remote logging
*/
- class DummyBundle implements Bundle
+ class DummyBundle implements Bundle, Serializable
{
+ private static final long serialVersionUID = 7582641115925353657L;
+
private String symbolicName;
public DummyBundle(Bundle bundle)
@@ -275,8 +280,10 @@
/**
* A dummy ServiceReference for remote logging
*/
- class DummyServiceReference implements ServiceReference
+ class DummyServiceReference implements ServiceReference, Serializable
{
+ private static final long serialVersionUID = -4043921452530056434L;
+
private Bundle bundle;
public DummyServiceReference(ServiceReference sref)
Copied: projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java (from rev 87178, projects/jboss-osgi/trunk/service/remlog/src/main/java/org/jboss/osgi/service/remlog/RemoteLogReceiverService.java)
===================================================================
--- projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/service/remote-log/src/main/java/org/jboss/osgi/service/remlog/internal/RemoteLogReaderServiceImpl.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -0,0 +1,156 @@
+/*
+ * 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.remlog.internal;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+
+import javax.management.MBeanServer;
+
+import org.jboss.osgi.service.log.RemoteLogReaderService;
+import org.jboss.osgi.service.remlog.NotImplementedException;
+import org.jboss.osgi.service.remlog.RemoteLogActivator;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.Connector;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogListener;
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Apr-2009
+ */
+public class RemoteLogReaderServiceImpl implements RemoteLogReaderService
+{
+ private String host;
+ private Integer port;
+ private Connector connector;
+
+ private List<LogListener> listeners = new ArrayList<LogListener>();
+
+ public RemoteLogReaderServiceImpl(BundleContext context, Properties props)
+ {
+ this.host = props.getProperty(RemoteLogActivator.REMOTE_LOG_HOST);
+ this.port = new Integer(props.getProperty(RemoteLogActivator.REMOTE_LOG_PORT));
+ }
+
+ public void addLogListener(LogListener listener)
+ {
+ listeners.add(listener);
+ }
+
+ public void removeLogListener(LogListener listener)
+ {
+ listeners.remove(listener);
+ }
+
+ public Enumeration<LogEntry> getLog()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void start()
+ {
+ try
+ {
+ String locatorURI = "socket://" + host + ":" + port;
+ InvokerLocator locator = new InvokerLocator(locatorURI);
+ connector = new Connector(locator);
+ connector.create();
+
+ LogEntryInvocationHandler invocationHandler = new LogEntryInvocationHandler();
+ connector.addInvocationHandler("remote-log", invocationHandler);
+ connector.start(true);
+ }
+ catch (Throwable ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ public void stop()
+ {
+ try
+ {
+ if (connector != null)
+ connector.stop();
+ }
+ catch (Throwable ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ /**
+ * Simple invocation handler implementation.
+ * This is the code that will be called with the invocation payload from the client.
+ */
+ class LogEntryInvocationHandler implements ServerInvocationHandler
+ {
+ public Object invoke(InvocationRequest invocation) throws Throwable
+ {
+ RemoteLogEntry remoteEntry = (RemoteLogEntry)invocation.getParameter();
+ for (LogListener listener : listeners)
+ {
+ try
+ {
+ listener.logged(remoteEntry);
+ }
+ catch (RuntimeException rte)
+ {
+ System.out.println(rte.toString());
+ }
+ }
+ return null;
+ }
+
+ public void addListener(InvokerCallbackHandler callbackHandler)
+ {
+ // NOOP as do not handling callback listeners
+ }
+
+ public void removeListener(InvokerCallbackHandler callbackHandler)
+ {
+ // NOOP as do not handling callback listeners
+ }
+
+ public void setMBeanServer(MBeanServer server)
+ {
+ // NOOP as do not need reference to MBeanServer for this handler
+ }
+
+ public void setInvoker(ServerInvoker invoker)
+ {
+ // NOOP as do not need reference back to the server invoker
+ }
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -54,7 +54,7 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-service-remlog</artifactId>
+ <artifactId>jboss-osgi-service-remote-log</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
@@ -90,7 +90,7 @@
<ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
- <descriptor>scripts/assembly-thirdparty-bundles.xml</descriptor>
+ <descriptor>scripts/assembly-bundles.xml</descriptor>
</descriptors>
</configuration>
</execution>
@@ -271,7 +271,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${surefire.security.args}</argLine>
+ <!-- argLine>${surefire.security.args}</argLine -->
<excludes>
</excludes>
</configuration>
Copied: projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml (from rev 87178, projects/jboss-osgi/trunk/testsuite/scripts/assembly-thirdparty-bundles.xml)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/scripts/assembly-bundles.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -0,0 +1,28 @@
+<assembly 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/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+
+ <id>deploy-artifacts</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <!-- Dependency Sets -->
+ <dependencySets>
+
+ <!-- bundle -->
+ <dependencySet>
+ <outputDirectory>bundles</outputDirectory>
+ <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ <includes>
+ <include>*:org.apache.felix.log:jar</include>
+ <include>*:org.osgi.compendium:jar</include>
+ <include>*:jboss-osgi-service-remote-log:jar</include>
+ </includes>
+ <useStrictFiltering>true</useStrictFiltering>
+ <scope>provided</scope>
+ <unpack>false</unpack>
+ </dependencySet>
+
+ </dependencySets>
+</assembly>
Deleted: projects/jboss-osgi/trunk/testsuite/scripts/assembly-thirdparty-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/assembly-thirdparty-bundles.xml 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/testsuite/scripts/assembly-thirdparty-bundles.xml 2009-04-13 13:47:53 UTC (rev 87182)
@@ -1,28 +0,0 @@
-<assembly 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/xsd/assembly-1.1.0-SNAPSHOT.xsd">
-
- <id>deploy-artifacts</id>
- <formats>
- <format>dir</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <!-- Dependency Sets -->
- <dependencySets>
-
- <!-- bundle -->
- <dependencySet>
- <outputDirectory>thirdparty</outputDirectory>
- <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
- <includes>
- <include>*:org.apache.felix.log:jar</include>
- <include>*:org.osgi.compendium:jar</include>
- <include>*:jboss-osgi-service-remlog:jar</include>
- </includes>
- <useStrictFiltering>true</useStrictFiltering>
- <scope>provided</scope>
- <unpack>false</unpack>
- </dependencySet>
-
- </dependencySets>
-</assembly>
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceRemoteTestCase.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -23,22 +23,27 @@
//$Id$
-import java.net.URL;
+import java.util.List;
+import org.jboss.osgi.service.log.LogEntryCache;
+import org.jboss.osgi.service.log.LogEntryFilter;
+import org.jboss.osgi.service.log.RemoteLogReaderService;
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiFramework;
-import org.jboss.osgi.spi.junit.OSGiTest;
-import org.osgi.framework.Bundle;
+import org.jboss.osgi.spi.junit.IntegrationTest;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogEntry;
import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
/**
- * This example demonstrates the usage of the {@link LogService}
+ * This example demonstrates the usage of the {@link RemoteLogReaderService}
*
* @author thomas.diesler(a)jboss.com
* @since 09-Apr-2009
*/
-public class LogServiceRemoteTestCase extends OSGiTest
+public class LogServiceRemoteTestCase extends IntegrationTest
{
public void testServiceA() throws Exception
{
@@ -46,13 +51,49 @@
OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
BundleContext sysContext = framework.getSystemBundleContext();
- // Install and start the 3rd party LogService.
- URL testURL = getTestArchiveURL("thirdparty/org.apache.felix.log.jar");
- Bundle logServiceBundle = sysContext.installBundle(testURL.toExternalForm());
- logServiceBundle.start();
+ // Setup the LogEntryCache
+ final LogEntryCache logEntryCache = new LogEntryCache();
+ logEntryCache.addFilter(new LogEntryFilter("example-log(.*)", LogService.LOG_INFO, "BundleEvent(.*)"));
+ logEntryCache.addFilter(new LogEntryFilter(null, -1, "\\[ServiceA\\](.*)"));
- installBundle(sysContext, "thirdparty/jboss-osgi-service-remlog.jar", true);
+ // Track the RemoteLogReaderService to add the LogEntryCache as LogListener
+ ServiceTracker tracker = new ServiceTracker(sysContext, RemoteLogReaderService.class.getName(), null)
+ {
+ @Override
+ public Object addingService(ServiceReference sref)
+ {
+ RemoteLogReaderService service = (RemoteLogReaderService)super.addingService(sref);
+ service.addLogListener(logEntryCache);
+ return service;
+ }
+ };
+ tracker.open();
+
+ // Install the RemoteLogReaderService in the local OSGiFramework.
+ installBundle(sysContext, "bundles/jboss-osgi-service-remote-log.jar", true);
- installBundle(sysContext, "example/example-log-bundleA.jar", true);
+ // Deploy the RemoteLogListener to the remote OSGiFramework.
+ deployBundle("bundles/jboss-osgi-service-remote-log.jar");
+
+ // Deploy the test bundle
+ deployBundle("example/example-log-bundleA.jar");
+
+ // Undeploy the test bundle
+ undeployBundle("example/example-log-bundleA.jar");
+
+ // Uneploy the RemoteLogListener from the remote OSGiFramework.
+ undeployBundle("bundles/jboss-osgi-service-remote-log.jar");
+
+// System.out.println(logEntryCache.getLog());
+
+ // Verify the received log entries
+ List<LogEntry> entries = logEntryCache.getLog();
+ assertEquals("Number of entries", 6, entries.size());
+// assertEquals("BundleEvent RESOLVED", entries.get(1).getMessage());
+// assertEquals("BundleEvent INSTALLED", entries.get(0).getMessage());
+// assertEquals("[ServiceA] addingService: org.apache.felix.log.LogServiceImpl", entries.get(2).getMessage());
+// assertEquals("BundleEvent STARTED", entries.get(3).getMessage());
+// assertEquals("BundleEvent STOPPED", entries.get(4).getMessage());
+// assertEquals("BundleEvent UNINSTALLED", entries.get(5).getMessage());
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -73,7 +73,7 @@
// Install and start the 3rd party LogService.
// This will register the LogReaderService that we track above.
- URL testURL = getTestArchiveURL("thirdparty/org.apache.felix.log.jar");
+ URL testURL = getTestArchiveURL("bundles/org.apache.felix.log.jar");
Bundle logServiceBundle = sysContext.installBundle(testURL.toExternalForm());
logServiceBundle.start();
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -47,11 +47,11 @@
*/
public void testInstallStartX() throws Exception
{
- RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX.jar");
assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
- undeployBundle("jbosgi38-bundleX");
+ undeployBundle("jbosgi38-bundleX.jar");
}
/*
@@ -59,14 +59,14 @@
*/
public void testInstallXBeforeB() throws Exception
{
- RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
- RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX.jar");
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB.jar");
assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- undeployBundle("jbosgi38-bundleB");
- undeployBundle("jbosgi38-bundleX");
+ undeployBundle("jbosgi38-bundleB.jar");
+ undeployBundle("jbosgi38-bundleX.jar");
}
/*
@@ -74,17 +74,17 @@
*/
public void testInstallBBeforeA() throws Exception
{
- RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
- RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
- RemoteBundle bundleA = deployBundle("jbosgi38-bundleA");
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX.jar");
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB.jar");
+ RemoteBundle bundleA = deployBundle("jbosgi38-bundleA.jar");
assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
- undeployBundle("jbosgi38-bundleA");
- undeployBundle("jbosgi38-bundleB");
- undeployBundle("jbosgi38-bundleX");
+ undeployBundle("jbosgi38-bundleA.jar");
+ undeployBundle("jbosgi38-bundleB.jar");
+ undeployBundle("jbosgi38-bundleX.jar");
}
/*
@@ -92,17 +92,17 @@
*/
public void testInstallBBeforeX() throws Exception
{
- RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB.jar");
assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
- RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX.jar");
assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- undeployBundle("jbosgi38-bundleB");
- undeployBundle("jbosgi38-bundleX");
+ undeployBundle("jbosgi38-bundleB.jar");
+ undeployBundle("jbosgi38-bundleX.jar");
}
/*
@@ -110,22 +110,22 @@
*/
public void testInstallABeforeB() throws Exception
{
- RemoteBundle bundleA = deployBundle("jbosgi38-bundleA");
+ RemoteBundle bundleA = deployBundle("jbosgi38-bundleA.jar");
assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
- RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB.jar");
assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
- RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX.jar");
assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
- undeployBundle("jbosgi38-bundleA");
- undeployBundle("jbosgi38-bundleB");
- undeployBundle("jbosgi38-bundleX");
+ undeployBundle("jbosgi38-bundleA.jar");
+ undeployBundle("jbosgi38-bundleB.jar");
+ undeployBundle("jbosgi38-bundleX.jar");
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -44,7 +44,7 @@
{
public void testVerifyUnresolved() throws Exception
{
- RemoteBundle bundleB = deployBundle("jbosgi39-bundleB");
+ RemoteBundle bundleB = deployBundle("jbosgi39-bundleB.jar");
assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
@@ -58,13 +58,13 @@
// expected
}
- RemoteBundle bundleX = deployBundle("jbosgi39-bundleX");
+ RemoteBundle bundleX = deployBundle("jbosgi39-bundleX.jar");
assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- undeployBundle("jbosgi39-bundleB");
- undeployBundle("jbosgi39-bundleX");
+ undeployBundle("jbosgi39-bundleB.jar");
+ undeployBundle("jbosgi39-bundleX.jar");
}
/*
@@ -80,8 +80,8 @@
*/
public void testWiringToUninstalled() throws Exception
{
- RemoteBundle bundleX = deployBundle("jbosgi39-bundleX");
- RemoteBundle bundleB = deployBundle("jbosgi39-bundleB");
+ RemoteBundle bundleX = deployBundle("jbosgi39-bundleX.jar");
+ RemoteBundle bundleB = deployBundle("jbosgi39-bundleB.jar");
bundleB.start();
@@ -89,16 +89,16 @@
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
// Undeploy X before B
- undeployBundle("jbosgi39-bundleX");
- undeployBundle("jbosgi39-bundleB");
+ undeployBundle("jbosgi39-bundleX.jar");
+ undeployBundle("jbosgi39-bundleB.jar");
// Install B without X
- bundleB = deployBundle("jbosgi39-bundleB");
+ bundleB = deployBundle("jbosgi39-bundleB.jar");
bundleB.start();
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- undeployBundle("jbosgi39-bundleB");
+ undeployBundle("jbosgi39-bundleB.jar");
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -43,7 +43,7 @@
{
public void testFirstRun() throws Exception
{
- RemoteBundle bundleA = deployBundle("jbosgi41-bundleA");
+ RemoteBundle bundleA = deployBundle("jbosgi41-bundleA.jar");
assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
File dataFile = getBundleDataFile(bundleA, "config/jbosgi41.txt");
@@ -53,7 +53,7 @@
String symbolicName = br.readLine();
assertEquals("jbosgi41-bundleA", symbolicName);
- undeployBundle("jbosgi41-bundleA");
+ undeployBundle("jbosgi41-bundleA.jar");
}
private File getBundleDataFile(RemoteBundle bundleA, String filename)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java 2009-04-13 11:08:55 UTC (rev 87181)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java 2009-04-13 13:47:53 UTC (rev 87182)
@@ -37,10 +37,10 @@
{
public void testStartLevel() throws Exception
{
- RemoteBundle bundle = deployBundle("startlevel-service");
+ RemoteBundle bundle = deployBundle("startlevel-service.jar");
assertEquals("Bundle active", Bundle.ACTIVE, bundle.getState());
- undeployBundle("startlevel-service");
+ undeployBundle("startlevel-service.jar");
}
}
\ No newline at end of file
17 years, 3 months