Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

385317 - Updates the service.accessor implementation and fixes IDE cl…

…ass paths
  • Loading branch information...
commit e83d4271630376992d6799ba0981dd8d25adbbe6 1 parent 9de31a9
@bkapukaranov bkapukaranov authored
Showing with 1,118 additions and 267 deletions.
  1. +2 −1  .gitignore
  2. +1 −0  build.versions
  3. +2 −2 org.eclipse.virgo.web.core/.classpath
  4. +18 −9 org.eclipse.virgo.web.enterprise.appdeployer/.classpath
  5. +14 −8 org.eclipse.virgo.web.enterprise.applistener/.classpath
  6. +15 −8 org.eclipse.virgo.web.enterprise.jsf.support/.classpath
  7. +10 −7 org.eclipse.virgo.web.enterprise.openejb.fragment.jotm/.classpath
  8. +2 −1  org.eclipse.virgo.web.enterprise.openejb.fragment.jpa/.classpath
  9. +28 −28 org.eclipse.virgo.web.enterprise.openejb.fragment.jpa/.project
  10. +15 −8 org.eclipse.virgo.web.enterprise.openejb.initialiser/.classpath
  11. +24 −7 org.eclipse.virgo.web.enterprise.services.accessor/.classpath
  12. +5 −0 org.eclipse.virgo.web.enterprise.services.accessor/ivy.xml
  13. +1 −1  ...ava/org/eclipse/virgo/web/enterprise/services/accessor/{internal/loader → }/ClassLoaderJarScanner.java
  14. +125 −0 ...essor/src/main/java/org/eclipse/virgo/web/enterprise/services/accessor/ServicesAccessorCommandProvider.java
  15. +9 −1 ...e/virgo/web/enterprise/services/accessor/{internal/loader → }/WebAppBundleClassLoaderDelegateHook.java
  16. +15 −6 ...pse/virgo/web/enterprise/services/accessor/{internal/loader → }/WebAppBundleClassloaderCustomizer.java
  17. +300 −0 ...ccessor/src/main/java/org/eclipse/virgo/web/enterprise/services/accessor/WebAppBundleTrackerCustomizer.java
  18. +0 −153 .../java/org/eclipse/virgo/web/enterprise/services/accessor/internal/loader/WebAppBundleTrackerCustomizer.java
  19. +5 −0 org.eclipse.virgo.web.enterprise.services.accessor/src/main/resources/OSGI-INF/command.xml
  20. +2 −3 org.eclipse.virgo.web.enterprise.services.accessor/src/main/resources/OSGI-INF/wab_classloader_customizer.xml
  21. +113 −0 ...r/src/test/java/org/eclipse/virgo/web/enterprise/services/accessor/ServicesAccessorCommandProviderTest.java
  22. +38 −0 ...prise.services.accessor/src/test/java/org/eclipse/virgo/web/enterprise/services/accessor/TestSystemOut.java
  23. +184 −0 ...c/test/java/org/eclipse/virgo/web/enterprise/services/accessor/WebAppBundleClassLoaderDelegateHookTest.java
  24. +92 −0 ...src/test/java/org/eclipse/virgo/web/enterprise/services/accessor/WebAppBundleClassloaderCustomizerTest.java
  25. +69 −0 ...sor/src/test/java/org/eclipse/virgo/web/enterprise/services/accessor/WebAppBundleTrackerCustomizerTest.java
  26. +11 −5 org.eclipse.virgo.web.enterprise.services.accessor/template.mf
  27. +3 −4 org.eclipse.virgo.web.test/.classpath
  28. +2 −2 org.eclipse.virgo.web.tomcat.support/.classpath
  29. +13 −13 org.eclipse.virgo.web.war.deployer/.classpath
View
3  .gitignore
@@ -4,4 +4,5 @@ integration-repo
ivy-cache
derby.log
*/work
-user-ivy.properties
+user-ivy.properties
+*/bin/*
View
1  build.versions
@@ -4,6 +4,7 @@ org.eclipse.virgo.kernel=3.6.0.D-20121004185842
org.eclipse.virgo.repository=3.6.0.D-20121003031628
org.eclipse.virgo.util=3.6.0.D-20121003030151
org.eclipse.virgo.medic=3.6.0.D-20121003030924
+org.apache.felix.gogo.runtime=0.8.0.v201108120515
javax.servlet=3.0.0.v201112011016
org.eclipse.osgi=3.8.1.v20120830-144521
org.eclipse.equinox.event=1.2.100.v20111010-1614
View
4 org.eclipse.virgo.web.core/.classpath
@@ -35,9 +35,9 @@
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.deployer/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.deployer-3.6.0.D-20121004185842.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.deployer/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.deployer-sources-3.6.0.D-20121004185842.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.osgi/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.osgi-3.6.0.D-20121004185842.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.osgi/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.osgi-sources-3.6.0.D-20121004185842.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20121003030151/org.eclipse.virgo.util.common-3.6.0.D-20121003030151.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.1.0.RELEASE/org.eclipse.gemini.web.core-2.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.1.0.RELEASE/org.eclipse.gemini.web.core-sources-2.1.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.2.0.BUILD-20120829065106/org.eclipse.gemini.web.core-2.2.0.BUILD-20120829065106.jar" sourcepath="/IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.1.0.RELEASE/org.eclipse.gemini.web.core-sources-2.1.0.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.core/3.1.0.RELEASE/org.springframework.core-3.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.core/3.1.0.RELEASE/org.springframework.core-sources-3.1.0.RELEASE.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.event/1.2.100.v20110110/org.eclipse.equinox.event-1.2.100.v20110110.jar" sourcepath="/IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-sources-1.0.0.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.event/1.2.100.v20111010-1614/org.eclipse.equinox.event-1.2.100.v20111010-1614.jar" sourcepath="/IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-sources-1.0.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.stubs/3.6.0.D-20121003030708/org.eclipse.virgo.test.stubs-3.6.0.D-20121003030708.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.stubs/3.6.0.D-20120711092322/org.eclipse.virgo.test.stubs-sources-3.6.0.D-20120711092322.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.test/3.1.0.RELEASE/org.springframework.test-3.1.0.RELEASE.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
View
27 org.eclipse.virgo.web.enterprise.appdeployer/.classpath
@@ -1,9 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="VIRGO_INSTALL_FOLDER/plugins/org.apache.openejb.jee_4.0.0.beta-2_v201205041336.jar"/>
- <classpathentry kind="var" path="VIRGO_INSTALL_FOLDER/plugins/org.apache.xbean.naming_3.9.0.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.loader/4.0.0.beta-2_v201205041336/org.apache.openejb.loader-4.0.0.beta-2_v201205041336.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.ejb/3.1.1.v201204261316/javax.ejb-3.1.1.v201204261316.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.29.v201208221210/org.apache.catalina-7.0.29.v201208221210.jar" sourcepath="/IVY_CACHE/org.apache.catalina/com.springsource.org.apache.catalina/7.0.26/com.springsource.org.apache.catalina-sources-7.0.26.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20121003030924/org.eclipse.virgo.medic-3.6.0.D-20121003030924.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.1.0.M01/org.eclipse.virgo.medic-sources-3.1.0.M01.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.jee/4.0.0.beta-2_v201205041336/org.apache.openejb.jee-4.0.0.beta-2_v201205041336.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.validation/1.0.0.GA_v201205091237/javax.validation-1.0.0.GA_v201205091237.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
22 org.eclipse.virgo.web.enterprise.applistener/.classpath
@@ -1,8 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="VIRGO_INSTALL_FOLDER/plugins/org.apache.openejb.core_4.0.0.beta-2_v201205260545.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar" sourcepath="/IVY_CACHE/javax.servlet/javax.servlet/3.0.0.v201103241009/javax.servlet-sources-3.0.0.v201103241009.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.29.v201208221210/org.apache.catalina-7.0.29.v201208221210.jar" sourcepath="/IVY_CACHE/org.apache.catalina/com.springsource.org.apache.catalina/7.0.26/com.springsource.org.apache.catalina-sources-7.0.26.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.web.enterprise.appdeployer"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
23 org.eclipse.virgo.web.enterprise.jsf.support/.classpath
@@ -1,8 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="var" path="VIRGO_INSTALL_FOLDER/plugins/javax.annotation_1.1.0.v201105051105.jar"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.annotation/1.1.0.v201108011116/javax.annotation-1.1.0.v201108011116.jar"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.ejb/3.1.1.v201204261316/javax.ejb-3.1.1.v201204261316.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.29.v201208221210/org.apache.catalina-7.0.29.v201208221210.jar" sourcepath="/IVY_CACHE/org.apache.catalina/com.springsource.org.apache.catalina/7.0.26/com.springsource.org.apache.catalina-sources-7.0.26.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.glassfish.com.sun.faces/2.1.6.v201205171319/org.glassfish.com.sun.faces-2.1.6.v201205171319.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
17 org.eclipse.virgo.web.enterprise.openejb.fragment.jotm/.classpath
@@ -1,7 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.transaction/1.1.1.v201105210645/javax.transaction-1.1.1.v201105210645.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.ow2.jotm.jotm-core/2.1.9.v201204271116/org.ow2.jotm.jotm-core-2.1.9.v201204271116.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
3  org.eclipse.virgo.web.enterprise.openejb.fragment.jpa/.classpath
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
View
56 org.eclipse.virgo.web.enterprise.openejb.fragment.jpa/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.virgo.javaee.web.openejb.fragment.jpa</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.virgo.web.enterprise.openejb.fragment.jpa</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
23 org.eclipse.virgo.web.enterprise.openejb.initialiser/.classpath
@@ -1,8 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="VIRGO_INSTALL_FOLDER/lib/javax.transaction_1.1.0.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.1.v20120830-144521/org.eclipse.osgi-3.8.1.v20120830-144521.jar" sourcepath="/IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.loader/4.0.0.beta-2_v201205041336/org.apache.openejb.loader-4.0.0.beta-2_v201205041336.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.transaction/1.1.1.v201105210645/javax.transaction-1.1.1.v201105210645.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.29.v201208221210/org.apache.catalina-7.0.29.v201208221210.jar" sourcepath="/IVY_CACHE/org.apache.catalina/com.springsource.org.apache.catalina/7.0.26/com.springsource.org.apache.catalina-sources-7.0.26.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
31 org.eclipse.virgo.web.enterprise.services.accessor/.classpath
@@ -1,7 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.1.v20120830-144521/org.eclipse.osgi-3.8.1.v20120830-144521.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.tomcat.api/7.0.29.v201208220722/org.apache.tomcat.api-7.0.29.v201208220722.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.loader/4.0.0.beta-2_v201205041336/org.apache.openejb.loader-4.0.0.beta-2_v201205041336.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.29.v201208221210/org.apache.catalina-7.0.29.v201208221210.jar" sourcepath="/IVY_CACHE/org.apache.catalina/com.springsource.org.apache.catalina/7.0.26/com.springsource.org.apache.catalina-sources-7.0.26.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.tomcat/2.2.0.BUILD-20120829065106/org.eclipse.gemini.web.tomcat-2.2.0.BUILD-20120829065106.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.equinox.extensions/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.equinox.extensions-3.6.0.D-20121004185842.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.equinox.extensions/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.equinox.extensions-sources-3.6.0.D-20121004185842.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20121003030151/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20121003030151.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.felix.gogo.runtime/0.8.0.v201108120515/org.apache.felix.gogo.runtime-0.8.0.v201108120515.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
5 org.eclipse.virgo.web.enterprise.services.accessor/ivy.xml
@@ -21,10 +21,15 @@
<dependency org="org.eclipse.virgo.mirrored" name="org.slf4j.api" rev="${org.slf4j.api}" conf="compile->runtime"/>
<dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="compile->runtime"/>
<dependency org="org.eclipse.virgo.mirrored" name="org.apache.tomcat.api" rev="${org.apache.tomcat.api}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="org.apache.felix.gogo.runtime" rev="${org.apache.felix.gogo.runtime}" conf="compile->runtime"/>
<dependency org="org.eclipse.gemini" name="org.eclipse.gemini.web.tomcat" rev="${org.eclipse.gemini.web}" conf="compile->runtime"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.equinox.extensions" rev="${org.eclipse.virgo.kernel}" conf="compile->runtime"/>
+
+ <!-- Test dependencies -->
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ <dependency org="org.easymock" name="com.springsource.org.easymock" rev="${org.easymock}" conf="test->runtime"/>
</dependencies>
View
2  ...nternal/loader/ClassLoaderJarScanner.java → ...vices/accessor/ClassLoaderJarScanner.java
@@ -1,5 +1,5 @@
-package org.eclipse.virgo.web.enterprise.services.accessor.internal.loader;
+package org.eclipse.virgo.web.enterprise.services.accessor;
import java.io.File;
import java.io.IOException;
View
125 ...a/org/eclipse/virgo/web/enterprise/services/accessor/ServicesAccessorCommandProvider.java
@@ -0,0 +1,125 @@
+package org.eclipse.virgo.web.enterprise.services.accessor;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.felix.service.command.Descriptor;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+
+public class ServicesAccessorCommandProvider {
+
+ private final String CMD_HELP_MSG = "---Services accessor commands---\r\n" +
+ "\tlist_exposed_content <option> - display information about apis, which will be transparently added to applications, apis' implementations and JNDI consumption of services\r\n" +
+ "\t\tOptions:\r\n" +
+ "\t\t-api - display all API bundles\r\n" +
+ "\t\t-impl - display all Implementation bundles\r\n" +
+ "\t\t-clash - display all clashing API/Implementation bundles and which one is chosen\r\n";
+
+ private static String API_OPTION = "-api";
+ private static String IMPL_OPTION = "-impl";
+ private static String CLASH_OPTION = "-clash";
+ private static String API_BUNDLE_TYPE = "API";
+ private static String IMPL_BUNDLE_TYPE = "Implementation";
+
+ private WebAppBundleTrackerCustomizer webAppBundleTrackerCustomizer;
+ private WebAppBundleClassLoaderDelegateHook wabClassLoaderDelegateHook;
+ private String bundleType;
+ private final Object monitor = new Object();
+
+ public void activate(BundleContext context) {
+ Dictionary<String, Object> properties = new Hashtable<String, Object>();
+ properties.put("osgi.command.scope", "enterprise");
+ properties.put("osgi.command.function", new String[] {"list_exposed_content"});
+ context.registerService(ServicesAccessorCommandProvider.class, new ServicesAccessorCommandProvider(), properties);
+ }
+
+ @Descriptor(CMD_HELP_MSG)
+ public void list_exposed_content(String option) {
+ synchronized (monitor) {
+ if (wabClassLoaderDelegateHook != null) {
+ if (API_OPTION.equalsIgnoreCase(option)) {
+ bundleType = API_BUNDLE_TYPE;
+ displayBundles(wabClassLoaderDelegateHook.getApiBundles());
+ } else if (IMPL_OPTION.equalsIgnoreCase(option)) {
+ bundleType = IMPL_BUNDLE_TYPE;
+ displayBundles(wabClassLoaderDelegateHook.getImplBundles());
+ } else if (CLASH_OPTION.equalsIgnoreCase(option)) {
+ findClashes();
+ } else {
+ System.out.println();
+ System.out.println("Specify -api , -impl, -clash or -factories option");
+ }
+ }
+ }
+ }
+
+ private void displayBundles (Set<Bundle> bundles) {
+ if (bundles.size() == 0) {
+ System.out.println("No service " + bundleType + " bundles available");
+ return;
+ }
+
+ System.out.println();
+ System.out.print("ID");
+ System.out.print("\t");
+ System.out.print("Bundle name");
+ System.out.println();
+
+ for(Bundle bundle : bundles) {
+ System.out.print(bundle.getBundleId());
+ System.out.print("\t");
+ System.out.print(bundle.getSymbolicName() + "_" + bundle.getVersion());
+ System.out.println();
+ }
+ }
+
+ private void findClashes () {
+ Map<String, List<Bundle>> bundlesWithSameBSNMap = webAppBundleTrackerCustomizer.getBundlesWithSameBSNMap();
+ if (bundlesWithSameBSNMap == null || bundlesWithSameBSNMap.size() == 0) {
+ System.out.println("There are no clashes");
+ return;
+ }
+ Set<Bundle> apiBundles = wabClassLoaderDelegateHook.getApiBundles();
+ handleClashes(apiBundles, bundlesWithSameBSNMap, API_BUNDLE_TYPE);
+ Set<Bundle> implBundles = wabClassLoaderDelegateHook.getImplBundles();
+ handleClashes(implBundles, bundlesWithSameBSNMap, IMPL_BUNDLE_TYPE);
+ }
+
+ private void handleClashes(Set<Bundle> bundles, Map<String, List<Bundle>> bundlesWithSameBSNMap, String type) {
+ System.out.println("Clashing " + type + "s:");
+ System.out.println();
+ for (Bundle bundle : bundles) {
+ List<Bundle> bundlesWithSameBSN = bundlesWithSameBSNMap.get(bundle.getSymbolicName());
+ if (bundlesWithSameBSN.size() > 1) {
+ printClashing(bundlesWithSameBSN, bundle);
+ }
+ }
+ }
+
+ private void printClashing(List<Bundle> bundlesWithSameBSN, Bundle chosenBundle) {
+ System.out.println("Clashing bundles for BSN " + chosenBundle.getSymbolicName() + ":");
+ for (Bundle bundle : bundlesWithSameBSN) {
+ System.out.println(bundle.getSymbolicName() + "_" + bundle.getVersion());
+ }
+ System.out.println();
+ System.out.println("Chosen bundle: " + chosenBundle.getSymbolicName() + "_" + chosenBundle.getVersion());
+ }
+
+ public void bindCustomizer(WebAppBundleClassloaderCustomizer customizer) {
+ this.webAppBundleTrackerCustomizer = customizer.getWebAppBundleTrackerCustomizer();
+ this.wabClassLoaderDelegateHook = customizer.getWebAppBundleClassLoaderDelegateHook();
+ }
+
+ public void unbindCustomizer(WebAppBundleClassloaderCustomizer customizer) {
+ synchronized (monitor) {
+ this.wabClassLoaderDelegateHook = null;
+ this.webAppBundleTrackerCustomizer = null;
+ }
+ }
+
+}
View
10 .../WebAppBundleClassLoaderDelegateHook.java → .../WebAppBundleClassLoaderDelegateHook.java
@@ -1,5 +1,5 @@
-package org.eclipse.virgo.web.enterprise.services.accessor.internal.loader;
+package org.eclipse.virgo.web.enterprise.services.accessor;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -255,4 +255,12 @@ private ClassLoader getBundleClassloader(Bundle bundle) {
}
}
+ Set<Bundle> getApiBundles() {
+ return apiBundles;
+ }
+
+ Set<Bundle> getImplBundles() {
+ return implBundles;
+ }
+
}
View
21 ...er/WebAppBundleClassloaderCustomizer.java → ...or/WebAppBundleClassloaderCustomizer.java
@@ -1,5 +1,5 @@
-package org.eclipse.virgo.web.enterprise.services.accessor.internal.loader;
+package org.eclipse.virgo.web.enterprise.services.accessor;
import java.lang.instrument.ClassFileTransformer;
import java.security.AccessController;
@@ -43,6 +43,8 @@ public ClassLoader createThrowawayClassLoader(Bundle bundle) {
LOGGER.debug("Extending web application bundle " + bundle);
}
+ this.webAppBundleCustomizer.processAdditionalAPIBundles(this.bundleTracker.getBundles());
+
// TODO when we will remove the bundle?
this.wabClassLoaderDelegateHook.addWebAppBundle(bundle);
@@ -54,8 +56,7 @@ public ClassLoader createThrowawayClassLoader(Bundle bundle) {
}
});
}
-
- //TODO: reconsider exposing JarScannerCustomizer
+
protected final void activate(ComponentContext componentContext) {
this.bundleTracker = new BundleTracker<String>(componentContext.getBundleContext(), Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE,
this.webAppBundleCustomizer);
@@ -68,11 +69,19 @@ protected final void deactivate(ComponentContext componentContext) {
PluggableDelegatingClassLoaderDelegateHook.getInstance().removeDelegate(this.wabClassLoaderDelegateHook);
this.bundleTracker.close();
- }
- @Override
+ }
+
+ @Override
public JarScanner[] extendJarScannerChain(Bundle arg0) {
return new JarScanner[] { new ClassLoaderJarScanner(webAppBundleCustomizer.getBundlesForJarScanner()) };
}
-
+
+ WebAppBundleClassLoaderDelegateHook getWebAppBundleClassLoaderDelegateHook() {
+ return this.wabClassLoaderDelegateHook;
+ }
+
+ WebAppBundleTrackerCustomizer getWebAppBundleTrackerCustomizer() {
+ return this.webAppBundleCustomizer;
+ }
}
View
300 ...ava/org/eclipse/virgo/web/enterprise/services/accessor/WebAppBundleTrackerCustomizer.java
@@ -0,0 +1,300 @@
+
+package org.eclipse.virgo.web.enterprise.services.accessor;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.virgo.util.osgi.manifest.VersionRange;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
+import org.osgi.util.tracker.BundleTrackerCustomizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class WebAppBundleTrackerCustomizer implements BundleTrackerCustomizer<String> {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(WebAppBundleTrackerCustomizer.class);
+
+ static final String API_BUNDLES = "api.bundles";
+
+ static final String IMPL_BUNDLES = "impl.bundles";
+
+ private static final String COMMA_SEPARATOR = ",";
+
+ private static final String SEMICOLON_SEPARATOR = ";";
+
+ private static final String VERSION_SEPARATOR = "=";
+
+ static final String HEADER_EXPOSED_CONTENT_TYPE = "Exposed-ContentType";
+
+ static final String HEADER_EXPOSED_CONTENT_TYPE_API_VALUE = "API";
+
+ static final String HEADER_EXPOSED_CONTENT_TYPE_IMPL_VALUE = "Implementation";
+
+ static final String HEADER_EXPOSE_ADDITIONAL_API = "Expose-AdditionalAPI";
+
+ private static final char INCLUSIVE_UPPER = ']';
+
+ private static final char EXCLUSIVE_UPPER = ')';
+
+ private final WebAppBundleClassLoaderDelegateHook wabClassLoaderDelegateHook;
+
+ private final Map<String, VersionRange> exposeAdditionalApiBundles = new HashMap<String, VersionRange>();
+
+ private Map<String, List<Bundle>> bundlesWithSameBSNMap;
+
+ private boolean initialized = false;
+
+ // TODO May be it will be good if we configure which bundles to be scanned
+ private static final List<String> bundleNamesForJarScanner = Arrays.asList(new String[] {"com.springsource.javax.servlet.jsp.jstl", "org.glassfish.com.sun.faces"});
+
+ private final Set<Bundle> bundlesForJarScanner = new HashSet<Bundle>();
+
+ /**
+ * @deprecated Expose-AdditionalAPI header should be used instead of this
+ */
+ @Deprecated
+ private final Map<String, VersionRange> apiBundles;
+
+ /**
+ * @deprecated Not supported any more
+ */
+ @Deprecated
+ private final Map<String, VersionRange> implBundles;
+
+ public WebAppBundleTrackerCustomizer(WebAppBundleClassLoaderDelegateHook wabClassLoaderDelegateHook) {
+ this.wabClassLoaderDelegateHook = wabClassLoaderDelegateHook;
+ this.apiBundles = Collections.unmodifiableMap(getBundles(System.getProperty(API_BUNDLES)));
+ this.implBundles = Collections.unmodifiableMap(getBundles(System.getProperty(IMPL_BUNDLES)));
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Predefined api bundles added to the tracker " + this.apiBundles);
+ LOGGER.debug("Predefined impl bundles added to the tracker " + this.implBundles);
+ }
+ }
+
+ @Override
+ public String addingBundle(Bundle bundle, BundleEvent event) {
+ if(bundleNamesForJarScanner.contains(bundle.getSymbolicName())) {
+ bundlesForJarScanner.add(bundle);
+ }
+
+ if (isApiBundle(bundle)) {
+ this.wabClassLoaderDelegateHook.addApiBundle(bundle);
+ } else if (isImplBundle(bundle)) {
+ this.wabClassLoaderDelegateHook.addImplBundle(bundle);
+ }
+
+ processExposeAdditionalAPIHeader(bundle);
+
+ return bundle.getSymbolicName();
+ }
+
+ @Override
+ public void modifiedBundle(Bundle bundle, BundleEvent event, String symbolicName) {
+ // no-op
+ }
+
+ @Override
+ public void removedBundle(Bundle bundle, BundleEvent event, String symbolicName) {
+ this.wabClassLoaderDelegateHook.removeApiBundle(bundle);
+ this.wabClassLoaderDelegateHook.removeImplBundle(bundle);
+ bundlesForJarScanner.remove(bundle);
+ }
+
+ // TODO more fine tuned synchronization needed
+ synchronized void processAdditionalAPIBundles(Bundle[] allBundles) {
+ if (allBundles == null || allBundles.length == 0 || this.exposeAdditionalApiBundles == null || this.exposeAdditionalApiBundles.size() == 0) {
+ return;
+ }
+
+ if (!this.initialized) {
+ this.bundlesWithSameBSNMap = getBundleMap(allBundles);
+ Set<String> keys = this.exposeAdditionalApiBundles.keySet();
+ for (String key : keys) {
+ List<Bundle> bundlesWithSameBSN = this.bundlesWithSameBSNMap.get(key);
+ if (bundlesWithSameBSN == null || bundlesWithSameBSN.size() == 0) {
+ if (LOGGER.isErrorEnabled()) {
+ LOGGER.error("Bundle with symbolic name [" + key + "] is marked as additional API."
+ + "Such bundle is not installed on the system and cannot be added to the application classloader."
+ + "This may cause a severe problem during runtime.");
+ }
+ } else {
+ Bundle apiBundle = null;
+ for (int i = 0; i < bundlesWithSameBSN.size(); i++) {
+ VersionRange range = this.exposeAdditionalApiBundles.get(key);
+ Bundle bundle = bundlesWithSameBSN.get(i);
+ if (!range.includes(bundle.getVersion())) {
+ continue;
+ }
+
+ if (apiBundle == null || apiBundle.getVersion().compareTo(bundle.getVersion()) < 0) {
+ apiBundle = bundle;
+ }
+ }
+ if (apiBundle != null) {
+ this.wabClassLoaderDelegateHook.addApiBundle(apiBundle);
+ }
+ }
+ }
+ this.initialized = true;
+ }
+ }
+
+ Map<String, List<Bundle>> getBundlesWithSameBSNMap() {
+ return this.bundlesWithSameBSNMap;
+ }
+
+ Map<String, VersionRange> getExposeAdditionalApiBundles() {
+ return this.exposeAdditionalApiBundles;
+ }
+
+ private Map<String, List<Bundle>> getBundleMap(Bundle[] allBundles) {
+ Map<String, List<Bundle>> result = new HashMap<String, List<Bundle>>();
+ for (Bundle bundle : allBundles) {
+ String bsn = bundle.getSymbolicName();
+ List<Bundle> bundlesWithSameBSN = result.get(bsn);
+ if (bundlesWithSameBSN == null) {
+ bundlesWithSameBSN = new ArrayList<Bundle>();
+ }
+ bundlesWithSameBSN.add(bundle);
+ result.put(bsn, bundlesWithSameBSN);
+ }
+ return result;
+ }
+
+ private boolean isApiBundle(Bundle bundle) {
+ String headerValue = getHeaderValue(bundle, HEADER_EXPOSED_CONTENT_TYPE);
+ if (HEADER_EXPOSED_CONTENT_TYPE_API_VALUE.equals(headerValue)) {
+ return true;
+ }
+
+ VersionRange versionRange = this.apiBundles.get(bundle.getSymbolicName());
+ if (versionRange != null && versionRange.includes(bundle.getVersion())) {
+ return true;
+ }
+
+ return false;
+ }
+
+ private boolean isImplBundle(Bundle bundle) {
+ String headerValue = getHeaderValue(bundle, HEADER_EXPOSED_CONTENT_TYPE);
+ if (HEADER_EXPOSED_CONTENT_TYPE_IMPL_VALUE.equals(headerValue)) {
+ return true;
+ }
+
+ VersionRange versionRange = this.implBundles.get(bundle.getSymbolicName());
+ if (versionRange != null && versionRange.includes(bundle.getVersion())) {
+ return true;
+ }
+
+ return false;
+ }
+
+ // TODO more fine tuned synchronization needed
+ private synchronized void processExposeAdditionalAPIHeader(Bundle bundle) {
+ String headerValue = getHeaderValue(bundle, HEADER_EXPOSE_ADDITIONAL_API);
+ if (headerValue != null && !headerValue.equals("")) {
+ Map<String, VersionRange> additionalApiBundles = getBundles(headerValue);
+ if (additionalApiBundles != null) {
+ Set<String> keys = additionalApiBundles.keySet();
+ for (String key : keys) {
+ VersionRange oldVersionRange = this.exposeAdditionalApiBundles.get(key);
+ VersionRange newVersionRange = additionalApiBundles.get(key);
+ if (oldVersionRange != null) {
+ this.exposeAdditionalApiBundles.put(key, VersionRange.intersection(oldVersionRange, newVersionRange));
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Expose additional API bundle with BSN [" + key + "] and merge old version [" + oldVersionRange
+ + "] with the new one [" + newVersionRange + "]");
+ }
+ } else {
+ this.exposeAdditionalApiBundles.put(key, additionalApiBundles.get(key));
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Expose additional API bundle with BSN [" + key + "] and version [" + newVersionRange + "].");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * The format of the property is BSN;bundle-version=Version|RANGE,BSN;bundle-version=Version|RANGE,... Where BSN
+ * stands for bundle symbolic name.
+ *
+ * @param property
+ * @return
+ */
+ private Map<String, VersionRange> getBundles(String property) {
+ Map<String, VersionRange> bundles = new HashMap<String, VersionRange>();
+
+ if (property != null) {
+ final List<String> bundleNames = parse(property);
+ if (bundleNames.size() > 0) {
+ for (String bundleName : bundleNames) {
+ final String[] parts = bundleName.split(SEMICOLON_SEPARATOR);
+ if (parts == null || parts.length != 2) {
+ continue;
+ }
+
+ final String symbolicName = parts[0];
+
+ final String[] versionParts = parts[1].split(VERSION_SEPARATOR);
+
+ if (versionParts == null || versionParts.length != 2) {
+ continue;
+ }
+
+ final VersionRange bundleVersion = new VersionRange(versionParts[1]);
+
+ bundles.put(symbolicName, bundleVersion);
+ }
+ }
+ }
+
+ return bundles;
+ }
+
+ private List<String> parse(String property) {
+ List<String> result = new ArrayList<String>();
+ int ind = property.indexOf(COMMA_SEPARATOR);
+ if (ind >= 0) {
+ int nextComma = property.indexOf(COMMA_SEPARATOR, ind + 1);
+ if (nextComma >= 0) {
+ char prevChar = property.charAt(nextComma - 1);
+ if (prevChar == EXCLUSIVE_UPPER || prevChar == INCLUSIVE_UPPER) {
+ result.add(property.substring(0, nextComma).trim());
+ result.addAll(parse(property.substring(nextComma + 1)));
+ } else {
+ result.add(property.substring(0, ind).trim());
+ result.addAll(parse(property.substring(ind + 1)));
+ }
+ } else {
+ int lastIndex = property.charAt(property.length() - 1);
+ if (lastIndex == EXCLUSIVE_UPPER || lastIndex == INCLUSIVE_UPPER) {
+ result.add(property.trim());
+ } else {
+ result.add(property.substring(0, ind).trim());
+ result.add(property.substring(ind + 1).trim());
+ }
+ }
+ } else {
+ result.add(property);
+ }
+ return result;
+ }
+
+ private String getHeaderValue(Bundle bundle, String headerName) {
+ return bundle.getHeaders().get(headerName);
+ }
+
+ Set<Bundle> getBundlesForJarScanner() {
+ return bundlesForJarScanner;
+ }
+
+}
View
153 ...virgo/web/enterprise/services/accessor/internal/loader/WebAppBundleTrackerCustomizer.java
@@ -1,153 +0,0 @@
-
-package org.eclipse.virgo.web.enterprise.services.accessor.internal.loader;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleEvent;
-import org.osgi.util.tracker.BundleTrackerCustomizer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class WebAppBundleTrackerCustomizer implements BundleTrackerCustomizer<String> {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(WebAppBundleTrackerCustomizer.class);
-
- private static final String API_BUNDLES = "api.bundles";
-
- private static final String IMPL_BUNDLES = "impl.bundles";
-
- private static final String COMMA_SEPARATOR = ",";
-
- private static final String SEMICOLON_SEPARATOR = ";";
-
- private static final String VERSION_SEPARATOR = "=";
-
- private static final String HEADER_EXPOSED_CONTENT_TYPE = "Exposed-ContentType";
-
- private static final String HEADER_EXPOSED_CONTENT_TYPE_API_VALUE = "API";
-
- private static final String HEADER_EXPOSED_CONTENT_TYPE_IMPL_VALUE = "Implementation";
-
- // TODO May be it will be good if we configure which bundles to be scanned
- private static final List<String> bundleNamesForJarScanner = Arrays.asList(new String[] {"com.springsource.javax.servlet.jsp.jstl", "org.glassfish.com.sun.faces"});
-
- private final WebAppBundleClassLoaderDelegateHook wabClassLoaderDelegateHook;
-
- private final Map<String, String> apiBundles;
-
- private final Map<String, String> implBundles;
-
- private final Set<Bundle> bundlesForJarScanner = new HashSet<Bundle>();
-
- public WebAppBundleTrackerCustomizer(WebAppBundleClassLoaderDelegateHook wabClassLoaderDelegateHook) {
- this.wabClassLoaderDelegateHook = wabClassLoaderDelegateHook;
- this.apiBundles = Collections.unmodifiableMap(getBundles(System.getProperty(API_BUNDLES)));
- this.implBundles = Collections.unmodifiableMap(getBundles(System.getProperty(IMPL_BUNDLES)));
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Predefined api bundles added to the tracker " + this.apiBundles);
- LOGGER.debug("Predefined impl bundles added to the tracker " + this.implBundles);
- }
- }
-
- @Override
- public String addingBundle(Bundle bundle, BundleEvent event) {
- if(bundleNamesForJarScanner.contains(bundle.getSymbolicName())) {
- bundlesForJarScanner.add(bundle);
- }
-
- if (isApiBundle(bundle)) {
- this.wabClassLoaderDelegateHook.addApiBundle(bundle);
- } else if (isImplBundle(bundle)) {
- this.wabClassLoaderDelegateHook.addImplBundle(bundle);
- }
- return bundle.getSymbolicName();
- }
-
- @Override
- public void modifiedBundle(Bundle bundle, BundleEvent event, String symbolicName) {
- // no-op
- }
-
- @Override
- public void removedBundle(Bundle bundle, BundleEvent event, String symbolicName) {
- if (isApiBundle(bundle)) {
- this.wabClassLoaderDelegateHook.removeApiBundle(bundle);
- bundlesForJarScanner.remove(bundle);
- } else if (isImplBundle(bundle)) {
- this.wabClassLoaderDelegateHook.removeImplBundle(bundle);
- bundlesForJarScanner.remove(bundle);
- }
- }
-
- private boolean isApiBundle(Bundle bundle) {
- String headerValue = getHeaderValue(bundle, HEADER_EXPOSED_CONTENT_TYPE);
- if (HEADER_EXPOSED_CONTENT_TYPE_API_VALUE.equals(headerValue)) {
- return true;
- }
-
- if (bundle.getVersion().toString().equals(this.apiBundles.get(bundle.getSymbolicName()))) {
- return true;
- }
-
- return false;
- }
-
- private boolean isImplBundle(Bundle bundle) {
- String headerValue = getHeaderValue(bundle, HEADER_EXPOSED_CONTENT_TYPE);
- if (HEADER_EXPOSED_CONTENT_TYPE_IMPL_VALUE.equals(headerValue)) {
- return true;
- }
-
- if (bundle.getVersion().toString().equals(this.implBundles.get(bundle.getSymbolicName()))) {
- return true;
- }
-
- return false;
- }
-
- private Map<String, String> getBundles(String property) {
- Map<String, String> bundles = new HashMap<String, String>();
-
- if (property != null) {
- final String[] bundleNames = property.split(COMMA_SEPARATOR);
- if (bundleNames != null && bundleNames.length > 0) {
- for (String bundleName : bundleNames) {
- final String[] parts = bundleName.split(SEMICOLON_SEPARATOR);
- if (parts == null || parts.length != 2) {
- continue;
- }
-
- final String symbolicName = parts[0];
-
- final String[] versionParts = parts[1].split(VERSION_SEPARATOR);
-
- if (versionParts == null || versionParts.length != 2) {
- continue;
- }
-
- final String bundleVersion = versionParts[1];
-
- bundles.put(symbolicName, bundleVersion);
- }
- }
- }
-
- return bundles;
- }
-
- private String getHeaderValue(Bundle bundle, String headerName) {
- return bundle.getHeaders().get(headerName);
- }
-
- Set<Bundle> getBundlesForJarScanner() {
- return bundlesForJarScanner;
- }
-
-}
View
5 org.eclipse.virgo.web.enterprise.services.accessor/src/main/resources/OSGI-INF/command.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="services_accessor_command">
+ <implementation class="org.eclipse.virgo.web.enterprise.services.accessor.ServicesAccessorCommandProvider"/>
+ <reference bind="bindCustomizer" cardinality="1..1" interface="org.eclipse.gemini.web.tomcat.spi.ClassLoaderCustomizer" name="WABClassLoaderCustomizer" policy="static" unbind="unbindCustomizer"/>
+</scr:component>
View
5 ...b.enterprise.services.accessor/src/main/resources/OSGI-INF/wab_classloader_customizer.xml
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="javaee_classloader_customizer">
- <implementation class="org.eclipse.virgo.web.enterprise.services.accessor.internal.loader.WebAppBundleClassloaderCustomizer"/>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="wab_classloader_customizer">
+ <implementation class="org.eclipse.virgo.web.enterprise.services.accessor.WebAppBundleClassloaderCustomizer"/>
<service>
<provide interface="org.eclipse.gemini.web.tomcat.spi.ClassLoaderCustomizer"/>
- <provide interface="org.eclipse.gemini.web.tomcat.spi.JarScannerCustomizer"/>
</service>
</scr:component>
View
113 ...g/eclipse/virgo/web/enterprise/services/accessor/ServicesAccessorCommandProviderTest.java
@@ -0,0 +1,113 @@
+
+package org.eclipse.virgo.web.enterprise.services.accessor;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.easymock.EasyMock;
+import org.junit.Assert;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Version;
+
+public class ServicesAccessorCommandProviderTest {
+
+ @Test
+ public void testListApi() {
+ testListBundles("api");
+ }
+
+ @Test
+ public void testListImpl() {
+ testListBundles("impl");
+ }
+
+ private void testListBundles(String type) {
+ Bundle bundle1 = prepareBundleMock(1, type + "1", "1.0.0", false, null, null);
+ Bundle bundle2 = prepareBundleMock(2, type + "2", "2.0.0", false, null, null);
+ Bundle bundle3 = prepareBundleMock(3, type + "3", "3.0.0", false, null, null);
+
+ EasyMock.replay(bundle1, bundle2, bundle3);
+
+ WebAppBundleClassloaderCustomizer classloaderCustomizer = new WebAppBundleClassloaderCustomizer();
+ WebAppBundleClassLoaderDelegateHook hook = classloaderCustomizer.getWebAppBundleClassLoaderDelegateHook();
+ Bundle[] bundles = new Bundle[] { bundle1, bundle2, bundle3 };
+ if ("api".equals(type)) {
+ for (Bundle bundle : bundles) {
+ hook.addApiBundle(bundle);
+ }
+ } else if ("impl".equals(type)) {
+ for (Bundle bundle : bundles) {
+ hook.addImplBundle(bundle);
+ }
+ }
+
+ TestSystemOut ci = new TestSystemOut();
+ System.setOut(ci);
+
+ ServicesAccessorCommandProvider cmdProvider = new ServicesAccessorCommandProvider();
+ cmdProvider.bindCustomizer(classloaderCustomizer);
+ cmdProvider.list_exposed_content("-" + type);
+
+ List<Object> output = ci.getOutput();
+ Assert.assertEquals(12, output.size());
+
+ Assert.assertEquals("Wrong bundle id of " + type + "1", Long.valueOf(1), output.get(3));
+ Assert.assertEquals("Wrong name/version of " + type + "1", type + "1_1.0.0", output.get(5));
+ Assert.assertEquals("Wrong bundle id of " + type + "2", Long.valueOf(2), output.get(6));
+ Assert.assertEquals("Wrong name/version of " + type + "2", type + "2_2.0.0", output.get(8));
+ Assert.assertEquals("Wrong bundle id of " + type + "3", Long.valueOf(3), output.get(9));
+ Assert.assertEquals("Wrong name/version of " + type + "3", type + "3_3.0.0", output.get(11));
+ }
+
+ @Test
+ public void testClashes() {
+ Bundle bundle1 = prepareBundleMock(1, "api", "1.0.0", true, null, null);
+ Bundle bundle2 = prepareBundleMock(2, "api", "2.0.0", true, null, null);
+ Bundle bundle3 = prepareBundleMock(3, "api", "3.0.0", true, null, null);
+ Bundle bundle = prepareBundleMock(4, "bundle", "1.0.0", true, "Expose-AdditionalAPI", "api;bundle-version=3.0.0");
+
+ EasyMock.replay(bundle1, bundle2, bundle3, bundle);
+
+ WebAppBundleClassloaderCustomizer classloaderCustomizer = new WebAppBundleClassloaderCustomizer();
+ WebAppBundleTrackerCustomizer trackerCustomizer = classloaderCustomizer.getWebAppBundleTrackerCustomizer();
+ Bundle[] bundles = new Bundle[] { bundle, bundle1, bundle2, bundle3 };
+ for (Bundle bun : bundles) {
+ trackerCustomizer.addingBundle(bun, null);
+ }
+ trackerCustomizer.processAdditionalAPIBundles(bundles);
+
+ TestSystemOut ci = new TestSystemOut();
+ System.setOut(ci);
+
+ ServicesAccessorCommandProvider cmdProvider = new ServicesAccessorCommandProvider();
+ cmdProvider.bindCustomizer(classloaderCustomizer);
+ cmdProvider.list_exposed_content("-clash");
+
+ List<Object> output = ci.getOutput();
+ Assert.assertEquals(7, output.size());
+ Assert.assertEquals("Clashing APIs:", output.get(0));
+ Assert.assertEquals("Clashing bundles for BSN api:", output.get(1));
+ Assert.assertEquals("api_1.0.0", output.get(2));
+ Assert.assertEquals("api_2.0.0", output.get(3));
+ Assert.assertEquals("api_3.0.0", output.get(4));
+ Assert.assertEquals("Chosen bundle: api_3.0.0", output.get(5));
+ Assert.assertEquals("Clashing Implementations:", output.get(6));
+ }
+
+ private Bundle prepareBundleMock(long bundleId, String bsn, String version, boolean isHeader, String headerName, String headerValue) {
+ Bundle bundle = EasyMock.createMock(Bundle.class);
+ if (isHeader) {
+ Dictionary<String, String> header = new Hashtable<String, String>();
+ if (headerName != null && headerValue != null) {
+ header.put(headerName, headerValue);
+ }
+ EasyMock.expect(bundle.getHeaders()).andReturn(header).anyTimes();
+ }
+ EasyMock.expect(bundle.getBundleId()).andReturn(bundleId);
+ EasyMock.expect(bundle.getSymbolicName()).andReturn(bsn).anyTimes();
+ EasyMock.expect(bundle.getVersion()).andReturn(new Version(version)).anyTimes();
+ return bundle;
+ }
+}
View
38 ...essor/src/test/java/org/eclipse/virgo/web/enterprise/services/accessor/TestSystemOut.java
@@ -0,0 +1,38 @@
+package org.eclipse.virgo.web.enterprise.services.accessor;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.io.PrintStream;
+
+public class TestSystemOut extends PrintStream {
+ private List<Object> output = new ArrayList<Object>();
+
+ public TestSystemOut () {
+ super(System.out);
+ }
+
+ @Override
+ public void print(String o) {
+ output.add(o);
+ }
+
+ @Override
+ public void print(long o) {
+ output.add(o);
+ }
+
+ @Override
+ public void println(String o) {
+ output.add(o);
+ }
+
+ @Override
+ public void println() {
+ //no-op
+ }
+
+ public List<Object> getOutput() {
+ return output;
+ }
+
+}
View
184 ...lipse/virgo/web/enterprise/services/accessor/WebAppBundleClassLoaderDelegateHookTest.java
@@ -0,0 +1,184 @@
+
+package org.eclipse.virgo.web.enterprise.services.accessor;
+
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+
+import org.eclipse.osgi.framework.adaptor.BundleClassLoader;
+import org.eclipse.osgi.framework.adaptor.BundleData;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+@SuppressWarnings("restriction")
+public class WebAppBundleClassLoaderDelegateHookTest {
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void testPostFindWithWAB() throws ClassNotFoundException, IOException {
+ BundleData bd = createMock(BundleData.class);
+ BundleClassLoader bcl = createMock(BundleClassLoader.class);
+ Bundle wab = createMock(Bundle.class);
+ Bundle apiBundle = createMock(Bundle.class);
+ expect(bd.getBundle()).andReturn(wab).anyTimes();
+ expect((Class<String>) apiBundle.loadClass("")).andReturn(String.class).andThrow(new ClassNotFoundException());
+ expect(apiBundle.getResource("")).andReturn(new URL("file:foo.txt")).andReturn(null);
+ List<URL> resources = new ArrayList<URL>();
+ resources.add(new URL("file:foo.txt"));
+ Enumeration<URL> enumeration = Collections.enumeration(resources);
+ expect(apiBundle.getResources("")).andReturn(enumeration).andReturn(null).andThrow(new IOException());
+
+ replay(bd, bcl, wab, apiBundle);
+
+ WebAppBundleClassLoaderDelegateHook webAppBundleClassLoaderDelegateHook = new WebAppBundleClassLoaderDelegateHook();
+ webAppBundleClassLoaderDelegateHook.addWebAppBundle(wab);
+
+ checkExpectations(webAppBundleClassLoaderDelegateHook, "", bcl, bd, new Object[] { null, null, null });
+
+ webAppBundleClassLoaderDelegateHook.addApiBundle(apiBundle);
+ checkExpectations(webAppBundleClassLoaderDelegateHook, "", bcl, bd, new Object[] { String.class, new URL("file:foo.txt"), enumeration });
+
+ checkExpectations(webAppBundleClassLoaderDelegateHook, "", bcl, bd, new Object[] { null, null, null });
+ assertEquals(null, webAppBundleClassLoaderDelegateHook.postFindResources("", bcl, bd));
+
+ verify(bd, bcl, wab, apiBundle);
+ }
+
+ @Test
+ public void testPostFindWithImplBundle() throws ClassNotFoundException, IOException {
+ BundleData bd = createMock(BundleData.class);
+ BundleClassLoader bcl = createMock(BundleClassLoader.class);
+ Bundle implBundle = createMock(Bundle.class);
+ expect(bd.getBundle()).andReturn(implBundle).anyTimes();
+
+ replay(bd, bcl, implBundle);
+
+ WebAppBundleClassLoaderDelegateHook webAppBundleClassLoaderDelegateHook = new WebAppBundleClassLoaderDelegateHook();
+ webAppBundleClassLoaderDelegateHook.addImplBundle(implBundle);
+
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(null);
+ checkExpectations(webAppBundleClassLoaderDelegateHook, "", bcl, bd, new Object[] { null, null, null });
+ } finally {
+ Thread.currentThread().setContextClassLoader(tccl);
+ }
+
+ tccl = Thread.currentThread().getContextClassLoader();
+ List<URL> resources = new ArrayList<URL>();
+ resources.add(new URL("file:foo.txt"));
+ final Enumeration<URL> enumeration = Collections.enumeration(resources);
+ try {
+ Thread.currentThread().setContextClassLoader(new ClassLoaderExt1(enumeration));
+ checkExpectations(webAppBundleClassLoaderDelegateHook, "", bcl, bd, new Object[] { String.class, new URL("file:foo.txt"), enumeration });
+ } finally {
+ Thread.currentThread().setContextClassLoader(tccl);
+ }
+
+ tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(new ClassLoaderExt2());
+ checkExpectations(webAppBundleClassLoaderDelegateHook, "", bcl, bd, new Object[] { null, null, null });
+ } finally {
+ Thread.currentThread().setContextClassLoader(tccl);
+ }
+
+ tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(new ClassLoaderExt3());
+ assertEquals(null, webAppBundleClassLoaderDelegateHook.postFindResources("", bcl, bd));
+ } finally {
+ Thread.currentThread().setContextClassLoader(tccl);
+ }
+
+ verify(bd, bcl, implBundle);
+ }
+
+ @Test
+ public void testPostFindNotWABNorImplBundle() throws ClassNotFoundException, IOException {
+ BundleData bd = createMock(BundleData.class);
+ BundleClassLoader bcl = createMock(BundleClassLoader.class);
+ Bundle wab = createMock(Bundle.class);
+ expect(bd.getBundle()).andReturn(wab).anyTimes();
+
+ replay(bd, bcl, wab);
+
+ WebAppBundleClassLoaderDelegateHook webAppBundleClassLoaderDelegateHook = new WebAppBundleClassLoaderDelegateHook();
+
+ checkExpectations(webAppBundleClassLoaderDelegateHook, "", bcl, bd, new Object[] { null, null, null });
+
+ verify(bd, bcl, wab);
+ }
+
+ private void checkExpectations(WebAppBundleClassLoaderDelegateHook webAppBundleClassLoaderDelegateHook, String name, BundleClassLoader bcl,
+ BundleData bd, Object[] expected) throws ClassNotFoundException, IOException {
+ assertEquals(expected[0], webAppBundleClassLoaderDelegateHook.postFindClass(name, bcl, bd));
+ assertEquals(expected[1], webAppBundleClassLoaderDelegateHook.postFindResource(name, bcl, bd));
+ assertEquals(expected[2], webAppBundleClassLoaderDelegateHook.postFindResources(name, bcl, bd));
+ }
+
+ private final class ClassLoaderExt1 extends ClassLoader {
+
+ private final Enumeration<URL> enumeration;
+
+ private ClassLoaderExt1(Enumeration<URL> enumeration) {
+ this.enumeration = enumeration;
+ }
+
+ @Override
+ public Class<?> loadClass(String name) throws ClassNotFoundException {
+ return String.class;
+ }
+
+ @Override
+ public URL getResource(String name) {
+ try {
+ return new URL("file:foo.txt");
+ } catch (MalformedURLException e) {
+ return null;
+ }
+ }
+
+ @Override
+ public Enumeration<URL> getResources(String name) throws IOException {
+ return this.enumeration;
+ }
+ }
+
+ private final class ClassLoaderExt2 extends ClassLoader {
+
+ @Override
+ public Class<?> loadClass(String name) throws ClassNotFoundException {
+ throw new ClassNotFoundException();
+ }
+
+ @Override
+ public URL getResource(String name) {
+ return null;
+ }
+
+ @Override
+ public Enumeration<URL> getResources(String name) throws IOException {
+ return null;
+ }
+ }
+
+ private final class ClassLoaderExt3 extends ClassLoader {
+
+ @Override
+ public Enumeration<URL> getResources(String name) throws IOException {
+ throw new IOException();
+ }
+ }
+
+}
View
92 ...eclipse/virgo/web/enterprise/services/accessor/WebAppBundleClassloaderCustomizerTest.java
@@ -0,0 +1,92 @@
+
+package org.eclipse.virgo.web.enterprise.services.accessor;
+
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.isA;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Field;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.service.component.ComponentContext;
+
+import org.eclipse.virgo.kernel.equinox.extensions.hooks.PluggableDelegatingClassLoaderDelegateHook;
+
+public class WebAppBundleClassloaderCustomizerTest {
+
+ @Test
+ public void testExtendClassLoaderChain() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+ ComponentContext ctx = createMock(ComponentContext.class);
+
+ BundleContext bundleContext = createMock(BundleContext.class);
+
+ Bundle apiBundle = createMock(Bundle.class);
+ Bundle implBundle = createMock(Bundle.class);
+ Bundle webBundle = createMock(Bundle.class);
+
+ Dictionary<String, String> apiHeaders = new Hashtable<String, String>();
+ apiHeaders.put(WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE, WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE_API_VALUE);
+ Dictionary<String, String> implHeaders = new Hashtable<String, String>();
+ implHeaders.put(WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE,
+ WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE_IMPL_VALUE);
+
+ expect(apiBundle.getHeaders()).andReturn(apiHeaders).anyTimes();
+ expect(implBundle.getHeaders()).andReturn(implHeaders).anyTimes();
+ expect(apiBundle.getState()).andReturn(Bundle.ACTIVE);
+ expect(implBundle.getState()).andReturn(Bundle.ACTIVE);
+ expect(apiBundle.getSymbolicName()).andReturn("api").anyTimes();
+ expect(implBundle.getSymbolicName()).andReturn("impl").anyTimes();
+ expect(ctx.getBundleContext()).andReturn(bundleContext);
+ expect(bundleContext.getBundles()).andReturn(new Bundle[] { apiBundle, implBundle });
+
+ bundleContext.addBundleListener(isA(SynchronousBundleListener.class));
+ expectLastCall();
+ bundleContext.removeBundleListener(isA(SynchronousBundleListener.class));
+ expectLastCall();
+
+ replay(ctx, bundleContext, apiBundle, implBundle);
+
+ Field field = PluggableDelegatingClassLoaderDelegateHook.getInstance().getClass().getDeclaredField("delegates");
+ field.setAccessible(true);
+
+ WebAppBundleClassloaderCustomizer webAppBundleClassloaderCustomizer = createWebAppBundleClassloaderCustomizer();
+
+ Field field2 = webAppBundleClassloaderCustomizer.getWebAppBundleClassLoaderDelegateHook().getClass().getDeclaredField("webAppBundles");
+ field2.setAccessible(true);
+
+ webAppBundleClassloaderCustomizer.activate(ctx);
+
+ assertTrue(webAppBundleClassloaderCustomizer.getWebAppBundleClassLoaderDelegateHook().getApiBundles().contains(apiBundle));
+ assertTrue(webAppBundleClassloaderCustomizer.getWebAppBundleClassLoaderDelegateHook().getImplBundles().contains(implBundle));
+ assertTrue(((List<ClassLoaderDelegateHook>) field.get(PluggableDelegatingClassLoaderDelegateHook.getInstance())).contains(webAppBundleClassloaderCustomizer.getWebAppBundleClassLoaderDelegateHook()));
+
+ assertTrue(webAppBundleClassloaderCustomizer.extendClassLoaderChain(webBundle).length == 0);
+ assertTrue(webAppBundleClassloaderCustomizer.getWebAppBundleTrackerCustomizer().getExposeAdditionalApiBundles().isEmpty());
+ assertTrue(((Set<Bundle>) field2.get(webAppBundleClassloaderCustomizer.getWebAppBundleClassLoaderDelegateHook())).contains(webBundle));
+
+ webAppBundleClassloaderCustomizer.deactivate(ctx);
+
+ assertTrue(webAppBundleClassloaderCustomizer.getWebAppBundleClassLoaderDelegateHook().getApiBundles().isEmpty());
+ assertTrue(webAppBundleClassloaderCustomizer.getWebAppBundleClassLoaderDelegateHook().getImplBundles().isEmpty());
+ assertTrue(((List<ClassLoaderDelegateHook>) field.get(PluggableDelegatingClassLoaderDelegateHook.getInstance())).isEmpty());
+
+ verify(ctx, bundleContext, apiBundle, implBundle);
+ }
+
+ private WebAppBundleClassloaderCustomizer createWebAppBundleClassloaderCustomizer() {
+ return new WebAppBundleClassloaderCustomizer();
+ }
+
+}
View
69 ...org/eclipse/virgo/web/enterprise/services/accessor/WebAppBundleTrackerCustomizerTest.java
@@ -0,0 +1,69 @@
+
+package org.eclipse.virgo.web.enterprise.services.accessor;
+
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Version;
+
+public class WebAppBundleTrackerCustomizerTest {
+
+ @Test
+ public void testAddingBundleRemovedBundle() {
+ System.setProperty(WebAppBundleTrackerCustomizer.API_BUNDLES,// NOSONAR
+ "test;bundle-version=[1.0,2.0),test1;bundle-version=1.0,test2,test3;1.0,test5;bundle-version=[1.0,1.0]");// NOSONAR
+ System.setProperty(WebAppBundleTrackerCustomizer.IMPL_BUNDLES, "test4;bundle-version=[1.0,2.0),test1;bundle-version=1.0,test2,test3;1.0");// NOSONAR
+
+ Dictionary<String, String> dictionary = new Hashtable<String, String>();
+
+ Bundle bundle1 = createMock(Bundle.class);
+ expect(bundle1.getHeaders()).andReturn(dictionary).anyTimes();
+ expect(bundle1.getSymbolicName()).andReturn("test").andReturn("test").andReturn("test4").andReturn("test4").andReturn("test").times(4).andReturn("test4").times(4);
+ expect(bundle1.getVersion()).andReturn(new Version("1.1.1")).andReturn(new Version("1.0"));
+
+ replay(bundle1);
+
+ WebAppBundleClassLoaderDelegateHook webAppBundleClassLoaderDelegateHook = new WebAppBundleClassLoaderDelegateHook();
+ WebAppBundleTrackerCustomizer webAppBundleTrackerCustomizer = createWebAppBundleTrackerCustomizer(webAppBundleClassLoaderDelegateHook);
+
+ dictionary.put(WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE, WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE_API_VALUE);
+ webAppBundleTrackerCustomizer.addingBundle(bundle1, null);
+ assertTrue(webAppBundleClassLoaderDelegateHook.getApiBundles().contains(bundle1));
+
+ dictionary.put(WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE,
+ WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE_IMPL_VALUE);
+ webAppBundleTrackerCustomizer.addingBundle(bundle1, null);
+ assertTrue(webAppBundleClassLoaderDelegateHook.getApiBundles().contains(bundle1));
+
+ dictionary.remove(WebAppBundleTrackerCustomizer.HEADER_EXPOSED_CONTENT_TYPE);
+
+ dictionary.put(WebAppBundleTrackerCustomizer.HEADER_EXPOSE_ADDITIONAL_API, "test;bundle-version=[1.0,2.0),test1;bundle-version=1.0");
+ webAppBundleTrackerCustomizer.addingBundle(bundle1, null);
+ assertTrue(webAppBundleClassLoaderDelegateHook.getImplBundles().contains(bundle1));
+
+ dictionary.put(WebAppBundleTrackerCustomizer.HEADER_EXPOSE_ADDITIONAL_API, "test;bundle-version=[1.2,1.5),test1;bundle-version=1.5");
+ webAppBundleTrackerCustomizer.addingBundle(bundle1, null);
+ assertTrue(webAppBundleClassLoaderDelegateHook.getImplBundles().contains(bundle1));
+
+ assertTrue(webAppBundleTrackerCustomizer.getExposeAdditionalApiBundles().get("test").toString().equals("[1.2.0, 1.5.0)"));
+ assertTrue(webAppBundleTrackerCustomizer.getExposeAdditionalApiBundles().get("test1").toString().equals("[1.5.0, oo)"));
+
+ webAppBundleTrackerCustomizer.removedBundle(bundle1, null, null);
+ assertTrue(!webAppBundleClassLoaderDelegateHook.getApiBundles().contains(bundle1));
+ assertTrue(!webAppBundleClassLoaderDelegateHook.getImplBundles().contains(bundle1));
+
+ verify(bundle1);
+ }
+
+ private WebAppBundleTrackerCustomizer createWebAppBundleTrackerCustomizer(WebAppBundleClassLoaderDelegateHook webAppBundleClassLoaderDelegateHook) {
+ return new WebAppBundleTrackerCustomizer(webAppBundleClassLoaderDelegateHook);
+ }
+}
View
16 org.eclipse.virgo.web.enterprise.services.accessor/template.mf
@@ -4,15 +4,21 @@ Bundle-Name: Virgo Web Enterprise Services Accessor
Bundle-SymbolicName: org.eclipse.virgo.web.enterprise.services.accessor
Bundle-Version: ${version}
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Service-Component: OSGI-INF/wab_classloader_customizer.xml
-Import-Template: javax.servlet;version="0",
- org.apache.tomcat;version="${org.apache.tomcat.api:[=.=.=, +1)}",
- org.eclipse.virgo.kernel.equinox.extensions.hooks;version="${org.eclipse.virgo.kernel:[=.=.=, +1)}",
+Service-Component: OSGI-INF/wab_classloader_customizer.xml, OSGI-INF/command.xml
+Import-Template: org.eclipse.virgo.kernel.equinox.extensions.hooks;version="0",
+ org.apache.catalina;version="0",
+ org.apache.catalina.deploy;version="0",
+ org.apache.naming;version="0",
+ org.apache.naming.factory;version="0",
+ org.apache.tomcat;version="0",
org.eclipse.gemini.web.tomcat.spi;version="0",
org.eclipse.osgi.*;version="0",
+ org.eclipse.virgo.util.osgi.manifest;version="0",
org.osgi.framework;version="0",
org.osgi.service.component;version="0",
org.osgi.util.tracker;version="0",
- org.slf4j;version="0"
+ javax.servlet;version="0",
+ org.slf4j;version="0",
+ org.apache.felix.service.command;version="0";status=provisional;mandatory:=status
Excluded-Exports:
*
View
7 org.eclipse.virgo.web.test/.classpath
@@ -31,14 +31,13 @@
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.6.0.D-20121003030708/org.eclipse.virgo.test.framework-3.6.0.D-20121003030708.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.6.0.D-20121003030708/org.eclipse.virgo.test.framework-sources-3.6.0.D-20121003030708.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20121003030151/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20121003030151.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.equinox.extensions/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.equinox.extensions-3.6.0.D-20121004185842.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.equinox.extensions/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.equinox.extensions-sources-3.6.0.D-20121004185842.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.tomcat/2.1.0.RELEASE/org.eclipse.gemini.web.tomcat-2.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.tomcat/2.1.0.RELEASE/org.eclipse.gemini.web.tomcat-sources-2.1.0.RELEASE.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.apache.catalina/com.springsource.org.apache.catalina/7.0.26/com.springsource.org.apache.catalina-7.0.26.jar" sourcepath="/IVY_CACHE/org.apache.catalina/com.springsource.org.apache.catalina/7.0.26/com.springsource.org.apache.catalina-sources-7.0.26.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.apache.coyote/com.springsource.org.apache.coyote/7.0.26/com.springsource.org.apache.coyote-7.0.26.jar" sourcepath="/IVY_CACHE/org.apache.coyote/com.springsource.org.apache.coyote/7.0.26/com.springsource.org.apache.coyote-sources-7.0.26.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.29.v201208221210/org.apache.catalina-7.0.29.v201208221210.jar" sourcepath="/IVY_CACHE/org.apache.catalina/com.springsource.org.apache.catalina/7.0.26/com.springsource.org.apache.catalina-sources-7.0.26.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.coyote/7.0.29.v201208230737/org.apache.coyote-7.0.29.v201208230737.jar" sourcepath="/IVY_CACHE/org.apache.coyote/com.springsource.org.apache.coyote/7.0.26/com.springsource.org.apache.coyote-sources-7.0.26.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar" sourcepath="/IVY_CACHE/javax.servlet/javax.servlet.jsp/2.2.0.v201103241009/javax.servlet.jsp-sources-2.2.0.v201103241009.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.jasper/7.0.29.v201208230737/org.apache.jasper-7.0.29.v201208230737.jar" sourcepath="/IVY_CACHE/org.apache.jasper/com.springsource.org.apache.jasper/7.0.26/com.springsource.org.apache.jasper-sources-7.0.26.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.2.0.BUILD-20120829065106/org.eclipse.gemini.web.core-2.2.0.BUILD-20120829065106.jar" sourcepath="/IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.1.0.RELEASE/org.eclipse.gemini.web.core-sources-2.1.0.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.core/3.1.0.RELEASE/org.springframework.core-3.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.core/3.1.0.RELEASE/org.springframework.core-sources-3.1.0.RELEASE.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.launcher/3.6.0.D-20121004185842/org.eclipse.virgo.test.launcher-3.6.0.D-20121004185842.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.launcher/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.launcher-sources-3.6.0.D-20121004185842.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.launcher/3.6.0.D-20121003030708/org.eclipse.virgo.test.launcher-3.6.0.D-20121003030708.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.launcher/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.launcher-sources-3.6.0.D-20121004185842.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20121003030151/org.eclipse.virgo.util.common-3.6.0.D-20121003030151.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.event/1.2.100.v20111010-1614/org.eclipse.equinox.event-1.2.100.v20111010-1614.jar" sourcepath="/IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-sources-1.0.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.model/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.model-3.6.0.D-20121004185842.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.model/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.model-sources-3.6.0.D-20121004185842.jar"/>
View
4 org.eclipse.virgo.web.tomcat.support/.classpath
@@ -26,7 +26,7 @@
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar" sourcepath="/IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.web.core"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20121003030151/org.eclipse.virgo.util.math-3.6.0.D-20121003030151.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.tomcat/2.1.0.RELEASE/org.eclipse.gemini.web.tomcat-2.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.tomcat/2.1.0.RELEASE/org.eclipse.gemini.web.tomcat-sources-2.1.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.tomcat/2.2.0.BUILD-20120829065106/org.eclipse.gemini.web.tomcat-2.2.0.BUILD-20120829065106.jar" sourcepath="/IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.tomcat/2.1.0.RELEASE/org.eclipse.gemini.web.tomcat-sources-2.1.0.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.osgi/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.osgi-3.6.0.D-20121004185842.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.osgi/3.6.0.D-20121004185842/org.eclipse.virgo.kernel.osgi-sources-3.6.0.D-20121004185842.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
@@ -35,6 +35,6 @@
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20121003030151/org.eclipse.virgo.util.io-3.6.0.D-20121003030151.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20121003030151/org.eclipse.virgo.util.io-sources-3.6.0.D-20121003030151.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20121003030924/org.eclipse.virgo.medic-3.6.0.D-20121003030924.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.1.0.M01/org.eclipse.virgo.medic-sources-3.1.0.M01.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.core/3.6.0.D-20121004185842/org.eclipse.virgo.nano.core-3.6.0.D-20121004185842.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.nano.core/3.6.0.D-20121004185842/org.eclipse.virgo.nano.core-sources-3.6.0.D-20121004185842.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.core/3.6.0.D-20121003031232/org.eclipse.virgo.nano.core-3.6.0.D-20121003031232.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.nano.core/3.6.0.D-20121004185842/org.eclipse.virgo.nano.core-sources-3.6.0.D-20121004185842.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
View
26 org.eclipse.virgo.web.war.deployer/.classpath
@@ -21,18 +21,18 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20121003030151/org.eclipse.virgo.util.io-3.6.0.D-20121003030151.jar" sourcepath="/NANO_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.1.0.D-20111205151812/org.eclipse.virgo.util.io-sources-3.1.0.D-20111205151812.jar"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.1.v20120830-144521/org.eclipse.osgi-3.8.1.v20120830-144521.jar" sourcepath="/NANO_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20121003030924/org.eclipse.virgo.medic-3.6.0.D-20121003030924.jar" sourcepath="/NANO_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.1.0.D-20111205152504/org.eclipse.virgo.medic-sources-3.1.0.D-20111205152504.jar"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20121003030924/org.eclipse.virgo.medic.core-3.6.0.D-20121003030924.jar"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.2.0.BUILD-20120829065106/org.eclipse.gemini.web.core-2.2.0.BUILD-20120829065106.jar" sourcepath="/NANO_IVY_CACHE/org.eclipse.gemini.web/org.eclipse.gemini.web.core/2.1.0.BUILD-20120525195844/org.eclipse.gemini.web.core-sources-2.1.0.BUILD-20120525195844.jar"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.simpleconfigurator.manipulator/2.0.0.v20110808-1657/org.eclipse.equinox.simpleconfigurator.manipulator-2.0.0.v20110808-1657.jar"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.simpleconfigurator/1.0.300.v20110815-1744/org.eclipse.equinox.simpleconfigurator-1.0.300.v20110815-1744.jar" sourcepath="/NANO_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.simpleconfigurator/1.0.300.v20110815-1744/org.eclipse.equinox.simpleconfigurator-sources-1.0.300.v20110815-1744.jar"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/NANO_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20121003030151/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20121003030151.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.nano.deployer"/>
- <classpathentry kind="var" path="NANO_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/NANO_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.nano.core"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.nano.deployer.api"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.deployer.api/3.6.0.D-20121003031232/org.eclipse.virgo.nano.deployer.api-3.6.0.D-20121003031232.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.deployer.api/3.6.0.D-20121003031232/org.eclipse.virgo.nano.deployer.api-sources-3.6.0.D-20121003031232.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.2.0.BUILD-20120829065106/org.eclipse.gemini.web.core-2.2.0.BUILD-20120829065106.jar" sourcepath="/IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.1.0.RELEASE/org.eclipse.gemini.web.core-sources-2.1.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20121003030924/org.eclipse.virgo.medic.core-3.6.0.D-20121003030924.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20121003030924/org.eclipse.virgo.medic-3.6.0.D-20121003030924.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.1.0.M01/org.eclipse.virgo.medic-sources-3.1.0.M01.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.simpleconfigurator.manipulator/2.0.0.v20110808-1657/org.eclipse.equinox.simpleconfigurator.manipulator-2.0.0.v20110808-1657.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.simpleconfigurator/1.0.300.v20110815-1744/org.eclipse.equinox.simpleconfigurator-1.0.300.v20110815-1744.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.1.v20120830-144521/org.eclipse.osgi-3.8.1.v20120830-144521.jar" sourcepath="/IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20121003030151/org.eclipse.virgo.util.io-3.6.0.D-20121003030151.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20121003030151/org.eclipse.virgo.util.io-sources-3.6.0.D-20121003030151.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20121003030151/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20121003030151.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.deployer/3.6.0.D-20121003031232/org.eclipse.virgo.nano.deployer-3.6.0.D-20121003031232.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.core/3.6.0.D-20121003031232/org.eclipse.virgo.nano.core-3.6.0.D-20121003031232.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.nano.core/3.6.0.D-20121004185842/org.eclipse.virgo.nano.core-sources-3.6.0.D-20121004185842.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Please sign in to comment.
Something went wrong with that request. Please try again.