[jboss-cvs] JBossAS SVN: r84058 - in projects/jboss-felix/tags: jboss-osgi-1.0.0.Alpha1 and 109 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 10 09:02:01 EST 2009
Author: thomas.diesler at jboss.com
Date: 2009-02-10 09:02:01 -0500 (Tue, 10 Feb 2009)
New Revision: 84058
Added:
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/eclipse.code.style.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/readme-commiters.txt
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/ant.properties.example
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/server.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/tomcat-users.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/build.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/command.sh
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/config.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Mailer.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Maven.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/jobs/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/jobs/JBoss-OSGi-Matrix/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/jobs/JBoss-OSGi-Matrix/config.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/http-spider.sh
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/jboss.sh
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/runjboss.sh
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/profiles.xml.local.qa
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/antrun-installer.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/assembly-deploy-artifacts.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/JBossORG-EULA.txt
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/release.notes.html
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/ant-actions-spec.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/auto-install-template.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/install-definition.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/target-panel-dir.txt
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/user-input-spec.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.classpath
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/scripts/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/scripts/assembly-config.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-jboss-beans.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.classpath
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/scripts/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/scripts/assembly-config.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/osgi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/osgi/felix/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/osgi/felix/framework/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/org.jboss.osgi.spi.framework.OSGiConfigurationProvider
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/osgi-jboss-beans.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredService.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredServiceTest.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitService.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitServiceTest.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/MyBean.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/system/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/system/SystemBundleTest.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/jboss-osgi-beans.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/log4j.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/configured-service-test.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/explicit-service-test.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.classpath
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/scripts/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/scripts/antrun-test-jars.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/service/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/service/http/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointActivator.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/jndi.properties
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/log4j.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/http-service.bnd
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/message.txt
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/tst.policy
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.classpath
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/GenericEndpointServlet.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpEndpointDeployer.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoader.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoaderMBean.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContext.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContextMBean.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServlet.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServletMBean.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/WebMetaDataFactory.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.classpath
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpContextImpl.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceActivator.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceException.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/NotImplementedException.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.classpath
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.project
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/org.eclipse.jdt.core.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/org.maven.ide.eclipse.prefs
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/service/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/service/MicrocontainerService.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/FrameworkException.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/NotImplementedException.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/ObjectNameFactory.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/EmbeddedBeansDeployer.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/KernelLocator.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/ArchiveDeployer.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestCase.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestSetup.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/JBossArchiveDeployer.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestCase.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestHelper.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestSetup.java
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/resources/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/test/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/test/java/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/test/resources/
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/pom.xml
projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/profiles.xml.example
Log:
Release jboss-osgi-1.0.0.Alpha1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,5 @@
+#Thu Jan 29 07:27:00 CET 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-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Tue Feb 03 13:32:33 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/eclipse.code.style.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/eclipse.code.style.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/eclipse.code.style.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="11">
+<profile kind="CodeFormatterProfile" name="jboss.osgi.code.style" version="11">
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="164"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="168"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+</profile>
+</profiles>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/eclipse.code.style.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/readme-commiters.txt
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/readme-commiters.txt (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/readme-commiters.txt 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,25 @@
+#
+# $Id$
+#
+
+1. Edit your subversion config ~/.subversion/config and set the following in each section:
+
+[miscellany]
+enable-auto-props = yes
+
+[auto-props]
+*.bat = svn:keywords=Id Revision;svn:eol-style=LF
+*.java = svn:keywords=Id Revision;svn:eol-style=LF
+*.sh = svn:keywords=Id Revision;svn:eol-style=LF
+*.txt = svn:keywords=Id Revision;svn:eol-style=LF
+*.wsdl = svn:keywords=Id Revision;svn:eol-style=LF
+*.xml = svn:keywords=Id Revision;svn:eol-style=LF
+*.xsd = svn:keywords=Id Revision;svn:eol-style=LF
+
+2. If you are using an IDE, make sure that it refers to the same config. So,
+for example, if you are using Eclipse with Subclipse on windows, you need to
+set Team->SVN->Configuration Location to:
+
+/home/<your user name>/.subversion
+
+3. If you are using Eclipse, set your code style to jBPMCodeStyle.xml
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/eclipse/readme-commiters.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>hudson</name>
+ <comment></comment>
+ <projects>
+ </projects>
+</projectDescription>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/ant.properties.example
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/ant.properties.example (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/ant.properties.example 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,38 @@
+#
+# A sample ant properties file
+#
+# $Id: ant.properties.example 3995 2007-07-26 08:52:45Z thomas.diesler at jboss.com $
+
+# JBoss remote repository
+jboss.repository=http://repository.jboss.org
+
+# The JBoss settings
+jboss.server.instance=default
+jboss.bind.address=127.0.0.1
+
+# JDK settings
+java.home.jdk15=/usr/java/jdk1.5.0_17
+java.home.jdk16=/usr/java/jdk1.6.0_11
+
+# Hudson QA Environment
+hudson.username=changeme
+hudson.password=changeme
+
+hudson.maven.path=/usr/java/apache-maven-2.0.9
+
+hudson.root=/home/hudson/workspace
+
+hudson.maven.profile=$OSGIDIR/hudson/profiles.xml.local.qa
+
+hudson.host=jbpm.dyndns.org
+hudson.admin.port=8150
+hudson.http.port=8180
+
+#hudson.jboss501.zip=file:///home/hudson/download/java/jboss/jboss-5.0.1.GA.zip
+
+hudson.mail.recipients=
+hudson.smtp.host=localhost
+
+# Hudson (1.282)
+apache-tomcat=5.5.20
+sun-hudson=2402/126367
\ No newline at end of file
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/server.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/server.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/server.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,57 @@
+
+<Server port="@hudson.admin.port@" shutdown="SHUTDOWN">
+
+ <!-- Comment these entries out to disable JMX MBeans support used for the
+ administration web application -->
+ <Listener className="org.apache.catalina.core.AprLifecycleListener"/>
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
+ <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
+
+ <!-- Global JNDI resources -->
+ <GlobalNamingResources>
+
+ <!-- Test entry for demonstration purposes -->
+ <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
+
+ <!-- Editable user database that can also be used by
+ UserDatabaseRealm to authenticate users -->
+ <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved"
+ factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml"/>
+
+ </GlobalNamingResources>
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Catalina">
+
+ <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
+ <Connector port="@hudson.http.port@" maxHttpHeaderSize="8192" maxThreads="150"
+ minSpareThreads="25" maxSpareThreads="75"
+ enableLookups="false" redirectPort="8443" acceptCount="100"
+ connectionTimeout="20000" disableUploadTimeout="true"/>
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Catalina" defaultHost="localhost">
+
+ <!-- This Realm uses the UserDatabase configured in the global JNDI
+ resources under the key "UserDatabase". Any edits
+ that are performed against this UserDatabase are immediately
+ available for use by the Realm. -->
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
+
+ <!-- Define the default virtual host
+ Note: XML Schema validation will not work with Xerces 2.2.
+ -->
+ <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
+
+ <Context path="/hudson">
+ <Environment description="" name="HUDSON_HOME" type="java.lang.String" value="@hudson.home@"/>
+ </Context>
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/server.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/tomcat-users.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/tomcat-users.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/tomcat-users.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tomcat-users>
+ <role rolename="admin"/>
+ <user username="@hudson.username@" password="@hudson.password@" roles="admin"/>
+</tomcat-users>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/apache-tomcat/conf/tomcat-users.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/build.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/build.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/build.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <property name="hudson.dir" value="${basedir}"/>
+ <property name="hudson.target.dir" value="${hudson.dir}/target"/>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <target name="init">
+ <!-- Check if ant.properties is available -->
+ <available property="ant.properties.available" file="${basedir}/ant.properties"/>
+ <fail message="Cannot find ant.properties. Did you copy/edit ant.properties.example?" unless="ant.properties.available"/>
+
+ <property file="${basedir}/ant.properties"/>
+
+ <xmlproperty file="${basedir}/../pom.xml"/>
+ <property name="version.id" value="${project.version}"/>
+ <property name="repository.id" value="${project.version}"/>
+
+ <echo message="version.id=${version.id}"/>
+ <echo message="repository.id=${repository.id}"/>
+ </target>
+
+ <target name="init-hudson" depends="init">
+ <property name="hudson.base" value="${hudson.root}/jboss-osgi-hudson-${version.id}"/>
+ <property name="hudson.tomcat" value="${hudson.base}/apache-tomcat"/>
+ <property name="hudson.home" value="${hudson.base}/hudson-home"/>
+ <property name="hudson.jboss" value="${hudson.base}/jboss"/>
+
+ <echo/>
+ <echo message="hudson.root = ${hudson.root}"/>
+ <echo message="hudson.home = ${hudson.home}"/>
+ <echo/>
+
+ <available file="${hudson.root}" property="hudson.root.available"/>
+ <available file="${hudson.tomcat}" property="hudson.tomcat.available"/>
+ <fail message="Hudson root not available" unless="hudson.root.available"/>
+
+ <property name="hudson.username.${hudson.username}" value="true"/>
+ <fail message="Cannot use default hudson username: ${hudson.username}" if="hudson.username.changeme"/>
+ <property name="hudson.password.${hudson.password}" value="true"/>
+ <fail message="Cannot use default hudson password: ${hudson.password}" if="hudson.password.changeme"/>
+ </target>
+
+ <target name="init-thirdparty" depends="init-hudson">
+ <property name="thirdparty.dir" value="${hudson.target.dir}/thirdparty"/>
+ <mkdir dir="${thirdparty.dir}"/>
+ <available property="apache.tomcat.available" file="${thirdparty.dir}/apache-tomcat.zip"/>
+ <available property="sun.hudson.available" file="${thirdparty.dir}/hudson.war"/>
+ <available property="jboss501.available" file="${thirdparty.dir}/jboss-5.0.1.GA.zip"/>
+ </target>
+
+ <!--
+ Get thirdparty dependencies
+ -->
+ <target name="thirdparty" depends="init-thirdparty,get-tomcat,get-hudson,get-jboss501">
+ <copy todir="${hudson.base}/jboss" file="${thirdparty.dir}/jboss-5.0.1.GA.zip"/>
+ </target>
+ <target name="get-tomcat" depends="init-thirdparty" unless="apache.tomcat.available">
+ <get src="${jboss.repository}/apache-tomcat/${apache-tomcat}/lib/apache-tomcat.zip" dest="${thirdparty.dir}/apache-tomcat.zip" usetimestamp="true" verbose="true"/>
+ </target>
+ <target name="get-hudson" depends="init-thirdparty" unless="sun.hudson.available">
+ <get src="https://hudson.dev.java.net/files/documents/${sun-hudson}/hudson.war" dest="${thirdparty.dir}/hudson.war" usetimestamp="true" verbose="true"/>
+ </target>
+ <target name="get-jboss501" depends="init-thirdparty" unless="jboss501.available">
+ <property name="hudson.jboss501.zip" value="http://jbpm.dyndns.org/files/jboss-5.0.1.GA-r84020.zip"/>
+ <get src="${hudson.jboss501.zip}" dest="${thirdparty.dir}/jboss-5.0.1.GA.zip" usetimestamp="true" verbose="true"/>
+ </target>
+
+ <!--
+ Setup the Hudson Tomcat instance
+ -->
+ <target name="hudson-tomcat-setup" depends="thirdparty" unless="hudson.tomcat.available">
+
+ <!-- Install Tomcat -->
+ <mkdir dir="${hudson.root}"/>
+ <unzip src="${thirdparty.dir}/apache-tomcat.zip" dest="${hudson.root}"/>
+ <move file="${hudson.root}/apache-tomcat-${apache-tomcat}" tofile="${hudson.tomcat}"/>
+ <chmod perm="+x">
+ <fileset dir="${hudson.tomcat}/bin">
+ <include name="*.sh"/>
+ </fileset>
+ </chmod>
+
+ <!-- Install Hudson -->
+ <copy todir="${hudson.tomcat}/webapps" file="${thirdparty.dir}/hudson.war"/>
+
+ </target>
+
+ <!--
+ Update the Hudson version
+ -->
+ <target name="hudson-update" depends="init-thirdparty">
+ <get src="https://hudson.dev.java.net/files/documents/${sun-hudson}/hudson.war" dest="${thirdparty.dir}/hudson.war" usetimestamp="false" verbose="true"/>
+ <delete dir="${hudson.tomcat}/webapps/hudson"/>
+ <copy todir="${hudson.tomcat}/webapps" file="${thirdparty.dir}/hudson.war"/>
+ </target>
+
+ <!--
+ Setup the Hudson QA environment
+ -->
+ <target name="hudson-setup" depends="init-hudson,hudson-tomcat-setup" description="Setup the Hudson QA environment">
+
+ <!-- get the svn url -->
+ <exec dir="${hudson.dir}/.." executable="svn" failonerror="true" output="${hudson.target.dir}/svn-info.xml">
+ <arg line="info"/>
+ <arg line="--xml"/>
+ </exec>
+ <xmlproperty file="${hudson.target.dir}/svn-info.xml"/>
+ <property name="hudson.osgi.url" value="${info.entry.url}"/>
+
+ <!-- Configure Tomcat -->
+ <copy todir="${hudson.tomcat}" overwrite="true">
+ <fileset dir="${hudson.dir}/apache-tomcat">
+ <include name="**/*.xml"/>
+ </fileset>
+ <filterset>
+ <filtersfile file="${hudson.dir}/ant.properties"/>
+ <filter token="hudson.home" value="${hudson.home}"/>
+ </filterset>
+ </copy>
+
+ <!-- Configure Hudson -->
+ <copy todir="${hudson.home}" overwrite="true">
+ <fileset dir="${hudson.dir}/hudson-home">
+ <include name="jobs/*/config.xml"/>
+ <include name="command.sh"/>
+ <include name="*.xml"/>
+ </fileset>
+ <filterset>
+ <filter token="hudson.osgi.url" value="${hudson.osgi.url}"/>
+ <filter token="hudson.base" value="${hudson.base}"/>
+ <filter token="hudson.home" value="${hudson.home}"/>
+ <filter token="version.id" value="${version.id}"/>
+ <filtersfile file="${hudson.dir}/ant.properties"/>
+ </filterset>
+ </copy>
+
+ <echo/>
+ <echo message="*************************************"/>
+ <echo message="* Hudson setup successfully *"/>
+ <echo message="* ant hudson-start *"/>
+ <echo message="*************************************"/>
+ <echo/>
+
+ </target>
+
+ <target name="hudson-stop" depends="init-hudson" description="Stops the Hudson QA environment">
+
+ <exec executable="${hudson.tomcat}/bin/catalina.sh" failonerror="true">
+ <arg line="stop"/>
+ </exec>
+
+ <echo/>
+ <echo message="*************************************"/>
+ <echo message="* Hudson stopped successfully *"/>
+ <echo message="* ant hudson-start *"/>
+ <echo message="*************************************"/>
+ <echo/>
+
+ </target>
+
+ <target name="hudson-start" depends="init-hudson" description="Start the Hudson QA environment">
+
+ <property environment="env"/>
+ <fail message="unset JBOSS_REPOSITORY=${env.JBOSS_REPOSITORY}" if="env.JBOSS_REPOSITORY"/>
+
+ <exec executable="${hudson.tomcat}/bin/catalina.sh" failonerror="true" output="${hudson.target.dir}/hudson.log">
+ <env key="CATALINA_OPTS" value="-Xmx512m -Djava.awt.headless=true"/>
+ <arg line="start"/>
+ </exec>
+
+ <echo/>
+ <echo message="*************************************"/>
+ <echo message="* Hudson started successfully *"/>
+ <echo message="* http://localhost:${hudson.http.port}/hudson *"/>
+ <echo message="*************************************"/>
+ <echo/>
+
+ </target>
+
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/build.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/command.sh
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/command.sh (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/command.sh 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# A script that uses Maven to build the project and
+# execute its test suite against a given target container
+#
+# $Id$
+
+WORKSPACE=`pwd`
+OSGIDIR=$WORKSPACE/jboss-osgi
+DISTRODIR=$OSGIDIR/modules/distribution/target
+
+case "$CONTAINER" in
+ jboss501*)
+ JBOSS_BUILD=jboss-5.0.1.GA
+ ;;
+esac
+
+#
+# Unzip the JBoss build
+#
+rm -rf $JBOSS_BUILD
+unzip -q $HUDSON_BASE/jboss/$JBOSS_BUILD.zip
+
+JBOSS_HOME=$WORKSPACE/$JBOSS_BUILD
+ENVIRONMENT="-Dtarget.container=$CONTAINER -Djboss.home=$JBOSS_HOME -Djboss.bind.address=$JBOSS_BINDADDR"
+
+#
+# Build distro
+#
+cd $OSGIDIR
+MVN_CMD="mvn -U $ENVIRONMENT -Pdistro clean install"
+echo $MVN_CMD; $MVN_CMD; MVN_STATUS=$?
+if [ $MVN_STATUS -ne 0 ]; then
+ echo maven exit status $MVN_STATUS
+ exit 1
+fi
+
+#
+# build the tests
+#
+MVN_CMD="mvn -o $ENVIRONMENT process-test-classes"
+echo $MVN_CMD; $MVN_CMD 2>&1; MVN_STATUS=$?
+if [ $MVN_STATUS -ne 0 ]; then
+ echo maven exit status $MVN_STATUS
+ exit 1
+fi
+
+#
+# Deploy distro
+#
+AUTO_INSTALL=modules/distribution/target/resources/auto-install-template.xml; cat $AUTO_INSTALL;
+JAVA_CMD="java -jar $DISTRODIR/jboss-osgi-installer-$OSGI_VERSION.jar $AUTO_INSTALL"
+echo $JAVA_CMD; $JAVA_CMD
+
+#
+# start jbossas
+#
+$OSGIDIR/hudson/jboss/bin/jboss.sh $JBOSS_HOME start $JBOSS_BINDADDR
+
+# Was it successfully started?
+$OSGIDIR/hudson/jboss/bin/http-spider.sh $JBOSS_BINDADDR:8080 $WORKSPACE
+if [ -e $WORKSPACE/spider.failed ]; then
+ tail -n 100 $JBOSS_HOME/server/$JBOSS_SERVER/log/server.log
+ $OSGIDIR/hudson/jboss/bin/jboss.sh $JBOSS_HOME stop $JBOSS_BINDADDR
+ exit 1
+fi
+
+#
+# log dependency tree
+#
+MVN_CMD="mvn -o $ENVIRONMENT dependency:tree"
+echo $MVN_CMD; $MVN_CMD | tee $WORKSPACE/dependency-tree.txt
+
+#
+# execute tests
+#
+MVN_CMD="mvn -o -fae $ENVIRONMENT test"
+echo $MVN_CMD; $MVN_CMD 2>&1 | tee $WORKSPACE/tests.log
+cat $WORKSPACE/tests.log | egrep FIXME\|FAILED | sort -u | tee $WORKSPACE/fixme.txt
+cat $WORKSPACE/fixme.txt | egrep "\[\S*]" > $WORKSPACE/errata-$CONTAINER.txt || :
+
+#
+# stop jbossas
+#
+$OSGIDIR/hudson/jboss/bin/jboss.sh $JBOSS_HOME stop
+cp $JBOSS_HOME/server/$JBOSS_SERVER/log/boot.log $WORKSPACE/jboss-boot.log
+cp $JBOSS_HOME/server/$JBOSS_SERVER/log/server.log $WORKSPACE/jboss-server.log
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/command.sh
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/config.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/config.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/config.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,27 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<hudson>
+ <numExecutors>2</numExecutors>
+ <useSecurity>true</useSecurity>
+ <systemMessage>
+ <![CDATA[
+ <h2>JBoss OSGi @version.id@ QA Environment</h2>
+
+ <table>
+ <tr align="left"><th>SVN</th><td>@hudson.osgi.url@</td></tr>
+ <tr align="left"><th>Bind Addr</th><td>@jboss.bind.address@</td></tr>
+ </table>
+]]>
+ </systemMessage>
+ <jdks>
+ <jdk>
+ <name>jdk1.5</name>
+ <javaHome>@java.home.jdk15@</javaHome>
+ </jdk>
+ <jdk>
+ <name>jdk1.6</name>
+ <javaHome>@java.home.jdk16@</javaHome>
+ </jdk>
+ </jdks>
+ <slaves/>
+ <quietPeriod>5</quietPeriod>
+</hudson>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Mailer.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Mailer.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Mailer.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<hudson.tasks.Mailer-DescriptorImpl>
+ <defaultSuffix></defaultSuffix>
+ <hudsonUrl>http://@hudson.host@:@hudson.http.port@/hudson/</hudsonUrl>
+ <adminAddress>thomas.diesler at jboss.com</adminAddress>
+ <smtpHost>@hudson.smtp.host@</smtpHost>
+</hudson.tasks.Mailer-DescriptorImpl>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Mailer.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Maven.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Maven.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Maven.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<hudson.tasks.Maven_-DescriptorImpl>
+ <installations>
+ <hudson.tasks.Maven_-MavenInstallation>
+ <name>apache-maven</name>
+ <mavenHome>@hudson.maven.path@</mavenHome>
+ </hudson.tasks.Maven_-MavenInstallation>
+ </installations>
+</hudson.tasks.Maven_-DescriptorImpl>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/hudson.tasks.Maven.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/jobs/JBoss-OSGi-Matrix/config.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/jobs/JBoss-OSGi-Matrix/config.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/jobs/JBoss-OSGi-Matrix/config.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,82 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<matrix-project>
+ <actions class="java.util.concurrent.CopyOnWriteArrayList"/>
+ <description>Build and test the JBoss OSGi @version.id@ Matrix</description>
+ <logRotator>
+ <daysToKeep>60</daysToKeep>
+ <numToKeep>-1</numToKeep>
+ </logRotator>
+ <keepDependencies>false</keepDependencies>
+ <properties>
+ <hudson.security.AuthorizationMatrixProperty/>
+ </properties>
+ <scm class="hudson.scm.SubversionSCM">
+ <locations>
+ <hudson.scm.SubversionSCM_-ModuleLocation>
+ <remote>@hudson.osgi.url@</remote>
+ <local>jboss-osgi</local>
+ </hudson.scm.SubversionSCM_-ModuleLocation>
+ </locations>
+ <useUpdate>true</useUpdate>
+ <browser class="hudson.scm.browsers.FishEyeSVN">
+ <url>http://fisheye.jboss.com/browse/JbpmSvn/</url>
+ <rootModule></rootModule>
+ </browser>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <triggers class="vector">
+ <hudson.triggers.TimerTrigger>
+ <spec>0 0 * * *</spec>
+ </hudson.triggers.TimerTrigger>
+ </triggers>
+ <axes>
+ <axis>
+ <name>container</name>
+ <values>
+ <string>jboss501</string>
+ </values>
+ </axis>
+ <axis>
+ <name>jdk</name>
+ <values>
+ <string>jdk1.5</string>
+ <string>jdk1.6</string>
+ </values>
+ </axis>
+ </axes>
+ <builders>
+ <hudson.tasks.Shell>
+ <command>
+WORKSPACE=`pwd`
+OSGIDIR=$WORKSPACE/jboss-osgi
+
+export CONTAINER=$container
+
+export HUDSON_BASE=@hudson.base@
+export OSGI_VERSION=@version.id@
+export JBOSS_SERVER=@jboss.server.instance@
+export JBOSS_BINDADDR=@jboss.bind.address@
+
+# copy the maven profile
+cp @hudson.maven.profile@ $OSGIDIR/profiles.xml
+
+#
+# call command.sh
+#
+/bin/sh $OSGIDIR/hudson/hudson-home/command.sh
+ </command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers class="vector">
+ <hudson.tasks.junit.JUnitResultArchiver>
+ <testResults>jboss-osgi/modules/**/target/surefire-reports/TEST-*.xml</testResults>
+ </hudson.tasks.junit.JUnitResultArchiver>
+ <hudson.tasks.Mailer>
+ <recipients>@hudson.mail.recipients@</recipients>
+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
+ <sendToIndividuals>true</sendToIndividuals>
+ </hudson.tasks.Mailer>
+ </publishers>
+ <buildWrappers/>
+</matrix-project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/hudson-home/jobs/JBoss-OSGi-Matrix/config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/http-spider.sh
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/http-spider.sh (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/http-spider.sh 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+#############################################################
+#
+# Simple helper that checks if an HTTP host is available.
+# (Relies on wget)
+#
+# Within hudson it can be used to test if the AS instance
+# has successfully booted.
+#
+# @author Heiko.Braun at jboss.com
+#
+# $Id$
+#
+#############################################################
+
+TIMEOUT=2 # wget timeout in sec
+SLEEP_TIME=10 # the actual sleep time in between test
+NUM_RETRIES=18 # equals 180 seconds before exit
+
+if [ "x$1" = "x" -o "x$2" = "x" ]; then
+ echo "Usage: http-spider.sh <hostname:port> <output_dir>"
+fi
+
+# cleanup
+rm $2/spider.success 2&>1 /dev/null
+rm $2/spider.failed 2&>1 /dev/null
+
+which wget > /dev/null
+if [ $? -eq 0 ]; then
+ COUNTER=0
+ while [ $COUNTER -lt $NUM_RETRIES ]; do
+ if wget --spider --timeout=$TIMEOUT --tries=1 $1 &> /dev/null; then
+ touch $2/spider.success
+ echo "Try $COUNTER: '$1' is available" > ./spider.success
+ exit 0
+ else
+ echo "Try $COUNTER: '$1' does not respond, wait another $SLEEP_TIME seconds"
+ fi
+ sleep $SLEEP_TIME
+ let COUNTER=COUNTER+1
+ done
+fi
+
+touch $2/spider.failed
+echo "Unable to connect to $1, exiting..." > spider.failed
+exit 0
+
+
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/http-spider.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/jboss.sh
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/jboss.sh (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/jboss.sh 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+PROGNAME=`basename $0`
+DIRNAME=`dirname $0`
+JBOSS_HOME="$1"
+BINDADDR="$3"
+CMD="$2"
+
+export JBOSS_HOME
+
+#
+# Helper to complain.
+#
+warn() {
+ echo "$PROGNAME: $*"
+}
+
+if [ ! -f "$JBOSS_HOME/bin/run.sh" ]; then
+ warn "Cannot find: $JBOSS_HOME/bin/run.sh"
+ exit 1
+fi
+
+case "$CMD" in
+start)
+ # This version of run.sh obtains the pid of the JVM and saves it as jboss.pid
+ # It relies on bash specific features
+ # Do you want to hide jboss output?
+ /bin/bash $DIRNAME/runjboss.sh -b $BINDADDR &
+ ;;
+stop)
+ pidfile="$JBOSS_HOME/bin/jboss.pid"
+ if [ -f "$pidfile" ]; then
+ pid=`cat "$pidfile"`
+ echo "kill pid: $pid"
+ kill $pid
+ if [ "$?" -eq 0 ]; then
+ # process exists, wait for it to die, and force if not
+ sleep 20
+ kill -9 $pid &> /dev/null
+ fi
+ rm "$pidfile"
+ else
+ warn "No pid found, using shutdown"
+ $JBOSS_HOME/bin/shutdown.sh -S > /dev/null &
+ fi
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+*)
+ echo "usage: $0 jboss_instance (start|stop|restart|help)"
+esac
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/jboss.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/runjboss.sh
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/runjboss.sh (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/runjboss.sh 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,149 @@
+#!/bin/bash
+### ====================================================================== ###
+## ##
+## JBoss Bootstrap Script ##
+## ##
+### ====================================================================== ###
+
+### $Id$ ###
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+GREP="grep"
+
+# Use the maximum available, or set MAX_FD != -1 to use that
+MAX_FD="maximum"
+
+#
+# Helper to complain.
+#
+warn() {
+ echo "${PROGNAME}: $*"
+}
+
+#
+# Helper to puke.
+#
+die() {
+ warn $*
+ exit 1
+}
+
+# Setup JBOSS_HOME
+if [ "x$JBOSS_HOME" = "x" ]; then
+ # get the full path (without any relative bits)
+ JBOSS_HOME=`cd $DIRNAME/..; pwd`
+fi
+export JBOSS_HOME
+
+# Read an optional running configuration file
+if [ "x$RUN_CONF" = "x" ]; then
+ RUN_CONF="$JBOSS_HOME/bin/run.conf"
+fi
+if [ -r "$RUN_CONF" ]; then
+ . "$RUN_CONF"
+fi
+
+# Setup the JVM
+if [ "x$JAVA" = "x" ]; then
+ if [ "x$JAVA_HOME" != "x" ]; then
+ JAVA="$JAVA_HOME/bin/java"
+ else
+ JAVA="java"
+ fi
+fi
+
+# Setup the classpath
+runjar="$JBOSS_HOME/bin/run.jar"
+if [ ! -f "$runjar" ]; then
+ die "Missing required file: $runjar"
+fi
+JBOSS_BOOT_CLASSPATH="$runjar"
+
+# Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
+# compatible distribution which JAVA_HOME points to
+if [ "x$JAVAC_JAR" = "x" ]; then
+ JAVAC_JAR="$JAVA_HOME/lib/tools.jar"
+fi
+if [ ! -f "$JAVAC_JAR" ]; then
+ warn "Missing file: $JAVAC_JAR"
+ warn "Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE."
+fi
+
+if [ "x$JBOSS_CLASSPATH" = "x" ]; then
+ JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
+else
+ JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
+fi
+
+# If -server not set in JAVA_OPTS, set it, if supported
+SERVER_SET=`echo $JAVA_OPTS | $GREP "\-server"`
+if [ "x$SERVER_SET" = "x" ]; then
+
+ # Check for SUN(tm) JVM w/ HotSpot support
+ if [ "x$HAS_HOTSPOT" = "x" ]; then
+ HAS_HOTSPOT=`"$JAVA" -version 2>&1 | $GREP -i HotSpot`
+ fi
+
+ # Enable -server if we have Hotspot, unless we can't
+ if [ "x$HAS_HOTSPOT" != "x" ]; then
+ JAVA_OPTS="-server $JAVA_OPTS"
+ fi
+fi
+
+# Setup JBosst Native library path
+JBOSS_NATIVE_DIR="$JBOSS_HOME/bin/native"
+if [ -d "$JBOSS_NATIVE_DIR" ]; then
+ if [ "x$LD_LIBRARY_PATH" = "x" ]; then
+ LD_LIBRARY_PATH="$JBOSS_NATIVE_DIR"
+ else
+ LD_LIBRARY_PATH="$JBOSS_NATIVE_DIR:$LD_LIBRARY_PATH"
+ fi
+ export LD_LIBRARY_PATH
+ if [ "x$JAVA_OPTS" = "x" ]; then
+ JAVA_OPTS="-Djava.library.path=$JBOSS_NATIVE_DIR"
+ else
+ JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$JBOSS_NATIVE_DIR"
+ fi
+fi
+
+#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
+
+# Setup JBoss sepecific properties
+JAVA_OPTS="-Dprogram.name=$PROGNAME $JAVA_OPTS"
+
+# Setup the java endorsed dirs
+JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
+
+# Display our environment
+echo "========================================================================="
+echo ""
+echo " JBoss Bootstrap Environment"
+echo ""
+echo " JBOSS_HOME: $JBOSS_HOME"
+echo ""
+echo " JAVA: $JAVA"
+echo ""
+echo " JAVA_OPTS: $JAVA_OPTS"
+echo ""
+echo " CLASSPATH: $JBOSS_CLASSPATH"
+echo ""
+echo "========================================================================="
+echo ""
+# enable monitor mode (job control needed)
+set -m
+STATUS=10
+while [ $STATUS -eq 10 ]
+do
+# Execute the JVM
+ "$JAVA" $JAVA_OPTS \
+ -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
+ -classpath "$JBOSS_CLASSPATH" \
+ org.jboss.Main "$@" &> /dev/null &
+ echo $! > $JBOSS_HOME/bin/jboss.pid
+ fg
+ STATUS=$?
+ # if it doesn't work, you may want to take a look at this:
+ # http://developer.java.sun.com/developer/bugParade/bugs/4465334.html
+done
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/jboss/bin/runjboss.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/profiles.xml.local.qa
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/profiles.xml.local.qa (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/hudson/profiles.xml.local.qa 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,21 @@
+<profilesXml 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/profiles-1.0.0.xsd">
+ <profiles>
+
+ <!-- This profile can also be defined in ~/.m2/settings.xml -->
+ <profile>
+ <id>jboss-home-profile</id>
+
+ <activation>
+ <property>
+ <name>user.name</name>
+ </property>
+ </activation>
+
+ <properties>
+
+ </properties>
+ </profile>
+
+ </profiles>
+</profilesXml>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jbpm-distribution</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>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,5 @@
+#Thu Jan 29 07:27:05 CET 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-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Tue Feb 03 13:57:45 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <!-- ====================================================================== -->
+ <!-- -->
+ <!-- JBoss, the OpenSource J2EE webOS -->
+ <!-- -->
+ <!-- Distributable under LGPL license. -->
+ <!-- See terms of license at http://www.gnu.org. -->
+ <!-- -->
+ <!-- ====================================================================== -->
+
+ <!-- $Id$ -->
+<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>JBoss OSGi - Distribution</name>
+ <description>JBoss OSGi - IzPack Distribution</description>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-distribution</artifactId>
+ <packaging>pom</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Alpha1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ <izpack.version>4.2.0</izpack.version>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-deployer</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-deployer</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-felix</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-felix</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-service-http</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>javax.servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.webconsole</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.izpack</groupId>
+ <artifactId>izpack-standalone-compiler</artifactId>
+ <version>${izpack.version}</version>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>directory-single</goal>
+ </goals>
+ <configuration>
+ <finalName>deploy-artifacts</finalName>
+ <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-deploy-artifacts.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>izpack</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
+ <property name="jboss501.home" value="${jboss501.home}" />
+ <property name="jboss.home" value="${jboss.home}" />
+ <property name="product.name" value="${project.name}" />
+ <property name="product.short.name" value="${artifactId}" />
+ <property name="product.version" value="${project.version}" />
+ <property name="user.home" value="${user.home}" />
+ <ant antfile="scripts/antrun-installer.xml" target="build-installer" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/antrun-installer.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/antrun-installer.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/antrun-installer.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+<project>
+
+ <!-- ================================================================== -->
+ <!-- Setup -->
+ <!-- ================================================================== -->
+ <property name="output.dir" value="${basedir}/target" />
+ <property name="resources.dir" value="${basedir}/src/main/resources" />
+ <property name="filtered.resources.dir" value="${output.dir}/resources" />
+ <property name="deploy.artifacts.dir" value="${output.dir}/deploy-artifacts" />
+ <property name="deploy.artifacts.lib" value="${deploy.artifacts.dir}/lib" />
+ <property name="deploy.artifacts.resources" value="${deploy.artifacts.dir}/resources" />
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+ <target name="init"/>
+
+ <!-- ================================================================== -->
+ <!-- Distribution -->
+ <!-- ================================================================== -->
+ <target name="build-installer" depends="init">
+
+ <echo/>
+ <echo message="JBoss Home: ${jboss.home}"/>
+ <echo/>
+
+ <!-- Filter the installer scripts -->
+ <copy todir="${filtered.resources.dir}" filtering="true" overwrite="true">
+ <fileset dir="${resources.dir}/installer" />
+ <filterset>
+ <filter token="jboss.home" value="${jboss.home}" />
+ <filter token="product.version" value="${product.version}" />
+ <filter token="user.home" value="${user.home}" />
+ </filterset>
+ </copy>
+
+ <!-- HACK ALERT -->
+ <copy file="${deploy.artifacts.lib}/org.apache.felix.webconsole.jar" tofile="${deploy.artifacts.lib}/org.apache.felix.webconsole.bundle" overwrite="true"/>
+
+ <!-- Run the IzPack Ant task -->
+ <taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask">
+ <classpath>
+ <pathelement path="${maven.runtime.classpath}" />
+ </classpath>
+ </taskdef>
+ <property name="izpack.temp.dir" value="${output.dir}/izpack-temp" />
+ <mkdir dir="${izpack.temp.dir}" />
+
+ <!-- Run installer build -->
+ <echo message="Running IzPack to build the installer..." />
+ <izpack input="${resources.dir}/installer/install-definition.xml" output="${output.dir}/jboss-osgi-installer-${product.version}.jar"
+ installerType="standard" inheritAll="true" basedir="${izpack.temp.dir}" />
+
+ <!-- Clean working directory -->
+ <delete dir="${izpack.temp.dir}" quiet="true" includeemptydirs="true" />
+ </target>
+</project>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/antrun-installer.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/assembly-deploy-artifacts.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/assembly-deploy-artifacts.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/assembly-deploy-artifacts.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,53 @@
+<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>
+
+ <!-- lib -->
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ <useStrictFiltering>true</useStrictFiltering>
+ <scope>compile</scope>
+ <unpack>false</unpack>
+ </dependencySet>
+
+ <!-- resources -->
+ <dependencySet>
+ <outputDirectory>resources/jboss-osgi-deployer-config</outputDirectory>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>*:jboss-osgi-deployer:jar:config</include>
+ </includes>
+ <unpack>true</unpack>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>resources/jboss-osgi-felix-config</outputDirectory>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>*:jboss-osgi-felix:jar:config</include>
+ </includes>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ </dependencySets>
+
+ <fileSets>
+ <!-- etc -->
+ <fileSet>
+ <directory>src/main/etc</directory>
+ <outputDirectory>/etc</outputDirectory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ <include>release.notes.html</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/scripts/assembly-deploy-artifacts.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/JBossORG-EULA.txt
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/JBossORG-EULA.txt (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/JBossORG-EULA.txt 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,107 @@
+LICENSE AGREEMENT
+JBOSS(r)
+
+This License Agreement governs the use of the Software Packages and any updates to the Software
+Packages, regardless of the delivery mechanism. Each Software Package is a collective work
+under U.S. Copyright Law. Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to
+the user ("Client") a license to the applicable collective work(s) pursuant to the
+GNU Lesser General Public License v. 2.1 except for the following Software Packages:
+(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to the
+GNU General Public License v.2;
+
+(b) JBoss Rules, which is licensed pursuant to the Apache License v.2.0;
+
+(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is licensed under the
+(open source) Sleepycat License (if Client does not wish to use the open source version of this database,
+it may purchase a license from Sleepycat Software);
+
+and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public License v.1,
+and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to enter various
+royalty-free patent licenses.
+
+Each of the foregoing licenses is available at http://www.opensource.org/licenses/index.php.
+
+1. The Software. "Software Packages" refer to the various software modules that are created and made available
+for distribution by the JBoss.org open source community at http://www.jboss.org. Each of the Software Packages
+may be comprised of hundreds of software components. The end user license agreement for each component is located in
+the component's source code. With the exception of certain image files identified in Section 2 below,
+the license terms for the components permit Client to copy, modify, and redistribute the component,
+in both source code and binary code forms. This agreement does not limit Client's rights under,
+or grant Client rights that supersede, the license terms of any particular component.
+
+2. Intellectual Property Rights. The Software Packages are owned by Red Hat and others and are protected under copyright
+and other laws. Title to the Software Packages and any component, or to any copy, modification, or merged portion shall
+remain with the aforementioned, subject to the applicable license. The "JBoss" trademark, "Red Hat" trademark, the
+individual Software Package trademarks, and the "Shadowman" logo are registered trademarks of Red Hat and its affiliates
+in the U.S. and other countries. This agreement permits Client to distribute unmodified copies of the Software Packages
+using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the condition that Client follows Red Hat's
+trademark guidelines for those trademarks located at http://www.redhat.com/about/corporate/trademark/. Client must abide by
+these trademark guidelines when distributing the Software Packages, regardless of whether the Software Packages have been modified.
+If Client modifies the Software Packages, then Client must replace all Red Hat trademarks and logos identified at
+http://www.jboss.com/company/logos, unless a separate agreement with Red Hat is executed or other permission granted.
+Merely deleting the files containing the Red Hat trademarks may corrupt the Software Packages.
+
+3. Limited Warranty. Except as specifically stated in this Paragraph 3 or a license for a particular
+component, to the maximum extent permitted under applicable law, the Software Packages and the
+components are provided and licensed "as is" without warranty of any kind, expressed or implied,
+including the implied warranties of merchantability, non-infringement or fitness for a particular purpose.
+Red Hat warrants that the media on which Software Packages may be furnished will be free from defects in
+materials and manufacture under normal use for a period of 30 days from the date of delivery to Client.
+Red Hat does not warrant that the functions contained in the Software Packages will meet Client's requirements
+or that the operation of the Software Packages will be entirely error free or appear precisely as described
+in the accompanying documentation. This warranty extends only to the party that purchases the Services
+pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor.
+
+4. Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, the remedies
+described below are accepted by Client as its only remedies. Red Hat's entire liability, and Client's
+exclusive remedies, shall be: If the Software media is defective, Client may return it within 30 days of
+delivery along with a copy of Client's payment receipt and Red Hat, at its option, will replace it or
+refund the money paid by Client for the Software. To the maximum extent permitted by applicable law,
+Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential
+damages, including lost profits or lost savings arising out of the use or inability to use the Software,
+even if Red Hat or such dealer has been advised of the possibility of such damages. In no event shall
+Red Hat's liability under this agreement exceed the amount that Client paid to Red Hat under this
+Agreement during the twelve months preceding the action.
+
+5. Export Control. As required by U.S. law, Client represents and warrants that it:
+(a) understands that the Software Packages are subject to export controls under the
+U.S. Commerce Department's Export Administration Regulations ("EAR");
+
+(b) is not located in a prohibited destination country under the EAR or U.S. sanctions regulations
+(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria);
+
+(c) will not export, re-export, or transfer the Software Packages to any prohibited destination, entity,
+or individual without the necessary export license(s) or authorizations(s) from the U.S. Government;
+
+(d) will not use or transfer the Software Packages for use in any sensitive nuclear, chemical or
+biological weapons, or missile technology end-uses unless authorized by the U.S. Government by
+regulation or specific license;
+
+(e) understands and agrees that if it is in the United States and exports or transfers the Software
+Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit semi-annual
+reports to the Commerce Department's Bureau of Industry & Security (BIS), which include the name and
+address (including country) of each transferee;
+
+and (f) understands that countries other than the United States may restrict the import, use, or
+export of encryption products and that it shall be solely responsible for compliance with any such
+import, use, or export restrictions.
+
+6. Third Party Programs. Red Hat may distribute third party software programs with the Software Packages
+that are not part of the Software Packages and which Client must install separately. These third party
+programs are subject to their own license terms. The license terms either accompany the programs or
+can be viewed at http://www.redhat.com/licenses/. If Client does not agree to abide by the applicable
+license terms for such programs, then Client may not install them. If Client wishes to install the programs
+on more than one system or transfer the programs to another party, then Client must contact the licensor
+of the programs.
+
+7. General. If any provision of this agreement is held to be unenforceable, that shall not affect the
+enforceability of the remaining provisions. This License Agreement shall be governed by the laws of the
+State of North Carolina and of the United States, without regard to any conflict of laws provisions,
+except that the United Nations Convention on the International Sale of Goods shall not apply.
+
+Copyright 2006 Red Hat, Inc. All rights reserved.
+"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.
+All other trademarks are the property of their respective owners.
+
+ Page 1 of 1 18 October 2006
+
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/JBossORG-EULA.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/release.notes.html
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/release.notes.html (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/etc/release.notes.html 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,2 @@
+<body><h1>JBoss OSGi 1.0.0.Alpha1 Release Notes</h1>
+</body>
\ No newline at end of file
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/ant-actions-spec.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/ant-actions-spec.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/ant-actions-spec.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,14 @@
+<antactions>
+ <pack name="Download JBoss-5.0.0">
+ <antcall order="afterpack" buildfile="$INSTALL_PATH/Uninstaller/download-helper.xml">
+ <property name="install.path" value="$INSTALL_PATH"/>
+ <target name="download-jboss"/>
+ </antcall>
+ </pack>
+ <pack name="Download Eclipse-3.4.0">
+ <antcall order="afterpack" buildfile="$INSTALL_PATH/Uninstaller/download-helper.xml">
+ <property name="install.path" value="$INSTALL_PATH"/>
+ <target name="download-eclipse"/>
+ </antcall>
+ </pack>
+</antactions>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/ant-actions-spec.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/auto-install-template.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/auto-install-template.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/auto-install-template.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,23 @@
+<AutomatedInstallation langpack="eng">
+ <com.izforge.izpack.panels.HelloPanel />
+ <com.izforge.izpack.panels.TargetPanel>
+ <installpath>@user.home@/jboss-osgi- at product.version@</installpath>
+ </com.izforge.izpack.panels.TargetPanel>
+ <com.izforge.izpack.panels.TreePacksPanel>
+ <pack name="JBoss OSGi Integration" index="0" selected="true" />
+ </com.izforge.izpack.panels.TreePacksPanel>
+ <com.izforge.izpack.panels.UserInputPanel>
+ <userInput>
+ <entry key="jbossTargetServer" value="default" />
+ <entry key="jbossSelection" value="jboss501" />
+ </userInput>
+ </com.izforge.izpack.panels.UserInputPanel>
+ <com.izforge.izpack.panels.UserInputPanel>
+ <userInput>
+ <entry key="jbossInstallPath" value="@jboss.home@" />
+ </userInput>
+ </com.izforge.izpack.panels.UserInputPanel>
+ <com.izforge.izpack.panels.SummaryPanel />
+ <com.izforge.izpack.panels.InstallPanel />
+ <com.izforge.izpack.panels.FinishPanel />
+</AutomatedInstallation>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/auto-install-template.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/install-definition.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/install-definition.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
+<installation version="1.0">
+ <!--
+ Ant properties in this file can be referenced with @{},
+ otherwise use variables below in installer files with ${}
+ -->
+ <info>
+ <appname>@{product.name}</appname>
+ <appversion>@{product.version}</appversion>
+ <uninstaller name="remove.task" write="yes" />
+ </info>
+ <guiprefs width="600" height="440" resizable="yes">
+ <!--
+ <laf name="kunststoff">
+ <os family="unix" />
+ </laf>
+ -->
+ </guiprefs>
+ <locale>
+ <langpack iso3="eng" />
+ </locale>
+
+ <!-- Resources -->
+ <resources>
+ <res id="userInputSpec.xml" src="@{filtered.resources.dir}/user-input-spec.xml" />
+ <res id="TargetPanel.dir" src="@{filtered.resources.dir}/target-panel-dir.txt" />
+ </resources>
+
+ <!-- Variables -->
+ <variables>
+ <variable name="jboss.home" value="@{jboss501.home}" />
+ </variables>
+
+ <!-- Dynamic Variables -->
+ <dynamicvariables>
+ </dynamicvariables>
+
+ <!-- Conditions -->
+ <conditions>
+ </conditions>
+
+ <!-- Panels -->
+ <panels>
+ <panel classname="HelloPanel" />
+ <panel classname="TargetPanel" />
+ <panel classname="TreePacksPanel" />
+ <panel classname="UserInputPanel" />
+ <panel classname="UserInputPanel" />
+ <panel classname="SummaryPanel" />
+ <panel classname="InstallPanel" />
+ <panel classname="FinishPanel" />
+ </panels>
+
+ <!-- Packs -->
+ <packs>
+
+ <!--
+ ********************************
+ * *
+ * JBoss Integration *
+ * *
+ ********************************
+ -->
+
+ <pack name="JBoss OSGi Integration" required="no" preselected="yes">
+
+ <description>The JBoss OSGi Integration</description>
+
+ <!-- OSGi Beans -->
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
+ <include name="jboss-osgi-service-http.jar" />
+ <include name="jboss-osgi-service-http-beans.jar" />
+ </fileset>
+ <fileset dir="@{deploy.artifacts.dir}/resources/jboss-osgi-deployer-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
+ <include name="osgi-jboss-beans.xml" />
+ </fileset>
+
+ <!-- OSGi Deployer -->
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer" override="true">
+ <include name="jboss-osgi-deployer.jar" />
+ <include name="jboss-osgi-felix.jar" />
+ <include name="jboss-osgi-spi.jar" />
+ <include name="org.apache.felix.framework.jar" />
+ <include name="org.osgi.compendium.jar" />
+ <include name="org.osgi.core.jar" />
+ </fileset>
+ <fileset dir="@{deploy.artifacts.dir}/resources/jboss-osgi-deployer-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer/META-INF" override="true">
+ <include name="osgi-deployers-jboss-beans.xml" />
+ </fileset>
+ </pack>
+
+ <!--
+ ********************************
+ * *
+ * Optional Components *
+ * *
+ ********************************
+ -->
+
+ </packs>
+</installation>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/install-definition.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/target-panel-dir.txt
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/target-panel-dir.txt (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/target-panel-dir.txt 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1 @@
+$USER_HOME/jboss-osgi- at product.version@
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/target-panel-dir.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/user-input-spec.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/user-input-spec.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/user-input-spec.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,20 @@
+<userInput>
+ <panel order="0">
+ <createForPack name="JBoss OSGi Integration" />
+ <field type="radio" variable="jbossSelection">
+ <description align="left" txt="Please choose your target server" />
+ <spec>
+ <choice txt="JBoss-5.0.1" value="jboss501" set="true"/>
+ </spec>
+ </field>
+ <field type="text" variable="jbossTargetServer">
+ <spec txt="Server:" size="15" set="default" />
+ </field>
+ </panel>
+ <panel order="1">
+ <createForPack name="JBoss OSGi Integration" />
+ <field type="dir" align="left" variable="jbossInstallPath">
+ <spec txt="JBoss Home:" size="25" set="${jboss.home}" />
+ </field>
+ </panel>
+</userInput>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/distribution/src/main/resources/installer/user-input-spec.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-integration</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>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,5 @@
+#Tue Feb 03 13:06:37 CET 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-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Tue Feb 03 13:06:34 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.classpath
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.classpath (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.classpath 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+<?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>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-deployer</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.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,12 @@
+#Wed Feb 04 09:36:33 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Tue Feb 03 13:06:34 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,67 @@
+<?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>JBoss OSGi - Integration Deployer</name>
+ <description>JBoss OSGi - JBoss Deployer</description>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-deployer</artifactId>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-integration</artifactId>
+ <version>1.0.0.Alpha1</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system-jmx</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Build -->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>*beans.xml</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/scripts/assembly-config.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/scripts/assembly-config.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/scripts/assembly-config.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,17 @@
+<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>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.outputDirectory}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*beans.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.deployer;
+
+//$Id$
+
+import java.net.URI;
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * This is the OSGi Deployer
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class OSGiDeployer extends AbstractRealDeployer
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(OSGiDeployer.class);
+
+ private BundleContext bundleContext;
+ private List<URI> skipBundles;
+
+ public OSGiDeployer()
+ {
+ setInput(OSGiMetaData.class);
+ }
+
+ public void setBundleContext(BundleContext bundleContext)
+ {
+ this.bundleContext = bundleContext;
+ }
+
+ public void setSkipBundles(List<URI> skipBundles)
+ {
+ this.skipBundles = skipBundles;
+ }
+
+ @Override
+ protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ OSGiMetaData metadata = unit.getAttachment(OSGiMetaData.class);
+ log.info("Install Bundle: " + metadata.getSymbolicName());
+
+ URI bundleUri = metadata.getBundleLocation();
+ if (bundleUri == null)
+ throw new IllegalStateException("Cannot obtain bundle location for: " + metadata);
+
+ try
+ {
+ if (skipBundles.contains(bundleUri) == false)
+ {
+ Bundle bundle = bundleContext.installBundle(bundleUri.toString());
+ bundle.start();
+
+ unit.addAttachment(Bundle.class, bundle);
+ }
+ }
+ catch (BundleException ex)
+ {
+ throw new DeploymentException("Cannot install bundle: " + metadata, ex);
+ }
+ }
+
+ @Override
+ protected void internalUndeploy(DeploymentUnit unit)
+ {
+ Bundle bundle = unit.getAttachment(Bundle.class);
+ if (bundle != null)
+ {
+ log.info("Uninstall Bundle: " + bundle.getSymbolicName());
+ try
+ {
+ bundle.uninstall();
+ }
+ catch (BundleException ex)
+ {
+ log.error(ex);
+ }
+ }
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.deployer;
+
+//$Id$
+
+import java.net.URI;
+
+import org.jboss.deployers.vfs.spi.deployer.helpers.AbstractManifestMetaData;
+
+
+/**
+ * This are the OSGi Meta Data
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class OSGiMetaData extends AbstractManifestMetaData
+{
+ private String symbolicName;
+ private URI bundleLocation;
+
+ public OSGiMetaData(String symbolicName)
+ {
+ this.symbolicName = symbolicName;
+ }
+
+ public String getSymbolicName()
+ {
+ return symbolicName;
+ }
+
+ public URI getBundleLocation()
+ {
+ return bundleLocation;
+ }
+
+ public void setBundleLocation(URI bundleLocation)
+ {
+ this.bundleLocation = bundleLocation;
+ }
+
+ public String toString()
+ {
+ return "Bundle[name=" + symbolicName + "]";
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.deployer;
+
+//$Id$
+
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.jboss.deployers.vfs.spi.deployer.ManifestDeployer;
+import org.jboss.deployers.vfs.spi.deployer.ManifestMetaData;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * This is the OSGi Deployer
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class OSGiMetaDataDeployer<T extends ManifestMetaData> extends ManifestDeployer<OSGiMetaData>
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(OSGiMetaDataDeployer.class);
+
+ public OSGiMetaDataDeployer()
+ {
+ super(OSGiMetaData.class);
+ }
+
+ @Override
+ protected OSGiMetaData parse(VFSDeploymentUnit unit, VirtualFile file, OSGiMetaData root) throws Exception
+ {
+ OSGiMetaData metaData = super.parse(unit, file, root);
+ if (metaData != null)
+ {
+ metaData.setBundleLocation(unit.getRoot().toURI());
+ log.debug("Bundle-SymbolicName: " + metaData.getSymbolicName() + " in " + file);
+ }
+ return metaData;
+ }
+
+ @Override
+ protected OSGiMetaData createMetaData(Manifest manifest) throws Exception
+ {
+ OSGiMetaData metaData = null;
+
+ Attributes attribs = manifest.getMainAttributes();
+ String symbolicName = attribs.getValue("Bundle-SymbolicName");
+ if (symbolicName != null)
+ metaData = new OSGiMetaData(symbolicName);
+
+ return metaData;
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-deployers-jboss-beans.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-deployers-jboss-beans.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="jboss.osgi:service=KernelLocator" class="org.jboss.osgi.spi.internal.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
+
+ <!-- The OSGiFramework -->
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
+ <property name="felixProperties">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry><key>felix.cache.rootdir</key><value>${jboss.server.data.dir}</value></entry>
+ <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
+ <entry>
+ <key>org.osgi.framework.system.packages</key>
+ <value>
+ javax.servlet,
+ javax.servlet.http,
+ javax.xml.parsers,
+ org.jboss.deployers.client.plugins.deployment,
+ org.jboss.deployers.client.spi,
+ org.jboss.deployers.spi.attachments,
+ org.jboss.deployers.spi.structure,
+ org.jboss.metadata.javaee.support,
+ org.jboss.metadata.web.jboss,
+ org.jboss.metadata.web.spec,
+ org.jboss.osgi.service.http.beans,
+ org.osgi.service.deploymentadmin,
+ org.osgi.framework; version=1.4,
+ org.osgi.service.cm,
+ org.osgi.service.event,
+ org.osgi.service.http; version=1.2,
+ org.osgi.service.log,
+ org.osgi.service.metatype,
+ org.osgi.service.packageadmin,
+ org.osgi.service.prefs,
+ org.osgi.service.startlevel,
+ org.osgi.util.tracker,
+ org.xml.sax
+ </value>
+ </entry>
+ </map>
+ </property>
+ <property name="autoStart">
+ <list elementClass="java.net.URI">
+ <!--
+ <value>${jboss.server.home.url}/deployers/osgi.deployer/org.osgi.core.jar</value>
+ <value>${jboss.server.home.url}/deployers/osgi.deployer/org.osgi.compendium.jar</value>
+ -->
+ </list>
+ </property>
+ </bean>
+
+ <!-- The OSGi Meta Data Deployer -->
+ <bean name="jboss.osgi:service=MetaDataDeployer" class="org.jboss.osgi.deployer.OSGiMetaDataDeployer" />
+
+ <!-- The OSGi Deployer -->
+ <bean name="jboss.osgi:service=Deployer" class="org.jboss.osgi.deployer.OSGiDeployer">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext" /></property>
+ <property name="skipBundles"><inject bean="jboss.osgi:service=Framework" property="autoInstall" /></property>
+ </bean>
+
+</deployment>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-jboss-beans.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-jboss-beans.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-jboss-beans.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,20 @@
+<!--
+ $Id$
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- A Service that gives access to the Microcontainer Kernel -->
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+ <property name="bundleContext"><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>
+ </bean>
+
+ <!-- A Service that generates and deployes webapps on behalf of the HttpService -->
+ <bean name="jboss.osgi:service=HttpEndpointDeployer" class="org.jboss.osgi.service.http.beans.HttpEndpointDeployer">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+ <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ </bean>
+
+</deployment>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/deployer/src/main/resources/osgi-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.classpath
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.classpath (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.classpath 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,10 @@
+<?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="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/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>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-felix</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.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,12 @@
+#Tue Feb 03 14:02:25 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Thu Jan 29 07:34:53 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,84 @@
+<?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>JBoss OSGi - Integration Felix</name>
+ <description>JBoss OSGi - Apache Felix Integration</description>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-felix</artifactId>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-integration</artifactId>
+ <version>1.0.0.Alpha1</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-spi</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Build -->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>*beans.xml</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/scripts/assembly-config.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/scripts/assembly-config.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/scripts/assembly-config.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,17 @@
+<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>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.outputDirectory}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*beans.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,196 @@
+/*
+ * 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.felix.framework;
+
+//$Id$
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.felix.framework.Felix;
+import org.jboss.osgi.spi.FrameworkException;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * An abstraction of an OSGi Framework
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class FelixIntegration implements OSGiFramework
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(FelixIntegration.class);
+
+ private Map<String, String> felixProperties = new HashMap<String, String>();
+ private List<URI> autoInstall = new ArrayList<URI>();
+ private List<URI> autoStart = new ArrayList<URI>();
+
+ private Felix felix;
+
+ public Map<String, String> getFelixProperties()
+ {
+ return felixProperties;
+ }
+
+ public void setFelixProperties(Map<String, String> props)
+ {
+ this.felixProperties = props;
+ }
+
+ public List<URI> getAutoInstall()
+ {
+ return autoInstall;
+ }
+
+ public void setAutoInstall(List<URI> autoInstall)
+ {
+ this.autoInstall = autoInstall;
+ }
+
+ public List<URI> getAutoStart()
+ {
+ return autoStart;
+ }
+
+ public void setAutoStart(List<URI> autoStart)
+ {
+ this.autoStart = autoStart;
+ }
+
+ public Bundle getSystemBundle()
+ {
+ return felix;
+ }
+
+ public BundleContext getSystemBundleContext()
+ {
+ return getSystemBundle().getBundleContext();
+ }
+
+ public void create()
+ {
+ String implVersion = getClass().getPackage().getImplementationVersion();
+ log.info("OSGi Integration Felix - " + implVersion);
+
+ // When a Felix instance is embedded in a host application,
+ // the host application must inform the Felix instance that it is embedded
+ felixProperties.put("felix.embedded.execution", "true");
+
+ // Init & Start the System Bundle
+ try
+ {
+ felix = new Felix(felixProperties);
+ felix.start();
+ }
+ catch (BundleException ex)
+ {
+ throw new FrameworkException("Cannot initialze system bundle", ex);
+ }
+ }
+
+ public void start()
+ {
+ // Get system bundle context
+ BundleContext context = felix.getBundleContext();
+ if (context == null)
+ throw new FrameworkException("Cannot obtain system context");
+
+ Map<URI, Bundle> autoBundles = new HashMap<URI, Bundle>();
+
+ // Add the autoStart bundles to autoInstall
+ for (URI bundleURI : autoStart)
+ {
+ autoInstall.add(bundleURI);
+ }
+
+ // Install autoInstall bundles
+ for (URI bundleURI : autoInstall)
+ {
+ try
+ {
+ Bundle bundle = context.installBundle(bundleURI.toString());
+ log.info("Installed bundle: " + bundle.getSymbolicName());
+ autoBundles.put(bundleURI, bundle);
+ }
+ catch (BundleException ex)
+ {
+ log.error("Cannot install bundle: " + bundleURI, ex);
+ }
+ }
+
+ // Start autoStart bundles
+ for (URI bundleURI : autoStart)
+ {
+ try
+ {
+ Bundle bundle = autoBundles.get(bundleURI);
+ bundle.start();
+ log.info("Started bundle: " + bundle.getSymbolicName());
+ }
+ catch (BundleException ex)
+ {
+ log.error("Cannot start bundle: " + bundleURI, ex);
+ }
+ }
+
+ // List registered services
+ try
+ {
+ ServiceReference[] refs = context.getAllServiceReferences(null, null);
+ for (ServiceReference sref : refs)
+ {
+ Object service = context.getService(sref);
+ log.info("Registered Service: " + service.getClass().getName());
+ }
+ }
+ catch (InvalidSyntaxException ex)
+ {
+ log.error("Cannot list registered services", ex);
+ }
+ }
+
+ public void stop()
+ {
+ if (felix != null)
+ {
+ try
+ {
+ felix.stop();
+ }
+ catch (BundleException ex)
+ {
+ log.error("Cannot stop Felix", ex);
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/java/org/jboss/osgi/felix/framework/FelixIntegration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/org.jboss.osgi.spi.framework.OSGiConfigurationProvider
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/org.jboss.osgi.spi.framework.OSGiConfigurationProvider (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/org.jboss.osgi.spi.framework.OSGiConfigurationProvider 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1 @@
+org.jboss.osgi.spi.internal.MicrocontainerConfigurationProvider
\ No newline at end of file
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/osgi-jboss-beans.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/osgi-jboss-beans.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/osgi-jboss-beans.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,30 @@
+<!--
+ $Id$
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="jboss.osgi:service=KernelLocator" class="org.jboss.osgi.spi.internal.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
+
+ <!-- The OSGiFramework -->
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
+ <property name="felixProperties">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>org.osgi.framework.system.packages</key>
+ <value>
+ </value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- A Service that gives access to the Microcontainer Kernel -->
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
+
+</deployment>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/main/resources/osgi-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredService.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredService.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredService.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,59 @@
+/*
+ * 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.test.felix.microcontainer;
+
+//$Id$
+
+import org.osgi.framework.BundleContext;
+
+/**
+ * An OSGi Service that is defined as an mc bean
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class ConfiguredService
+{
+ private BundleContext bundleContext;
+ private MyBean testBean;
+
+ public void setBundleContext(BundleContext bundleContext)
+ {
+ this.bundleContext = bundleContext;
+ }
+
+ public void setTestBean(MyBean myBean)
+ {
+ this.testBean = myBean;
+ }
+
+ public String callBean(String msg)
+ {
+ return testBean.echo(msg);
+ }
+
+ public void start()
+ {
+ // Register this bean as an OSGi service when the bean is started
+ bundleContext.registerService(ConfiguredService.class.getName(), this, null);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredServiceTest.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredServiceTest.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredServiceTest.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -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.test.felix.microcontainer;
+
+//$Id$
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.framework.OSGiConfiguration;
+import org.jboss.osgi.spi.framework.OSGiConfigurationProvider;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.junit.OSGiTestCase;
+import org.jboss.osgi.spi.junit.OSGiTestSetup;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Test OSGi Framework integration with the Microcontainer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class ConfiguredServiceTest extends OSGiTestCase
+{
+ private static OSGiFramework framework;
+
+ public static Test suite()
+ {
+ Test setup = new OSGiTestSetup(ConfiguredServiceTest.class)
+ {
+ @Override
+ protected void setUp() throws Exception
+ {
+ OSGiConfigurationProvider provider = OSGiConfiguration.getConfigurationProvider();
+ provider.configure(getResourceURL("microcontainer/configured-service-test.xml"));
+ framework = provider.getFramework();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ framework = null;
+ }
+ };
+ return setup;
+ }
+
+ public void testServiceCallsBean()
+ {
+ BundleContext bundleContext = framework.getSystemBundleContext();
+ ServiceReference sref = bundleContext.getServiceReference(ConfiguredService.class.getName());
+ ConfiguredService service = (ConfiguredService)bundleContext.getService(sref);
+ assertNotNull("ConfiguredService not null", service);
+
+ String retStr = service.callBean("kermit");
+ assertEquals("kermit", retStr);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ConfiguredServiceTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitService.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitService.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitService.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,60 @@
+/*
+ * 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.test.felix.microcontainer;
+
+//$Id$
+
+import org.jboss.osgi.service.MicrocontainerService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * An OSGi Service that is dynamically registered
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class ExplicitService
+{
+ private BundleContext context;
+
+ public ExplicitService(BundleContext context)
+ {
+ this.context = context;
+ }
+
+ /**
+ * Calls 'echo' on the IntegrationBean
+ */
+ public String callBean(String msg)
+ {
+ ServiceReference sref = context.getServiceReference(MicrocontainerService.class.getName());
+ MicrocontainerService mcService = (MicrocontainerService)context.getService(sref);
+ MyBean bean = (MyBean)mcService.getRegisteredBean("MyBean");
+ return bean.echo(msg);
+ }
+
+ public String echo(String msg)
+ {
+ return msg;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitServiceTest.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitServiceTest.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitServiceTest.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,106 @@
+/*
+ * 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.test.felix.microcontainer;
+
+//$Id$
+
+import junit.framework.Test;
+
+import org.jboss.osgi.service.MicrocontainerService;
+import org.jboss.osgi.spi.framework.OSGiConfiguration;
+import org.jboss.osgi.spi.framework.OSGiConfigurationProvider;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.junit.OSGiTestCase;
+import org.jboss.osgi.spi.junit.OSGiTestSetup;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Test OSGi Framework integration with the Microcontainer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class ExplicitServiceTest extends OSGiTestCase
+{
+ private static OSGiFramework framework;
+
+ public static Test suite()
+ {
+ Test setup = new OSGiTestSetup(ExplicitServiceTest.class)
+ {
+ @Override
+ protected void setUp() throws Exception
+ {
+ OSGiConfigurationProvider provider = OSGiConfiguration.getConfigurationProvider();
+ provider.configure(getResourceURL("microcontainer/explicit-service-test.xml"));
+ framework = provider.getFramework();
+
+ // Register IntegrationService
+ BundleContext context = framework.getSystemBundleContext();
+ context.registerService(ExplicitService.class.getName(), new ExplicitService(context), null);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ framework = null;
+ }
+ };
+ return setup;
+ }
+
+ public void testBeanCallsService()
+ {
+ MyBean bean = getBean();
+ assertNotNull("MyBean not null", bean);
+
+ String retStr = bean.callService("kermit");
+ assertEquals("kermit", retStr);
+ }
+
+ public void testServiceCallsBean()
+ {
+ ExplicitService service = getService();
+ assertNotNull("DynamicService not null", service);
+
+ String retStr = service.callBean("kermit");
+ assertEquals("kermit", retStr);
+ }
+
+ private ExplicitService getService()
+ {
+ BundleContext bundleContext = framework.getSystemBundleContext();
+ ServiceReference sref = bundleContext.getServiceReference(ExplicitService.class.getName());
+ ExplicitService service = (ExplicitService)bundleContext.getService(sref);
+ return service;
+ }
+
+ private MyBean getBean()
+ {
+ BundleContext context = framework.getSystemBundleContext();
+ ServiceReference sref = context.getServiceReference(MicrocontainerService.class.getName());
+ MicrocontainerService mcService = (MicrocontainerService)context.getService(sref);
+ MyBean bean = (MyBean)mcService.getRegisteredBean("MyBean");
+ return bean;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/ExplicitServiceTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/MyBean.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/MyBean.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/MyBean.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,52 @@
+/*
+ * 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.test.felix.microcontainer;
+
+//$Id$
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+public class MyBean
+{
+ private BundleContext bundleContext;
+
+ public void setBundleContext(BundleContext bundleContext)
+ {
+ this.bundleContext = bundleContext;
+ }
+
+ /**
+ * Calls 'echo' on the DynamicService
+ */
+ public String callService(String msg)
+ {
+ ServiceReference sref = bundleContext.getServiceReference(ExplicitService.class.getName());
+ ExplicitService service = (ExplicitService)bundleContext.getService(sref);
+ return service.echo(msg);
+ }
+
+ public String echo(String msg)
+ {
+ return msg;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/microcontainer/MyBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/system/SystemBundleTest.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/system/SystemBundleTest.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/system/SystemBundleTest.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,47 @@
+/*
+ * 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.test.felix.system;
+
+//$Id$
+
+import org.jboss.osgi.spi.framework.OSGiConfiguration;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.junit.OSGiTestCase;
+import org.osgi.framework.Bundle;
+
+/**
+ * Test OSGi System bundle access
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class SystemBundleTest extends OSGiTestCase
+{
+ public void testSystemBundle()
+ {
+ OSGiFramework framework = OSGiConfiguration.getFramework();
+ Bundle bundle = framework.getSystemBundle();
+
+ assertEquals("BundleId == 0", 0, bundle.getBundleId());
+ assertEquals("SymbolicName == system.bundle", "system.bundle", bundle.getSymbolicName());
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/java/org/jboss/osgi/test/felix/system/SystemBundleTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/jboss-osgi-beans.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/jboss-osgi-beans.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/jboss-osgi-beans.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,20 @@
+<!--
+ $Id$
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- The OSGiFramework -->
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
+ <property name="felixProperties">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
+ </map>
+ </property>
+ </bean>
+
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
+
+</deployment>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/jboss-osgi-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/log4j.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/log4j.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/log4j.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <appender name="FILE" class="org.apache.log4j.FileAppender">
+ <param name="File" value="${log4j.output.dir}/test.log"/>
+ <param name="Append" value="false"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <param name="Threshold" value="INFO" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n" />
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.hibernate">
+ <priority value="INFO" />
+ </category>
+ <category name="org.hibernate.SQL">
+ <priority value="DEBUG" />
+ </category>
+ <category name="org.hibernate.connection">
+ <priority value="TRACE" />
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <!--appender-ref ref="CONSOLE"/-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/configured-service-test.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/configured-service-test.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/configured-service-test.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,23 @@
+<!--
+ $Id$
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
+ </bean>
+
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
+
+ <bean name="MyBean" class="org.jboss.osgi.test.felix.microcontainer.MyBean">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+ </bean>
+
+ <bean name="ConfiguredService" class="org.jboss.osgi.test.felix.microcontainer.ConfiguredService">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+ <property name="testBean"><inject bean="MyBean"/></property>
+ </bean>
+
+</deployment>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/configured-service-test.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/explicit-service-test.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/explicit-service-test.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/explicit-service-test.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,18 @@
+<!--
+ $Id$
+-->
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
+ </bean>
+
+ <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
+
+ <bean name="MyBean" class="org.jboss.osgi.test.felix.microcontainer.MyBean">
+ <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+ </bean>
+
+</deployment>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/felix/src/test/resources/microcontainer/explicit-service-test.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,25 @@
+<?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>JBoss OSGi - Integration</name>
+ <description>JBoss OSGi - Integration</description>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-integration</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Alpha1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <modules>
+ <module>deployer</module>
+ <module>felix</module>
+ <module>testsuite</module>
+ </modules>
+
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.classpath
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.classpath (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.classpath 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/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>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-testsuite</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.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,5 @@
+#Wed Feb 04 11:13:20 CET 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-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Wed Feb 04 11:13:18 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,134 @@
+<?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>JBoss OSGi - Integration Testsuite</name>
+ <description>JBoss OSGi - Integration Testsuite</description>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-testsuite</artifactId>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-integration</artifactId>
+ <version>1.0.0.Alpha1</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/resources/tst.policy</surefire.security.args>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-felix</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>biz.aQute</groupId>
+ <artifactId>bnd</artifactId>
+ <version>0.0.249</version>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-client</artifactId>
+ <scope>test</scope>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Build -->
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>build-test-jars</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
+ <property name="tests.output.dir" value="${project.build.directory}" />
+ <ant antfile="scripts/antrun-test-jars.xml" target="build-test-jars" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${surefire.security.args}</argLine>
+ <systemProperties>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${basedir}/target</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- Profiles -->
+ <profiles>
+
+ <!--
+ Name: no-jboss-bind-address
+ Descr: Skip tests if no jboss.bind address is given
+ -->
+ <profile>
+ <id>no-jboss-bind-address</id>
+ <activation>
+ <property>
+ <name>!jboss.bind.address</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/scripts/antrun-test-jars.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/scripts/antrun-test-jars.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ============================================================ -->
+
+<!-- $Id$ -->
+
+<project default="build-test-jars">
+
+ <description>OSGi test archive builder</description>
+
+ <!-- ================================================================== -->
+ <!-- Init -->
+ <!-- ================================================================== -->
+
+ <target name="init">
+
+ <!-- Property override when not called from maven -->
+ <property name="maven.runtime.classpath" value="/usr/java/bnd.jar" />
+ <property name="tests.output.dir" value="${basedir}/../target" />
+
+ <mkdir dir="${tests.output.dir}/test-libs" />
+ <property name="tests.classes.dir" value="${tests.output.dir}/test-classes" />
+ <property name="tests.resources.dir" value="${tests.output.dir}/test-classes" />
+
+ <taskdef resource="aQute/bnd/ant/taskdef.properties">
+ <classpath>
+ <pathelement path="${maven.runtime.classpath}" />
+ </classpath>
+ </taskdef>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <target name="build-test-jars" depends="init" description="Build the test deployments">
+
+ <!-- http-service-test -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/http-service-test.jar"
+ files="${tests.resources.dir}/service/http/http-service.bnd"/>
+
+ <!-- Please add alphabetically -->
+
+ </target>
+
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/scripts/antrun-test-jars.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointActivator.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointActivator.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointActivator.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,61 @@
+/*
+ * 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.test.service.http;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A Service Activator
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 04-Feb-2009
+ */
+public class EndpointActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+
+ /*
+ * Implements BundleActivator.start().
+ * Registers an instance of a HttpEndpoint Service using the bundle context.
+ */
+ public void start(BundleContext context)
+ {
+ EndpointService service = new EndpointService(context);
+ registration = context.registerService(EndpointService.class.getName(), service, null);
+ }
+
+ /*
+ * Implements BundleActivator.stop().
+ */
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,99 @@
+/*
+ * 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.test.service.http;
+
+//$Id$
+
+import java.util.Properties;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.HttpService;
+
+/**
+ * A service that creates an Http context through the HttpService
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class EndpointService implements ServiceListener
+{
+ private BundleContext context;
+
+ public EndpointService(BundleContext context)
+ {
+ this.context = context;
+ context.addServiceListener(this);
+ }
+
+ private void registerService()
+ {
+ try
+ {
+ HttpService httpService = getHttpService();
+
+ Properties initParams = new Properties();
+ initParams.setProperty("initProp", "SomeValue");
+ httpService.registerServlet("/servlet", new EndpointServlet(context), initParams, null);
+ httpService.registerResources("/file", "/res", null);
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Cannot register context", ex);
+ }
+ }
+
+ private void unregisterService()
+ {
+ HttpService httpService = getHttpService();
+ httpService.unregister("/servlet");
+ httpService.unregister("/file");
+ context.removeServiceListener(this);
+ }
+
+ private HttpService getHttpService()
+ {
+ ServiceReference sref = context.getServiceReference(HttpService.class.getName());
+ if (sref == null)
+ throw new IllegalStateException("HttpService not registered");
+
+ return (HttpService)context.getService(sref);
+ }
+
+ public void serviceChanged(ServiceEvent event)
+ {
+ Object service = context.getService(event.getServiceReference());
+ if (service == this)
+ {
+ if (event.getType() == ServiceEvent.REGISTERED)
+ {
+ registerService();
+ }
+ else if (event.getType() == ServiceEvent.UNREGISTERING)
+ {
+ unregisterService();
+ }
+ }
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,83 @@
+/*
+ * 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.test.service.http;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.service.startlevel.StartLevel;
+import org.osgi.util.tracker.ServiceTracker;
+
+ at SuppressWarnings("serial")
+public class EndpointServlet extends HttpServlet
+{
+ private BundleContext context;
+
+ // This hides the default ctor and verifies that this instance is used
+ public EndpointServlet(BundleContext context)
+ {
+ this.context = context;
+ }
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ PrintWriter out = res.getWriter();
+
+ String testParam = req.getParameter("test");
+ if ("plain".equals(testParam))
+ {
+ out.println("Hello from Servlet");
+ }
+ else if ("initProp".equals(testParam))
+ {
+ String value = getInitParameter(testParam);
+ out.println(testParam + "=" + value);
+ }
+ else if ("context".equals(testParam))
+ {
+ out.println(context.getBundle().getSymbolicName());
+ }
+ else if ("startLevel".equals(testParam))
+ {
+ ServiceTracker tracker = new ServiceTracker(context, StartLevel.class.getName(), null);
+ tracker.open();
+
+ StartLevel service = (StartLevel)tracker.getService();
+ out.println("startLevel=" + service.getStartLevel());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Invalid 'test' parameter: " + testParam);
+ }
+
+ out.close();
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,83 @@
+/*
+ * 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.test.service.http.junit;
+
+//$Id$
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.junit.IntegrationTestCase;
+import org.jboss.osgi.spi.junit.IntegrationTestSetup;
+
+/**
+ * A test that deployes a bundle that containes a HttpServlet which
+ * is registered through the OSGi HttpService
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class EndpointServiceTest extends IntegrationTestCase
+{
+ public static Test suite()
+ {
+ return new IntegrationTestSetup(EndpointServiceTest.class, "http-service-test.jar");
+ }
+
+ public void testServletAccess() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8080/servlet?test=plain");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("Hello from Servlet", br.readLine());
+ }
+
+ public void testServletInitProps() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8080/servlet?test=initProp");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("initProp=SomeValue", br.readLine());
+ }
+
+ public void testServletBundleContext() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8080/servlet?test=context");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("http-service-test", br.readLine());
+ }
+
+ public void testServletStartLevel() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8080/servlet?test=startLevel");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("startLevel=1", br.readLine());
+ }
+
+ public void testResourceAccess() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8080/file/message.txt");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("Hello from Resource", br.readLine());
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/jndi.properties
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/jndi.properties (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/jndi.properties 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://@jboss.bind.address@:1099
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/log4j.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/log4j.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/log4j.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <appender name="FILE" class="org.apache.log4j.FileAppender">
+ <param name="File" value="${log4j.output.dir}/test.log"/>
+ <param name="Append" value="false"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <param name="Threshold" value="INFO" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n" />
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.hibernate">
+ <priority value="INFO" />
+ </category>
+
+ <!-- hide optimistic locking failures
+ <category name="org.hibernate.event.def.AbstractFlushingEventListener">
+ <priority value="FATAL" />
+ </category>
+ -->
+
+ <!-- hide proxy narrowing warns -->
+ <category name="org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog">
+ <priority value="ERROR" />
+ </category>
+
+ <!-- show SQL DML statements as they are executed -->
+ <category name="org.hibernate.SQL">
+ <priority value="DEBUG" />
+ </category>
+
+ <!-- show JDBC parameters
+ <category name="org.hibernate.type">
+ <priority value="TRACE" />
+ </category>
+ -->
+
+ <!-- hide httpclient wire dumps -->
+ <category name="httpclient.wire.header">
+ <priority value="INFO" />
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <!--appender-ref ref="CONSOLE"/-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/http-service.bnd
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/http-service.bnd (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/http-service.bnd 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,9 @@
+# bnd build -classpath target/test-classes -output target/test-libs/http-service.jar src/test/resources/service/http/http-service.bnd
+
+Bundle-SymbolicName: http-service-test
+Bundle-Activator: org.jboss.osgi.test.service.http.EndpointActivator
+Export-Package: org.jboss.osgi.test.service.http;uses:="javax.servlet,org.osgi.framework,org.osgi.service.http,javax.servlet.http"
+Include-Resource: res/message.txt=message.txt
+
+# For some reason this does not work
+# Include-Resource: src/test/resources/service/http/message.txt
\ No newline at end of file
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/message.txt
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/message.txt (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/message.txt 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1 @@
+Hello from Resource
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/service/http/message.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/tst.policy
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/tst.policy (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/integration/testsuite/src/test/resources/tst.policy 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,4 @@
+grant {
+ permission java.security.AllPermission;
+};
+
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,17 @@
+<?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>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,5 @@
+#Thu Jan 29 07:27:03 CET 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-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Tue Feb 03 13:57:43 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.classpath
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.classpath (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.classpath 2009-02-10 14:02:01 UTC (rev 84058)
@@ -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-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-service-http</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.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,5 @@
+#Thu Jan 29 07:27:04 CET 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-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Sat Jan 31 16:47:17 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,53 @@
+<?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>JBoss OSGi - Service HTTP</name>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-service-http</artifactId>
+ <packaging>bundle</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-service</artifactId>
+ <version>1.0.0.Alpha1</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-service-http-beans</artifactId>
+ <version>${version}</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.http</Bundle-SymbolicName>
+ <Bundle-Activator>org.jboss.osgi.service.http.HttpServiceActivator</Bundle-Activator>
+ <Private-Package>org.jboss.osgi.service.http</Private-Package>
+ <Import-Package>
+ !javax.servlet, !javax.servlet.http,
+ org.jboss.osgi.service.http.beans,
+ org.osgi.framework,
+ org.osgi.service.http
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpContextImpl.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpContextImpl.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpContextImpl.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,88 @@
+/*
+ * 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.http;
+
+//$Id$
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.Bundle;
+import org.osgi.service.http.HttpContext;
+
+/**
+ * An implementation of the HTTPContext
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class HttpContextImpl implements HttpContext
+{
+ private Bundle bundle;
+
+ public HttpContextImpl(Bundle bundle)
+ {
+ this.bundle = bundle;
+ }
+
+ public String getMimeType(String name)
+ {
+ if (name == null)
+ throw new IllegalArgumentException("Cannot obtain MimeType for: " + name);
+
+ String mimeType = null;
+ if (name.endsWith(".jpg") || name.endsWith(".jpeg"))
+ {
+ mimeType = "image/jpeg";
+ }
+ else if (name.endsWith(".gif"))
+ {
+ mimeType = "image/gif";
+ }
+ else if (name.endsWith(".css"))
+ {
+ mimeType = "text/css";
+ }
+ else if (name.endsWith(".txt"))
+ {
+ mimeType = "text/plain";
+ }
+ else if (name.endsWith(".htm") || name.endsWith(".html"))
+ {
+ mimeType = "text/html";
+ }
+ return mimeType;
+ }
+
+ public URL getResource(String name)
+ {
+ return bundle.getResource(name);
+ }
+
+ public boolean handleSecurity(HttpServletRequest req, HttpServletResponse res) throws IOException
+ {
+ return true;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpContextImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceActivator.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceActivator.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceActivator.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,70 @@
+/*
+ * 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.http;
+
+//$Id$
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.http.HttpService;
+
+/**
+ * An HTTPService Activator
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class HttpServiceActivator implements BundleActivator
+{
+ /*
+ * Implements BundleActivator.start().
+ * Registers an instance of a HTTP Service using the bundle context.
+ */
+ public void start(BundleContext context)
+ {
+ context.registerService(HttpService.class.getName(), new HttpContextServiceFactory(), null);
+ }
+
+ /*
+ * Implements BundleActivator.stop().
+ * Does nothing since the framework will automatically unregister any registered services.
+ */
+ public void stop(BundleContext context)
+ {
+ // NOTE: The service is automatically unregistered.
+ }
+
+ static class HttpContextServiceFactory implements ServiceFactory
+ {
+ public Object getService(Bundle bundle, ServiceRegistration reg)
+ {
+ return new HttpServiceImpl(bundle);
+ }
+
+ public void ungetService(Bundle bundle, ServiceRegistration reg, Object service)
+ {
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceException.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceException.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceException.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,44 @@
+/*
+ * 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.http;
+
+// $Id$
+
+/**
+ * A RuntimeException that should be thrown for unrecoverable HttpService errors
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 26-Jan-2009
+ */
+ at SuppressWarnings("serial")
+public class HttpServiceException extends RuntimeException
+{
+ public HttpServiceException(String message)
+ {
+ super(message);
+ }
+
+ public HttpServiceException(String message, Exception cause)
+ {
+ super(message, cause);
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,87 @@
+/*
+ * 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.http;
+
+//$Id$
+
+import java.util.Dictionary;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+
+import org.jboss.osgi.service.http.beans.HttpEndpointDeployer;
+import org.jboss.osgi.service.http.beans.ManagedHttpContext;
+import org.jboss.osgi.service.http.beans.ManagedServlet;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.HttpContext;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.http.NamespaceException;
+
+/**
+ * An implementation of the HTTP Service Specification
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class HttpServiceImpl implements HttpService
+{
+ private Bundle bundle;
+ private HttpEndpointDeployer webappService;
+
+ public HttpServiceImpl(Bundle bundle)
+ {
+ this.bundle = bundle;
+
+ BundleContext bundleContext = bundle.getBundleContext();
+ ServiceReference sref = bundleContext.getServiceReference(HttpEndpointDeployer.class.getName());
+ webappService = (HttpEndpointDeployer)bundleContext.getService(sref);
+ }
+
+ public HttpContext createDefaultHttpContext()
+ {
+ return new HttpContextImpl(bundle);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void registerServlet(String alias, Servlet servlet, Dictionary initParams, HttpContext httpContext) throws ServletException, NamespaceException
+ {
+ if (httpContext == null)
+ httpContext = createDefaultHttpContext();
+
+ webappService.registerServlet(alias, new ManagedServlet(servlet), initParams, new ManagedHttpContext(httpContext));
+ }
+
+ public void registerResources(String alias, String name, HttpContext httpContext) throws NamespaceException
+ {
+ if (httpContext == null)
+ httpContext = createDefaultHttpContext();
+
+ webappService.registerResources(alias, name, new ManagedHttpContext(httpContext));
+ }
+
+ public void unregister(String alias)
+ {
+ webappService.unregister(alias);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/HttpServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/NotImplementedException.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/NotImplementedException.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/NotImplementedException.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,48 @@
+/*
+ * 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.http;
+
+// $Id$
+
+/**
+ * A RuntimeException that should be thrown for unimplemented features
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+ at SuppressWarnings("serial")
+public class NotImplementedException extends RuntimeException
+{
+ public NotImplementedException()
+ {
+ }
+
+ public NotImplementedException(String message)
+ {
+ super(message);
+ }
+
+ public NotImplementedException(String jiraIssue, String message)
+ {
+ super("[" + jiraIssue + "] " + message);
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http/src/main/java/org/jboss/osgi/service/http/NotImplementedException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.classpath
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.classpath (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.classpath 2009-02-10 14:02:01 UTC (rev 84058)
@@ -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-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-service-http-beans</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.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,12 @@
+#Sat Jan 31 16:50:01 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Thu Jan 29 15:18:30 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,76 @@
+<?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>JBoss OSGi - Service HTTP Beans</name>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-service-http-beans</artifactId>
+ <packaging>jar</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-service</artifactId>
+ <version>1.0.0.Alpha1</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-spi</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>javax.servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-structure-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jacc-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ </plugins>
+ </build>
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/GenericEndpointServlet.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/GenericEndpointServlet.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/GenericEndpointServlet.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.service.http.beans;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.osgi.service.MicrocontainerService;
+import org.jboss.osgi.spi.ObjectNameFactory;
+import org.jboss.osgi.spi.framework.OSGiConfiguration;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.virtual.VFSUtils;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A generic servlet that handles http service requests
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-Feb-2009
+ */
+ at SuppressWarnings("serial")
+public class GenericEndpointServlet extends HttpServlet
+{
+ private ObjectName httpContextName;
+ private ObjectName httpServletName;
+ private ManagedHttpContextMBean httpContext;
+ private ManagedServletMBean httpServlet;
+ private String resourceLocation;
+
+ @Override
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+
+ // Get the MBeanServer
+ OSGiFramework framework = OSGiConfiguration.getFramework();
+ BundleContext context = framework.getSystemBundleContext();
+ ServiceReference sref = context.getServiceReference(MicrocontainerService.class.getName());
+ MicrocontainerService service = (MicrocontainerService)context.getService(sref);
+ MBeanServer server = service.getMbeanServer();
+
+ try
+ {
+ // Get the HttpContext, which must alway be there
+ httpContextName = ObjectNameFactory.create(getInitParameter(HttpEndpointDeployer.INIT_PARAM_HTTP_CONTEXT_NAME));
+ httpContext = (ManagedHttpContextMBean)MBeanProxy.get(ManagedHttpContextMBean.class, httpContextName, server);
+
+ // Get the HttpSerlet, which must be there for a registered servlet
+ String servletName = getInitParameter(HttpEndpointDeployer.INIT_PARAM_SERVLET_NAME);
+ if (servletName != null)
+ {
+ httpServletName = ObjectNameFactory.create(servletName);
+ httpServlet = (ManagedServletMBean)MBeanProxy.get(ManagedServletMBean.class, httpServletName, server);
+ httpServlet.init(config);
+ }
+
+ // Get the resource location, which must be there for a registered resources
+ resourceLocation = getInitParameter(HttpEndpointDeployer.INIT_PARAM_RESOURCE_LOCATION);
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new ServletException("Cannot obtain MBeanProxy", ex);
+ }
+ }
+
+ @Override
+ protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ // Handle a service request to a registered servlet
+ if (httpServlet != null)
+ {
+ httpServlet.service(req, res);
+ }
+
+ // Handle a service request to a registered resource
+ else
+ {
+ String resourcePath = resourceLocation + req.getPathInfo();
+
+ URL resourceUrl = httpContext.getResource(resourcePath);
+ if (resourceUrl != null)
+ {
+ String mimeType = httpContext.getMimeType(resourcePath);
+ if (mimeType != null)
+ res.setContentType(mimeType);
+
+ ServletOutputStream outStream = res.getOutputStream();
+ InputStream inStream = resourceUrl.openStream();
+ VFSUtils.copyStream(inStream, outStream);
+ outStream.close();
+ inStream.close();
+ }
+ else
+ {
+ res.sendError(HttpServletResponse.SC_NOT_FOUND, resourcePath);
+ }
+ }
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/GenericEndpointServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpEndpointDeployer.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpEndpointDeployer.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpEndpointDeployer.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,281 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.service.http.beans;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.servlet.Servlet;
+
+import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.DeploymentFactory;
+import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.osgi.spi.ObjectNameFactory;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Generates a webapp for a HttpService servlet registration
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 26-Jan-2009
+ */
+public class HttpEndpointDeployer
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(HttpEndpointDeployer.class);
+
+ static final String INIT_PARAM_RESOURCE_LOCATION = "org.jboss.osgi.service.http.resource.location";
+ static final String INIT_PARAM_HTTP_CONTEXT_NAME = "org.jboss.osgi.service.http.context.name";
+ static final String INIT_PARAM_SERVLET_NAME = "org.jboss.osgi.service.http.servlet.name";
+
+ private BundleContext bundleContext;
+ private DeployerClient mainDeployer;
+ private MBeanServer mbeanServer;
+
+ private DeploymentFactory factory = new DeploymentFactory();
+ private Map<String, Deployment> deployments = new HashMap<String, Deployment>();
+
+ public void setBundleContext(BundleContext bundleContext)
+ {
+ this.bundleContext = bundleContext;
+ }
+
+ public void setMainDeployer(DeployerClient mainDeployer)
+ {
+ this.mainDeployer = mainDeployer;
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+
+ // Register this bean as an OSGi service
+ public void create()
+ {
+ bundleContext.registerService(HttpEndpointDeployer.class.getName(), this, null);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void registerServlet(String alias, ManagedServlet servlet, Dictionary initParams, ManagedHttpContext httpContext)
+ {
+ registerServletInternal(alias, servlet, initParams, httpContext);
+ }
+
+ public void registerResources(String alias, String name, ManagedHttpContext httpContext)
+ {
+ Properties initParams = new Properties();
+ initParams.setProperty(HttpEndpointDeployer.INIT_PARAM_RESOURCE_LOCATION, name);
+ registerServletInternal(alias, null, initParams, httpContext);
+ }
+
+ public void unregister(String alias)
+ {
+ assertAlias(alias);
+
+ Deployment deployment = deployments.remove(alias);
+ if (deployment != null)
+ {
+ try
+ {
+ if (mainDeployer != null)
+ mainDeployer.undeploy(deployment);
+
+ MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects();
+ unregisterManagedObject(mutableAttachments.getAttachment(INIT_PARAM_HTTP_CONTEXT_NAME, ObjectName.class));
+ unregisterManagedObject(mutableAttachments.getAttachment(INIT_PARAM_SERVLET_NAME, ObjectName.class));
+ unregisterManagedObject(mutableAttachments.getAttachment(HttpServiceClassLoader.class.getName(), ObjectName.class));
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Cannot undeploy webapp: " + alias, ex);
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private void registerServletInternal(String alias, ManagedServlet servlet, Dictionary initParams, ManagedHttpContext httpContext)
+ {
+ assertAlias(alias);
+
+ if (initParams == null)
+ initParams = new Properties();
+
+ ObjectName contextName = null;
+ ObjectName loaderName = null;
+ ObjectName servletName = null;
+ try
+ {
+ contextName = registerHttpContext(alias, httpContext);
+ initParams.put(INIT_PARAM_HTTP_CONTEXT_NAME, contextName.getCanonicalName());
+
+ HttpServiceClassLoader classLoader = null;
+ if (servlet != null)
+ {
+ ClassLoader osgiLoader = servlet.getClassLoader();
+ classLoader = createHttpServiceClassLoader(osgiLoader);
+ loaderName = registerClassLoader(alias, classLoader);
+
+ servletName = registerServlet(alias, servlet);
+ initParams.put(INIT_PARAM_SERVLET_NAME, servletName.getCanonicalName());
+ }
+
+ // Add the registered objects to the deployment, so that they can be unregistered again
+ Deployment deployment = deployWebApp(alias, new GenericEndpointServlet(), initParams, classLoader);
+ MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects();
+ mutableAttachments.addAttachment(INIT_PARAM_HTTP_CONTEXT_NAME, contextName, ObjectName.class);
+
+ if (servlet != null)
+ {
+ mutableAttachments.addAttachment(INIT_PARAM_SERVLET_NAME, servletName, ObjectName.class);
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ unregisterManagedObject(contextName);
+ unregisterManagedObject(loaderName);
+ unregisterManagedObject(servletName);
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ unregisterManagedObject(contextName);
+ unregisterManagedObject(loaderName);
+ unregisterManagedObject(servletName);
+ throw new IllegalStateException("Cannot deploy webapp: " + alias, ex);
+ }
+ }
+
+ private ObjectName registerServlet(String alias, ManagedServlet managedServlet) throws Exception
+ {
+ ObjectName objectName = ObjectNameFactory.create("jboss.osgi:service=http,object=servlet,alias=" + alias);
+ mbeanServer.registerMBean(managedServlet, objectName);
+ return objectName;
+ }
+
+ private ObjectName registerHttpContext(String alias, ManagedHttpContext managedContext) throws Exception
+ {
+ ObjectName objectName = ObjectNameFactory.create("jboss.osgi:service=http,object=httpcontext,alias=" + alias);
+ mbeanServer.registerMBean(managedContext, objectName);
+ return objectName;
+ }
+
+ private ObjectName registerClassLoader(String alias, HttpServiceClassLoader classLoader) throws Exception
+ {
+ ObjectName objectName = ObjectNameFactory.create("jboss.osgi:service=http,object=classloader,alias=" + alias);
+ mbeanServer.registerMBean(classLoader, objectName);
+ classLoader.setObjectName(objectName);
+ return objectName;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Deployment deployWebApp(String alias, Servlet servlet, Dictionary initParams, HttpServiceClassLoader classLoader) throws Exception
+ {
+ WebMetaDataFactory metaDatafactory = new WebMetaDataFactory();
+ JBossWebMetaData jbwmd = metaDatafactory.generateWebMetaData(alias, servlet, initParams);
+
+ String contextRoot = jbwmd.getContextRoot();
+
+ Deployment deployment = deployments.get(contextRoot);
+ if (deployment != null)
+ throw new IllegalStateException("HttpService alias already deployed: " + contextRoot);
+
+ String depName = "http://osgi-http-service" + contextRoot;
+ deployment = new AbstractDeployment(depName);
+ factory.addContext(deployment, "");
+
+ metaDatafactory.generateJACCPermissions(depName, jbwmd);
+
+ MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects();
+ mutableAttachments.addAttachment("org.jboss.web.explicitDocBase", "/", String.class);
+ mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd);
+
+ if (classLoader != null)
+ {
+ mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory(classLoader));
+ mutableAttachments.addAttachment(HttpServiceClassLoader.class.getName(), classLoader.getObjectName(), ObjectName.class);
+ }
+
+ mainDeployer.deploy(deployment);
+
+ deployments.put(contextRoot, deployment);
+ return deployment;
+ }
+
+ private HttpServiceClassLoader createHttpServiceClassLoader(ClassLoader osgiLoader) throws Exception
+ {
+ ClassLoader kernelLoader = mainDeployer.getClass().getClassLoader();
+ HttpServiceClassLoader classLoader = new HttpServiceClassLoader(kernelLoader, osgiLoader);
+ return classLoader;
+ }
+
+ private void unregisterManagedObject(ObjectName objectName)
+ {
+ if (objectName != null && mbeanServer != null && mbeanServer.isRegistered(objectName))
+ {
+ try
+ {
+ mbeanServer.unregisterMBean(objectName);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot unregister: " + objectName, ex);
+ }
+ }
+ }
+
+ private void assertAlias(String alias)
+ {
+ if (alias.equals("/") == false && (alias.startsWith("/") == false || alias.endsWith("/")))
+ throw new IllegalArgumentException("An alias must begin with slash ('/') and must not end with slash ('/')");
+ }
+
+ private static class ContextClassLoaderFactory implements ClassLoaderFactory
+ {
+ private ClassLoader classLoader;
+
+ public ContextClassLoaderFactory(ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
+ {
+ return classLoader;
+ }
+
+ public void removeClassLoader(DeploymentUnit unit) throws Exception
+ {
+ classLoader = null;
+ }
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpEndpointDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoader.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoader.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoader.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.service.http.beans;
+
+import java.net.URL;
+import java.security.SecureClassLoader;
+
+import javax.management.ObjectName;
+
+/**
+ * A ClassLoader that implements RealClassLoader and delegates to
+ * the JBoss system classloader when a class cannot be found in the
+ * OSGi class loader.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 29-Jan-2009
+ */
+public class HttpServiceClassLoader extends SecureClassLoader implements HttpServiceClassLoaderMBean
+{
+ private ClassLoader osgiLoader;
+ private ObjectName objectName;
+
+ public HttpServiceClassLoader(ClassLoader kernelLoader, ClassLoader osgiLoader)
+ {
+ super(kernelLoader);
+ this.osgiLoader = osgiLoader;
+ }
+
+ public ObjectName getObjectName()
+ {
+ return objectName;
+ }
+
+ public void setObjectName(ObjectName objectName)
+ {
+ this.objectName = objectName;
+ }
+
+ @Override
+ public Class<?> loadClass(String name) throws ClassNotFoundException
+ {
+ Class<?> clazz;
+ try
+ {
+ clazz = osgiLoader.loadClass(name);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ clazz = super.loadClass(name);
+ }
+ return clazz;
+ }
+
+ @Override
+ public URL getResource(String name)
+ {
+ URL resUrl = osgiLoader.getResource(name);
+ return resUrl;
+ }
+
+ public void clearBlackList(String name)
+ {
+ }
+
+ public Class<?> getCachedClass(String name)
+ {
+ return null;
+ }
+
+ public URL getCachedResource(String name)
+ {
+ return null;
+ }
+
+ public boolean isValid()
+ {
+ return true;
+ }
+
+ public URL getResourceLocally(String name)
+ {
+ return null;
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoaderMBean.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoaderMBean.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoaderMBean.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.service.http.beans;
+
+import org.jboss.classloading.spi.RealClassLoader;
+
+/**
+ * The associated MBean interface
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 29-Jan-2009
+ */
+public interface HttpServiceClassLoaderMBean extends RealClassLoader
+{
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/HttpServiceClassLoaderMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContext.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContext.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContext.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,63 @@
+/*
+ * 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.http.beans;
+
+//$Id$
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.service.http.HttpContext;
+
+/**
+ * An HTTPContext that can be registered with the MBeanServer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class ManagedHttpContext implements ManagedHttpContextMBean
+{
+ private HttpContext httpContext;
+
+ public ManagedHttpContext(Object delegate)
+ {
+ this.httpContext = (HttpContext)delegate;
+ }
+
+ public String getMimeType(String name)
+ {
+ return httpContext.getMimeType(name);
+ }
+
+ public URL getResource(String name)
+ {
+ return httpContext.getResource(name);
+ }
+
+ public boolean handleSecurity(HttpServletRequest req, HttpServletResponse res) throws IOException
+ {
+ return httpContext.handleSecurity(req, res);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContext.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContextMBean.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContextMBean.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContextMBean.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.service.http.beans;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * An MBean interface for the HttpContext
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 06-Feb-2009
+ */
+public interface ManagedHttpContextMBean
+{
+ String getMimeType(String name);
+
+ URL getResource(String name);
+
+ boolean handleSecurity(HttpServletRequest req, HttpServletResponse res) throws IOException;
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedHttpContextMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServlet.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServlet.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServlet.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,80 @@
+/*
+ * 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.http.beans;
+
+//$Id$
+
+import java.io.IOException;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+/**
+ * A Servlet that can be registered with the MBeanServer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class ManagedServlet implements ManagedServletMBean
+{
+ private Servlet delegate;
+ private ClassLoader classLoader;
+
+ public ManagedServlet(Servlet delegate)
+ {
+ this.delegate = delegate;
+ this.classLoader = delegate.getClass().getClassLoader();
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+
+ public void destroy()
+ {
+ delegate.destroy();
+ }
+
+ public ServletConfig getServletConfig()
+ {
+ return delegate.getServletConfig();
+ }
+
+ public String getServletInfo()
+ {
+ return delegate.getServletInfo();
+ }
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ delegate.init(config);
+ }
+
+ public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException
+ {
+ delegate.service(req, res);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServletMBean.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServletMBean.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServletMBean.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,37 @@
+/*
+ * 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.http.beans;
+
+//$Id$
+
+import javax.servlet.Servlet;
+
+/**
+ * A Servlet that can be registered with the MBeanServer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public interface ManagedServletMBean extends Servlet
+{
+ ClassLoader getClassLoader();
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/ManagedServletMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/WebMetaDataFactory.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/WebMetaDataFactory.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/WebMetaDataFactory.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.service.http.beans;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.List;
+
+import javax.security.jacc.PolicyConfiguration;
+import javax.security.jacc.PolicyConfigurationFactory;
+import javax.security.jacc.PolicyContextException;
+import javax.servlet.Servlet;
+
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.web.WebPermissionMapping;
+
+/**
+ * Generates a webapp for a HttpService servlet registration
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 26-Jan-2009
+ */
+public class WebMetaDataFactory
+{
+ @SuppressWarnings("unchecked")
+ public JBossWebMetaData generateWebMetaData(String alias, Servlet servletImpl, Dictionary initParams)
+ {
+ String servletClass = servletImpl.getClass().getName();
+ String servletName = servletClass;
+
+ JBossWebMetaData jbwmd = new JBossWebMetaData();
+ jbwmd.setContextRoot(alias);
+
+ /*
+ * <servlet>
+ * <servlet-name>
+ * <servlet-class>
+ * </servlet>
+ */
+ JBossServletsMetaData servlets = jbwmd.getServlets();
+ JBossServletMetaData servlet = new JBossServletMetaData();
+ servlet.setServletName(servletName);
+ servlet.setServletClass(servletClass);
+ servlets.add(servlet);
+
+ /*
+ * <init-param>
+ * <param-name>
+ * <param-value>
+ * </init-param>
+ */
+ if (initParams != null)
+ {
+ List<ParamValueMetaData> servletParams = servlet.getInitParam();
+ if (servletParams == null)
+ {
+ servletParams = new ArrayList<ParamValueMetaData>();
+ servlet.setInitParam(servletParams);
+ }
+ Enumeration en = initParams.keys();
+ while (en.hasMoreElements())
+ {
+ String name = (String)en.nextElement();
+ String value = (String)initParams.get(name);
+ ParamValueMetaData param = new ParamValueMetaData();
+ param.setParamName(name);
+ param.setParamValue(value);
+ servletParams.add(param);
+ }
+ }
+
+ /*
+ * <servlet-mapping>
+ * <servlet-name>
+ * <url-pattern>
+ * </servlet-mapping>
+ */
+ List<ServletMappingMetaData> servletMappings = jbwmd.getServletMappings();
+ if (servletMappings == null)
+ {
+ servletMappings = new ArrayList<ServletMappingMetaData>();
+ jbwmd.setServletMappings(servletMappings);
+ }
+ ServletMappingMetaData servletMapping = new ServletMappingMetaData();
+ servletMapping.setServletName(servletName);
+ servletMapping.setUrlPatterns(Arrays.asList(new String[] { "/*" }));
+ servletMappings.add(servletMapping);
+
+ return jbwmd;
+ }
+
+ /**
+ * JBAS-5935: The dynamic web application does not go through the war security deployer.
+ * Hence the JACC permissions are not created. There is a need to explicitly create
+ * the war jacc permissions.
+ */
+ public void generateJACCPermissions(String depName, JBossWebMetaData jbwmd) throws ClassNotFoundException, PolicyContextException
+ {
+ PolicyConfigurationFactory policyConfigurationFactory = PolicyConfigurationFactory.getPolicyConfigurationFactory();
+ PolicyConfiguration policyConfiguration = policyConfigurationFactory.getPolicyConfiguration(depName, false);
+ WebPermissionMapping.createPermissions(jbwmd, policyConfiguration);
+ policyConfiguration.commit();
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/http-beans/src/main/java/org/jboss/osgi/service/http/beans/WebMetaDataFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,24 @@
+<?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>JBoss OSGi - Service</name>
+ <description>JBoss OSGi - Service</description>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-service</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Alpha1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <modules>
+ <module>http</module>
+ <module>http-beans</module>
+ </modules>
+
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/service/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.classpath
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.classpath (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.classpath 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,10 @@
+<?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="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/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>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.project
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.project (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.project 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-spi</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.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/org.eclipse.jdt.core.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,12 @@
+#Tue Feb 03 14:02:47 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/.settings/org.maven.ide.eclipse.prefs 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,8 @@
+#Thu Jan 29 11:21:45 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,40 @@
+<?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>JBoss OSGi - SPI</name>
+ <description>JBoss OSGi - Service Provider Interface</description>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-spi</artifactId>
+ <packaging>jar</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Alpha1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/service/MicrocontainerService.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/service/MicrocontainerService.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/service/MicrocontainerService.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.service;
+
+//$Id$
+
+import javax.management.MBeanServer;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.kernel.Kernel;
+import org.osgi.framework.BundleContext;
+
+/**
+ * An OSGi Service the gives access to the Microcontainer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class MicrocontainerService
+{
+ private BundleContext bundleContext;
+ private MBeanServer mbeanServer;
+ private Kernel kernel;
+
+ /**
+ * Register this bean as an OSGi service
+ */
+ public void create()
+ {
+ bundleContext.registerService(MicrocontainerService.class.getName(), this, null);
+ }
+
+ public void setBundleContext(BundleContext bundleContext)
+ {
+ this.bundleContext = bundleContext;
+ }
+
+ public void setKernel(Kernel kernel)
+ {
+ this.kernel = kernel;
+ }
+
+ public Kernel getKernel()
+ {
+ return kernel;
+ }
+
+ public MBeanServer getMbeanServer()
+ {
+ return mbeanServer;
+ }
+
+ public void setMbeanServer(MBeanServer server)
+ {
+ this.mbeanServer = server;
+ }
+
+ public Object getRegisteredBean(String beanName)
+ {
+ if (kernel == null)
+ throw new IllegalArgumentException("Kernel cannot be null");
+
+ ControllerContext context = kernel.getController().getInstalledContext(beanName);
+ return context.getTarget();
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/service/MicrocontainerService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/FrameworkException.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/FrameworkException.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/FrameworkException.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi;
+
+// $Id$
+
+/**
+ * An OSGi Framework Exception that should be thrown on unrecoverable errors.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jan-2009
+ */
+ at SuppressWarnings("serial")
+public class FrameworkException extends RuntimeException
+{
+ public FrameworkException(String message)
+ {
+ super(message);
+ }
+
+ public FrameworkException(String message, Exception cause)
+ {
+ super(message, cause);
+ }
+
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/FrameworkException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/NotImplementedException.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/NotImplementedException.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/NotImplementedException.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi;
+
+// $Id$
+
+/**
+ * A RuntimeException that should be thrown for unimplemented features
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+ at SuppressWarnings("serial")
+public class NotImplementedException extends RuntimeException
+{
+ public NotImplementedException()
+ {
+ }
+
+ public NotImplementedException(String message)
+ {
+ super(message);
+ }
+
+ public NotImplementedException(String jiraIssue, String message)
+ {
+ super("[" + jiraIssue + "] " + message);
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/NotImplementedException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/ObjectNameFactory.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/ObjectNameFactory.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/ObjectNameFactory.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi;
+
+// $Id$
+
+import java.util.Hashtable;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+/**
+ * A simple factory for creating safe object names.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-May-2006
+ */
+public class ObjectNameFactory
+{
+ public static ObjectName create(String name)
+ {
+ try
+ {
+ return new ObjectName(name);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + name + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, String key, String value)
+ {
+ try
+ {
+ return new ObjectName(domain, key, value);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," + key + "," + value + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, Hashtable<String, String> table)
+ {
+ try
+ {
+ return new ObjectName(domain, table);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," + table + "; " + e);
+ }
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/ObjectNameFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.framework;
+
+//$Id$
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+
+/**
+ * The Configuration provides a Framework through a ConfigurationProvider
+ * </p>
+ * A ConfigurationProvider is discovered in two stages
+ * <p/>
+ *
+ * <ol>
+ * <li>Read the configuration provider class name from a system property
+ * <li>Read the configuration provider class name from a resource file
+ * </ol>
+ *
+ * In both cases the key is the fully qalified name of the {@link OSGiConfigurationProvider} interface.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public final class OSGiConfiguration
+{
+ // Hide the ctor
+ private OSGiConfiguration()
+ {
+ }
+
+ /*
+ * Get the OSGi Framework for this configuration
+ * @return The configured instance of a Framework
+ */
+ public static OSGiFramework getFramework()
+ {
+ return getConfigurationProvider().getFramework();
+ }
+
+ /*
+ * Get a Framework with a given name from this configuration
+ * @return The configured instance of a Framework
+ */
+ public static OSGiFramework getFramework(String frameworkName)
+ {
+ return getConfigurationProvider().getFramework(frameworkName);
+ }
+
+ /*
+ * Get the ConfigurationProvider
+ */
+ public static OSGiConfigurationProvider getConfigurationProvider()
+ {
+ OSGiConfigurationProvider provider;
+
+ // Get the provider name from the System property
+ String providerName = System.getProperty(OSGiConfigurationProvider.class.getName());
+
+ // Get the provider name from the resource file
+ if (providerName == null)
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ URL providerURL = ctxLoader.getResource(OSGiConfigurationProvider.class.getName());
+ if (providerURL == null)
+ throw new IllegalStateException("Cannot find resource: " + OSGiConfigurationProvider.class.getName());
+
+ try
+ {
+ providerName = new BufferedReader(new InputStreamReader(providerURL.openStream())).readLine();
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Cannot read configuration provider name from: " + providerURL);
+ }
+ }
+
+ // Verify that we have a provider name
+ if (providerName == null)
+ throw new IllegalStateException("Cannot obtain configuration provider");
+
+ // Load the config provider
+ try
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ Class<?> providerClass = ctxLoader.loadClass(providerName);
+ provider = (OSGiConfigurationProvider)providerClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Cannot load configuration provider: " + providerName);
+ }
+
+ return provider;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfiguration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.framework;
+
+//$Id$
+
+import java.io.InputStream;
+import java.net.URL;
+
+
+/**
+ * The ConfigurationProvider provides a Framework
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public interface OSGiConfigurationProvider
+{
+ /**
+ * Get a Framework from this ConfigurationProvider
+ * @return The configured instance of a Framework
+ */
+ OSGiFramework getFramework();
+
+ /**
+ * Get a Framework with a given name from this ConfigurationProvider
+ * @return The configured instance of a Framework
+ */
+ OSGiFramework getFramework(String name);
+
+ /**
+ * Configure this provider from the given URL
+ */
+ void configure(URL urlConfig);
+
+ /**
+ * Configure this provider from the resource
+ */
+ void configure(String resourceConfig);
+
+ /**
+ * Configure this provider from the resource
+ */
+ void configure(InputStream streamConfig);
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiConfigurationProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.framework;
+
+//$Id$
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * An abstraction of an OSGi Framework
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public interface OSGiFramework
+{
+ /**
+ * Get the System Bundle associated with this Framework
+ */
+ Bundle getSystemBundle();
+
+ /**
+ * Get the System Bundle Context associated with this Framework
+ */
+ BundleContext getSystemBundleContext();
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiFramework.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/EmbeddedBeansDeployer.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/EmbeddedBeansDeployer.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/EmbeddedBeansDeployer.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.internal;
+
+// $Id$
+
+import java.net.URL;
+
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Boostrap the Microcontainer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 27-Jun-2008
+ */
+public class EmbeddedBeansDeployer extends BasicBootstrap
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(EmbeddedBeansDeployer.class);
+
+ private BasicXMLDeployer deployer;
+
+ public EmbeddedBeansDeployer()
+ {
+ // Get or bootstrap the kernel
+ if (getKernel() == null)
+ {
+ try
+ {
+ super.bootstrap();
+ log.debug("bootstrap kernel: " + kernel);
+ }
+ catch (Throwable e)
+ {
+ throw new IllegalStateException("Cannot bootstrap kernel", e);
+ }
+ }
+ deployer = new BasicXMLDeployer(kernel);
+ }
+
+ /**
+ * Deploy MC beans from URL
+ */
+ public void deploy(URL url)
+ {
+ log.debug("deploy: " + url);
+ try
+ {
+ deployer.deploy(url);
+ deployer.validate();
+ }
+ catch (Throwable e)
+ {
+ throw new IllegalStateException("Cannot deploy beans from: " + url, e);
+ }
+ }
+
+ /**
+ * Undeploy MC beans from URL
+ */
+ public void undeploy(URL url)
+ {
+ log.debug("undeploy: " + url);
+ try
+ {
+ deployer.undeploy(url);
+ }
+ catch (Throwable e)
+ {
+ throw new IllegalStateException("Cannot undeploy beans from: " + url, e);
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/EmbeddedBeansDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/KernelLocator.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/KernelLocator.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/KernelLocator.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.internal;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+
+/**
+ * Locate the single instance of the kernel
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class KernelLocator
+{
+ private static Kernel kernel;
+
+ public static Kernel getKernel()
+ {
+ return KernelLocator.kernel;
+ }
+
+ public void setKernel(Kernel kernel)
+ {
+ KernelLocator.kernel = kernel;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/KernelLocator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -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.spi.internal;
+
+//$Id$
+
+import java.io.InputStream;
+import java.net.URL;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.osgi.spi.NotImplementedException;
+import org.jboss.osgi.spi.framework.OSGiConfigurationProvider;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+
+/**
+ * The ConfigurationProvider provides a Framework through a given configuration method
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public class MicrocontainerConfigurationProvider implements OSGiConfigurationProvider
+{
+ /* The Framework bean name - jboss.osgi:service=Framework */
+ public static final String DEFAULT_BEAN_NAME = "jboss.osgi:service=Framework";
+ /* The default bean config: jboss-osgi-beans.xml */
+ public static final String DEFAULT_BEANS_CONFIG = "osgi-jboss-beans.xml";
+
+ private Kernel kernel;
+
+ public OSGiFramework getFramework()
+ {
+ return getFramework(DEFAULT_BEAN_NAME);
+ }
+
+ @SuppressWarnings("deprecation")
+ public OSGiFramework getFramework(String beanName)
+ {
+ if (kernel == null)
+ kernel = KernelLocator.getKernel();
+
+ if (kernel == null)
+ configure(DEFAULT_BEANS_CONFIG);
+
+ KernelRegistryEntry entry = kernel.getRegistry().getEntry(beanName);
+ OSGiFramework framework = (OSGiFramework)entry.getTarget();
+
+ return framework;
+ }
+
+ public void configure(InputStream streamConfig)
+ {
+ throw new NotImplementedException("Cannot bootstrap JBossMC from InputStream");
+ }
+
+ public void configure(String resourceConfig)
+ {
+ URL urlConfig = Thread.currentThread().getContextClassLoader().getResource(resourceConfig);
+ if (urlConfig == null)
+ throw new IllegalStateException("Cannot find resource: " + resourceConfig);
+
+ deploy(urlConfig);
+ }
+
+ public void configure(URL urlConfig)
+ {
+ deploy(urlConfig);
+ }
+
+ private void deploy(URL urlConfig)
+ {
+ EmbeddedBeansDeployer deployer = new EmbeddedBeansDeployer();
+ deployer.deploy(urlConfig);
+ kernel = deployer.getKernel();
+
+ if (kernel == null)
+ throw new IllegalStateException("Cannot obtain kernel, after beans deployment");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/internal/MicrocontainerConfigurationProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/ArchiveDeployer.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/ArchiveDeployer.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/ArchiveDeployer.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.junit;
+
+import java.net.URL;
+
+/**
+ * An archive deployer
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 16-May-2006
+ */
+public interface ArchiveDeployer
+{
+ /** Deploy the given archive
+ */
+ void deploy(URL archive) throws Exception;
+
+ /** Undeploy the given archive
+ */
+ void undeploy(URL archive) throws Exception;
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/ArchiveDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestCase.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestCase.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestCase.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.junit;
+
+// $Id$
+
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * An integration test case
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class IntegrationTestCase extends OSGiTestCase
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(IntegrationTestCase.class);
+
+ IntegrationTestHelper delegate = new IntegrationTestHelper();
+
+ public boolean isTargetJBoss50()
+ {
+ return delegate.isTargetJBoss50();
+ }
+
+ public void deploy(String archive) throws Exception
+ {
+ delegate.deploy(archive);
+ }
+
+ public void deploy(URL archive) throws Exception
+ {
+ delegate.deploy(archive);
+ }
+
+ public void undeploy(String archive) throws Exception
+ {
+ delegate.undeploy(archive);
+ }
+
+ public void undeploy(URL archive) throws Exception
+ {
+ delegate.undeploy(archive);
+ }
+
+ public MBeanServerConnection getServer()
+ {
+ return delegate.getServer();
+ }
+
+ public String getServerHost()
+ {
+ return delegate.getServerHost();
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.junit;
+
+import java.net.URL;
+import java.util.Hashtable;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * An integration test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class IntegrationTestHelper extends OSGiTestHelper
+{
+ private static MBeanServerConnection server;
+ private String integrationTarget;
+
+ public void deploy(String archive) throws Exception
+ {
+ URL url = getTestArchiveFile(archive).toURI().toURL();
+ deploy(url);
+ }
+
+ public void deploy(URL archive) throws Exception
+ {
+ getDeployer().deploy(archive);
+ }
+
+ public void undeploy(String archive) throws Exception
+ {
+ URL url = getTestArchiveFile(archive).toURI().toURL();
+ undeploy(url);
+ }
+
+ public void undeploy(URL archive) throws Exception
+ {
+ getDeployer().undeploy(archive);
+ }
+
+ public boolean isTargetJBoss50()
+ {
+ String target = getIntegrationTarget();
+ return target.startsWith("jboss50");
+ }
+
+ private String getIntegrationTarget()
+ {
+ if (integrationTarget == null)
+ {
+ String jbossVersion;
+ try
+ {
+ ObjectName oname = new ObjectName("jboss.system:type=ServerConfig");
+ jbossVersion = (String)getServer().getAttribute(oname, "SpecificationVersion");
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Cannot obtain jboss version", ex);
+ }
+
+ if (jbossVersion.startsWith("5.0"))
+ integrationTarget = "jboss50";
+ else
+ throw new IllegalStateException("Unsupported jboss version: " + jbossVersion);
+ }
+ return integrationTarget;
+ }
+
+ @SuppressWarnings("unchecked")
+ public MBeanServerConnection getServer()
+ {
+ if (server == null)
+ {
+ Hashtable jndiEnv = null;
+ try
+ {
+ InitialContext iniCtx = new InitialContext();
+ jndiEnv = iniCtx.getEnvironment();
+ server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ }
+ catch (NamingException ex)
+ {
+ throw new RuntimeException("Cannot obtain MBeanServerConnection using jndi props: " + jndiEnv, ex);
+ }
+ }
+ return server;
+ }
+
+ private ArchiveDeployer getDeployer()
+ {
+ return new JBossArchiveDeployer(getServer());
+ }
+
+ public String getServerHost()
+ {
+ return System.getProperty("jboss.bind.address", "localhost");
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestSetup.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestSetup.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestSetup.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,148 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.junit;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.management.MBeanServerConnection;
+
+/**
+ * A test setup that deploys/undeploys archives
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class IntegrationTestSetup extends OSGiTestSetup
+{
+ private IntegrationTestHelper delegate = new IntegrationTestHelper();
+ private String[] archives = new String[0];
+ private ClassLoader originalClassLoader;
+
+ public IntegrationTestSetup(Class<?> testClass, String archiveList)
+ {
+ super(testClass);
+ getArchiveArray(archiveList);
+ }
+
+ public File getArchiveFile(String archive)
+ {
+ return delegate.getTestArchiveFile(archive);
+ }
+
+ public URL getArchiveURL(String archive) throws MalformedURLException
+ {
+ return delegate.getTestArchiveFile(archive).toURI().toURL();
+ }
+
+ public boolean isTargetJBoss50()
+ {
+ return delegate.isTargetJBoss50();
+ }
+
+ public MBeanServerConnection getServer()
+ {
+ return delegate.getServer();
+ }
+
+ public String getServerHost()
+ {
+ return delegate.getServerHost();
+ }
+
+ private void getArchiveArray(String archiveList)
+ {
+ if (archiveList != null)
+ {
+ StringTokenizer st = new StringTokenizer(archiveList, ", ");
+ archives = new String[st.countTokens()];
+
+ for (int i = 0; i < archives.length; i++)
+ archives[i] = st.nextToken();
+ }
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ List<URL> clientJars = new ArrayList<URL>();
+ for (int i = 0; i < archives.length; i++)
+ {
+ String archive = archives[i];
+ try
+ {
+ delegate.deploy(archive);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ delegate.undeploy(archive);
+ }
+
+ if (archive.endsWith("-client.jar"))
+ {
+ URL archiveURL = getArchiveURL(archive);
+ clientJars.add(archiveURL);
+ }
+ }
+
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ originalClassLoader = parent;
+
+ // add client jars to the class loader
+ if (!clientJars.isEmpty())
+ {
+ URL[] urls = new URL[clientJars.size()];
+ for (int i = 0; i < clientJars.size(); i++)
+ {
+ urls[i] = clientJars.get(i);
+ }
+ URLClassLoader cl = new URLClassLoader(urls, parent);
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ try
+ {
+ for (int i = 0; i < archives.length; i++)
+ {
+ String archive = archives[archives.length - i - 1];
+ delegate.undeploy(archive);
+ }
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(originalClassLoader);
+ }
+ super.tearDown();
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestSetup.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/JBossArchiveDeployer.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/JBossArchiveDeployer.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/JBossArchiveDeployer.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.junit;
+
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+/**
+ * An archive deployer that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class JBossArchiveDeployer implements ArchiveDeployer
+{
+ private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+ private MBeanServerConnection server;
+
+ public JBossArchiveDeployer(MBeanServerConnection server)
+ {
+ this.server = server;
+ }
+
+ public void deploy(URL url) throws Exception
+ {
+ invokeMainDeployer("deploy", url);
+ }
+
+ public void undeploy(URL url) throws Exception
+ {
+ invokeMainDeployer("undeploy", url);
+ }
+
+ private void invokeMainDeployer(String methodName, URL url) throws Exception
+ {
+ server.invoke(new ObjectName(MAIN_DEPLOYER), methodName, new Object[] { url }, new String[] { "java.net.URL" });
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/JBossArchiveDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestCase.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestCase.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestCase.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.junit;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * An OSGi Test Case
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class OSGiTestCase extends TestCase
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(OSGiTestCase.class);
+
+ private OSGiTestHelper delegate = new OSGiTestHelper();
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ log.debug("### START " + getLongName());
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ log.debug("### END " + getLongName());
+ }
+
+ protected String getShortName()
+ {
+ String shortName = getClass().getName();
+ shortName = shortName.substring(shortName.lastIndexOf(".") + 1);
+ return shortName;
+ }
+
+ protected String getLongName()
+ {
+ return getClass().getName() + "." + getName();
+ }
+
+ protected URL getResourceURL(String resource)
+ {
+ return delegate.getResourceURL(resource);
+ }
+
+ protected File getResourceFile(String resource)
+ {
+ return delegate.getResourceFile(resource);
+ }
+
+ public File getTestArchiveFile(String archive)
+ {
+ return delegate.getTestArchiveFile(archive);
+ }
+
+ public URL getTestArchiveURL(String archive) throws MalformedURLException
+ {
+ return delegate.getTestArchiveFile(archive).toURI().toURL();
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestHelper.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestHelper.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestHelper.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.junit;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * An OSGi Test Helper
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class OSGiTestHelper
+{
+ private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
+ private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
+
+ private static String testResourcesDir;
+ private static String testArchiveDir;
+
+ /** Try to discover the URL for the test resource */
+ public URL getResourceURL(String resource)
+ {
+ URL resURL = null;
+ try
+ {
+ File resourceFile = getResourceFile(resource);
+ resURL = resourceFile.toURI().toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ return resURL;
+ }
+
+ /** Try to discover the File for the test resource */
+ public File getResourceFile(String resource)
+ {
+ File file = new File(resource);
+ if (file.exists())
+ return file;
+
+ file = new File(getTestResourcesDir() + "/" + resource);
+ if (file.exists())
+ return file;
+
+ throw new IllegalArgumentException("Cannot obtain '" + getTestResourcesDir() + "/" + resource + "'");
+ }
+
+ public String getTestResourcesDir()
+ {
+ if (testResourcesDir == null)
+ testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY, "target/test-classes");
+
+ return testResourcesDir;
+ }
+
+ /** Try to discover the URL for the deployment archive */
+ public URL getTestArchiveURL(String archive) throws MalformedURLException
+ {
+ return getTestArchiveFile(archive).toURI().toURL();
+ }
+
+ /** Try to discover the File for the deployment archive */
+ public File getTestArchiveFile(String archive)
+ {
+ File file = new File(archive);
+ if (file.exists())
+ return file;
+
+ file = new File(getTestArchiveDir() + "/" + archive);
+ if (file.exists())
+ return file;
+
+ String notSet = (getTestArchiveDir() == null ? " System property '" + SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not set." : "");
+ throw new IllegalArgumentException("Cannot obtain '" + getTestArchiveDir() + "/" + archive + "'." + notSet);
+ }
+
+ public String getTestArchiveDir()
+ {
+ if (testArchiveDir == null)
+ testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY, "target/test-libs");
+
+ return testArchiveDir;
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestSetup.java
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestSetup.java (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestSetup.java 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.junit;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import junit.extensions.TestSetup;
+import junit.framework.TestSuite;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * An OSGi Test Setup
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class OSGiTestSetup extends TestSetup
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(OSGiTestSetup.class);
+
+ private OSGiTestHelper delegate = new OSGiTestHelper();
+
+ public OSGiTestSetup(Class<?> testCase)
+ {
+ super(new TestSuite(testCase));
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ log.debug("### START SETUP " + getTest());
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ log.debug("### END SETUP " + getTest());
+ }
+
+ protected URL getResourceURL(String resource)
+ {
+ return delegate.getResourceURL(resource);
+ }
+
+ protected File getResourceFile(String resource)
+ {
+ return delegate.getResourceFile(resource);
+ }
+
+ public File getTestArchiveFile(String archive)
+ {
+ return delegate.getTestArchiveFile(archive);
+ }
+
+ public URL getTestArchiveURL(String archive) throws MalformedURLException
+ {
+ return delegate.getTestArchiveFile(archive).toURI().toURL();
+ }
+}
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/modules/spi/src/main/java/org/jboss/osgi/spi/junit/OSGiTestSetup.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/pom.xml
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/pom.xml (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/pom.xml 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,261 @@
+<?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>JBoss OSGi</name>
+ <description>JBoss OSGi</description>
+
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Alpha1</version>
+ <packaging>pom</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>4</version>
+ </parent>
+
+ <!-- Modules -->
+ <modules>
+ <module>modules/spi</module>
+ <module>modules/integration</module>
+ <module>modules/service</module>
+ </modules>
+
+ <!-- Properties -->
+ <properties>
+ <felix.framework.version>1.4.1</felix.framework.version>
+ <felix.javax.servlet.version>1.0.0</felix.javax.servlet.version>
+ <felix.osgi.core.version>1.2.0</felix.osgi.core.version>
+ <felix.webconsole.version>1.2.2</felix.webconsole.version>
+ <jboss.deployers.version>2.0.3.GA</jboss.deployers.version>
+ <jboss.metadata.version>1.0.0.CR11</jboss.metadata.version>
+ <jboss.microcontainer.version>2.0.2.GA</jboss.microcontainer.version>
+ <jboss.jacc.version>1.1.0.GA</jboss.jacc.version>
+ <jbossas.version>5.0.0.GA</jbossas.version>
+ <junit.version>3.8.1</junit.version>
+ <log4j.version>1.2.14</log4j.version>
+ <slf4j.version>1.5.2</slf4j.version>
+ </properties>
+
+ <!-- Dependecy Management -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jacc-api</artifactId>
+ <version>${jboss.jacc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <version>${jbossas.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system-jmx</artifactId>
+ <version>${jbossas.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-client</artifactId>
+ <version>${jbossas.version}</version>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client</artifactId>
+ <version>${jboss.deployers.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ <version>${jboss.deployers.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <version>${jboss.deployers.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-structure-spi</artifactId>
+ <version>${jboss.deployers.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>${jboss.deployers.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <version>${jboss.metadata.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>${jboss.microcontainer.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+
+ <!-- Felix Dependencies -->
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>javax.servlet</artifactId>
+ <version>${felix.javax.servlet.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>${felix.osgi.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>${felix.osgi.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ <version>${felix.framework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.webconsole</artifactId>
+ <version>${felix.webconsole.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <!-- Build -->
+ <build>
+ <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-surefire-plugin</artifactId>
+ <configuration>
+ <failIfNoTests>false</failIfNoTests>
+ <trimStackTrace>false</trimStackTrace>
+ <systemProperties>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${project.build.directory}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- Repositories -->
+ <repositories>
+ <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>
+ <repository>
+ <id>repository.codehaus.org</id>
+ <name>Codehaus Repository</name>
+ <layout>default</layout>
+ <url>http://repository.codehaus.org</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>repository.aqute.biz</id>
+ <name>aQute Repository</name>
+ <url>http://www.aqute.biz/repo</url>
+ </repository>
+ </repositories>
+
+ <!-- Profiles -->
+ <profiles>
+
+ <!--
+ Name: distro
+ Desc: Build the distribution
+ -->
+ <profile>
+ <id>distro</id>
+ <modules>
+ <module>modules/distribution</module>
+ </modules>
+ <build>
+ <plugins>
+ <!--
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <quiet>true</quiet>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+</project>
Property changes on: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/profiles.xml.example
===================================================================
--- projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/profiles.xml.example (rev 0)
+++ projects/jboss-felix/tags/jboss-osgi-1.0.0.Alpha1/profiles.xml.example 2009-02-10 14:02:01 UTC (rev 84058)
@@ -0,0 +1,19 @@
+<profilesXml 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/profiles-1.0.0.xsd">
+ <profiles>
+
+ <!-- This profile can also be defined in ~/.m2/settings.xml -->
+ <profile>
+ <id>jboss-home-profile</id>
+ <activation>
+ <property>
+ <name>user.name</name>
+ </property>
+ </activation>
+ <properties>
+ <jboss501.home>/home/tdiesler/svn/jbossas/branches/Branch_5_0/build/output/jboss-5.0.1.GA</jboss501.home>
+ </properties>
+ </profile>
+
+ </profiles>
+</profilesXml>
More information about the jboss-cvs-commits
mailing list