[jboss-cvs] JBossAS SVN: r92957 - in projects/demos/microcontainer/trunk: bundle_user and 10 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 28 10:48:42 EDT 2009
Author: alesj
Date: 2009-08-28 10:48:42 -0400 (Fri, 28 Aug 2009)
New Revision: 92957
Added:
projects/demos/microcontainer/trunk/bundle_user/
projects/demos/microcontainer/trunk/bundle_user/pom.xml
projects/demos/microcontainer/trunk/bundle_user/src/
projects/demos/microcontainer/trunk/bundle_user/src/main/
projects/demos/microcontainer/trunk/bundle_user/src/main/java/
projects/demos/microcontainer/trunk/bundle_user/src/main/java/org/
projects/demos/microcontainer/trunk/bundle_user/src/main/java/org/jboss/
projects/demos/microcontainer/trunk/bundle_user/src/main/java/org/jboss/demos/
projects/demos/microcontainer/trunk/bundle_user/src/main/java/org/jboss/demos/buser/
projects/demos/microcontainer/trunk/bundle_user/src/main/java/org/jboss/demos/buser/EventActivator.java
projects/demos/microcontainer/trunk/bundle_user/src/main/resources/
projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/
projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/MANIFEST.MF
projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/bundle-beans.xml
Modified:
projects/demos/microcontainer/trunk/igloo/src/main/java/org/jboss/demos/bootstrap/igloo/deployers/BundleResolveDeployer.java
projects/demos/microcontainer/trunk/pom.xml
Log:
Add Bundle user module.
Added: projects/demos/microcontainer/trunk/bundle_user/pom.xml
===================================================================
--- projects/demos/microcontainer/trunk/bundle_user/pom.xml (rev 0)
+++ projects/demos/microcontainer/trunk/bundle_user/pom.xml 2009-08-28 14:48:42 UTC (rev 92957)
@@ -0,0 +1,27 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.demos</groupId>
+ <artifactId>jboss-demos</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.demos</groupId>
+ <artifactId>jboss-demos-bundle-user</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss MC Demos Bundle User</name>
+ <url>http://www.jboss.org/jbossmc</url>
+ <description>JBoss MC Demos</description>
+
+ <dependencies>
+ <!-- Compile (global dependencies) -->
+ <dependency>
+ <groupId>org.jboss.demos</groupId>
+ <artifactId>jboss-demos-bundle</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: projects/demos/microcontainer/trunk/bundle_user/src/main/java/org/jboss/demos/buser/EventActivator.java
===================================================================
--- projects/demos/microcontainer/trunk/bundle_user/src/main/java/org/jboss/demos/buser/EventActivator.java (rev 0)
+++ projects/demos/microcontainer/trunk/bundle_user/src/main/java/org/jboss/demos/buser/EventActivator.java 2009-08-28 14:48:42 UTC (rev 92957)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.demos.buser;
+
+import java.util.logging.Logger;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.jboss.demos.bundle.services.EventService;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class EventActivator implements BundleActivator
+{
+ private Logger log = Logger.getLogger(EventActivator.class.getName());
+
+ public void start(BundleContext bundleContext) throws Exception
+ {
+ ServiceReference reference = bundleContext.getServiceReference(EventService.class.getName());
+ try
+ {
+ EventService es = (EventService)bundleContext.getService(reference);
+ log.info("\nWelcome to " + es.getEventName() + "!\n");
+ }
+ finally
+ {
+ bundleContext.ungetService(reference);
+ }
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception
+ {
+ }
+}
Added: projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/MANIFEST.MF
===================================================================
--- projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/MANIFEST.MF (rev 0)
+++ projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/MANIFEST.MF 2009-08-28 14:48:42 UTC (rev 92957)
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.6.5
+Created-By: Ales Justin
+Implementation-Title: JBoss OSGi tests
+Implementation-Version: 2.0.0.beta2
+Implementation-Vendor: jboss.org
+Bundle-SymbolicName: org.jboss.demos.buser
+Import-Package: org.jboss.demos.bundle.services;version=[1,2]
+Bundle-Activator: org.jboss.demos.buser.EventActivator
Added: projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/bundle-beans.xml
===================================================================
--- projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/bundle-beans.xml (rev 0)
+++ projects/demos/microcontainer/trunk/bundle_user/src/main/resources/META-INF/bundle-beans.xml 2009-08-28 14:48:42 UTC (rev 92957)
@@ -0,0 +1,3 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+</deployment>
Modified: projects/demos/microcontainer/trunk/igloo/src/main/java/org/jboss/demos/bootstrap/igloo/deployers/BundleResolveDeployer.java
===================================================================
--- projects/demos/microcontainer/trunk/igloo/src/main/java/org/jboss/demos/bootstrap/igloo/deployers/BundleResolveDeployer.java 2009-08-28 14:46:16 UTC (rev 92956)
+++ projects/demos/microcontainer/trunk/igloo/src/main/java/org/jboss/demos/bootstrap/igloo/deployers/BundleResolveDeployer.java 2009-08-28 14:48:42 UTC (rev 92957)
@@ -23,9 +23,10 @@
import java.util.Set;
+import org.jboss.classloading.spi.dependency.Module;
import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
import org.jboss.dependency.spi.DependencyInfo;
-import org.jboss.dependency.spi.ControllerState;
import org.jboss.dependency.spi.DependencyItem;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
@@ -45,6 +46,7 @@
public BundleResolveDeployer()
{
super(OSGiMetaData.class);
+ addInput(Module.class);
setStage(DeploymentStages.DESCRIBE);
setTopLevelOnly(true);
}
Modified: projects/demos/microcontainer/trunk/pom.xml
===================================================================
--- projects/demos/microcontainer/trunk/pom.xml 2009-08-28 14:46:16 UTC (rev 92956)
+++ projects/demos/microcontainer/trunk/pom.xml 2009-08-28 14:48:42 UTC (rev 92957)
@@ -29,6 +29,7 @@
<module>classpath</module>
<module>igloo</module>
<module>bundle</module>
+ <module>bundle_user</module>
<!-- <module>osgi</module> -->
<module>build</module>
</modules>
@@ -176,13 +177,11 @@
<artifactId>jboss-demos-models</artifactId>
<version>${project.version}</version>
</dependency>
- <!--
<dependency>
<groupId>org.jboss.demos</groupId>
- <artifactId>jboss-demos-osgi</artifactId>
+ <artifactId>jboss-demos-bundle</artifactId>
<version>${project.version}</version>
</dependency>
- -->
<dependency>
<groupId>org.jboss.microcontainer</groupId>
More information about the jboss-cvs-commits
mailing list