Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2010-05-11 08:15:08 -0400
committerGlyn Normington2010-05-11 08:15:08 -0400
commit5dfdbe75bdf1ba2476fe2e60e62e3454a3565de7 (patch)
tree5522099ce269769cdd39fe31fbe2d20afd416a1c /test-apps
parentb99bf75af622c030c6c9b479c1639925bd1ea872 (diff)
downloadorg.eclipse.virgo.kernel-5dfdbe75bdf1ba2476fe2e60e62e3454a3565de7.tar.gz
org.eclipse.virgo.kernel-5dfdbe75bdf1ba2476fe2e60e62e3454a3565de7.tar.xz
org.eclipse.virgo.kernel-5dfdbe75bdf1ba2476fe2e60e62e3454a3565de7.zip
initial checkin from dm Server kernel commit dffbc217a919cefba04886160ba820f2c6cf5f57 omitting build-kernel/bin/service
Diffstat (limited to 'test-apps')
-rw-r--r--test-apps/activator-tccl/build.properties6
-rw-r--r--test-apps/activator-tccl/build.xml9
-rw-r--r--test-apps/activator-tccl/ivy.xml22
-rw-r--r--test-apps/activator-tccl/src/main/java/eg/Activator.java40
-rw-r--r--test-apps/activator-tccl/src/main/resources/META-INF/MANIFEST.MF8
-rw-r--r--test-apps/bundle-activation-policy/README.TXT9
-rw-r--r--test-apps/bundle-activation-policy/build-par/build.xml14
-rw-r--r--test-apps/bundle-activation-policy/build.properties6
-rw-r--r--test-apps/bundle-activation-policy/bundle.activation.policy.module.a/build.xml9
-rw-r--r--test-apps/bundle-activation-policy/bundle.activation.policy.module.a/ivy.xml26
-rw-r--r--test-apps/bundle-activation-policy/bundle.activation.policy.module.a/src/main/java/a/UseBundleB.java24
-rw-r--r--test-apps/bundle-activation-policy/bundle.activation.policy.module.a/src/main/resources/META-INF/MANIFEST.MF5
-rw-r--r--test-apps/bundle-activation-policy/bundle.activation.policy.module.b/build.xml9
-rw-r--r--test-apps/bundle-activation-policy/bundle.activation.policy.module.b/ivy.xml25
-rw-r--r--test-apps/bundle-activation-policy/bundle.activation.policy.module.b/src/main/java/b/ClassInBundleB.java17
-rw-r--r--test-apps/bundle-activation-policy/bundle.activation.policy.module.b/src/main/resources/META-INF/MANIFEST.MF5
-rw-r--r--test-apps/bundle-update/class.load.after.update/README.TXT11
-rw-r--r--test-apps/bundle-update/class.load.after.update/build.properties6
-rw-r--r--test-apps/bundle-update/class.load.after.update/build.xml31
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.after/.classpath6
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.after/.project17
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.after/build.xml9
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.after/ivy.xml25
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/A.java16
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/B.java22
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/I.java17
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.after/src/main/resources/META-INF/MANIFEST.MF6
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.before/.classpath6
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.before/.project17
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.before/build.xml9
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.before/ivy.xml25
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.before/src/main/java/but/but/A.java16
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.before/src/main/java/but/but/B.java16
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.B.before/src/main/resources/META-INF/MANIFEST.MF6
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.C/.classpath8
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.C/.project17
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.C/build.xml9
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.C/ivy.xml26
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.C/src/main/java/but/c/C.java46
-rw-r--r--test-apps/bundle-update/class.load.after.update/but.C/src/main/resources/META-INF/MANIFEST.MF7
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/README.TXT9
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build-par/build.xml13
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build.properties6
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build.xml18
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/build.xml9
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/ivy.xml20
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/src/main/resources/META-INF/MANIFEST.MF6
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/build.xml9
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/ivy.xml20
-rw-r--r--test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/src/main/resources/META-INF/MANIFEST.MF6
-rw-r--r--test-apps/manual-context/build.properties6
-rw-r--r--test-apps/manual-context/build.xml9
-rw-r--r--test-apps/manual-context/ivy.xml28
-rw-r--r--test-apps/manual-context/src/main/java/eg/Activator.java28
-rw-r--r--test-apps/manual-context/src/main/java/eg/context.xml7
-rw-r--r--test-apps/manual-context/src/main/resources/META-INF/MANIFEST.MF8
-rw-r--r--test-apps/plan-deployment/build.properties6
-rw-r--r--test-apps/plan-deployment/simple.bundle.one/.classpath10
-rw-r--r--test-apps/plan-deployment/simple.bundle.one/.project17
-rw-r--r--test-apps/plan-deployment/simple.bundle.one/build.xml9
-rw-r--r--test-apps/plan-deployment/simple.bundle.one/ivy.xml22
-rw-r--r--test-apps/plan-deployment/simple.bundle.one/src/main/resources/META-INF/MANIFEST.MF4
-rw-r--r--test-apps/plan-deployment/simple.bundle.two/.classpath10
-rw-r--r--test-apps/plan-deployment/simple.bundle.two/.project17
-rw-r--r--test-apps/plan-deployment/simple.bundle.two/build.xml9
-rw-r--r--test-apps/plan-deployment/simple.bundle.two/ivy.xml22
-rw-r--r--test-apps/plan-deployment/simple.bundle.two/src/main/resources/META-INF/MANIFEST.MF4
-rw-r--r--test-apps/quartz-scheduler/README.TXT21
-rw-r--r--test-apps/quartz-scheduler/build.properties7
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/.classpath14
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/.project17
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/build.xml9
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/ivy.xml31
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/src/main/java/quartz/bundle/a/Service.java28
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/src/main/java/quartz/bundle/a/internal/StandardService.java47
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/MANIFEST.MF7
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/spring/module-context.xml28
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/spring/osgi-context.xml12
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/.classpath14
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/.project17
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/build.xml9
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/ivy.xml31
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/src/main/java/quartz/bundle/b/Service.java28
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/src/main/java/quartz/bundle/b/internal/StandardService.java47
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/MANIFEST.MF7
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/spring/module-context.xml28
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/spring/osgi-context.xml12
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/.classpath14
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/.project15
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/build.xml9
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/ivy.xml31
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/src/main/java/quartz/bundle/same1/Service.java28
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/src/main/java/quartz/bundle/same1/internal/StandardService.java47
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/MANIFEST.MF7
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/spring/module-context.xml27
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/spring/osgi-context.xml12
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/.classpath14
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/.project15
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/build.xml9
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/ivy.xml31
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/src/main/java/quartz/bundle/same2/Service.java28
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/src/main/java/quartz/bundle/same2/internal/StandardService.java47
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/MANIFEST.MF7
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/spring/module-context.xml27
-rw-r--r--test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/spring/osgi-context.xml12
-rw-r--r--test-apps/redeploy-refresh/README.TXT11
-rw-r--r--test-apps/redeploy-refresh/build.properties6
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.bad/.classpath10
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.bad/.project17
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.bad/build.xml9
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.bad/ivy.xml22
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.bad/src/main/resources/META-INF/MANIFEST.MF6
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.ok/.classpath10
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.ok/.project17
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.ok/build.xml9
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.ok/ivy.xml22
-rw-r--r--test-apps/redeploy-refresh/simple.bundle.ok/src/main/resources/META-INF/MANIFEST.MF4
-rw-r--r--test-apps/refresh/README.TXT13
-rw-r--r--test-apps/refresh/refresh-import-bundle/.classpath10
-rw-r--r--test-apps/refresh/refresh-import-bundle/.project17
-rw-r--r--test-apps/refresh/refresh-import-bundle/build-par/build.xml16
-rw-r--r--test-apps/refresh/refresh-import-bundle/build.properties6
-rw-r--r--test-apps/refresh/refresh-import-bundle/exporter/build.xml7
-rw-r--r--test-apps/refresh/refresh-import-bundle/exporter/ivy.xml22
-rw-r--r--test-apps/refresh/refresh-import-bundle/exporter/src/main/java/refresh/exporter/b1/B11.java17
-rw-r--r--test-apps/refresh/refresh-import-bundle/exporter/src/main/resources/META-INF/MANIFEST.MF8
-rw-r--r--test-apps/refresh/refresh-import-bundle/importer/build.xml10
-rw-r--r--test-apps/refresh/refresh-import-bundle/importer/ivy.xml24
-rw-r--r--test-apps/refresh/refresh-import-bundle/importer/src/main/java/org/eclipse/virgo/kernel/deployer/test/LoadableClasses.java20
-rw-r--r--test-apps/refresh/refresh-import-bundle/importer/src/main/java/refresh/importer/Importer.java53
-rw-r--r--test-apps/refresh/refresh-import-bundle/importer/src/main/resources/META-INF/MANIFEST.MF11
-rw-r--r--test-apps/refresh/refresh-import-bundle/importer/src/main/resources/META-INF/spring/importer-context.xml20
-rw-r--r--test-apps/refresh/refresh-import-bundle/src/main/resources/META-INF/MANIFEST.MF3
-rw-r--r--test-apps/refresh/refresh/build-par/build.xml37
-rw-r--r--test-apps/refresh/refresh/build.properties6
-rw-r--r--test-apps/refresh/refresh/exporter/build.xml9
-rw-r--r--test-apps/refresh/refresh/exporter/ivy.xml21
-rw-r--r--test-apps/refresh/refresh/exporter/src/main/java/refresh/exporter/b1/B11.java17
-rw-r--r--test-apps/refresh/refresh/exporter/src/main/resources/META-INF/MANIFEST.MF8
-rw-r--r--test-apps/refresh/refresh/exporter2/build.xml9
-rw-r--r--test-apps/refresh/refresh/exporter2/ivy.xml21
-rw-r--r--test-apps/refresh/refresh/exporter2/src/main/java/exporter/b1/B11.java17
-rw-r--r--test-apps/refresh/refresh/exporter2/src/main/java/exporter/b1/B12.java17
-rw-r--r--test-apps/refresh/refresh/exporter2/src/main/resources/META-INF/MANIFEST.MF8
-rw-r--r--test-apps/refresh/refresh/exporter3/build.xml9
-rw-r--r--test-apps/refresh/refresh/exporter3/ivy.xml21
-rw-r--r--test-apps/refresh/refresh/exporter3/src/main/java/exporter/b1/B11.java17
-rw-r--r--test-apps/refresh/refresh/exporter3/src/main/java/exporter/b1/B12.java17
-rw-r--r--test-apps/refresh/refresh/exporter3/src/main/java/exporter/b2/B21.java17
-rw-r--r--test-apps/refresh/refresh/exporter3/src/main/resources/META-INF/MANIFEST.MF8
-rw-r--r--test-apps/refresh/refresh/importer/build.xml9
-rw-r--r--test-apps/refresh/refresh/importer/ivy.xml25
-rw-r--r--test-apps/refresh/refresh/importer/src/main/java/org/eclipse/virgo/kernel/deployer/test/LoadableClasses.java20
-rw-r--r--test-apps/refresh/refresh/importer/src/main/java/refresh/importer/Importer.java53
-rw-r--r--test-apps/refresh/refresh/importer/src/main/resources/META-INF/MANIFEST.MF12
-rw-r--r--test-apps/refresh/refresh/importer/src/main/resources/META-INF/spring/importer-context.xml20
-rw-r--r--test-apps/service-publication-from-repo-bundles/README.TXT13
-rw-r--r--test-apps/service-publication-from-repo-bundles/build.properties6
-rw-r--r--test-apps/service-publication-from-repo-bundles/consumer/build.xml9
-rw-r--r--test-apps/service-publication-from-repo-bundles/consumer/ivy.xml22
-rw-r--r--test-apps/service-publication-from-repo-bundles/consumer/src/main/resources/META-INF/MANIFEST.MF4
-rw-r--r--test-apps/service-publication-from-repo-bundles/consumer/src/main/resources/META-INF/spring/app-context.xml15
-rw-r--r--test-apps/service-publication-from-repo-bundles/publisher/build.xml9
-rw-r--r--test-apps/service-publication-from-repo-bundles/publisher/ivy.xml22
-rw-r--r--test-apps/service-publication-from-repo-bundles/publisher/src/main/resources/META-INF/MANIFEST.MF4
-rw-r--r--test-apps/service-publication-from-repo-bundles/publisher/src/main/resources/META-INF/spring/app-context.xml16
-rw-r--r--test-apps/service-scoping-engine-1265/README.TXT9
-rw-r--r--test-apps/service-scoping-engine-1265/build-par/build.xml13
-rw-r--r--test-apps/service-scoping-engine-1265/build.properties6
-rw-r--r--test-apps/service-scoping-engine-1265/dependent/build.xml9
-rw-r--r--test-apps/service-scoping-engine-1265/dependent/ivy.xml22
-rw-r--r--test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/MANIFEST.MF5
-rw-r--r--test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/spring/bundle-context.xml13
-rw-r--r--test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/spring/osgi-context.xml16
-rw-r--r--test-apps/service-scoping-engine-1265/master/build.xml9
-rw-r--r--test-apps/service-scoping-engine-1265/master/ivy.xml22
-rw-r--r--test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/MANIFEST.MF5
-rw-r--r--test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/spring/bundle-context.xml26
-rw-r--r--test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/spring/osgi-context.xml22
-rw-r--r--test-apps/service-scoping-platform-183/README.TXT9
-rw-r--r--test-apps/service-scoping-platform-183/build-par/build.xml13
-rw-r--r--test-apps/service-scoping-platform-183/build.properties6
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.a/.classpath10
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.a/.project17
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.a/build.xml9
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.a/ivy.xml22
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.a/src/main/resources/META-INF/MANIFEST.MF3
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.a/src/main/resources/META-INF/spring/module.xml11
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.b/.classpath10
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.b/.project17
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.b/build.xml9
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.b/ivy.xml22
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.b/src/main/resources/META-INF/MANIFEST.MF3
-rw-r--r--test-apps/service-scoping-platform-183/scoping.service.module.b/src/main/resources/META-INF/spring/module.xml18
-rw-r--r--test-apps/service-scoping/README.TXT13
-rw-r--r--test-apps/service-scoping/build-par/build.xml13
-rw-r--r--test-apps/service-scoping/build.properties6
-rw-r--r--test-apps/service-scoping/scoping.service.global/.classpath10
-rw-r--r--test-apps/service-scoping/scoping.service.global/.project17
-rw-r--r--test-apps/service-scoping/scoping.service.global/build.xml9
-rw-r--r--test-apps/service-scoping/scoping.service.global/ivy.xml23
-rw-r--r--test-apps/service-scoping/scoping.service.global/src/main/resources/META-INF/MANIFEST.MF3
-rw-r--r--test-apps/service-scoping/scoping.service.global/src/main/resources/META-INF/spring/module.xml14
-rw-r--r--test-apps/service-scoping/scoping.service.module.a/.classpath10
-rw-r--r--test-apps/service-scoping/scoping.service.module.a/.project17
-rw-r--r--test-apps/service-scoping/scoping.service.module.a/build.xml9
-rw-r--r--test-apps/service-scoping/scoping.service.module.a/ivy.xml25
-rw-r--r--test-apps/service-scoping/scoping.service.module.a/src/main/resources/META-INF/MANIFEST.MF3
-rw-r--r--test-apps/service-scoping/scoping.service.module.a/src/main/resources/META-INF/spring/module.xml13
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/.classpath11
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/.project17
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/build.xml9
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/ivy.xml26
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/Activator.java40
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/Listener.java48
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/ListenerMBean.java20
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/src/main/resources/META-INF/MANIFEST.MF5
-rw-r--r--test-apps/service-scoping/scoping.service.module.b/src/main/resources/META-INF/spring/module.xml44
-rw-r--r--test-apps/spring-2.5.6.A-sample/.classpath12
-rw-r--r--test-apps/spring-2.5.6.A-sample/.project30
-rw-r--r--test-apps/spring-2.5.6.A-sample/.springBeans13
-rw-r--r--test-apps/spring-2.5.6.A-sample/build.properties6
-rw-r--r--test-apps/spring-2.5.6.A-sample/build.xml7
-rw-r--r--test-apps/spring-2.5.6.A-sample/ivy.xml22
-rw-r--r--test-apps/spring-2.5.6.A-sample/src/main/java/spring/sample/SampleBean.java46
-rw-r--r--test-apps/spring-2.5.6.A-sample/src/main/resources/META-INF/MANIFEST.MF8
-rw-r--r--test-apps/spring-2.5.6.A-sample/src/main/resources/META-INF/spring/applicationContext.xml9
227 files changed, 3566 insertions, 0 deletions
diff --git a/test-apps/activator-tccl/build.properties b/test-apps/activator-tccl/build.properties
new file mode 100644
index 00000000..0a1bca3f
--- /dev/null
+++ b/test-apps/activator-tccl/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../ivy-cache
+integration.repo.dir=${basedir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/activator-tccl/build.xml b/test-apps/activator-tccl/build.xml
new file mode 100644
index 00000000..6a8872c3
--- /dev/null
+++ b/test-apps/activator-tccl/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="activator-tccl">
+
+ <property file="${basedir}/build.properties"/>
+ <property file="${basedir}/../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/activator-tccl.jar"/>
+ <import file="${basedir}/../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/activator-tccl/ivy.xml b/test-apps/activator-tccl/ivy.xml
new file mode 100644
index 00000000..6c53dbd4
--- /dev/null
+++ b/test-apps/activator-tccl/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="activator.tccl" module="${ant.project.name}"/>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ <dependency name='org.eclipse.osgi' rev='${org.eclipse.osgi}' org='org.eclipse.osgi' conf='compile->runtime'/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/activator-tccl/src/main/java/eg/Activator.java b/test-apps/activator-tccl/src/main/java/eg/Activator.java
new file mode 100644
index 00000000..3eb1d841
--- /dev/null
+++ b/test-apps/activator-tccl/src/main/java/eg/Activator.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package eg;
+
+import org.osgi.framework.*;
+import org.eclipse.osgi.framework.adaptor.BundleClassLoader;
+
+public class Activator implements BundleActivator {
+
+ public void start(BundleContext ctx) throws BundleException {
+ assertTccl("start", ctx.getBundle());
+ }
+
+ public void stop(BundleContext ctx) throws BundleException {
+ assertTccl("stop", ctx.getBundle());
+ }
+
+ private void assertTccl(String operation, Bundle expectedBundle) throws BundleException {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+
+ System.out.println("ClassLoader during " + operation + ": " + classLoader);
+
+ if (!(classLoader instanceof BundleClassLoader)) {
+ throw new BundleException("TCCL " + classLoader + " was not a BundleClassLoader");
+ }
+
+ if (!expectedBundle.equals(((BundleReference)classLoader).getBundle())) {
+ throw new BundleException("TCCL " + classLoader + " was not bundle class loader for this bundle");
+ }
+ }
+}
diff --git a/test-apps/activator-tccl/src/main/resources/META-INF/MANIFEST.MF b/test-apps/activator-tccl/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..21690dfa
--- /dev/null
+++ b/test-apps/activator-tccl/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: activator.tccl
+Bundle-Name: Bundle activator thread context class loader tests
+Import-Package: org.osgi.framework,
+ org.eclipse.osgi.framework.adaptor
+Bundle-Activator: eg.Activator
+
diff --git a/test-apps/bundle-activation-policy/README.TXT b/test-apps/bundle-activation-policy/README.TXT
new file mode 100644
index 00000000..82aa9e9d
--- /dev/null
+++ b/test-apps/bundle-activation-policy/README.TXT
@@ -0,0 +1,9 @@
+How to build
+------------
+
+Run ant jar build-par
+
+Output
+------
+
+com.springsource.kernel.test/com.springsource.kernel.deployer.test/src/test/resources/bundle-activation-policy.par
diff --git a/test-apps/bundle-activation-policy/build-par/build.xml b/test-apps/bundle-activation-policy/build-par/build.xml
new file mode 100644
index 00000000..696de56f
--- /dev/null
+++ b/test-apps/bundle-activation-policy/build-par/build.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="bundle-activation-policy">
+
+ <path id="bundles">
+ <pathelement location="../bundle.activation.policy.module.b"/>
+ <pathelement location="../bundle.activation.policy.module.a"/>
+ </path>
+
+ <property file="${basedir}/../build.properties"/>
+ <property name="par.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/bundle-activation-policy.par"/>
+
+ <import file="${basedir}/../../../spring-build/par/default.xml"/>
+
+</project>
diff --git a/test-apps/bundle-activation-policy/build.properties b/test-apps/bundle-activation-policy/build.properties
new file mode 100644
index 00000000..0a1bca3f
--- /dev/null
+++ b/test-apps/bundle-activation-policy/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../ivy-cache
+integration.repo.dir=${basedir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/build.xml b/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/build.xml
new file mode 100644
index 00000000..05d752bd
--- /dev/null
+++ b/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="bundle.activation.policy.module.a">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../build.versions"/>
+
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/ivy.xml b/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/ivy.xml
new file mode 100644
index 00000000..f92fa16c
--- /dev/null
+++ b/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/ivy.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="bundle.activation.policy" module="${ant.project.name}">
+ <ivyauthor name="awilkinson"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ <dependency org="bundle.activation.policy" name="bundle.activation.policy.module.b" rev="latest.integration" conf="compile->compile"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/src/main/java/a/UseBundleB.java b/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/src/main/java/a/UseBundleB.java
new file mode 100644
index 00000000..74944df0
--- /dev/null
+++ b/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/src/main/java/a/UseBundleB.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package a;
+
+import b.ClassInBundleB;
+
+public class UseBundleB {
+ private final ClassInBundleB classInBundleB;
+ public UseBundleB() {
+ this.classInBundleB = new ClassInBundleB();
+ }
+ public ClassInBundleB getClassInBundleB() {
+ return this.classInBundleB;
+ }
+}
diff --git a/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/src/main/resources/META-INF/MANIFEST.MF b/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..faa2e94c
--- /dev/null
+++ b/test-apps/bundle-activation-policy/bundle.activation.policy.module.a/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Bundle-SymbolicName: bundle.activation.policy.module.a
+Bundle-Version: 1.0
+Bundle-ManifestVersion: 2
+Import-Package: b
+Export-Package: a
diff --git a/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/build.xml b/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/build.xml
new file mode 100644
index 00000000..9270bfb7
--- /dev/null
+++ b/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="bundle.activation.policy.module.b">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/ivy.xml b/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/ivy.xml
new file mode 100644
index 00000000..c01c34bb
--- /dev/null
+++ b/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/ivy.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="bundle.activation.policy" module="${ant.project.name}">
+ <ivyauthor name="awilkinson"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/src/main/java/b/ClassInBundleB.java b/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/src/main/java/b/ClassInBundleB.java
new file mode 100644
index 00000000..5ef6aa08
--- /dev/null
+++ b/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/src/main/java/b/ClassInBundleB.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package b;
+
+public class ClassInBundleB {
+ public ClassInBundleB() {
+ }
+}
diff --git a/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/src/main/resources/META-INF/MANIFEST.MF b/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..1e2fb2e6
--- /dev/null
+++ b/test-apps/bundle-activation-policy/bundle.activation.policy.module.b/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Bundle-SymbolicName: bundle.activation.policy.module.b
+Bundle-Version: 1.0
+Bundle-ManifestVersion: 2
+Export-Package: b
+Bundle-ActivationPolicy: lazy
diff --git a/test-apps/bundle-update/class.load.after.update/README.TXT b/test-apps/bundle-update/class.load.after.update/README.TXT
new file mode 100644
index 00000000..66436ef4
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/README.TXT
@@ -0,0 +1,11 @@
+How to build
+------------
+
+ant jar
+
+Output
+------
+
+com.springsource.kernel.osgi/src/test/resources/but/but.C.jar
+com.springsource.kernel.osgi/src/test/resources/but/but.B.before.jar
+com.springsource.kernel.osgi/src/test/resources/but/but.B.after.jar
diff --git a/test-apps/bundle-update/class.load.after.update/build.properties b/test-apps/bundle-update/class.load.after.update/build.properties
new file mode 100644
index 00000000..1dcbd8ce
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../../ivy-cache
+integration.repo.dir=${basedir}/../../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/bundle-update/class.load.after.update/build.xml b/test-apps/bundle-update/class.load.after.update/build.xml
new file mode 100644
index 00000000..d4ad0f2e
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/build.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="bundle-update" default="jar">
+
+ <path id="bundles">
+ <pathelement location="but.B.before"/>
+ <pathelement location="but.B.after"/>
+ <pathelement location="but.C"/>
+ </path>
+
+ <property name="virgo.kernel.dir" value="${basedir}/../../.."/>
+
+ <import file="${virgo.kernel.dir}/spring-build/multi-bundle/default.xml"/>
+
+ <target name="jar" depends="artifact-multi-bundle.jar">
+ <copy todir="${virgo.kernel.dir}/org.eclipse.virgo.kernel.osgi/src/test/resources/but">
+ <fileset dir="${basedir}/but.B.before/target/artifacts">
+ <exclude name="**/ivy.xml"/>
+ <exclude name="**/*-sources.jar"/>
+ </fileset>
+ <fileset dir="${basedir}/but.B.after/target/artifacts">
+ <exclude name="**/ivy.xml"/>
+ <exclude name="**/*-sources.jar"/>
+ </fileset>
+ <fileset dir="${basedir}/but.C/target/artifacts">
+ <exclude name="**/ivy.xml"/>
+ <exclude name="**/*-sources.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+</project>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.after/.classpath b/test-apps/bundle-update/class.load.after.update/but.B.after/.classpath
new file mode 100644
index 00000000..14a424e3
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.after/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java/but"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="target"/>
+</classpath>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.after/.project b/test-apps/bundle-update/class.load.after.update/but.B.after/.project
new file mode 100644
index 00000000..8048deaf
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.after/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>but.b.after</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.after/build.xml b/test-apps/bundle-update/class.load.after.update/but.B.after/build.xml
new file mode 100644
index 00000000..3a2f3019
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.after/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="but.B.after">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../../build.versions"/>
+
+ <import file="${basedir}/../../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.after/ivy.xml b/test-apps/bundle-update/class.load.after.update/but.B.after/ivy.xml
new file mode 100644
index 00000000..876655e1
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.after/ivy.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="cloning.tests" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/A.java b/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/A.java
new file mode 100644
index 00000000..c9d803d6
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/A.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package but;
+
+public class A implements I {
+
+}
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/B.java b/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/B.java
new file mode 100644
index 00000000..83d21bb1
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/B.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package but;
+
+public class B {
+
+ static I i;
+
+ static {
+ i = new A();
+ }
+
+}
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/I.java b/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/I.java
new file mode 100644
index 00000000..934f8d08
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/java/but/but/I.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package but;
+
+
+public interface I {
+
+}
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/resources/META-INF/MANIFEST.MF b/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..f15c9ac4
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.after/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: but.B
+Bundle-Version: 1
+Export-Package: but
+
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.before/.classpath b/test-apps/bundle-update/class.load.after.update/but.B.before/.classpath
new file mode 100644
index 00000000..14a424e3
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.before/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java/but"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="target"/>
+</classpath>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.before/.project b/test-apps/bundle-update/class.load.after.update/but.B.before/.project
new file mode 100644
index 00000000..64849bbd
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.before/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>but.b.before</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.before/build.xml b/test-apps/bundle-update/class.load.after.update/but.B.before/build.xml
new file mode 100644
index 00000000..e0c831ef
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.before/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="but.B.before">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../../build.versions"/>
+
+ <import file="${basedir}/../../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.before/ivy.xml b/test-apps/bundle-update/class.load.after.update/but.B.before/ivy.xml
new file mode 100644
index 00000000..876655e1
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.before/ivy.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="cloning.tests" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/java/but/but/A.java b/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/java/but/but/A.java
new file mode 100644
index 00000000..080542cb
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/java/but/but/A.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package but;
+
+public class A {
+
+}
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/java/but/but/B.java b/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/java/but/but/B.java
new file mode 100644
index 00000000..25df2e16
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/java/but/but/B.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package but;
+
+public class B {
+
+}
diff --git a/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/resources/META-INF/MANIFEST.MF b/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..f15c9ac4
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.B.before/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: but.B
+Bundle-Version: 1
+Export-Package: but
+
diff --git a/test-apps/bundle-update/class.load.after.update/but.C/.classpath b/test-apps/bundle-update/class.load.after.update/but.C/.classpath
new file mode 100644
index 00000000..6bceeebb
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.C/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/but.b.after"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-3.5.1.R35x_v20091005.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-sources-3.5.1.R35x_v20091005.jar"/>
+ <classpathentry kind="output" path="target"/>
+</classpath>
diff --git a/test-apps/bundle-update/class.load.after.update/but.C/.project b/test-apps/bundle-update/class.load.after.update/but.C/.project
new file mode 100644
index 00000000..83eff1e1
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.C/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>but.C</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/bundle-update/class.load.after.update/but.C/build.xml b/test-apps/bundle-update/class.load.after.update/but.C/build.xml
new file mode 100644
index 00000000..f505d46c
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.C/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="but.C">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../../build.versions"/>
+
+ <import file="${basedir}/../../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/bundle-update/class.load.after.update/but.C/ivy.xml b/test-apps/bundle-update/class.load.after.update/but.C/ivy.xml
new file mode 100644
index 00000000..b3e64f07
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.C/ivy.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="cloning.tests" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="compile->compile"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/bundle-update/class.load.after.update/but.C/src/main/java/but/c/C.java b/test-apps/bundle-update/class.load.after.update/but.C/src/main/java/but/c/C.java
new file mode 100644
index 00000000..65d385b3
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.C/src/main/java/but/c/C.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package but.c;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.SynchronousBundleListener;
+
+public class C implements BundleActivator, SynchronousBundleListener {
+
+ public void start(BundleContext context) throws Exception {
+
+ // Load the old version of A
+ Class.forName("but.A");
+
+ context.addBundleListener(this);
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ }
+
+ public void bundleChanged(BundleEvent event) {
+ if ("but.B".equals(event.getBundle().getSymbolicName()) && event.getType() == BundleEvent.UPDATED) {
+ try {
+ // Load B. If successful, this is the old version that is compatible with the old version of A.
+ Class.forName("but.B");
+ } catch (Exception e) {
+ e.printStackTrace();
+ // Prevent the JUnit test from passing if we get to here.
+ System.exit(987);
+ }
+ }
+
+ }
+
+}
diff --git a/test-apps/bundle-update/class.load.after.update/but.C/src/main/resources/META-INF/MANIFEST.MF b/test-apps/bundle-update/class.load.after.update/but.C/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..e7d429ff
--- /dev/null
+++ b/test-apps/bundle-update/class.load.after.update/but.C/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: but.C
+Import-Package: but,org.osgi.framework
+Bundle-Activator: but.c.C
+
+
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/README.TXT b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/README.TXT
new file mode 100644
index 00000000..d3657df3
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/README.TXT
@@ -0,0 +1,9 @@
+How to build
+------------
+
+ant jar
+
+Output
+------
+
+com.springsource.kernel.deployer.test/src/test/resources/clashing.exports.in.a.scope.par
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build-par/build.xml b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build-par/build.xml
new file mode 100644
index 00000000..deab1607
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build-par/build.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="clashing.exports.in.a.scope">
+
+ <path id="bundles">
+ <pathelement location="../c1"/>
+ <pathelement location="../c2"/>
+ </path>
+
+ <property file="${basedir}/../build.properties"/>
+
+ <import file="${basedir}/../../../../spring-build/par/default.xml"/>
+
+</project>
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build.properties b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build.properties
new file mode 100644
index 00000000..1dcbd8ce
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../../ivy-cache
+integration.repo.dir=${basedir}/../../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build.xml b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build.xml
new file mode 100644
index 00000000..8505bea5
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/build.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="clashing-exports-in-a-scope" default="jar">
+
+ <path id="bundles">
+ <pathelement location="build-par"/>
+ </path>
+
+ <property name="virgo.kernel.dir" value="${basedir}/../../.."/>
+
+ <import file="${virgo.kernel.dir}/spring-build/multi-bundle/default.xml"/>
+
+ <target name="jar" depends="artifact-multi-bundle.jar">
+ <copy todir="${virgo.kernel.dir}/org.eclipse.virgo.kernel.deployer.test/src/test/resources">
+ <fileset dir="${basedir}/build-par/target/artifacts"/>
+ </copy>
+ </target>
+
+</project>
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/build.xml b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/build.xml
new file mode 100644
index 00000000..31cf3cd2
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="c1">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../../build.versions"/>
+
+ <import file="${basedir}/../../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/ivy.xml b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/ivy.xml
new file mode 100644
index 00000000..ec9164b3
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/ivy.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="cloning.tests" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications/>
+
+ <dependencies/>
+
+</ivy-module>
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/src/main/resources/META-INF/MANIFEST.MF b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..d40b9d5b
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c1/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: c1
+Export-Package: c.p
+
+
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/build.xml b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/build.xml
new file mode 100644
index 00000000..cc37ab7b
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="c2">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../../build.versions"/>
+
+ <import file="${basedir}/../../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/ivy.xml b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/ivy.xml
new file mode 100644
index 00000000..ec9164b3
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/ivy.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="cloning.tests" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications/>
+
+ <dependencies/>
+
+</ivy-module>
diff --git a/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/src/main/resources/META-INF/MANIFEST.MF b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..cddc240b
--- /dev/null
+++ b/test-apps/deployer-edge-tests/clashing-exports-in-a-scope/c2/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: c2
+Export-Package: c.p
+
+
diff --git a/test-apps/manual-context/build.properties b/test-apps/manual-context/build.properties
new file mode 100644
index 00000000..0a1bca3f
--- /dev/null
+++ b/test-apps/manual-context/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../ivy-cache
+integration.repo.dir=${basedir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/manual-context/build.xml b/test-apps/manual-context/build.xml
new file mode 100644
index 00000000..4e7ac92d
--- /dev/null
+++ b/test-apps/manual-context/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="manual-context">
+
+ <property file="${basedir}/build.properties"/>
+ <property file="${basedir}/../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/manual-context.jar"/>
+ <import file="${basedir}/../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/manual-context/ivy.xml b/test-apps/manual-context/ivy.xml
new file mode 100644
index 00000000..0c41ab90
--- /dev/null
+++ b/test-apps/manual-context/ivy.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="scoping.service" module="${ant.project.name}">
+ <ivyauthor name="rharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.context.support" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency name='org.eclipse.osgi' rev='${org.eclipse.osgi}' org='org.eclipse.osgi' conf='compile->runtime'/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/manual-context/src/main/java/eg/Activator.java b/test-apps/manual-context/src/main/java/eg/Activator.java
new file mode 100644
index 00000000..80a5ec0d
--- /dev/null
+++ b/test-apps/manual-context/src/main/java/eg/Activator.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package eg;
+
+import org.osgi.framework.*;
+import org.springframework.context.support.*;
+
+public class Activator implements BundleActivator {
+
+ public void start(BundleContext ctx) throws BundleException {
+ System.out.println("Starting with TCCL: " + Thread.currentThread().getContextClassLoader());
+ ClassPathXmlApplicationContext c = new ClassPathXmlApplicationContext("context.xml", getClass());
+ c.refresh();
+ }
+
+ public void stop(BundleContext ctx) throws BundleException {
+
+ }
+}
diff --git a/test-apps/manual-context/src/main/java/eg/context.xml b/test-apps/manual-context/src/main/java/eg/context.xml
new file mode 100644
index 00000000..c872253c
--- /dev/null
+++ b/test-apps/manual-context/src/main/java/eg/context.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+</beans>
diff --git a/test-apps/manual-context/src/main/resources/META-INF/MANIFEST.MF b/test-apps/manual-context/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..667a8175
--- /dev/null
+++ b/test-apps/manual-context/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: manual.context
+Bundle-Name: Manual Context Test
+Import-Package: org.osgi.framework,
+ org.springframework.context.support
+Bundle-Activator: eg.Activator
+
diff --git a/test-apps/plan-deployment/build.properties b/test-apps/plan-deployment/build.properties
new file mode 100644
index 00000000..aa48e854
--- /dev/null
+++ b/test-apps/plan-deployment/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${user.dir}/../../ivy-cache
+integration.repo.dir=${user.dir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/plan-deployment/simple.bundle.one/.classpath b/test-apps/plan-deployment/simple.bundle.one/.classpath
new file mode 100644
index 00000000..adebb12a
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.one/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/plan-deployment/simple.bundle.one/.project b/test-apps/plan-deployment/simple.bundle.one/.project
new file mode 100644
index 00000000..d96c914a
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.one/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>simple.bundle.one</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/plan-deployment/simple.bundle.one/build.xml b/test-apps/plan-deployment/simple.bundle.one/build.xml
new file mode 100644
index 00000000..42498ca9
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.one/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="simple.bundle.one">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.bundle.one.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/plan-deployment/simple.bundle.one/ivy.xml b/test-apps/plan-deployment/simple.bundle.one/ivy.xml
new file mode 100644
index 00000000..cc9959db
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.one/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="plan-deployment" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/plan-deployment/simple.bundle.one/src/main/resources/META-INF/MANIFEST.MF b/test-apps/plan-deployment/simple.bundle.one/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..8e107704
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.one/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: simple.bundle.one
+Bundle-Version: 1
diff --git a/test-apps/plan-deployment/simple.bundle.two/.classpath b/test-apps/plan-deployment/simple.bundle.two/.classpath
new file mode 100644
index 00000000..adebb12a
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.two/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/plan-deployment/simple.bundle.two/.project b/test-apps/plan-deployment/simple.bundle.two/.project
new file mode 100644
index 00000000..4dd63888
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.two/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>simple.bundle.two</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/plan-deployment/simple.bundle.two/build.xml b/test-apps/plan-deployment/simple.bundle.two/build.xml
new file mode 100644
index 00000000..ea90c8fd
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.two/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="simple.bundle.two">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.bundle.two.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/plan-deployment/simple.bundle.two/ivy.xml b/test-apps/plan-deployment/simple.bundle.two/ivy.xml
new file mode 100644
index 00000000..cc9959db
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.two/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="plan-deployment" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/plan-deployment/simple.bundle.two/src/main/resources/META-INF/MANIFEST.MF b/test-apps/plan-deployment/simple.bundle.two/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..7b4ce17d
--- /dev/null
+++ b/test-apps/plan-deployment/simple.bundle.two/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: simple.bundle.two
+Bundle-Version: 1
diff --git a/test-apps/quartz-scheduler/README.TXT b/test-apps/quartz-scheduler/README.TXT
new file mode 100644
index 00000000..f303c824
--- /dev/null
+++ b/test-apps/quartz-scheduler/README.TXT
@@ -0,0 +1,21 @@
+How to build
+------------
+
+1. Run ant jar in quartz.bundle.a
+ or
+2. Run ant jar in quartz.bundle.b
+ or
+3. Run ant jar in quartz.bundle.same1
+ or
+4. Run ant jar in quartz.bundle.same2
+
+Output
+------
+
+1. com.springsource.kernel.deployer.test/src/test/resources/quartz/quartz.bundle.a.jar
+ or
+2. com.springsource.kernel.deployer.test/src/test/resources/quartz/quartz.bundle.b.jar
+ or
+3. com.springsource.kernel.deployer.test/src/test/resources/quartz/quartz.bundle.same1.jar
+ or
+4. com.springsource.kernel.deployer.test/src/test/resources/quartz/quartz.bundle.same2.jar \ No newline at end of file
diff --git a/test-apps/quartz-scheduler/build.properties b/test-apps/quartz-scheduler/build.properties
new file mode 100644
index 00000000..17e34032
--- /dev/null
+++ b/test-apps/quartz-scheduler/build.properties
@@ -0,0 +1,7 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../ivy-cache
+integration.repo.dir=${basedir}/../../integration-repo
+disable.bundlor=true
+ivy.settings.file=${basedir}/../../../ivysettings.xml
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/.classpath b/test-apps/quartz-scheduler/quartz.bundle.a/.classpath
new file mode 100644
index 00000000..399b6f9a
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/.classpath
@@ -0,0 +1,14 @@
+<?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"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/com.opensymphony.quartz/com.springsource.org.quartz/1.6.0/com.springsource.org.quartz-1.6.0.jar" sourcepath="/KERNEL_IVY_CACHE/com.opensymphony.quartz/com.springsource.org.quartz/1.6.0/com.springsource.org.quartz-sources-1.6.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-3.5.1.R35x_v20091005.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-sources-3.5.1.R35x_v20091005.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RELEASE/org.springframework.context.support-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RELEASE/org.springframework.context.support-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/.project b/test-apps/quartz-scheduler/quartz.bundle.a/.project
new file mode 100644
index 00000000..da9e5f64
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>quartz.bundle.a</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/build.xml b/test-apps/quartz-scheduler/quartz.bundle.a/build.xml
new file mode 100644
index 00000000..5014ff7a
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="quartz.bundle.a">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/quartz/quartz.bundle.a.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/ivy.xml b/test-apps/quartz-scheduler/quartz.bundle.a/ivy.xml
new file mode 100644
index 00000000..9f19ac47
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/ivy.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.server.test" module="${ant.project.name}">
+ <ivyauthor name="sbrannen"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="com.opensymphony.quartz" name="com.springsource.org.quartz" rev="${com.opensymphony.quartz}" conf="provided->compile"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.context.support" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="provided->compile"/>
+
+ <override org="org.springframework" rev="${org.springframework}"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/src/main/java/quartz/bundle/a/Service.java b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/java/quartz/bundle/a/Service.java
new file mode 100644
index 00000000..5ac6b33b
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/java/quartz/bundle/a/Service.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package quartz.bundle.a;
+
+import org.quartz.Scheduler;
+
+/**
+ * Simple test service to serve as a scheduled job.
+ *
+ */
+public interface Service {
+
+ int getCount();
+
+ Scheduler getScheduler();
+
+ void process();
+
+}
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/src/main/java/quartz/bundle/a/internal/StandardService.java b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/java/quartz/bundle/a/internal/StandardService.java
new file mode 100644
index 00000000..c438287e
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/java/quartz/bundle/a/internal/StandardService.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package quartz.bundle.a.internal;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.quartz.Scheduler;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+import quartz.bundle.a.Service;
+
+/**
+ */
+public class StandardService implements Service, ApplicationContextAware {
+
+ private final AtomicInteger count = new AtomicInteger(0);
+
+ private ApplicationContext applicationContext;
+
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+ }
+
+ public int getCount() {
+ return this.count.get();
+ }
+
+ public Scheduler getScheduler() {
+ return (Scheduler) this.applicationContext.getBean("schedulerFactoryBean");
+ }
+
+ public void process() {
+ System.err.println(getClass().getName() + " called " + this.count.incrementAndGet() + " times.");
+ }
+
+}
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/MANIFEST.MF b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..88ab6bf7
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: quartz.bundle.a
+Bundle-Version: 1.0.0
+Import-Bundle: com.springsource.org.quartz;version="[1.6.0,1.6.0]"
+Import-Library: org.springframework.spring;version="[2.5.5,3.1.0)"
+Export-Package: quartz.bundle.a
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/spring/module-context.xml b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/spring/module-context.xml
new file mode 100644
index 00000000..2dcfaca0
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/spring/module-context.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+ <bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
+ <property name="jobDetail" ref="jobDetail" />
+ <property name="startDelay" value="500" />
+ <property name="repeatInterval" value="1000" />
+ </bean>
+ <bean id="jobDetail"
+ class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
+ <property name="targetObject" ref="service" />
+ <property name="targetMethod" value="process" />
+ <property name="concurrent" value="false" />
+ </bean>
+ <bean id="schedulerFactoryBean"
+ class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
+ <property name="schedulerName" value="QuartzScheduler-A" />
+ <property name="triggers">
+ <list>
+ <ref bean="simpleTrigger" />
+ </list>
+ </property>
+ </bean>
+ <bean id="service" class="quartz.bundle.a.internal.StandardService" />
+</beans>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/spring/osgi-context.xml b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/spring/osgi-context.xml
new file mode 100644
index 00000000..d78e2bdf
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.a/src/main/resources/META-INF/spring/osgi-context.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <service ref="service" interface="quartz.bundle.a.Service" />
+
+</beans:beans>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/.classpath b/test-apps/quartz-scheduler/quartz.bundle.b/.classpath
new file mode 100644
index 00000000..399b6f9a
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/.classpath
@@ -0,0 +1,14 @@
+<?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"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/com.opensymphony.quartz/com.springsource.org.quartz/1.6.0/com.springsource.org.quartz-1.6.0.jar" sourcepath="/KERNEL_IVY_CACHE/com.opensymphony.quartz/com.springsource.org.quartz/1.6.0/com.springsource.org.quartz-sources-1.6.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-3.5.1.R35x_v20091005.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-sources-3.5.1.R35x_v20091005.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RELEASE/org.springframework.context.support-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RELEASE/org.springframework.context.support-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/.project b/test-apps/quartz-scheduler/quartz.bundle.b/.project
new file mode 100644
index 00000000..4abff2de
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>quartz.bundle.b</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/build.xml b/test-apps/quartz-scheduler/quartz.bundle.b/build.xml
new file mode 100644
index 00000000..19011026
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="quartz.bundle.b">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/quartz/quartz.bundle.b.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/ivy.xml b/test-apps/quartz-scheduler/quartz.bundle.b/ivy.xml
new file mode 100644
index 00000000..9f19ac47
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/ivy.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.server.test" module="${ant.project.name}">
+ <ivyauthor name="sbrannen"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="com.opensymphony.quartz" name="com.springsource.org.quartz" rev="${com.opensymphony.quartz}" conf="provided->compile"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.context.support" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="provided->compile"/>
+
+ <override org="org.springframework" rev="${org.springframework}"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/src/main/java/quartz/bundle/b/Service.java b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/java/quartz/bundle/b/Service.java
new file mode 100644
index 00000000..aed25551
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/java/quartz/bundle/b/Service.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package quartz.bundle.b;
+
+import org.quartz.Scheduler;
+
+/**
+ * Simple test service to serve as a scheduled job.
+ *
+ */
+public interface Service {
+
+ int getCount();
+
+ Scheduler getScheduler();
+
+ void process();
+
+}
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/src/main/java/quartz/bundle/b/internal/StandardService.java b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/java/quartz/bundle/b/internal/StandardService.java
new file mode 100644
index 00000000..707d068f
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/java/quartz/bundle/b/internal/StandardService.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package quartz.bundle.b.internal;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.quartz.Scheduler;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+import quartz.bundle.b.Service;
+
+/**
+ */
+public class StandardService implements Service, ApplicationContextAware {
+
+ private final AtomicInteger count = new AtomicInteger(0);
+
+ private ApplicationContext applicationContext;
+
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+ }
+
+ public int getCount() {
+ return this.count.get();
+ }
+
+ public Scheduler getScheduler() {
+ return (Scheduler) this.applicationContext.getBean("schedulerFactoryBean");
+ }
+
+ public void process() {
+ System.err.println(getClass().getName() + " called " + this.count.incrementAndGet() + " times.");
+ }
+
+}
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/MANIFEST.MF b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..8c8c16ea
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: quartz.bundle.b
+Bundle-Version: 1.0.0
+Import-Bundle: com.springsource.org.quartz;version="[1.6.0,1.6.0]"
+Import-Library: org.springframework.spring;version="[2.5.5,3.1.0)"
+Export-Package: quartz.bundle.b
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/spring/module-context.xml b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/spring/module-context.xml
new file mode 100644
index 00000000..d0889341
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/spring/module-context.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+ <bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
+ <property name="jobDetail" ref="jobDetail" />
+ <property name="startDelay" value="500" />
+ <property name="repeatInterval" value="1000" />
+ </bean>
+ <bean id="jobDetail"
+ class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
+ <property name="targetObject" ref="service" />
+ <property name="targetMethod" value="process" />
+ <property name="concurrent" value="false" />
+ </bean>
+ <bean id="schedulerFactoryBean"
+ class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
+ <property name="schedulerName" value="QuartzScheduler-B" />
+ <property name="triggers">
+ <list>
+ <ref bean="simpleTrigger" />
+ </list>
+ </property>
+ </bean>
+ <bean id="service" class="quartz.bundle.b.internal.StandardService" />
+</beans>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/spring/osgi-context.xml b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/spring/osgi-context.xml
new file mode 100644
index 00000000..f8f283bb
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.b/src/main/resources/META-INF/spring/osgi-context.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <service ref="service" interface="quartz.bundle.b.Service" />
+
+</beans:beans>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/.classpath b/test-apps/quartz-scheduler/quartz.bundle.same1/.classpath
new file mode 100644
index 00000000..399b6f9a
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/.classpath
@@ -0,0 +1,14 @@
+<?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"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/com.opensymphony.quartz/com.springsource.org.quartz/1.6.0/com.springsource.org.quartz-1.6.0.jar" sourcepath="/KERNEL_IVY_CACHE/com.opensymphony.quartz/com.springsource.org.quartz/1.6.0/com.springsource.org.quartz-sources-1.6.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-3.5.1.R35x_v20091005.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-sources-3.5.1.R35x_v20091005.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RELEASE/org.springframework.context.support-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RELEASE/org.springframework.context.support-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/.project b/test-apps/quartz-scheduler/quartz.bundle.same1/.project
new file mode 100644
index 00000000..7a78f0b1
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/.project
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>quartz.bundle.same1</name>
+ <comment></comment>
+ <projects></projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments></arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/build.xml b/test-apps/quartz-scheduler/quartz.bundle.same1/build.xml
new file mode 100644
index 00000000..8cf604b8
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="quartz.bundle.same1">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/quartz/quartz.bundle.same1.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/ivy.xml b/test-apps/quartz-scheduler/quartz.bundle.same1/ivy.xml
new file mode 100644
index 00000000..9f19ac47
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/ivy.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.server.test" module="${ant.project.name}">
+ <ivyauthor name="sbrannen"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="com.opensymphony.quartz" name="com.springsource.org.quartz" rev="${com.opensymphony.quartz}" conf="provided->compile"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.context.support" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="provided->compile"/>
+
+ <override org="org.springframework" rev="${org.springframework}"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/java/quartz/bundle/same1/Service.java b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/java/quartz/bundle/same1/Service.java
new file mode 100644
index 00000000..66f43b52
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/java/quartz/bundle/same1/Service.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package quartz.bundle.same1;
+
+import org.quartz.Scheduler;
+
+/**
+ * Simple test service to serve as a scheduled job.
+ *
+ */
+public interface Service {
+
+ int getCount();
+
+ Scheduler getScheduler();
+
+ void process();
+
+}
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/java/quartz/bundle/same1/internal/StandardService.java b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/java/quartz/bundle/same1/internal/StandardService.java
new file mode 100644
index 00000000..36db66ab
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/java/quartz/bundle/same1/internal/StandardService.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package quartz.bundle.same1.internal;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.quartz.Scheduler;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+import quartz.bundle.same1.Service;
+
+/**
+ */
+public class StandardService implements Service, ApplicationContextAware {
+
+ private final AtomicInteger count = new AtomicInteger(0);
+
+ private ApplicationContext applicationContext;
+
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+ }
+
+ public int getCount() {
+ return this.count.get();
+ }
+
+ public Scheduler getScheduler() {
+ return (Scheduler) this.applicationContext.getBean("schedulerFactoryBean");
+ }
+
+ public void process() {
+ System.err.println(getClass().getName() + " called " + this.count.incrementAndGet() + " times.");
+ }
+
+}
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/MANIFEST.MF b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..a7f5d990
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: quartz.bundle.same1
+Bundle-Version: 1.0.0
+Import-Bundle: com.springsource.org.quartz;version="[1.6.0,1.6.0]"
+Import-Library: org.springframework.spring;version="[2.5.5,3.1.0)"
+Export-Package: quartz.bundle.same1
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/spring/module-context.xml b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/spring/module-context.xml
new file mode 100644
index 00000000..635e5718
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/spring/module-context.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+ <bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
+ <property name="jobDetail" ref="jobDetail" />
+ <property name="startDelay" value="500" />
+ <property name="repeatInterval" value="1000" />
+ </bean>
+ <bean id="jobDetail"
+ class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
+ <property name="targetObject" ref="service" />
+ <property name="targetMethod" value="process" />
+ <property name="concurrent" value="false" />
+ </bean>
+ <bean id="schedulerFactoryBean"
+ class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
+ <property name="triggers">
+ <list>
+ <ref bean="simpleTrigger" />
+ </list>
+ </property>
+ </bean>
+ <bean id="service" class="quartz.bundle.same1.internal.StandardService" />
+</beans>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/spring/osgi-context.xml b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/spring/osgi-context.xml
new file mode 100644
index 00000000..0b42dcbf
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same1/src/main/resources/META-INF/spring/osgi-context.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <service ref="service" interface="quartz.bundle.same1.Service" />
+
+</beans:beans>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/.classpath b/test-apps/quartz-scheduler/quartz.bundle.same2/.classpath
new file mode 100644
index 00000000..399b6f9a
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/.classpath
@@ -0,0 +1,14 @@
+<?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"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/com.opensymphony.quartz/com.springsource.org.quartz/1.6.0/com.springsource.org.quartz-1.6.0.jar" sourcepath="/KERNEL_IVY_CACHE/com.opensymphony.quartz/com.springsource.org.quartz/1.6.0/com.springsource.org.quartz-sources-1.6.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-3.5.1.R35x_v20091005.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-sources-3.5.1.R35x_v20091005.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RELEASE/org.springframework.context.support-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RELEASE/org.springframework.context.support-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/.project b/test-apps/quartz-scheduler/quartz.bundle.same2/.project
new file mode 100644
index 00000000..c0a767dc
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/.project
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>quartz.bundle.same2</name>
+ <comment></comment>
+ <projects></projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments></arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/build.xml b/test-apps/quartz-scheduler/quartz.bundle.same2/build.xml
new file mode 100644
index 00000000..d87cd82e
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="quartz.bundle.same2">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/quartz/quartz.bundle.same2.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/ivy.xml b/test-apps/quartz-scheduler/quartz.bundle.same2/ivy.xml
new file mode 100644
index 00000000..9f19ac47
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/ivy.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.server.test" module="${ant.project.name}">
+ <ivyauthor name="sbrannen"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="com.opensymphony.quartz" name="com.springsource.org.quartz" rev="${com.opensymphony.quartz}" conf="provided->compile"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.context.support" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->compile"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="provided->compile"/>
+
+ <override org="org.springframework" rev="${org.springframework}"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/java/quartz/bundle/same2/Service.java b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/java/quartz/bundle/same2/Service.java
new file mode 100644
index 00000000..1e357096
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/java/quartz/bundle/same2/Service.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package quartz.bundle.same2;
+
+import org.quartz.Scheduler;
+
+/**
+ * Simple test service to serve as a scheduled job.
+ *
+ */
+public interface Service {
+
+ int getCount();
+
+ Scheduler getScheduler();
+
+ void process();
+
+}
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/java/quartz/bundle/same2/internal/StandardService.java b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/java/quartz/bundle/same2/internal/StandardService.java
new file mode 100644
index 00000000..c848cde3
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/java/quartz/bundle/same2/internal/StandardService.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package quartz.bundle.same2.internal;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.quartz.Scheduler;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+import quartz.bundle.same2.Service;
+
+/**
+ */
+public class StandardService implements Service, ApplicationContextAware {
+
+ private final AtomicInteger count = new AtomicInteger(0);
+
+ private ApplicationContext applicationContext;
+
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+ }
+
+ public int getCount() {
+ return this.count.get();
+ }
+
+ public Scheduler getScheduler() {
+ return (Scheduler) this.applicationContext.getBean("schedulerFactoryBean");
+ }
+
+ public void process() {
+ System.err.println(getClass().getName() + " called " + this.count.incrementAndGet() + " times.");
+ }
+
+}
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/MANIFEST.MF b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..fbca1d02
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: quartz.bundle.same2
+Bundle-Version: 1.0.0
+Import-Bundle: com.springsource.org.quartz;version="[1.6.0,1.6.0]"
+Import-Library: org.springframework.spring;version="[2.5.5,3.1.0)"
+Export-Package: quartz.bundle.same2
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/spring/module-context.xml b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/spring/module-context.xml
new file mode 100644
index 00000000..6784bb07
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/spring/module-context.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+ <bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
+ <property name="jobDetail" ref="jobDetail" />
+ <property name="startDelay" value="500" />
+ <property name="repeatInterval" value="1000" />
+ </bean>
+ <bean id="jobDetail"
+ class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
+ <property name="targetObject" ref="service" />
+ <property name="targetMethod" value="process" />
+ <property name="concurrent" value="false" />
+ </bean>
+ <bean id="schedulerFactoryBean"
+ class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
+ <property name="triggers">
+ <list>
+ <ref bean="simpleTrigger" />
+ </list>
+ </property>
+ </bean>
+ <bean id="service" class="quartz.bundle.same2.internal.StandardService" />
+</beans>
diff --git a/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/spring/osgi-context.xml b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/spring/osgi-context.xml
new file mode 100644
index 00000000..ccf6356a
--- /dev/null
+++ b/test-apps/quartz-scheduler/quartz.bundle.same2/src/main/resources/META-INF/spring/osgi-context.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <service ref="service" interface="quartz.bundle.same2.Service" />
+
+</beans:beans>
diff --git a/test-apps/redeploy-refresh/README.TXT b/test-apps/redeploy-refresh/README.TXT
new file mode 100644
index 00000000..693878f2
--- /dev/null
+++ b/test-apps/redeploy-refresh/README.TXT
@@ -0,0 +1,11 @@
+How to build
+------------
+
+1. Run ant jar simple.bundle.bad
+2. Run ant jar simple.bundle.ok
+
+Output
+------
+
+1. com.springsource.kernel.deployer.test/src/test/resources/redeploy-refresh/bad/simple.module.jar
+2. com.springsource.kernel.deployer.test/src/test/resources/redeploy-refresh/good/simple.module.jar
diff --git a/test-apps/redeploy-refresh/build.properties b/test-apps/redeploy-refresh/build.properties
new file mode 100644
index 00000000..aa48e854
--- /dev/null
+++ b/test-apps/redeploy-refresh/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${user.dir}/../../ivy-cache
+integration.repo.dir=${user.dir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/redeploy-refresh/simple.bundle.bad/.classpath b/test-apps/redeploy-refresh/simple.bundle.bad/.classpath
new file mode 100644
index 00000000..adebb12a
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.bad/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/redeploy-refresh/simple.bundle.bad/.project b/test-apps/redeploy-refresh/simple.bundle.bad/.project
new file mode 100644
index 00000000..b4b29155
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.bad/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>simple.module</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/redeploy-refresh/simple.bundle.bad/build.xml b/test-apps/redeploy-refresh/simple.bundle.bad/build.xml
new file mode 100644
index 00000000..554e4dd6
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.bad/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="simple.module">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/redeploy-refresh/bad/simple.module.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/redeploy-refresh/simple.bundle.bad/ivy.xml b/test-apps/redeploy-refresh/simple.bundle.bad/ivy.xml
new file mode 100644
index 00000000..a03ffb82
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.bad/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="simple.module" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/redeploy-refresh/simple.bundle.bad/src/main/resources/META-INF/MANIFEST.MF b/test-apps/redeploy-refresh/simple.bundle.bad/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..8b20b43d
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.bad/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: simple.module
+Bundle-Version: 2
+Import-Package: no.such.package
+
diff --git a/test-apps/redeploy-refresh/simple.bundle.ok/.classpath b/test-apps/redeploy-refresh/simple.bundle.ok/.classpath
new file mode 100644
index 00000000..adebb12a
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.ok/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/redeploy-refresh/simple.bundle.ok/.project b/test-apps/redeploy-refresh/simple.bundle.ok/.project
new file mode 100644
index 00000000..b4b29155
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.ok/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>simple.module</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/redeploy-refresh/simple.bundle.ok/build.xml b/test-apps/redeploy-refresh/simple.bundle.ok/build.xml
new file mode 100644
index 00000000..f3ce5108
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.ok/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="simple.module">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/redeploy-refresh/good/simple.module.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/redeploy-refresh/simple.bundle.ok/ivy.xml b/test-apps/redeploy-refresh/simple.bundle.ok/ivy.xml
new file mode 100644
index 00000000..a03ffb82
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.ok/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="simple.module" module="${ant.project.name}">
+ <ivyauthor name="gnormington"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/redeploy-refresh/simple.bundle.ok/src/main/resources/META-INF/MANIFEST.MF b/test-apps/redeploy-refresh/simple.bundle.ok/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..69145dec
--- /dev/null
+++ b/test-apps/redeploy-refresh/simple.bundle.ok/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: simple.module
+Bundle-Version: 1
diff --git a/test-apps/refresh/README.TXT b/test-apps/refresh/README.TXT
new file mode 100644
index 00000000..b1e81531
--- /dev/null
+++ b/test-apps/refresh/README.TXT
@@ -0,0 +1,13 @@
+How to build
+------------
+
+1. Run ant jar in refresh-import-bundle/build-par
+ or
+2. Run ant jar in refresh/build-par
+
+Output
+------
+
+1. com.springsource.kernel.deployer.test/src/test/resources/refresh-import-bundle.jar
+ or
+2. com.springsource.kernel.deployer.test/src/test/resources/refresh.par \ No newline at end of file
diff --git a/test-apps/refresh/refresh-import-bundle/.classpath b/test-apps/refresh/refresh-import-bundle/.classpath
new file mode 100644
index 00000000..3b8ad1f9
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <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.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/refresh/refresh-import-bundle/.project b/test-apps/refresh/refresh-import-bundle/.project
new file mode 100644
index 00000000..2cd297ca
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>refresh-import-bundle</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/refresh/refresh-import-bundle/build-par/build.xml b/test-apps/refresh/refresh-import-bundle/build-par/build.xml
new file mode 100644
index 00000000..1b44e4aa
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/build-par/build.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="RefreshTest-Import-Bundle">
+
+ <property name="bundle.version" value="1.0.0"/>
+
+ <path id="bundles">
+ <pathelement location="../exporter"/>
+ <pathelement location="../importer"/>
+ </path>
+
+ <property file="${basedir}/../build.properties"/>
+ <property name="par.output.file" value="${basedir}/../../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/refresh-import-bundle.par"/>
+
+ <import file="${basedir}/../../../../virgo-build/par/default.xml"/>
+
+</project>
diff --git a/test-apps/refresh/refresh-import-bundle/build.properties b/test-apps/refresh/refresh-import-bundle/build.properties
new file mode 100644
index 00000000..091fce38
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../../../ivy-cache
+integration.repo.dir=${basedir}/../../../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/refresh/refresh-import-bundle/exporter/build.xml b/test-apps/refresh/refresh-import-bundle/exporter/build.xml
new file mode 100644
index 00000000..9b7d583a
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/exporter/build.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="RefreshExporter">
+
+ <property file="${basedir}/../build.properties"/>
+ <import file="${basedir}/../../../../virgo-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/refresh/refresh-import-bundle/exporter/ivy.xml b/test-apps/refresh/refresh-import-bundle/exporter/ivy.xml
new file mode 100644
index 00000000..1518ce51
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/exporter/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="refresh-import-bundle" module="${ant.project.name}">
+ <ivyauthor name="robharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/refresh/refresh-import-bundle/exporter/src/main/java/refresh/exporter/b1/B11.java b/test-apps/refresh/refresh-import-bundle/exporter/src/main/java/refresh/exporter/b1/B11.java
new file mode 100644
index 00000000..f88b07a7
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/exporter/src/main/java/refresh/exporter/b1/B11.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.exporter.b1;
+
+
+public class B11 {
+
+}
diff --git a/test-apps/refresh/refresh-import-bundle/exporter/src/main/resources/META-INF/MANIFEST.MF b/test-apps/refresh/refresh-import-bundle/exporter/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..0c5f9e73
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/exporter/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-Name: RefreshExporter
+Created-By: 1.5.0_13 (Apple Computer, Inc.)
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: RefreshExporter
+Export-Package: refresh.exporter.b1
+Bundle-Version: 1
+
diff --git a/test-apps/refresh/refresh-import-bundle/importer/build.xml b/test-apps/refresh/refresh-import-bundle/importer/build.xml
new file mode 100644
index 00000000..7710e811
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/importer/build.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="RefreshImporter">
+
+ <property name="bundle.version" value="1.0.0"/>
+
+ <property file="${basedir}/../build.properties"/>
+
+ <import file="${basedir}/../../../../virgo-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/refresh/refresh-import-bundle/importer/ivy.xml b/test-apps/refresh/refresh-import-bundle/importer/ivy.xml
new file mode 100644
index 00000000..8844fbec
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/importer/ivy.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="refresh-import-bundle" module="${ant.project.name}">
+ <ivyauthor name="robharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgi" rev="latest.integration" conf="provided->compile"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.deployer.test" rev="latest.integration" conf="provided->compile"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/refresh/refresh-import-bundle/importer/src/main/java/org/eclipse/virgo/kernel/deployer/test/LoadableClasses.java b/test-apps/refresh/refresh-import-bundle/importer/src/main/java/org/eclipse/virgo/kernel/deployer/test/LoadableClasses.java
new file mode 100644
index 00000000..e56913aa
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/importer/src/main/java/org/eclipse/virgo/kernel/deployer/test/LoadableClasses.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.deployer.test;
+
+import java.util.Set;
+
+public interface LoadableClasses {
+
+ Set<String> getLoadableClasses();
+
+}
diff --git a/test-apps/refresh/refresh-import-bundle/importer/src/main/java/refresh/importer/Importer.java b/test-apps/refresh/refresh-import-bundle/importer/src/main/java/refresh/importer/Importer.java
new file mode 100644
index 00000000..f1ed4d20
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/importer/src/main/java/refresh/importer/Importer.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.importer;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.osgi.framework.Bundle;
+
+import org.eclipse.virgo.kernel.deployer.test.LoadableClasses;
+import org.eclipse.virgo.kernel.osgi.framework.OsgiFramework;
+
+public class Importer implements LoadableClasses {
+
+ private final Set<String> loadableClasses = new HashSet<String>();
+
+ public Importer(OsgiFramework osgi) {
+ System.out.println("New Importer bean");
+ checkLoadClass("refresh.exporter.b1.B11");
+ checkLoadClass("refresh.exporter.b1.B12");
+ checkLoadClass("refresh.exporter.b2.B21");
+ Bundle[] bundles = osgi.getBundleContext().getBundles();
+ for (Bundle bundle : bundles) {
+ if (bundle.getSymbolicName().equals("RefreshTest-1-RefreshExporter")) {
+ System.out.println(bundle.getHeaders().get("bundle-version"));
+ }
+ }
+ }
+
+ private void checkLoadClass(String className) {
+ try {
+ this.getClass().getClassLoader().loadClass(className);
+ System.out.println(className + " is loadable");
+ loadableClasses.add(className);
+ } catch (ClassNotFoundException e) {
+ System.out.println(className + " is not loadable");
+ }
+ }
+
+ public Set<String> getLoadableClasses() {
+ return this.loadableClasses;
+ }
+
+}
diff --git a/test-apps/refresh/refresh-import-bundle/importer/src/main/resources/META-INF/MANIFEST.MF b/test-apps/refresh/refresh-import-bundle/importer/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..4bc53424
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/importer/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-Name: RefreshImporter
+Created-By: 1.5.0_13 (Apple Computer, Inc.)
+Import-Package: org.osgi.framework,
+ org.eclipse.virgo.kernel.deployer.test,
+ org.eclipse.virgo.kernel.osgi.framework
+Import-Bundle: RefreshExporter
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: RefreshImporter
+Bundle-Version: 1.0.0
+
diff --git a/test-apps/refresh/refresh-import-bundle/importer/src/main/resources/META-INF/spring/importer-context.xml b/test-apps/refresh/refresh-import-bundle/importer/src/main/resources/META-INF/spring/importer-context.xml
new file mode 100644
index 00000000..df598c1f
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/importer/src/main/resources/META-INF/spring/importer-context.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <reference id="osgiFramework"
+ interface="org.eclipse.virgo.kernel.osgi.framework.OsgiFramework" />
+
+ <beans:bean id="importer" class="refresh.importer.Importer">
+ <beans:constructor-arg ref="osgiFramework" />
+ </beans:bean>
+
+ <service ref="importer"
+ interface="org.eclipse.virgo.kernel.deployer.test.LoadableClasses" />
+
+</beans:beans>
diff --git a/test-apps/refresh/refresh-import-bundle/src/main/resources/META-INF/MANIFEST.MF b/test-apps/refresh/refresh-import-bundle/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..c1c1faa8
--- /dev/null
+++ b/test-apps/refresh/refresh-import-bundle/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: refresh-import-bundle
diff --git a/test-apps/refresh/refresh/build-par/build.xml b/test-apps/refresh/refresh/build-par/build.xml
new file mode 100644
index 00000000..82160100
--- /dev/null
+++ b/test-apps/refresh/refresh/build-par/build.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="RefreshTest">
+
+ <import file="${basedir}/../../../../virgo-build/multi-bundle/default.xml"/>
+
+ <path id="bundles">
+ <pathelement location="../exporter"/>
+ <pathelement location="../exporter2"/>
+ <pathelement location="../exporter3"/>
+ <pathelement location="../importer"/>
+ </path>
+
+ <property name="par.expanded.dir" value="${basedir}/target/par-expanded"/>
+
+ <target name="jar">
+ <all-bundles target="jar"/>
+
+ <mkdir dir="${par.expanded.dir}/build"/>
+ <copy todir="${par.expanded.dir}" file="../importer/target/artifacts/RefreshImporter.jar"/>
+ <copy todir="${par.expanded.dir}" file="../exporter/target/artifacts/RefreshExporter.jar"/>
+ <copy todir="${par.expanded.dir}/build" file="../exporter2/target/artifacts/RefreshExporterv2.jar"/>
+ <copy todir="${par.expanded.dir}/build" file="../exporter3/target/artifacts/RefreshExporterv3.jar"/>
+
+ <mkdir dir="${basedir}/target/artifacts"/>
+ <jar destfile="${basedir}/target/artifacts/refresh.par">
+ <fileset dir="${par.expanded.dir}" includes="**/*"/>
+ <manifest>
+ <attribute name="Application-Version" value="1.0"/>
+ <attribute name="Application-SymbolicName" value="${ant.project.name}"/>
+ </manifest>
+ </jar>
+
+ <copy todir="${basedir}/../../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources" file="target/artifacts/refresh.par"/>
+
+ </target>
+
+</project>
diff --git a/test-apps/refresh/refresh/build.properties b/test-apps/refresh/refresh/build.properties
new file mode 100644
index 00000000..10f7f235
--- /dev/null
+++ b/test-apps/refresh/refresh/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../../ivy-cache
+integration.repo.dir=${basedir}/../../../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/refresh/refresh/exporter/build.xml b/test-apps/refresh/refresh/exporter/build.xml
new file mode 100644
index 00000000..646d895e
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="RefreshExporter">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../../virgo-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/refresh/refresh/exporter/ivy.xml b/test-apps/refresh/refresh/exporter/ivy.xml
new file mode 100644
index 00000000..7fc2d939
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter/ivy.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="refresh" module="${ant.project.name}">
+ <ivyauthor name="robharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies/>
+
+</ivy-module>
diff --git a/test-apps/refresh/refresh/exporter/src/main/java/refresh/exporter/b1/B11.java b/test-apps/refresh/refresh/exporter/src/main/java/refresh/exporter/b1/B11.java
new file mode 100644
index 00000000..f88b07a7
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter/src/main/java/refresh/exporter/b1/B11.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.exporter.b1;
+
+
+public class B11 {
+
+}
diff --git a/test-apps/refresh/refresh/exporter/src/main/resources/META-INF/MANIFEST.MF b/test-apps/refresh/refresh/exporter/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..0c5f9e73
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-Name: RefreshExporter
+Created-By: 1.5.0_13 (Apple Computer, Inc.)
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: RefreshExporter
+Export-Package: refresh.exporter.b1
+Bundle-Version: 1
+
diff --git a/test-apps/refresh/refresh/exporter2/build.xml b/test-apps/refresh/refresh/exporter2/build.xml
new file mode 100644
index 00000000..e03189bf
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter2/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="RefreshExporterv2">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../../virgo-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/refresh/refresh/exporter2/ivy.xml b/test-apps/refresh/refresh/exporter2/ivy.xml
new file mode 100644
index 00000000..7fc2d939
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter2/ivy.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="refresh" module="${ant.project.name}">
+ <ivyauthor name="robharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies/>
+
+</ivy-module>
diff --git a/test-apps/refresh/refresh/exporter2/src/main/java/exporter/b1/B11.java b/test-apps/refresh/refresh/exporter2/src/main/java/exporter/b1/B11.java
new file mode 100644
index 00000000..f88b07a7
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter2/src/main/java/exporter/b1/B11.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.exporter.b1;
+
+
+public class B11 {
+
+}
diff --git a/test-apps/refresh/refresh/exporter2/src/main/java/exporter/b1/B12.java b/test-apps/refresh/refresh/exporter2/src/main/java/exporter/b1/B12.java
new file mode 100644
index 00000000..ac067161
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter2/src/main/java/exporter/b1/B12.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.exporter.b1;
+
+
+public class B12 {
+
+}
diff --git a/test-apps/refresh/refresh/exporter2/src/main/resources/META-INF/MANIFEST.MF b/test-apps/refresh/refresh/exporter2/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..1348e130
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter2/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-Name: RefreshExporter
+Created-By: 1.5.0_13 (Apple Computer, Inc.)
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: RefreshExporter
+Export-Package: refresh.exporter.b1
+Bundle-Version: 2
+
diff --git a/test-apps/refresh/refresh/exporter3/build.xml b/test-apps/refresh/refresh/exporter3/build.xml
new file mode 100644
index 00000000..54b2b456
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter3/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="RefreshExporterv3">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../../virgo-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/refresh/refresh/exporter3/ivy.xml b/test-apps/refresh/refresh/exporter3/ivy.xml
new file mode 100644
index 00000000..7fc2d939
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter3/ivy.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="refresh" module="${ant.project.name}">
+ <ivyauthor name="robharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies/>
+
+</ivy-module>
diff --git a/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b1/B11.java b/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b1/B11.java
new file mode 100644
index 00000000..f88b07a7
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b1/B11.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.exporter.b1;
+
+
+public class B11 {
+
+}
diff --git a/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b1/B12.java b/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b1/B12.java
new file mode 100644
index 00000000..ac067161
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b1/B12.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.exporter.b1;
+
+
+public class B12 {
+
+}
diff --git a/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b2/B21.java b/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b2/B21.java
new file mode 100644
index 00000000..d5f9ed2e
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter3/src/main/java/exporter/b2/B21.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.exporter.b2;
+
+
+public class B21 {
+
+}
diff --git a/test-apps/refresh/refresh/exporter3/src/main/resources/META-INF/MANIFEST.MF b/test-apps/refresh/refresh/exporter3/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..a1ebe063
--- /dev/null
+++ b/test-apps/refresh/refresh/exporter3/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-Name: RefreshExporter
+Created-By: 1.5.0_13 (Apple Computer, Inc.)
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: RefreshExporter
+Export-Package: refresh.exporter.b1,refresh.exporter.b2
+Bundle-Version: 3
+
diff --git a/test-apps/refresh/refresh/importer/build.xml b/test-apps/refresh/refresh/importer/build.xml
new file mode 100644
index 00000000..cc1120b9
--- /dev/null
+++ b/test-apps/refresh/refresh/importer/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="RefreshImporter">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../../build.versions"/>
+
+ <import file="${basedir}/../../../../virgo-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/refresh/refresh/importer/ivy.xml b/test-apps/refresh/refresh/importer/ivy.xml
new file mode 100644
index 00000000..d3915115
--- /dev/null
+++ b/test-apps/refresh/refresh/importer/ivy.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="refresh" module="${ant.project.name}">
+ <ivyauthor name="robharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->compile"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgi" rev="latest.integration" conf="provided->compile"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.deployer.test" rev="latest.integration" conf="provided->compile"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/refresh/refresh/importer/src/main/java/org/eclipse/virgo/kernel/deployer/test/LoadableClasses.java b/test-apps/refresh/refresh/importer/src/main/java/org/eclipse/virgo/kernel/deployer/test/LoadableClasses.java
new file mode 100644
index 00000000..e56913aa
--- /dev/null
+++ b/test-apps/refresh/refresh/importer/src/main/java/org/eclipse/virgo/kernel/deployer/test/LoadableClasses.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.deployer.test;
+
+import java.util.Set;
+
+public interface LoadableClasses {
+
+ Set<String> getLoadableClasses();
+
+}
diff --git a/test-apps/refresh/refresh/importer/src/main/java/refresh/importer/Importer.java b/test-apps/refresh/refresh/importer/src/main/java/refresh/importer/Importer.java
new file mode 100644
index 00000000..f1ed4d20
--- /dev/null
+++ b/test-apps/refresh/refresh/importer/src/main/java/refresh/importer/Importer.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package refresh.importer;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.osgi.framework.Bundle;
+
+import org.eclipse.virgo.kernel.deployer.test.LoadableClasses;
+import org.eclipse.virgo.kernel.osgi.framework.OsgiFramework;
+
+public class Importer implements LoadableClasses {
+
+ private final Set<String> loadableClasses = new HashSet<String>();
+
+ public Importer(OsgiFramework osgi) {
+ System.out.println("New Importer bean");
+ checkLoadClass("refresh.exporter.b1.B11");
+ checkLoadClass("refresh.exporter.b1.B12");
+ checkLoadClass("refresh.exporter.b2.B21");
+ Bundle[] bundles = osgi.getBundleContext().getBundles();
+ for (Bundle bundle : bundles) {
+ if (bundle.getSymbolicName().equals("RefreshTest-1-RefreshExporter")) {
+ System.out.println(bundle.getHeaders().get("bundle-version"));
+ }
+ }
+ }
+
+ private void checkLoadClass(String className) {
+ try {
+ this.getClass().getClassLoader().loadClass(className);
+ System.out.println(className + " is loadable");
+ loadableClasses.add(className);
+ } catch (ClassNotFoundException e) {
+ System.out.println(className + " is not loadable");
+ }
+ }
+
+ public Set<String> getLoadableClasses() {
+ return this.loadableClasses;
+ }
+
+}
diff --git a/test-apps/refresh/refresh/importer/src/main/resources/META-INF/MANIFEST.MF b/test-apps/refresh/refresh/importer/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..0357d763
--- /dev/null
+++ b/test-apps/refresh/refresh/importer/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-Name: RefreshImporter
+Created-By: 1.5.0_13 (Apple Computer, Inc.)
+Import-Package: org.osgi.framework,
+ org.eclipse.virgo.kernel.osgi.framework,
+ org.eclipse.virgo.kernel.deployer.test,
+ refresh.exporter.b1,
+ refresh.exporter.b2;resolution:=optional
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: RefreshImporter
+Bundle-Version: 1.0.0
+
diff --git a/test-apps/refresh/refresh/importer/src/main/resources/META-INF/spring/importer-context.xml b/test-apps/refresh/refresh/importer/src/main/resources/META-INF/spring/importer-context.xml
new file mode 100644
index 00000000..df598c1f
--- /dev/null
+++ b/test-apps/refresh/refresh/importer/src/main/resources/META-INF/spring/importer-context.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <reference id="osgiFramework"
+ interface="org.eclipse.virgo.kernel.osgi.framework.OsgiFramework" />
+
+ <beans:bean id="importer" class="refresh.importer.Importer">
+ <beans:constructor-arg ref="osgiFramework" />
+ </beans:bean>
+
+ <service ref="importer"
+ interface="org.eclipse.virgo.kernel.deployer.test.LoadableClasses" />
+
+</beans:beans>
diff --git a/test-apps/service-publication-from-repo-bundles/README.TXT b/test-apps/service-publication-from-repo-bundles/README.TXT
new file mode 100644
index 00000000..000ccf9d
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/README.TXT
@@ -0,0 +1,13 @@
+How to build
+------------
+
+1. Run ant jar in consumer
+ or
+2. Run ant jar in publisher
+
+Output
+------
+
+1. com.springsource.kernel.deployer/test/src/test/resources/service-publication-from-repo/consumer.jar
+ or
+2. com.springsource.kernel.deployer/test/src/test/resources/service-publication-from-repo/publisher.jar \ No newline at end of file
diff --git a/test-apps/service-publication-from-repo-bundles/build.properties b/test-apps/service-publication-from-repo-bundles/build.properties
new file mode 100644
index 00000000..0a1bca3f
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../ivy-cache
+integration.repo.dir=${basedir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/service-publication-from-repo-bundles/consumer/build.xml b/test-apps/service-publication-from-repo-bundles/consumer/build.xml
new file mode 100644
index 00000000..44b4b153
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/consumer/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="consumer">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/service-publication-from-repo/consumer.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-publication-from-repo-bundles/consumer/ivy.xml b/test-apps/service-publication-from-repo-bundles/consumer/ivy.xml
new file mode 100644
index 00000000..11bbbc04
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/consumer/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="service.publication.from.repo" module="${ant.project.name}">
+ <ivyauthor name="awilkinson"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-publication-from-repo-bundles/consumer/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-publication-from-repo-bundles/consumer/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..1c2ead8a
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/consumer/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Bundle-ManifestVersion: 2
+Manifest-Version: 1.0
+Bundle-SymbolicName: org.eclipse.virgo.server.test.consumer
+Import-Package: org.eclipse.virgo.server.test.publisher
diff --git a/test-apps/service-publication-from-repo-bundles/consumer/src/main/resources/META-INF/spring/app-context.xml b/test-apps/service-publication-from-repo-bundles/consumer/src/main/resources/META-INF/spring/app-context.xml
new file mode 100644
index 00000000..6a4393fe
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/consumer/src/main/resources/META-INF/spring/app-context.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+ <osgi:reference id="list" interface="java.util.List"/>
+
+</beans:beans>
diff --git a/test-apps/service-publication-from-repo-bundles/publisher/build.xml b/test-apps/service-publication-from-repo-bundles/publisher/build.xml
new file mode 100644
index 00000000..cb225c7b
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/publisher/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="publisher">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/service-publication-from-repo/publisher.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-publication-from-repo-bundles/publisher/ivy.xml b/test-apps/service-publication-from-repo-bundles/publisher/ivy.xml
new file mode 100644
index 00000000..11bbbc04
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/publisher/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="service.publication.from.repo" module="${ant.project.name}">
+ <ivyauthor name="awilkinson"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-publication-from-repo-bundles/publisher/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-publication-from-repo-bundles/publisher/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..9edfef1f
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/publisher/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Bundle-ManifestVersion: 2
+Manifest-Version: 1.0
+Bundle-SymbolicName: org.eclipse.virgo.server.test.publisher
+Export-Package: org.eclipse.virgo.server.test.publisher
diff --git a/test-apps/service-publication-from-repo-bundles/publisher/src/main/resources/META-INF/spring/app-context.xml b/test-apps/service-publication-from-repo-bundles/publisher/src/main/resources/META-INF/spring/app-context.xml
new file mode 100644
index 00000000..9f5947b0
--- /dev/null
+++ b/test-apps/service-publication-from-repo-bundles/publisher/src/main/resources/META-INF/spring/app-context.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+ <osgi:service ref="list" interface="java.util.List"/>
+ <beans:bean id="list" class="java.util.ArrayList"/>
+
+</beans:beans>
diff --git a/test-apps/service-scoping-engine-1265/README.TXT b/test-apps/service-scoping-engine-1265/README.TXT
new file mode 100644
index 00000000..52b7ac7a
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/README.TXT
@@ -0,0 +1,9 @@
+How to build
+------------
+
+Run ant jar in build-par
+
+Output
+------
+
+com.springsource.kernel.deployer.test/src/test/resources/service-scoping/service-scoping-engine-1265.par \ No newline at end of file
diff --git a/test-apps/service-scoping-engine-1265/build-par/build.xml b/test-apps/service-scoping-engine-1265/build-par/build.xml
new file mode 100644
index 00000000..3bf238dc
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/build-par/build.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="service-scoping-engine-1265">
+
+ <path id="bundles">
+ <pathelement location="../master"/>
+ <pathelement location="../dependent"/>
+ </path>
+
+ <property file="${basedir}/../build.properties"/>
+ <property name="par.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/service-scoping/service-scoping-engine-1265.par"/>
+ <import file="${basedir}/../../../spring-build/par/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping-engine-1265/build.properties b/test-apps/service-scoping-engine-1265/build.properties
new file mode 100644
index 00000000..0a1bca3f
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../ivy-cache
+integration.repo.dir=${basedir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/service-scoping-engine-1265/dependent/build.xml b/test-apps/service-scoping-engine-1265/dependent/build.xml
new file mode 100644
index 00000000..216d6243
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/dependent/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="scoping.service.dependent">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping-engine-1265/dependent/ivy.xml b/test-apps/service-scoping-engine-1265/dependent/ivy.xml
new file mode 100644
index 00000000..c1c1f7b3
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/dependent/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="scoping.service" module="${ant.project.name}">
+ <ivyauthor name="rharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..f0739305
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: dependent.bundle
+Bundle-Version: 1.0.0.SNAPSHOT
+Import-Library: org.springframework.spring
diff --git a/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/spring/bundle-context.xml b/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/spring/bundle-context.xml
new file mode 100644
index 00000000..4682df07
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/spring/bundle-context.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+ <!-- bean name="dependent-registrar" class="test.registrar.ResourceRegistrar"/-->
+
+ <context:component-scan base-package="test.scratch.dependent"/>
+
+</beans>
diff --git a/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/spring/osgi-context.xml b/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/spring/osgi-context.xml
new file mode 100644
index 00000000..f38eb3ab
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/dependent/src/main/resources/META-INF/spring/osgi-context.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <reference id="scratch-registrar"
+ interface="org.springframework.core.io.Resource" filter="(path=foo)" cardinality="0..1"/>
+
+ <list id="scratch-registrars"
+ interface="org.springframework.core.io.Resource" cardinality="0..N"/>
+
+</beans:beans>
diff --git a/test-apps/service-scoping-engine-1265/master/build.xml b/test-apps/service-scoping-engine-1265/master/build.xml
new file mode 100644
index 00000000..b3d919e7
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/master/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="scoping.service.master">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping-engine-1265/master/ivy.xml b/test-apps/service-scoping-engine-1265/master/ivy.xml
new file mode 100644
index 00000000..c1c1f7b3
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/master/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="scoping.service" module="${ant.project.name}">
+ <ivyauthor name="rharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..1275a83c
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: master.bundle
+Bundle-Version: 1.0.0.SNAPSHOT
+Import-Library: org.springframework.spring
diff --git a/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/spring/bundle-context.xml b/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/spring/bundle-context.xml
new file mode 100644
index 00000000..80430c76
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/spring/bundle-context.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <bean name="scratch-registrar"
+ class="org.springframework.core.io.ClassPathResource">
+ <constructor-arg value="META-INF/spring/bundle-context.xml"/>
+ </bean>
+
+ <bean name="other-resource"
+ class="org.springframework.core.io.ClassPathResource">
+ <constructor-arg value="META-INF/spring/bundle-context.xml"/>
+ </bean>
+
+ <bean id="properties"
+ class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+ <property name="properties">
+ <props>
+ <prop key="foo">bar</prop>
+ </props>
+ </property>
+ </bean>
+</beans>
diff --git a/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/spring/osgi-context.xml b/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/spring/osgi-context.xml
new file mode 100644
index 00000000..6a421432
--- /dev/null
+++ b/test-apps/service-scoping-engine-1265/master/src/main/resources/META-INF/spring/osgi-context.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <service ref="scratch-registrar"
+ interface="org.springframework.core.io.Resource">
+ <service-properties>
+ <beans:entry key="path" value="foo" />
+ </service-properties>
+ </service>
+
+ <service ref="other-resource"
+ interface="org.springframework.core.io.Resource"/>
+
+ <service ref="properties" interface="java.util.Properties" />
+
+</beans:beans>
diff --git a/test-apps/service-scoping-platform-183/README.TXT b/test-apps/service-scoping-platform-183/README.TXT
new file mode 100644
index 00000000..30c7a08c
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/README.TXT
@@ -0,0 +1,9 @@
+How to build
+------------
+
+Run ant jar in build-par
+
+Output
+------
+
+com.springsource.kernel.deployer.test/src/test/resources/service-scoping/service-scoping-platform-183.par
diff --git a/test-apps/service-scoping-platform-183/build-par/build.xml b/test-apps/service-scoping-platform-183/build-par/build.xml
new file mode 100644
index 00000000..1302b10d
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/build-par/build.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="service-scoping-platform-183">
+
+ <path id="bundles">
+ <pathelement location="../scoping.service.module.a"/>
+ <pathelement location="../scoping.service.module.b"/>
+ </path>
+
+ <property file="${basedir}/../build.properties"/>
+ <property name="par.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/service-scoping/service-scoping-platform-183.par"/>
+ <import file="${basedir}/../../../spring-build/par/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping-platform-183/build.properties b/test-apps/service-scoping-platform-183/build.properties
new file mode 100644
index 00000000..aa48e854
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${user.dir}/../../ivy-cache
+integration.repo.dir=${user.dir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.a/.classpath b/test-apps/service-scoping-platform-183/scoping.service.module.a/.classpath
new file mode 100644
index 00000000..adebb12a
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.a/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.a/.project b/test-apps/service-scoping-platform-183/scoping.service.module.a/.project
new file mode 100644
index 00000000..020774aa
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.a/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>scoping.service.module.a</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.a/build.xml b/test-apps/service-scoping-platform-183/scoping.service.module.a/build.xml
new file mode 100644
index 00000000..eb1852a4
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.a/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="scoping.service.module.a">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.a/ivy.xml b/test-apps/service-scoping-platform-183/scoping.service.module.a/ivy.xml
new file mode 100644
index 00000000..c1c1f7b3
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.a/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="scoping.service" module="${ant.project.name}">
+ <ivyauthor name="rharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.a/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-scoping-platform-183/scoping.service.module.a/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..9d371f0b
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.a/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: scoping.service.module.a
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.a/src/main/resources/META-INF/spring/module.xml b/test-apps/service-scoping-platform-183/scoping.service.module.a/src/main/resources/META-INF/spring/module.xml
new file mode 100644
index 00000000..9881b443
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.a/src/main/resources/META-INF/spring/module.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <reference id="local" interface="java.lang.Appendable"/>
+
+</beans:beans>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.b/.classpath b/test-apps/service-scoping-platform-183/scoping.service.module.b/.classpath
new file mode 100644
index 00000000..adebb12a
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.b/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.b/.project b/test-apps/service-scoping-platform-183/scoping.service.module.b/.project
new file mode 100644
index 00000000..ff388df0
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.b/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>scoping.service.module.b</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.b/build.xml b/test-apps/service-scoping-platform-183/scoping.service.module.b/build.xml
new file mode 100644
index 00000000..69ce7e4d
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.b/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="scoping.service.module.b">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.b/ivy.xml b/test-apps/service-scoping-platform-183/scoping.service.module.b/ivy.xml
new file mode 100644
index 00000000..c1c1f7b3
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.b/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="scoping.service" module="${ant.project.name}">
+ <ivyauthor name="rharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.b/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-scoping-platform-183/scoping.service.module.b/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..aa2130a8
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.b/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: scoping.service.module.b
diff --git a/test-apps/service-scoping-platform-183/scoping.service.module.b/src/main/resources/META-INF/spring/module.xml b/test-apps/service-scoping-platform-183/scoping.service.module.b/src/main/resources/META-INF/spring/module.xml
new file mode 100644
index 00000000..467524de
--- /dev/null
+++ b/test-apps/service-scoping-platform-183/scoping.service.module.b/src/main/resources/META-INF/spring/module.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <service ref="appendable">
+ <interfaces>
+ <beans:value>java.lang.Appendable
+ </beans:value>
+ </interfaces>
+ </service>
+
+ <beans:bean id="appendable" class="java.lang.StringBuilder" />
+
+</beans:beans>
diff --git a/test-apps/service-scoping/README.TXT b/test-apps/service-scoping/README.TXT
new file mode 100644
index 00000000..c20786d8
--- /dev/null
+++ b/test-apps/service-scoping/README.TXT
@@ -0,0 +1,13 @@
+How to build
+------------
+
+1. Run ant jar in build-par
+ or
+2. Run ant jar in scoping.service.global
+
+Output
+------
+
+1. com.springsource.kernel.deployer.test/src/test/resources/service-scoping/service-scoping.par
+ or
+2. com.springsource.kernel.deployer.test/src/test/resources/service-scoping/scoping.service.global.jar
diff --git a/test-apps/service-scoping/build-par/build.xml b/test-apps/service-scoping/build-par/build.xml
new file mode 100644
index 00000000..2bfd8703
--- /dev/null
+++ b/test-apps/service-scoping/build-par/build.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="service-scoping">
+
+ <path id="bundles">
+ <pathelement location="../scoping.service.module.a"/>
+ <pathelement location="../scoping.service.module.b"/>
+ </path>
+
+ <property file="${basedir}/../build.properties"/>
+ <property name="par.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/service-scoping/service-scoping.par"/>
+ <import file="${basedir}/../../../spring-build/par/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping/build.properties b/test-apps/service-scoping/build.properties
new file mode 100644
index 00000000..0a1bca3f
--- /dev/null
+++ b/test-apps/service-scoping/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../ivy-cache
+integration.repo.dir=${basedir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/service-scoping/scoping.service.global/.classpath b/test-apps/service-scoping/scoping.service.global/.classpath
new file mode 100644
index 00000000..adebb12a
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.global/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/service-scoping/scoping.service.global/.project b/test-apps/service-scoping/scoping.service.global/.project
new file mode 100644
index 00000000..e283420b
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.global/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>scoping.service.global</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/service-scoping/scoping.service.global/build.xml b/test-apps/service-scoping/scoping.service.global/build.xml
new file mode 100644
index 00000000..a687512f
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.global/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="scoping.service.global">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/service-scoping/scoping.service.global.jar"/>
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping/scoping.service.global/ivy.xml b/test-apps/service-scoping/scoping.service.global/ivy.xml
new file mode 100644
index 00000000..1e2b9cb4
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.global/ivy.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="scoping.service" module="${ant.project.name}">
+ <ivyauthor name="rharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-scoping/scoping.service.global/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-scoping/scoping.service.global/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..303243a0
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.global/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: scoping.service.global
diff --git a/test-apps/service-scoping/scoping.service.global/src/main/resources/META-INF/spring/module.xml b/test-apps/service-scoping/scoping.service.global/src/main/resources/META-INF/spring/module.xml
new file mode 100644
index 00000000..6d9b8263
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.global/src/main/resources/META-INF/spring/module.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+ <service ref="appendable" interface="java.lang.Appendable">
+ <service-properties>
+ <beans:entry key="provider" value="global" />
+ </service-properties>
+ </service>
+ <beans:bean id="appendable" class="java.lang.StringBuilder" />
+</beans:beans>
diff --git a/test-apps/service-scoping/scoping.service.module.a/.classpath b/test-apps/service-scoping/scoping.service.module.a/.classpath
new file mode 100644
index 00000000..adebb12a
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.a/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/service-scoping/scoping.service.module.a/.project b/test-apps/service-scoping/scoping.service.module.a/.project
new file mode 100644
index 00000000..020774aa
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.a/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>scoping.service.module.a</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/service-scoping/scoping.service.module.a/build.xml b/test-apps/service-scoping/scoping.service.module.a/build.xml
new file mode 100644
index 00000000..eb1852a4
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.a/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="scoping.service.module.a">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping/scoping.service.module.a/ivy.xml b/test-apps/service-scoping/scoping.service.module.a/ivy.xml
new file mode 100644
index 00000000..6e13fe0a
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.a/ivy.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="scoping.service" module="${ant.project.name}">
+ <ivyauthor name="rharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-scoping/scoping.service.module.a/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-scoping/scoping.service.module.a/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..9d371f0b
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.a/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: scoping.service.module.a
diff --git a/test-apps/service-scoping/scoping.service.module.a/src/main/resources/META-INF/spring/module.xml b/test-apps/service-scoping/scoping.service.module.a/src/main/resources/META-INF/spring/module.xml
new file mode 100644
index 00000000..4d29c3ae
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.a/src/main/resources/META-INF/spring/module.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <reference id="local" interface="java.lang.Appendable"/>
+ <reference id="localWithFilter" interface="java.lang.Appendable" filter="(provider=local)"/>
+ <reference id="serializable" interface="java.io.Serializable" filter="(a=b)"/>
+
+</beans:beans>
diff --git a/test-apps/service-scoping/scoping.service.module.b/.classpath b/test-apps/service-scoping/scoping.service.module.b/.classpath
new file mode 100644
index 00000000..52e5a8c0
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-3.5.1.R35x_v20091005.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.1.R35x_v20091005/org.eclipse.osgi-3.5.1.R35x_v20091005.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/service-scoping/scoping.service.module.b/.project b/test-apps/service-scoping/scoping.service.module.b/.project
new file mode 100644
index 00000000..ff388df0
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>scoping.service.module.b</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/service-scoping/scoping.service.module.b/build.xml b/test-apps/service-scoping/scoping.service.module.b/build.xml
new file mode 100644
index 00000000..69ce7e4d
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="scoping.service.module.b">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+
+ <import file="${basedir}/../../../spring-build/standard/default.xml"/>
+
+</project>
diff --git a/test-apps/service-scoping/scoping.service.module.b/ivy.xml b/test-apps/service-scoping/scoping.service.module.b/ivy.xml
new file mode 100644
index 00000000..89025312
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/ivy.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="scoping.service" module="${ant.project.name}">
+ <ivyauthor name="rharrop"/>
+ </info>
+
+ <configurations>
+ <include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->runtime"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/Activator.java b/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/Activator.java
new file mode 100644
index 00000000..853a2f9a
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/Activator.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package scoping;
+
+import java.lang.management.ManagementFactory;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+
+public class Activator implements BundleActivator {
+
+ private final String OBJECT_NAME = "scoping.test:type=Listener";
+
+ public void start(BundleContext context) throws Exception {
+ Listener listener = new Listener(context);
+ context.addServiceListener(listener, "(test-case=app-listener)");
+
+ MBeanServer server = ManagementFactory.getPlatformMBeanServer();
+ server.registerMBean(listener, ObjectName.getInstance(OBJECT_NAME));
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ MBeanServer server = ManagementFactory.getPlatformMBeanServer();
+ server.unregisterMBean(ObjectName.getInstance(OBJECT_NAME));
+ }
+
+}
diff --git a/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/Listener.java b/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/Listener.java
new file mode 100644
index 00000000..579c8bcd
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/Listener.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package scoping;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+
+public class Listener implements ListenerMBean, ServiceListener {
+
+ private final AtomicInteger counter = new AtomicInteger();
+
+ private final BundleContext context;
+
+ public Listener(BundleContext context) {
+ this.context = context;
+ }
+
+ public int getCount() {
+ return this.counter.get();
+ }
+
+ public void registerService() {
+ Dictionary<String, String> properties = new Hashtable<String, String>();
+ properties.put("test-case", "app-listener");
+ this.context.registerService(CharSequence.class.getName(), "test", properties);
+ }
+
+ public void serviceChanged(ServiceEvent event) {
+ if (event.getType() == ServiceEvent.REGISTERED) {
+ this.counter.incrementAndGet();
+ }
+ }
+
+}
diff --git a/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/ListenerMBean.java b/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/ListenerMBean.java
new file mode 100644
index 00000000..99c2cc4e
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/src/main/java/scoping/ListenerMBean.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package scoping;
+
+
+public interface ListenerMBean {
+
+ int getCount();
+
+ void registerService();
+}
diff --git a/test-apps/service-scoping/scoping.service.module.b/src/main/resources/META-INF/MANIFEST.MF b/test-apps/service-scoping/scoping.service.module.b/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..3a971669
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: scoping.service.module.b
+Import-Package: org.osgi.framework, javax.management
+Bundle-Activator: scoping.Activator
diff --git a/test-apps/service-scoping/scoping.service.module.b/src/main/resources/META-INF/spring/module.xml b/test-apps/service-scoping/scoping.service.module.b/src/main/resources/META-INF/spring/module.xml
new file mode 100644
index 00000000..4fac5911
--- /dev/null
+++ b/test-apps/service-scoping/scoping.service.module.b/src/main/resources/META-INF/spring/module.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+ <service ref="appendable" interface="java.lang.Appendable">
+ <service-properties>
+ <beans:entry key="provider" value="local" />
+ </service-properties>
+ </service>
+
+ <service id="nestingCheck" interface="java.io.Serializable">
+ <beans:bean class="java.lang.String">
+ <beans:constructor-arg value="foo"/>
+ </beans:bean>
+ </service>
+
+ <service id="interfacesCheck">
+ <interfaces>
+ <beans:value>java.io.Serializable</beans:value>
+ </interfaces>
+ <service-properties>
+ <beans:entry key="a" value="b"/>
+ </service-properties>
+ <beans:bean class="java.lang.String">
+ <beans:constructor-arg value="foo"/>
+ </beans:bean>
+ </service>
+
+ <service id="publishIntoGlobal" interface="java.lang.CharSequence">
+ <service-properties>
+ <beans:entry key="com.springsource.service.scope" value="global" />
+ </service-properties>
+ <beans:bean class="java.lang.String">
+ <beans:constructor-arg value="foo"/>
+ </beans:bean>
+ </service>
+
+ <beans:bean id="appendable" class="java.lang.StringBuilder" />
+
+ <reference id="global" interface="java.lang.Appendable" filter="(provider=global)"/>
+</beans:beans>
diff --git a/test-apps/spring-2.5.6.A-sample/.classpath b/test-apps/spring-2.5.6.A-sample/.classpath
new file mode 100644
index 00000000..f04c0853
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/.classpath
@@ -0,0 +1,12 @@
+<?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="com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.springsource.server.ide.server.core.runtime.classpath/SpringSource dm Server (Runtime) v2.0"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/2.5.6.A/org.springframework.beans-2.5.6.A.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/2.5.6.A/org.springframework.beans-sources-2.5.6.A.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/test-apps/spring-2.5.6.A-sample/.project b/test-apps/spring-2.5.6.A-sample/.project
new file mode 100644
index 00000000..3be0e843
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>spring-2.5.6.A-sample</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/test-apps/spring-2.5.6.A-sample/.springBeans b/test-apps/spring-2.5.6.A-sample/.springBeans
new file mode 100644
index 00000000..8058887d
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/.springBeans
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+ <version>1</version>
+ <pluginVersion><![CDATA[2.2.6.200908051215-RELEASE]]></pluginVersion>
+ <configSuffixes>
+ <configSuffix><![CDATA[xml]]></configSuffix>
+ </configSuffixes>
+ <enableImports><![CDATA[false]]></enableImports>
+ <configs>
+ </configs>
+ <configSets>
+ </configSets>
+</beansProjectDescription>
diff --git a/test-apps/spring-2.5.6.A-sample/build.properties b/test-apps/spring-2.5.6.A-sample/build.properties
new file mode 100644
index 00000000..0a1bca3f
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/build.properties
@@ -0,0 +1,6 @@
+version=1.0.0
+release.type=integration
+bucket.basename=springsource.com
+ivy.cache.dir=${basedir}/../../ivy-cache
+integration.repo.dir=${basedir}/../../integration-repo
+disable.bundlor=true
diff --git a/test-apps/spring-2.5.6.A-sample/build.xml b/test-apps/spring-2.5.6.A-sample/build.xml
new file mode 100644
index 00000000..36cfd819
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/build.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="spring.256A.sample">
+ <property file="${basedir}/build.properties"/>
+ <property file="${basedir}/../../build.versions"/>
+ <property name="jar.output.file" value="${basedir}/../../org.eclipse.virgo.kernel.deployer.test/src/test/resources/spring.256A.sample.jar"/>
+ <import file="${basedir}/../../spring-build/standard/default.xml"/>
+</project>
diff --git a/test-apps/spring-2.5.6.A-sample/ivy.xml b/test-apps/spring-2.5.6.A-sample/ivy.xml
new file mode 100644
index 00000000..de4b63aa
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/ivy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.server.test" module="${ant.project.name}">
+ <ivyauthor name="rmadala" />
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml" />
+ </configurations>
+
+ <publications>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.springframework" name="org.springframework.beans" rev="2.5.6.A" conf="provided->compile"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/test-apps/spring-2.5.6.A-sample/src/main/java/spring/sample/SampleBean.java b/test-apps/spring-2.5.6.A-sample/src/main/java/spring/sample/SampleBean.java
new file mode 100644
index 00000000..8964939e
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/src/main/java/spring/sample/SampleBean.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package spring.sample;
+
+import org.springframework.beans.BeanUtils;
+
+public class SampleBean {
+
+ @SuppressWarnings("unused")
+ private final BeanUtils beanUtils;
+
+ public SampleBean() {
+ this.beanUtils = new BeanUtils() {
+ };
+ }
+
+ private String username;
+
+ private String password;
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+}
diff --git a/test-apps/spring-2.5.6.A-sample/src/main/resources/META-INF/MANIFEST.MF b/test-apps/spring-2.5.6.A-sample/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..35961ba1
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-Name: Spring 2.5.6.A Sample
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: spring.256A.sample
+Bundle-Version: 1.0.0
+Import-Bundle: org.springframework.beans;version="[2.5.6.A,2.5.6.A]"
+
+
diff --git a/test-apps/spring-2.5.6.A-sample/src/main/resources/META-INF/spring/applicationContext.xml b/test-apps/spring-2.5.6.A-sample/src/main/resources/META-INF/spring/applicationContext.xml
new file mode 100644
index 00000000..55be4033
--- /dev/null
+++ b/test-apps/spring-2.5.6.A-sample/src/main/resources/META-INF/spring/applicationContext.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <bean id="sampleBean" class="spring.sample.SampleBean">
+ <property name="username" value="admin"></property>
+ </bean>
+</beans>

Back to the top