tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r416333 [1/5] - in /incubator/tuscany/sandbox/jboynes/sca: containers/ containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/ containers/container.java/ core2/src/main/java/org/apache/tuscany/core/bootstrap/ core2/sr...
Date Thu, 22 Jun 2006 11:20:33 GMT
Author: jmarino
Date: Thu Jun 22 04:20:25 2006
New Revision: 416333

URL: http://svn.apache.org/viewvc?rev=416333&view=rev
Log:
container merge to core2

Added:
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/ScopeIdentifier.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/WorkContextImpl.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractEvent.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractRequestEvent.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeEvent.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStart.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStop.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEnd.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEvent.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionStart.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEnd.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEvent.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestStart.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeObjectFactory.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeObjectFactory.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeObjectFactory.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ScopeRegistryImpl.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/StatelessScopeContainer.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/StatelessScopeObjectFactory.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/PojoAtomicComponent.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoAtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/PojoComponentType.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/model/PojoComponentType.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/PojoConfiguration.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/PojoConfiguration.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/composite/
      - copied from r415180, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/composite/AbstractCompositeComponent.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/AbstractCompositeComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/composite/CompositeBuilder.java
      - copied, changed from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeBuilder.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/composite/CompositeComponentImpl.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/CompositeComponentImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/composite/CompositeLoader.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/composite/builder/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/builder/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/composite/loader/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/loader/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/java/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/java/JavaAtomicComponent.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/containers/container.java/src/main/java/org/apache/tuscany/container/java/JavaAtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/java/JavaComponentBuilder.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/containers/container.java/src/main/java/org/apache/tuscany/container/java/JavaComponentBuilder.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/java/JavaComponentTypeLoader.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/containers/container.java/src/main/java/org/apache/tuscany/container/java/JavaComponentTypeLoader.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/java/JavaImplementation.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/containers/container.java/src/main/java/org/apache/tuscany/container/java/JavaImplementation.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/java/JavaImplementationLoader.java   (contents, props changed)
      - copied, changed from r416162, incubator/tuscany/sandbox/jboynes/sca/containers/container.java/src/main/java/org/apache/tuscany/container/java/JavaImplementationLoader.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/java/JavaTargetInvoker.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/containers/container.java/src/main/java/org/apache/tuscany/container/java/JavaTargetInvoker.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/
      - copied from r415180, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/builder/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/loader/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/loader/SystemBindingLoader.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/loader/SystemComponentTypeLoader.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/loader/SystemImplementationLoader.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/model/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/model/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/wire/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ContextInjector.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/injection/ContextInjector.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/EventInvoker.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/injection/EventInvoker.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/InjectionRuntimeException.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/injection/InjectionRuntimeException.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/Injector.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/injection/Injector.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ObjectCallbackException.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/injection/ObjectCallbackException.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/PojoObjectFactory.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/injection/PojoObjectFactory.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/event/EventTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/AbstractScopeContainerTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicHttpSessionScopeTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicModuleScopeTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicRequestScopeTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicStatelessScopeTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/DependencyLifecycleTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeInstanceLifecycleTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeRestartTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/InstanceWrapperTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeInstanceLifecycleTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeObjectFactoryTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeRestartTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/RequestScopeInstanceLifecycleTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/RequestScopeRestartTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ScopeRegistryTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/StatelessScopeContainerTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/StatelessScopeObjectFactoryTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/WorkContextTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/composite/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/composite/CompositeComponentTestCase.java   (contents, props changed)
      - copied, changed from r415960, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/CompositeComponentTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/DifferentInterfaceWireTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/GetServiceByNameTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/JavaAtomicComponentMetadataInjectionTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/JavaAtomicComponentNegativeMetadataTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/JavaComponentBuilderTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/JavaReferenceWireTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/JavaTargetInvokerTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/MultiplicityTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/ReferenceInjectionTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/integration/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/integration/component/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/integration/component/OutboundWireToJavaTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/integration/component/ScopeReferenceTestCase.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/MockFactory.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/components/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/components/OtherTarget.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/components/OtherTargetImpl.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/components/Source.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/components/SourceImpl.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/components/Target.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/java/mock/components/TargetImpl.java   (with props)
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/
      - copied from r415180, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/builder/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/builder/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/component/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/wire/
      - copied from r416331, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/
Removed:
    incubator/tuscany/sandbox/jboynes/sca/containers/container.java/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/AbstractCompositeComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/CompositeComponentImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/PojoAtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/model/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/CompositeComponentTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/
    incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/component/PojoConfiguration.java
    incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/injection/
    incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/model/PojoComponentType.java
    incubator/tuscany/sandbox/jboynes/sca/spi/src/test/java/org/apache/tuscany/spi/injection/
Modified:
    incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/containers/pom.xml
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultBootstrapper.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultRuntime.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/deployer/DeployerImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/builder/SystemBindingBuilder.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilder.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/builder/SystemCompositeBuilder.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/ObjectRegistrationException.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemAtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemAtomicComponentImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemCompositeComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemCompositeComponentImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemReference.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemReferenceImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemService.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemServiceImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemSingletonAtomicComponent.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/component/SystemWireObjectFactory.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/loader/SystemCompositeComponentTypeLoader.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/model/SystemBinding.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/model/SystemCompositeImplementation.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/model/SystemImplementation.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemInboundWire.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemInboundWireImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowire.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundWire.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundWireImpl.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/FieldInjector.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/InvalidAccessorException.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/MethodEventInvoker.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/MethodInjector.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/NoAccessorException.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/deployer/BootstrapDeployerTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/AutowireResolutionTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/AutowireTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/CompositePropagationTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/DuplicateRegistrationTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/SystemAtomicComponentTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/SystemCompositeComponentResolutionTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/SystemCompositeLifecycleTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/component/SystemObjectRegistrationTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/wire/AtomicComponentWireInvocationTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemInboundtoOutboundTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundToInboundTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemServiceComponentWireTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/SystemBuildersTestCase.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockComponentFactory.java
    incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockFactory.java

Modified: incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java?rev=416333&r1=416332&r2=416333&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java Thu Jun 22 04:20:25 2006
@@ -5,6 +5,7 @@
 
 import org.apache.tuscany.container.groovy.mock.Greeting;
 import org.apache.tuscany.core.component.scope.ModuleScopeContainer;
+
 import org.apache.tuscany.spi.model.Scope;
 import org.apache.tuscany.spi.wire.InboundInvocationChain;
 import org.apache.tuscany.spi.wire.InboundWire;

Modified: incubator/tuscany/sandbox/jboynes/sca/containers/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/containers/pom.xml?rev=416333&r1=416332&r2=416333&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/containers/pom.xml (original)
+++ incubator/tuscany/sandbox/jboynes/sca/containers/pom.xml Thu Jun 22 04:20:25 2006
@@ -31,7 +31,7 @@
 
     <modules>
         <module>container.groovy</module>
-        <module>container.java</module>
+        <!--<module>container.java</module>-->
         <!--<module>container.js</module>-->
         <module>container.spring</module>
     </modules>

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultBootstrapper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultBootstrapper.java?rev=416333&r1=416332&r2=416333&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultBootstrapper.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultBootstrapper.java Thu Jun 22 04:20:25 2006
@@ -16,13 +16,31 @@
  */
 package org.apache.tuscany.core.bootstrap;
 
+import org.apache.tuscany.spi.builder.BuilderRegistry;
+import org.apache.tuscany.spi.component.ScopeRegistry;
+import org.apache.tuscany.spi.deployer.Deployer;
+import org.apache.tuscany.spi.extension.LoaderExtension;
+import org.apache.tuscany.spi.loader.LoaderRegistry;
+import org.apache.tuscany.spi.loader.StAXPropertyFactory;
+import org.apache.tuscany.spi.monitor.MonitorFactory;
+
 import org.apache.tuscany.core.builder.BuilderRegistryImpl;
 import org.apache.tuscany.core.builder.Connector;
 import org.apache.tuscany.core.builder.ConnectorImpl;
 import org.apache.tuscany.core.component.WorkContextImpl;
 import org.apache.tuscany.core.component.scope.ScopeRegistryImpl;
-import org.apache.tuscany.core.composite.CompositeLoader;
 import org.apache.tuscany.core.deployer.DeployerImpl;
+import org.apache.tuscany.core.implementation.composite.CompositeLoader;
+import org.apache.tuscany.core.implementation.system.builder.SystemBindingBuilder;
+import org.apache.tuscany.core.implementation.system.builder.SystemComponentBuilder;
+import org.apache.tuscany.core.implementation.system.builder.SystemCompositeBuilder;
+import org.apache.tuscany.core.implementation.system.loader.SystemBindingLoader;
+import org.apache.tuscany.core.implementation.system.loader.SystemComponentTypeLoader;
+import org.apache.tuscany.core.implementation.system.loader.SystemCompositeComponentTypeLoader;
+import org.apache.tuscany.core.implementation.system.loader.SystemImplementationLoader;
+import org.apache.tuscany.core.implementation.system.model.SystemBinding;
+import org.apache.tuscany.core.implementation.system.model.SystemCompositeImplementation;
+import org.apache.tuscany.core.implementation.system.model.SystemImplementation;
 import org.apache.tuscany.core.loader.ComponentLoader;
 import org.apache.tuscany.core.loader.ComponentTypeElementLoader;
 import org.apache.tuscany.core.loader.InterfaceJavaLoader;
@@ -31,23 +49,6 @@
 import org.apache.tuscany.core.loader.ReferenceLoader;
 import org.apache.tuscany.core.loader.ServiceLoader;
 import org.apache.tuscany.core.loader.StringParserPropertyFactory;
-import org.apache.tuscany.core.system.builder.SystemBindingBuilder;
-import org.apache.tuscany.core.system.builder.SystemComponentBuilder;
-import org.apache.tuscany.core.system.builder.SystemCompositeBuilder;
-import org.apache.tuscany.core.system.loader.SystemBindingLoader;
-import org.apache.tuscany.core.system.loader.SystemComponentTypeLoader;
-import org.apache.tuscany.core.system.loader.SystemCompositeComponentTypeLoader;
-import org.apache.tuscany.core.system.loader.SystemImplementationLoader;
-import org.apache.tuscany.core.system.model.SystemBinding;
-import org.apache.tuscany.core.system.model.SystemCompositeImplementation;
-import org.apache.tuscany.core.system.model.SystemImplementation;
-import org.apache.tuscany.spi.builder.BuilderRegistry;
-import org.apache.tuscany.spi.component.ScopeRegistry;
-import org.apache.tuscany.spi.deployer.Deployer;
-import org.apache.tuscany.spi.extension.LoaderExtension;
-import org.apache.tuscany.spi.loader.LoaderRegistry;
-import org.apache.tuscany.spi.loader.StAXPropertyFactory;
-import org.apache.tuscany.spi.monitor.MonitorFactory;
 
 /**
  * A Tuscany runtime bootstrapper responsible for instantiating the runtime with the default primordial configuration
@@ -67,8 +68,8 @@
 
     public DefaultBootstrapper(MonitorFactory monitorFactory) {
         this(getDefaultLoaderRegistry(monitorFactory, new StringParserPropertyFactory()),
-                getDefaultBuilderRegistry(),
-                getDefaultConnector());
+            getDefaultBuilderRegistry(),
+            getDefaultConnector());
     }
 
     public Deployer createDeployer() {
@@ -88,15 +89,16 @@
         return builderRegistry;
     }
 
-    protected static LoaderRegistry getDefaultLoaderRegistry(MonitorFactory monitorFactory, StAXPropertyFactory propertyFactory) {
+    protected static LoaderRegistry getDefaultLoaderRegistry(MonitorFactory monitorFactory,
+                                                             StAXPropertyFactory propertyFactory) {
         LoaderRegistryImpl loaderRegistry = new LoaderRegistryImpl();
         loaderRegistry.setMonitor(monitorFactory.getMonitor(LoaderRegistryImpl.Monitor.class));
 
         // register component type loaders
         loaderRegistry.registerLoader(SystemImplementation.class,
-                new SystemComponentTypeLoader());
+            new SystemComponentTypeLoader());
         loaderRegistry.registerLoader(SystemCompositeImplementation.class,
-                new SystemCompositeComponentTypeLoader(loaderRegistry));
+            new SystemCompositeComponentTypeLoader(loaderRegistry));
 
         // register element loaders
         registerLoader(loaderRegistry, new ComponentLoader(loaderRegistry, propertyFactory));

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultRuntime.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultRuntime.java?rev=416333&r1=416332&r2=416333&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultRuntime.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/bootstrap/DefaultRuntime.java Thu Jun 22 04:20:25 2006
@@ -21,8 +21,8 @@
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.deployer.Deployer;
 
-import org.apache.tuscany.core.system.component.SystemCompositeComponent;
-import org.apache.tuscany.core.system.component.SystemCompositeComponentImpl;
+import org.apache.tuscany.core.implementation.system.component.SystemCompositeComponent;
+import org.apache.tuscany.core.implementation.system.component.SystemCompositeComponentImpl;
 
 /**
  * The default implementation of the Tuscany runtime component

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/ScopeIdentifier.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/ScopeIdentifier.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/ScopeIdentifier.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/ScopeIdentifier.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,17 @@
+package org.apache.tuscany.core.component;
+
+/**
+ * Implementations enable lazy retrieval of a scope id associated with a request, i.e. an id (and presumably a context)
+ * do not have to be generated if the scope is never accessed. Identifiers are associated with the current request
+ * thread and keyed on scope type.
+ *
+ * @version $Rev: 415032 $ $Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $
+ * @see org.apache.tuscany.spi.component.WorkContext
+ */
+public interface ScopeIdentifier {
+
+    /**
+     * Returns the scope id for the request.
+     */
+    Object getIdentifier();
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/ScopeIdentifier.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/ScopeIdentifier.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/WorkContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/WorkContextImpl.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/WorkContextImpl.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/WorkContextImpl.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,84 @@
+package org.apache.tuscany.core.component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.component.WorkContext;
+
+/**
+ * An implementation of an {@link org.apache.tuscany.spi.component.WorkContext} that handles event-to-thread
+ * associations using an <code>InheritableThreadLocal</code>
+ *
+ * @version $Rev: 415032 $ $Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $
+ */
+public class WorkContextImpl implements WorkContext {
+
+    private static final Object REMOTE_CONTEXT = new Object();
+
+    // TODO implement propagation strategy for creating new threads
+
+    //A map ( associated with the current thread) of scope identifiers keyed on the event context id type.
+    //The scope identifier may be a {@link ScopeIdentifier} or an opaque id
+    private ThreadLocal<Map<Object, Object>> workContext = new InheritableThreadLocal<Map<Object, Object>>();
+
+    public WorkContextImpl() {
+        super();
+    }
+
+    public CompositeComponent getRemoteComponent() {
+        Map<Object, Object> map = workContext.get();
+        if (map == null) {
+            return null;
+        }
+        return (CompositeComponent) map.get(REMOTE_CONTEXT);
+    }
+
+
+    public void setRemoteComponent(CompositeComponent component) {
+        Map<Object, Object> map = workContext.get();
+        if (map == null) {
+            map = new HashMap<Object, Object>();
+            workContext.set(map);
+        }
+        map.put(REMOTE_CONTEXT, component);
+    }
+
+    public Object getIdentifier(Object type) {
+        Map<Object, Object> map = workContext.get();
+        if (map == null) {
+            return null;
+        }
+        Object currentId = map.get(type);
+        if (currentId instanceof ScopeIdentifier) {
+            currentId = ((ScopeIdentifier) currentId).getIdentifier();
+            // once we have accessed the id, replace the lazy wrapper
+            map.put(type, currentId);
+        }
+        return currentId;
+    }
+
+    public void setIdentifier(Object type, Object identifier) {
+        Map<Object, Object> map = workContext.get();
+        if (map == null) {
+            map = new HashMap<Object, Object>();
+            workContext.set(map);
+        }
+        map.put(type, identifier);
+    }
+
+    public void clearIdentifier(Object type) {
+        if (type == null) {
+            return;
+        }
+        Map map = workContext.get();
+        if (map != null) {
+            map.remove(type);
+        }
+    }
+
+    public void clearIdentifiers() {
+        workContext.remove();
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/WorkContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/WorkContextImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractEvent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractEvent.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractEvent.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractEvent.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,22 @@
+package org.apache.tuscany.core.component.event;
+
+import org.apache.tuscany.spi.event.Event;
+
+/**
+ * A basic implementation of a runtime event
+ *
+ * @version $$Rev: 415032 $$ $$Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $$
+ */
+public abstract class AbstractEvent implements Event {
+
+    protected transient Object source;
+
+    public AbstractEvent(Object source) {
+        assert source != null : "Source id was null";
+        this.source = source;
+    }
+
+    public Object getSource() {
+        return source;
+    }
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractEvent.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractRequestEvent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractRequestEvent.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractRequestEvent.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractRequestEvent.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,33 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.tuscany.core.component.event;
+
+/**
+ * Base implementation of a request event
+ *
+ * @version $$Rev: 411441 $$ $$Date: 2006-06-03 07:52:56 -0700 (Sat, 03 Jun 2006) $$
+ */
+public abstract class AbstractRequestEvent extends AbstractEvent implements RequestEvent {
+
+    /**
+     * Creates a new event
+     *
+     * @param source the source of the event
+     */
+    public AbstractRequestEvent(Object source) {
+        super(source);
+    }
+
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractRequestEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/AbstractRequestEvent.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeEvent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeEvent.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeEvent.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeEvent.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,15 @@
+package org.apache.tuscany.core.component.event;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.event.Event;
+
+/**
+ * Implemented by runtime events associated with a composite, e.g. lifecycle events
+ *
+ * @version $$Rev: 415032 $$ $$Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $$
+ */
+public interface CompositeEvent extends Event {
+
+    CompositeComponent getComposite();
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeEvent.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStart.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStart.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStart.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStart.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,29 @@
+package org.apache.tuscany.core.component.event;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+
+/**
+ * Propagated when a composite starts
+ *
+ * @version $$Rev: 415032 $$ $$Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $$
+ */
+public class CompositeStart extends AbstractEvent implements CompositeEvent {
+
+    private CompositeComponent component;
+
+    /**
+     * Creates a module stop event
+     *
+     * @param source    the source of the event
+     * @param component the composite component associated the module being stopped
+     */
+    public CompositeStart(Object source, CompositeComponent component) {
+        super(source);
+        this.component = component;
+    }
+
+    public CompositeComponent getComposite() {
+        return component;
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStart.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStart.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStop.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStop.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStop.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStop.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,28 @@
+package org.apache.tuscany.core.component.event;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+
+/**
+ * Propagated when a composite stops
+ *
+ * @version $$Rev: 415032 $$ $$Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $$
+ */
+public class CompositeStop extends AbstractEvent implements CompositeEvent {
+
+    private CompositeComponent component;
+
+    /**
+     * Creates a module stop event
+     *
+     * @param source    the source of the event
+     * @param component the composite component associated the module being stopped
+     */
+    public CompositeStop(Object source, CompositeComponent component) {
+        super(source);
+        this.component = component;
+    }
+
+    public CompositeComponent getComposite() {
+        return component;
+    }
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStop.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/CompositeStop.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEnd.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEnd.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEnd.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEnd.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,33 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.tuscany.core.component.event;
+
+/**
+ * Propagated when an HTTP-based session is expired
+ *
+ * @version $$Rev: 411441 $$ $$Date: 2006-06-03 07:52:56 -0700 (Sat, 03 Jun 2006) $$
+ */
+public class HttpSessionEnd extends HttpSessionEvent {
+
+    /**
+     * Creates a new event
+     *
+     * @param source the source of the event
+     * @param id     the id of the HTTP session being ended
+     */
+    public HttpSessionEnd(Object source, Object id) {
+        super(source, id);
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEnd.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEnd.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEvent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEvent.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEvent.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEvent.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,40 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.tuscany.core.component.event;
+
+/**
+ * A base implementation of HTTP-based session events in the runtime
+ *
+ * @version $$Rev: 415032 $$ $$Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $$
+ */
+public abstract class HttpSessionEvent extends AbstractEvent {
+
+    private Object id;
+
+    public HttpSessionEvent(Object source, Object id) {
+        super(source);
+        assert id != null : "Session id was null";
+        this.id = id;
+    }
+
+
+    public Object getSource() {
+        return source;
+    }
+
+    public Object getId() {
+        return id;
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionEvent.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionStart.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionStart.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionStart.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionStart.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,20 @@
+package org.apache.tuscany.core.component.event;
+
+/**
+ * Propagated when an HTTP-based session has started
+ *
+ * @version $$Rev: 411441 $$ $$Date: 2006-06-03 07:52:56 -0700 (Sat, 03 Jun 2006) $$
+ */
+public class HttpSessionStart extends HttpSessionEvent {
+
+    /**
+     * Creates a new event
+     *
+     * @param source the source of the event
+     * @param id     the id of the HTTP session being ended
+     */
+    public HttpSessionStart(Object source, Object id) {
+        super(source, id);
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionStart.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/HttpSessionStart.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEnd.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEnd.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEnd.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEnd.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,33 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.tuscany.core.component.event;
+
+/**
+ * Propagated when a request completes or is ended
+ *
+ * @version $$Rev: 411441 $$ $$Date: 2006-06-03 07:52:56 -0700 (Sat, 03 Jun 2006) $$
+ */
+public class RequestEnd extends AbstractRequestEvent {
+
+    /**
+     * Creates a new event
+     *
+     * @param source the source of the event
+     */
+    public RequestEnd(Object source) {
+        super(source);
+    }
+
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEnd.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEnd.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEvent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEvent.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEvent.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEvent.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,23 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.tuscany.core.component.event;
+
+/**
+ * Implemented by runtime events associated request
+ *
+ * @version $$Rev: 411441 $$ $$Date: 2006-06-03 07:52:56 -0700 (Sat, 03 Jun 2006) $$
+ */
+public interface RequestEvent {
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestEvent.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestStart.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestStart.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestStart.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestStart.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.tuscany.core.component.event;
+
+/**
+ * Propagated when a request is started in the runtime
+ *
+ * @version $$Rev: 411441 $$ $$Date: 2006-06-03 07:52:56 -0700 (Sat, 03 Jun 2006) $$
+ */
+public class RequestStart extends AbstractRequestEvent {
+
+    /**
+     * Creates a new event
+     *
+     * @param source the source of the event
+     */
+    public RequestStart(Object source) {
+        super(source);
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestStart.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/event/RequestStart.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,119 @@
+package org.apache.tuscany.core.component.scope;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.apache.tuscany.spi.AbstractLifecycle;
+import org.apache.tuscany.spi.component.AtomicComponent;
+import org.apache.tuscany.spi.component.ScopeContainer;
+import org.apache.tuscany.spi.component.TargetException;
+import org.apache.tuscany.spi.component.WorkContext;
+import org.apache.tuscany.spi.event.Event;
+import org.apache.tuscany.spi.event.EventFilter;
+import org.apache.tuscany.spi.event.RuntimeEventListener;
+import org.apache.tuscany.spi.event.TrueFilter;
+
+/**
+ * Implements functionality common to scope contexts.
+ *
+ * @version $Rev: 415032 $ $Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $
+ */
+public abstract class AbstractScopeContainer extends AbstractLifecycle implements ScopeContainer {
+    private static final EventFilter TRUE_FILTER = new TrueFilter();
+
+    // The event context the scope container is associated with
+    protected WorkContext workContext;
+    private final String name;
+    private Map<EventFilter, List<RuntimeEventListener>> listeners;
+
+    public AbstractScopeContainer(String name, WorkContext workContext) {
+        this.name = name;
+        this.workContext = workContext;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setWorkContext(WorkContext workContext) {
+        this.workContext = workContext;
+    }
+
+    public void addListener(RuntimeEventListener listener) {
+        addListener(TRUE_FILTER, listener);
+    }
+
+    public void removeListener(RuntimeEventListener listener) {
+        assert listener != null : "Listener cannot be null";
+        synchronized (getListeners()) {
+            for (List<RuntimeEventListener> currentList : getListeners().values()) {
+                for (RuntimeEventListener current : currentList) {
+                    if (current == listener) {
+                        currentList.remove(current);
+                        return;
+                    }
+                }
+            }
+        }
+    }
+
+    public void addListener(EventFilter filter, RuntimeEventListener listener) {
+        assert listener != null : "Listener cannot be null";
+        synchronized (getListeners()) {
+            List<RuntimeEventListener> list = getListeners().get(filter);
+            if (list == null) {
+                list = new CopyOnWriteArrayList<RuntimeEventListener>();
+                listeners.put(filter, list);
+            }
+            list.add(listener);
+        }
+    }
+
+    public void publish(Event event) {
+        assert event != null : "Event object was null";
+        for (Map.Entry<EventFilter, List<RuntimeEventListener>> entry : getListeners().entrySet()) {
+            if (entry.getKey().match(event)) {
+                for (RuntimeEventListener listener : entry.getValue()) {
+                    listener.onEvent(event);
+                }
+            }
+        }
+    }
+
+    public Object getInstance(AtomicComponent component) throws TargetException {
+        InstanceWrapper ctx = getInstanceWrapper(component);
+        if (ctx != null) {
+            if (ctx.getLifecycleState() == UNINITIALIZED) {
+                ctx.start();
+            }
+            return ctx.getInstance();
+        }
+        return null;
+    }
+
+    protected Map<EventFilter, List<RuntimeEventListener>> getListeners() {
+        if (listeners == null) {
+            listeners = new ConcurrentHashMap<EventFilter, List<RuntimeEventListener>>();
+        }
+        return listeners;
+    }
+
+    protected void checkInit() {
+        if (getLifecycleState() != RUNNING) {
+            throw new IllegalStateException("Scope not running [" + getLifecycleState() + "]");
+        }
+    }
+
+    protected WorkContext getWorkContext() {
+        return workContext;
+    }
+
+    public String toString() {
+        return "ScopeContainer [" + name + "] in state [" + super.toString() + ']';
+    }
+
+    protected abstract InstanceWrapper getInstanceWrapper(AtomicComponent component);
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/AbstractScopeContainer.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,124 @@
+package org.apache.tuscany.core.component.scope;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.tuscany.spi.component.AtomicComponent;
+import org.apache.tuscany.spi.component.TargetException;
+import org.apache.tuscany.spi.component.WorkContext;
+import org.apache.tuscany.spi.event.Event;
+import org.apache.tuscany.spi.model.Scope;
+
+import org.apache.tuscany.core.component.event.HttpSessionEnd;
+import org.apache.tuscany.core.component.event.HttpSessionStart;
+
+/**
+ * A scope context which manages atomic component instances keyed on HTTP session
+ *
+ * @version $Rev: 415162 $ $Date: 2006-06-18 11:19:43 -0700 (Sun, 18 Jun 2006) $
+ */
+public class HttpSessionScopeContainer extends AbstractScopeContainer {
+
+    public static final Object HTTP_IDENTIFIER = new Object();
+
+    private final Map<AtomicComponent, Map<Object, InstanceWrapper>> contexts;
+    private final Map<Object, List<InstanceWrapper>> destroyQueues;
+
+    public HttpSessionScopeContainer() {
+        this(null);
+    }
+
+    public HttpSessionScopeContainer(WorkContext workContext) {
+        super("Session Scope", workContext);
+        contexts = new ConcurrentHashMap<AtomicComponent, Map<Object, InstanceWrapper>>();
+        destroyQueues = new ConcurrentHashMap<Object, List<InstanceWrapper>>();
+    }
+
+    public Scope getScope() {
+        return Scope.SESSION;
+    }
+
+    public void onEvent(Event event) {
+        checkInit();
+        if (event instanceof HttpSessionStart) {
+            Object key = ((HttpSessionStart) event).getId();
+            for (Map.Entry<AtomicComponent, Map<Object, InstanceWrapper>> entry : contexts.entrySet()) {
+                if (entry.getKey().isEagerInit()) {
+                    getInstance(entry.getKey(), key);
+                }
+            }
+        } else if (event instanceof HttpSessionEnd) {
+            shutdownInstances(((HttpSessionEnd) event).getId());
+        }
+    }
+
+    public synchronized void start() {
+        if (lifecycleState != UNINITIALIZED && lifecycleState != STOPPED) {
+            throw new IllegalStateException("Scope must be in UNINITIALIZED or STOPPED state [" + lifecycleState + "]");
+        }
+        lifecycleState = RUNNING;
+    }
+
+    public synchronized void stop() {
+        contexts.clear();
+        synchronized (destroyQueues) {
+            destroyQueues.clear();
+        }
+        lifecycleState = STOPPED;
+    }
+
+    public void register(AtomicComponent component) {
+        contexts.put(component, new ConcurrentHashMap<Object, InstanceWrapper>());
+        component.addListener(this);
+
+    }
+
+    protected InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException {
+        Object key = workContext.getIdentifier(HTTP_IDENTIFIER);
+        assert key != null : "HTTP session key not bound in work component";
+        return getInstance(component, key);
+    }
+
+    private InstanceWrapper getInstance(AtomicComponent component, Object key) {
+        Map<Object, InstanceWrapper> wrappers = contexts.get(component);
+        InstanceWrapper ctx = wrappers.get(key);
+        if (ctx == null) {
+            ctx = new InstanceWrapperImpl(component, component.createInstance());
+            ctx.start();
+            wrappers.put(key, ctx);
+            List<InstanceWrapper> destroyQueue = destroyQueues.get(key);
+            if (destroyQueue == null) {
+                destroyQueue = new ArrayList<InstanceWrapper>();
+                destroyQueues.put(key, destroyQueue);
+            }
+            synchronized (destroyQueue) {
+                destroyQueue.add(ctx);
+            }
+        }
+        return ctx;
+
+    }
+
+    private void shutdownInstances(Object key) {
+        List<InstanceWrapper> destroyQueue = destroyQueues.remove(key);
+        if (destroyQueue != null) {
+            for (Map<Object, InstanceWrapper> map : contexts.values()) {
+                map.remove(key);
+            }
+            ListIterator<InstanceWrapper> iter = destroyQueue.listIterator(destroyQueue.size());
+            synchronized (destroyQueue) {
+                while (iter.hasPrevious()) {
+                    try {
+                        iter.previous().stop();
+                    } catch (TargetException e) {
+                        // TODO send a monitoring event
+                    }
+                }
+            }
+        }
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeContainer.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeObjectFactory.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeObjectFactory.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeObjectFactory.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,16 @@
+package org.apache.tuscany.core.component.scope;
+
+import org.apache.tuscany.spi.ObjectCreationException;
+import org.apache.tuscany.spi.ObjectFactory;
+
+/**
+ * Creates a new HTTP session scope context
+ *
+ * @version $$Rev: 412208 $$ $$Date: 2006-06-06 13:47:19 -0700 (Tue, 06 Jun 2006) $$
+ */
+public class HttpSessionScopeObjectFactory implements ObjectFactory<HttpSessionScopeContainer> {
+
+    public HttpSessionScopeContainer getInstance() throws ObjectCreationException {
+        return new HttpSessionScopeContainer();
+    }
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeObjectFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/HttpSessionScopeObjectFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tuscany.core.component.scope;
+
+import org.apache.tuscany.spi.Lifecycle;
+
+/**
+ * Provides lifecycle management for an implementation instance associated with an {@link
+ * org.apache.tuscany.spi.component.AtomicComponent} for use by the atomic context's associated {@link
+ * org.apache.tuscany.spi.component.ScopeContainer}
+ *
+ * @version $Rev: 415032 $ $Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $
+ */
+public interface InstanceWrapper extends Lifecycle {
+
+    Object getInstance();
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,63 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.tuscany.core.component.scope;
+
+import org.apache.tuscany.spi.AbstractLifecycle;
+import org.apache.tuscany.spi.CoreRuntimeException;
+import org.apache.tuscany.spi.component.AtomicComponent;
+
+/**
+ * Default implementation of an <code>InstanceWrapper</code>
+ *
+ * @version $$Rev: 415032 $$ $$Date: 2006-06-17 10:28:07 -0700 (Sat, 17 Jun 2006) $$
+ */
+public class InstanceWrapperImpl extends AbstractLifecycle implements InstanceWrapper {
+
+    private Object instance;
+    private AtomicComponent component;
+
+    public InstanceWrapperImpl(AtomicComponent component, Object instance) {
+        assert component != null;
+        assert instance != null;
+        this.component = component;
+        this.instance = instance;
+    }
+
+    public Object getInstance() {
+        checkInit();
+        return instance;
+    }
+
+    public void start() throws CoreRuntimeException {
+        try {
+            component.init(instance);
+            lifecycleState = RUNNING;
+        } catch (RuntimeException e) {
+            lifecycleState = ERROR;
+            throw e;
+        }
+    }
+
+    public void stop() throws CoreRuntimeException {
+        checkInit();
+        component.destroy(instance);
+    }
+
+    protected void checkInit() {
+        if (getLifecycleState() != RUNNING) {
+            throw new IllegalStateException("Scope not running [" + getLifecycleState() + "]");
+        }
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/InstanceWrapperImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Added: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java?rev=416333&view=auto
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java (added)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java Thu Jun 22 04:20:25 2006
@@ -0,0 +1,131 @@
+package org.apache.tuscany.core.component.scope;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.tuscany.spi.AbstractLifecycle;
+import org.apache.tuscany.spi.CoreRuntimeException;
+import org.apache.tuscany.spi.component.AtomicComponent;
+import org.apache.tuscany.spi.component.TargetException;
+import org.apache.tuscany.spi.component.WorkContext;
+import org.apache.tuscany.spi.event.Event;
+import org.apache.tuscany.spi.model.Scope;
+
+import org.apache.tuscany.core.component.event.CompositeStart;
+import org.apache.tuscany.core.component.event.CompositeStop;
+
+/**
+ * A scope context which manages atomic component instances keyed by module
+ *
+ * @version $Rev: 415162 $ $Date: 2006-06-18 11:19:43 -0700 (Sun, 18 Jun 2006) $
+ */
+public class ModuleScopeContainer extends AbstractScopeContainer {
+
+    private static final InstanceWrapper EMPTY = new EmptyWrapper();
+    private final Map<AtomicComponent, InstanceWrapper> instanceContexts;
+    // the queue of instanceContexts to destroy, in the order that their instances were created
+    private final List<InstanceWrapper> destroyQueue;
+
+    public ModuleScopeContainer() {
+        this(null);
+    }
+
+    public ModuleScopeContainer(WorkContext workContext) {
+        super("Module Scope", workContext);
+        instanceContexts = new ConcurrentHashMap<AtomicComponent, InstanceWrapper>();
+        destroyQueue = new ArrayList<InstanceWrapper>();
+    }
+
+    public Scope getScope() {
+        return Scope.MODULE;
+    }
+
+
+    public void onEvent(Event event) {
+        checkInit();
+        if (event instanceof CompositeStart) {
+            eagerInitContexts();
+            lifecycleState = RUNNING;
+        } else if (event instanceof CompositeStop) {
+            shutdownContexts();
+        }
+    }
+
+    public synchronized void start() {
+        if (lifecycleState != UNINITIALIZED && lifecycleState != STOPPED) {
+            throw new IllegalStateException("Scope must be in UNINITIALIZED or STOPPED state [" + lifecycleState + "]");
+        }
+        lifecycleState = RUNNING;
+    }
+
+    public synchronized void stop() {
+        checkInit();
+        instanceContexts.clear();
+        synchronized (destroyQueue) {
+            destroyQueue.clear();
+        }
+        lifecycleState = STOPPED;
+    }
+
+
+    /**
+     * Notifies instanceContexts of a shutdown in reverse order to which they were started
+     */
+    private void shutdownContexts() {
+        if (destroyQueue.size() == 0) {
+            return;
+        }
+        synchronized (destroyQueue) {
+            // shutdown destroyable instances in reverse instantiation order
+            ListIterator<InstanceWrapper> iter = destroyQueue.listIterator(destroyQueue.size());
+            while (iter.hasPrevious()) {
+                iter.previous().stop();
+            }
+            destroyQueue.clear();
+        }
+    }
+
+    public void register(AtomicComponent component) {
+        checkInit();
+        instanceContexts.put(component, EMPTY);
+    }
+
+
+    protected InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException {
+        checkInit();
+        InstanceWrapper ctx = instanceContexts.get(component);
+        assert ctx != null : "Component not registered with scope: " + component;
+        if (ctx == EMPTY) {
+            ctx = new InstanceWrapperImpl(component, component.createInstance());
+            ctx.start();
+            instanceContexts.put(component, ctx);
+            synchronized (destroyQueue) {
+                destroyQueue.add(ctx);
+            }
+        }
+        return ctx;
+    }
+
+    private void eagerInitContexts() throws CoreRuntimeException {
+        for (Map.Entry<AtomicComponent, InstanceWrapper> entry : instanceContexts.entrySet()) {
+            AtomicComponent component = entry.getKey();
+            if (component.isEagerInit()) {
+                InstanceWrapper ctx = new InstanceWrapperImpl(component, component.createInstance());
+                ctx.start();
+                instanceContexts.put(component, ctx);
+                destroyQueue.add(ctx);
+            }
+        }
+
+    }
+
+    private static class EmptyWrapper extends AbstractLifecycle implements InstanceWrapper {
+        public Object getInstance() {
+            return null;
+        }
+    }
+
+}

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ModuleScopeContainer.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message