You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/05/07 10:47:42 UTC

svn commit: r535784 [2/2] - in /incubator/tuscany/java/sca/modules: core-spi/src/main/java/org/apache/tuscany/spi/event/ core-spi/src/main/java/org/apache/tuscany/spi/services/ core-spi/src/main/java/org/apache/tuscany/store/ core-spi/src/main/java/org...

Added: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/event/EventTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/event/EventTestCase.java?view=auto&rev=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/event/EventTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/event/EventTestCase.java Mon May  7 01:47:32 2007
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.event;
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.core.event.ComponentStart;
+import org.apache.tuscany.core.event.ComponentStop;
+import org.apache.tuscany.core.event.HttpSessionEnd;
+import org.apache.tuscany.core.event.HttpSessionStart;
+import org.apache.tuscany.core.event.RequestEnd;
+import org.apache.tuscany.core.event.RequestStart;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EventTestCase extends TestCase {
+    private URI uri = URI.create("foo");
+
+    public void testCompositeStart() {
+        ComponentStart event = new ComponentStart(this, uri);
+        assertEquals(uri, event.getComponentURI());
+    }
+
+    public void testCompositeStop() {
+        ComponentStop event = new ComponentStop(this, uri);
+        assertEquals(uri, event.getComponentURI());
+    }
+
+    public void testHttpSessionStart() {
+        Object id = new Object();
+        HttpSessionStart event = new HttpSessionStart(this, id);
+        assertEquals(this, event.getSource());
+        assertEquals(id, event.getSessionID());
+    }
+
+    public void testHttpSessionEnd() {
+        Object id = new Object();
+        HttpSessionEnd event = new HttpSessionEnd(this, id);
+        assertEquals(this, event.getSource());
+        assertEquals(id, event.getSessionID());
+    }
+
+    public void testRequestStart() {
+        RequestStart event = new RequestStart(this);
+        assertEquals(this, event.getSource());
+    }
+
+    public void testReequestEnd() {
+        RequestEnd event = new RequestEnd(this);
+        assertEquals(this, event.getSource());
+    }
+
+
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/event/EventTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/event/EventTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/AbstractScopeContainerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/AbstractScopeContainerTestCase.java?view=auto&rev=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/AbstractScopeContainerTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/AbstractScopeContainerTestCase.java Mon May  7 01:47:32 2007
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.scope;
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.assembly.Implementation;
+import org.apache.tuscany.core.RuntimeComponent;
+import org.apache.tuscany.core.ScopedImplementationProvider;
+import org.apache.tuscany.scope.InstanceWrapper;
+import org.apache.tuscany.scope.ScopeContainer;
+import org.easymock.EasyMock;
+import org.easymock.IMocksControl;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class AbstractScopeContainerTestCase<T, KEY> extends TestCase {
+    protected IMocksControl control;
+    protected ScopeContainer<KEY> scopeContainer;
+    protected URI groupId;
+    protected KEY contextId;
+    protected RuntimeComponent component;
+    protected ScopedImplementation implementation; 
+    protected InstanceWrapper<T> wrapper;
+
+    @SuppressWarnings("unchecked")
+    protected void setUp() throws Exception {
+        super.setUp();
+        control = EasyMock.createStrictControl();
+        component = control.createMock(RuntimeComponent.class);
+        wrapper = control.createMock(InstanceWrapper.class);
+        implementation = control.createMock(ScopedImplementation.class);
+        EasyMock.expect(component.getImplementation()).andReturn(implementation).anyTimes();
+    }
+
+    protected void preRegisterComponent() throws Exception {
+        scopeContainer.start();
+        scopeContainer.register(component, groupId);
+        EasyMock.expect(implementation.isEagerInit(component)).andStubReturn(false);
+    }
+
+    protected void expectCreateWrapper() throws Exception {
+        EasyMock.expect(implementation.createInstanceWrapper(component)).andReturn(wrapper);
+        wrapper.start();
+    }
+    
+    protected static interface ScopedImplementation extends ScopedImplementationProvider, Implementation {
+        
+    }
+    
+    
+}

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/AbstractScopeContainerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/AbstractScopeContainerTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/InstanceWrapperBaseTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/InstanceWrapperBaseTestCase.java?view=auto&rev=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/InstanceWrapperBaseTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/InstanceWrapperBaseTestCase.java Mon May  7 01:47:32 2007
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.scope;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.core.scope.BaseInstanceWrapper;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class InstanceWrapperBaseTestCase extends TestCase {
+    private static final Object INSTANCE = new Object();
+    private BaseInstanceWrapper<Object> wrapper;
+
+    public void testLifecycle() throws Exception {
+        assertFalse(wrapper.isStarted());
+        try {
+            wrapper.getInstance();
+            fail();
+        } catch (AssertionError e) {
+            // expected
+        }
+        wrapper.start();
+        assertTrue(wrapper.isStarted());
+        assertSame(INSTANCE, wrapper.getInstance());
+        wrapper.stop();
+        assertFalse(wrapper.isStarted());
+        try {
+            wrapper.getInstance();
+            fail();
+        } catch (AssertionError e) {
+            // expected
+        }
+    }
+
+    public void testNullCheck() {
+        try {
+            new BaseInstanceWrapper<Object>(null);
+            fail();
+        } catch (AssertionError e) {
+            // expected
+        }
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        wrapper = new BaseInstanceWrapper<Object>(INSTANCE);
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/InstanceWrapperBaseTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/InstanceWrapperBaseTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/WorkContextTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/WorkContextTestCase.java?view=auto&rev=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/WorkContextTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/WorkContextTestCase.java Mon May  7 01:47:32 2007
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.scope;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+
+import org.apache.tuscany.core.RuntimeComponent;
+import org.apache.tuscany.spi.component.WorkContext;
+import org.apache.tuscany.spi.component.WorkContextImpl;
+import org.easymock.EasyMock;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WorkContextTestCase extends TestCase {
+
+    public void testSetCurrentAtomicComponent() throws Exception {
+        WorkContext ctx = new WorkContextImpl();
+        RuntimeComponent component = EasyMock.createNiceMock(RuntimeComponent.class);
+        RuntimeComponent component2 = EasyMock.createNiceMock(RuntimeComponent.class);
+        ctx.setCurrentComponent(component);
+        assertEquals(component, ctx.getCurrentComponent());
+        ctx.setCurrentComponent(component2);
+        assertEquals(component2, ctx.getCurrentComponent());
+    }
+
+    public void testNonSetCurrentAtomicComponent() throws Exception {
+        WorkContext ctx = new WorkContextImpl();
+        assertNull(ctx.getCurrentComponent());
+    }
+
+    public void testIndentifier() throws Exception {
+        WorkContext ctx = new WorkContextImpl();
+        Object id = new Object();
+        ctx.setIdentifier(this, id);
+        assertEquals(id, ctx.getIdentifier(this));
+    }
+
+    public void testClearIndentifier() throws Exception {
+        WorkContext ctx = new WorkContextImpl();
+        Object id = new Object();
+        ctx.setIdentifier(this, id);
+        ctx.clearIdentifier(this);
+        assertNull(ctx.getIdentifier(this));
+    }
+
+    public void testClearIndentifiers() throws Exception {
+        WorkContext ctx = new WorkContextImpl();
+        Object id = new Object();
+        Object id2 = new Object();
+        ctx.setIdentifier(id, id);
+        ctx.setIdentifier(id2, id2);
+        ctx.clearIdentifiers();
+        assertNull(ctx.getIdentifier(id));
+        assertNull(ctx.getIdentifier(id2));
+    }
+
+    public void testClearNonExistentIndentifier() throws Exception {
+        WorkContext ctx = new WorkContextImpl();
+        ctx.clearIdentifier(this);
+    }
+
+    public void testNullIndentifier() throws Exception {
+        WorkContext ctx = new WorkContextImpl();
+        Object id = new Object();
+        ctx.setIdentifier(this, id);
+        ctx.clearIdentifier(null);
+        assertEquals(id, ctx.getIdentifier(this));
+    }
+
+    public void testNoIndentifier() throws Exception {
+        WorkContext ctx = new WorkContextImpl();
+        assertNull(ctx.getIdentifier(this));
+    }
+
+    public void testSetGetCorrelationId() {
+        WorkContext context = new WorkContextImpl();
+        context.setCorrelationId("msg-005");
+        assertEquals(context.getCorrelationId(), "msg-005");
+        context.setCorrelationId(null);
+        assertNull(context.getCorrelationId());
+    }
+
+    public void testSetGetCorrelationIdInNewThread() throws InterruptedException {
+        WorkContext context = new WorkContextImpl();
+        context.setCorrelationId("msg-005");
+        assertEquals(context.getCorrelationId(), "msg-005");
+        context.setIdentifier("TX", "002");
+        ChildThread t = new ChildThread(context);
+        t.start();
+        t.join();
+        assertTrue(t.passed);
+        context.setCorrelationId(null);
+        assertNull(context.getCorrelationId());
+    }
+
+    public void testCurrentAtomicComponentDoesNotPropagateToChildThread() throws InterruptedException {
+        // NOTE should behaviour be to propagate?
+        WorkContext context = new WorkContextImpl();
+        context.setCurrentComponent(EasyMock.createNiceMock(RuntimeComponent.class));
+        TestCurrentAtomicComponentChildThread t = new TestCurrentAtomicComponentChildThread(context);
+        t.start();
+        t.join();
+        assertTrue(t.passed);
+        context.setCurrentComponent(null);
+        assertNull(context.getCurrentComponent());
+    }
+
+    private static final class ChildThread extends Thread {
+        private WorkContext context;
+        private boolean passed = true;
+
+        private ChildThread(WorkContext context) {
+            this.context = context;
+        }
+
+        @Override
+        public void run() {
+            try {
+                assertNull(context.getCorrelationId());
+                assertEquals("002", context.getIdentifier("TX"));
+            } catch (AssertionFailedError e) {
+                passed = false;
+            }
+        }
+
+    }
+
+    private static final class TestCurrentAtomicComponentChildThread extends Thread {
+        private WorkContext context;
+        private boolean passed = true;
+
+        private TestCurrentAtomicComponentChildThread(WorkContext context) {
+            this.context = context;
+        }
+
+        @Override
+        public void run() {
+            try {
+                assertNull(context.getCurrentComponent());
+            } catch (AssertionFailedError e) {
+                passed = false;
+            }
+        }
+
+    }
+
+
+}

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/WorkContextTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/scope/WorkContextTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/store/MemoryStoreTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/store/MemoryStoreTestCase.java?view=auto&rev=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/store/MemoryStoreTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/store/MemoryStoreTestCase.java Mon May  7 01:47:32 2007
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.store;
+
+import java.util.UUID;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.core.RuntimeComponent;
+import org.apache.tuscany.core.store.MemoryStore;
+import org.apache.tuscany.spi.event.RuntimeEventListener;
+import org.apache.tuscany.store.DuplicateRecordException;
+import org.apache.tuscany.store.Store;
+import org.apache.tuscany.store.StoreExpirationEvent;
+import org.apache.tuscany.store.StoreMonitor;
+import org.easymock.EasyMock;
+import org.easymock.IAnswer;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class MemoryStoreTestCase extends TestCase {
+    private StoreMonitor monitor;
+
+    public void testEviction() throws Exception {
+        MemoryStore store = new MemoryStore(monitor);
+        store.setReaperInterval(10);
+        store.init();
+        RuntimeComponent component = EasyMock.createNiceMock(RuntimeComponent.class);
+        EasyMock.replay(component);
+        String id = UUID.randomUUID().toString();
+        Object value = new Object();
+        store.insertRecord(component, id, value, 1);
+        Thread.sleep(200);
+        assertNull(store.readRecord(component, id));
+        store.destroy();
+    }
+
+    public void testNotifyOnEviction() throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+        RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
+        listener.onEvent(EasyMock.isA(StoreExpirationEvent.class));
+        EasyMock.expectLastCall().andStubAnswer(new IAnswer<Object>() {
+            public Object answer() throws Throwable {
+                latch.countDown();
+                return null;
+            }
+        });
+        EasyMock.replay(listener);
+        MemoryStore store = new MemoryStore(monitor);
+        store.addListener(listener);
+        store.setReaperInterval(10);
+        store.init();
+        RuntimeComponent component = EasyMock.createNiceMock(RuntimeComponent.class);
+        EasyMock.replay(component);
+        String id = UUID.randomUUID().toString();
+        Object value = new Object();
+        store.insertRecord(component, id, value, 1);
+        if (!latch.await(1000, TimeUnit.MILLISECONDS)) {
+            // failed to notify listener
+            fail();
+        }
+        EasyMock.verify(listener);
+    }
+
+    public void testNoEviction() throws Exception {
+        MemoryStore store = new MemoryStore(monitor);
+        store.setReaperInterval(10);
+        store.init();
+        RuntimeComponent component = EasyMock.createNiceMock(RuntimeComponent.class);
+        EasyMock.replay(component);
+        String id = UUID.randomUUID().toString();
+        Object value = new Object();
+        store.insertRecord(component, id, value, Store.NEVER);
+        Thread.sleep(100);
+        assertNotNull(store.readRecord(component, id));
+        store.destroy();
+    }
+
+    public void testInsertRecord() throws Exception {
+        MemoryStore store = new MemoryStore(monitor);
+        store.setReaperInterval(10);
+        store.init();
+        RuntimeComponent component = EasyMock.createNiceMock(RuntimeComponent.class);
+        EasyMock.replay(component);
+        String id = UUID.randomUUID().toString();
+        Object value = new Object();
+        store.insertRecord(component, id, value, Store.NEVER);
+        store.destroy();
+    }
+
+    public void testInsertAlreadyExists() throws Exception {
+        MemoryStore store = new MemoryStore(monitor);
+        store.setReaperInterval(10);
+        store.init();
+        RuntimeComponent component = EasyMock.createMock(RuntimeComponent.class);
+        EasyMock.expect(component.getURI()).andReturn("component");
+        EasyMock.replay(component);
+        String id = UUID.randomUUID().toString();
+        Object value = new Object();
+        store.insertRecord(component, id, value, Store.NEVER);
+        try {
+            store.insertRecord(component, id, value, Store.NEVER);
+            fail();
+        } catch (DuplicateRecordException e) {
+            //expected
+        }
+        store.destroy();
+    }
+
+    public void testUpdateRecord() throws Exception {
+        MemoryStore store = new MemoryStore(monitor);
+        store.setReaperInterval(10);
+        store.init();
+        RuntimeComponent component = EasyMock.createNiceMock(RuntimeComponent.class);
+        EasyMock.replay(component);
+        String id = UUID.randomUUID().toString();
+        Object value = new Object();
+        Object newValue = new Object();
+
+        store.insertRecord(component, id, value, Store.NEVER);
+        store.updateRecord(component, id, newValue, 1L);
+        assertEquals(newValue, store.readRecord(component, id));
+        store.destroy();
+    }
+
+    public void testDeleteRecord() throws Exception {
+        MemoryStore store = new MemoryStore(monitor);
+        store.setReaperInterval(10);
+        store.init();
+        RuntimeComponent component = EasyMock.createNiceMock(RuntimeComponent.class);
+        EasyMock.replay(component);
+        String id = UUID.randomUUID().toString();
+        Object value = new Object();
+
+        store.insertRecord(component, id, value, Store.NEVER);
+        store.removeRecord(component, id);
+        assertNull(store.readRecord(component, id));
+        store.destroy();
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        monitor = EasyMock.createNiceMock(StoreMonitor.class);
+        EasyMock.replay(monitor);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/store/MemoryStoreTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/store/MemoryStoreTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/NonBlockingInterceptorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/NonBlockingInterceptorTestCase.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/NonBlockingInterceptorTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/NonBlockingInterceptorTestCase.java Mon May  7 01:47:32 2007
@@ -32,7 +32,7 @@
 import org.apache.tuscany.invocation.MessageImpl;
 import org.apache.tuscany.scope.Scope;
 import org.apache.tuscany.spi.component.WorkContext;
-import org.apache.tuscany.spi.services.work.WorkScheduler;
+import org.apache.tuscany.work.WorkScheduler;
 import org.easymock.EasyMock;
 import org.easymock.IAnswer;
 

Modified: incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/SCADomainBean.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/SCADomainBean.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/SCADomainBean.java (original)
+++ incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/SCADomainBean.java Mon May  7 01:47:32 2007
@@ -64,6 +64,7 @@
         return composites;
     }
     
+    @SuppressWarnings("unchecked")
     @Override
     public <B, R extends CallableReference<B>> R cast(B target) throws IllegalArgumentException {
         if (instance == null) {

Modified: incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/ReallySmallRuntimeBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/ReallySmallRuntimeBuilder.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/ReallySmallRuntimeBuilder.java (original)
+++ incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/ReallySmallRuntimeBuilder.java Mon May  7 01:47:32 2007
@@ -82,7 +82,7 @@
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.component.WorkContextImpl;
 import org.apache.tuscany.spi.component.WorkContextTunnel;
-import org.apache.tuscany.spi.services.work.WorkScheduler;
+import org.apache.tuscany.work.WorkScheduler;
 
 import commonj.work.WorkManager;
 

Modified: incubator/tuscany/java/sca/modules/http-jetty/src/main/java/org/apache/tuscany/http/jetty/JettyServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/http-jetty/src/main/java/org/apache/tuscany/http/jetty/JettyServer.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/http-jetty/src/main/java/org/apache/tuscany/http/jetty/JettyServer.java (original)
+++ incubator/tuscany/java/sca/modules/http-jetty/src/main/java/org/apache/tuscany/http/jetty/JettyServer.java Mon May  7 01:47:32 2007
@@ -28,7 +28,7 @@
 
 import org.apache.tuscany.http.ServletHost;
 import org.apache.tuscany.http.ServletMappingException;
-import org.apache.tuscany.spi.services.work.WorkScheduler;
+import org.apache.tuscany.work.WorkScheduler;
 import org.mortbay.jetty.Connector;
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.handler.ContextHandler;

Modified: incubator/tuscany/java/sca/modules/http-jetty/src/main/java/org/apache/tuscany/http/jetty/module/JettyRuntimeModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/http-jetty/src/main/java/org/apache/tuscany/http/jetty/module/JettyRuntimeModuleActivator.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/http-jetty/src/main/java/org/apache/tuscany/http/jetty/module/JettyRuntimeModuleActivator.java (original)
+++ incubator/tuscany/java/sca/modules/http-jetty/src/main/java/org/apache/tuscany/http/jetty/module/JettyRuntimeModuleActivator.java Mon May  7 01:47:32 2007
@@ -25,7 +25,7 @@
 import org.apache.tuscany.core.ModuleActivator;
 import org.apache.tuscany.http.ServletHostExtensionPoint;
 import org.apache.tuscany.http.jetty.JettyServer;
-import org.apache.tuscany.spi.services.work.WorkScheduler;
+import org.apache.tuscany.work.WorkScheduler;
 
 /**
  * @version $Rev$ $Date$

Modified: incubator/tuscany/java/sca/modules/http-jetty/src/test/java/org/apache/tuscany/http/jetty/JettyServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/http-jetty/src/test/java/org/apache/tuscany/http/jetty/JettyServerTestCase.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/http-jetty/src/test/java/org/apache/tuscany/http/jetty/JettyServerTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/http-jetty/src/test/java/org/apache/tuscany/http/jetty/JettyServerTestCase.java Mon May  7 01:47:32 2007
@@ -31,8 +31,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.tuscany.http.jetty.JettyServer;
-import org.apache.tuscany.spi.services.work.NotificationListener;
-import org.apache.tuscany.spi.services.work.WorkScheduler;
+import org.apache.tuscany.work.NotificationListener;
+import org.apache.tuscany.work.WorkScheduler;
 
 import junit.framework.TestCase;
 

Modified: incubator/tuscany/java/sca/modules/http-tomcat/src/main/java/org/apache/tuscany/http/tomcat/TomcatServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/http-tomcat/src/main/java/org/apache/tuscany/http/tomcat/TomcatServer.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/http-tomcat/src/main/java/org/apache/tuscany/http/tomcat/TomcatServer.java (original)
+++ incubator/tuscany/java/sca/modules/http-tomcat/src/main/java/org/apache/tuscany/http/tomcat/TomcatServer.java Mon May  7 01:47:32 2007
@@ -37,7 +37,7 @@
 import org.apache.tomcat.util.net.JIoEndpoint;
 import org.apache.tuscany.http.ServletHost;
 import org.apache.tuscany.http.ServletMappingException;
-import org.apache.tuscany.spi.services.work.WorkScheduler;
+import org.apache.tuscany.work.WorkScheduler;
 
 /**
  * A Tomcat based implementation of ServletHost.

Modified: incubator/tuscany/java/sca/modules/http-tomcat/src/main/java/org/apache/tuscany/http/tomcat/module/TomcatRuntimeModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/http-tomcat/src/main/java/org/apache/tuscany/http/tomcat/module/TomcatRuntimeModuleActivator.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/http-tomcat/src/main/java/org/apache/tuscany/http/tomcat/module/TomcatRuntimeModuleActivator.java (original)
+++ incubator/tuscany/java/sca/modules/http-tomcat/src/main/java/org/apache/tuscany/http/tomcat/module/TomcatRuntimeModuleActivator.java Mon May  7 01:47:32 2007
@@ -25,7 +25,7 @@
 import org.apache.tuscany.core.ModuleActivator;
 import org.apache.tuscany.http.ServletHostExtensionPoint;
 import org.apache.tuscany.http.tomcat.TomcatServer;
-import org.apache.tuscany.spi.services.work.WorkScheduler;
+import org.apache.tuscany.work.WorkScheduler;
 
 /**
  * @version $Rev$ $Date$

Modified: incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java Mon May  7 01:47:32 2007
@@ -29,8 +29,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.tuscany.spi.services.work.NotificationListener;
-import org.apache.tuscany.spi.services.work.WorkScheduler;
+import org.apache.tuscany.work.NotificationListener;
+import org.apache.tuscany.work.WorkScheduler;
 
 import junit.framework.TestCase;
 

Modified: incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/ReflectiveInstanceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/ReflectiveInstanceWrapper.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/ReflectiveInstanceWrapper.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/context/ReflectiveInstanceWrapper.java Mon May  7 01:47:32 2007
@@ -18,7 +18,7 @@
  */
 package org.apache.tuscany.implementation.java.context;
 
-import org.apache.tuscany.core.scope.InstanceWrapperBase;
+import org.apache.tuscany.core.scope.BaseInstanceWrapper;
 import org.apache.tuscany.implementation.java.injection.EventInvoker;
 import org.apache.tuscany.spi.component.TargetDestructionException;
 import org.apache.tuscany.spi.component.TargetInitializationException;
@@ -26,7 +26,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public class ReflectiveInstanceWrapper<T> extends InstanceWrapperBase<T> {
+public class ReflectiveInstanceWrapper<T> extends BaseInstanceWrapper<T> {
     private final EventInvoker<T> initInvoker;
     private final EventInvoker<T> destroyInvoker;
 

Modified: incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/InstanceWrapperBaseTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/InstanceWrapperBaseTestCase.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/InstanceWrapperBaseTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/InstanceWrapperBaseTestCase.java Mon May  7 01:47:32 2007
@@ -20,14 +20,14 @@
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.core.scope.InstanceWrapperBase;
+import org.apache.tuscany.core.scope.BaseInstanceWrapper;
 
 /**
  * @version $Rev$ $Date$
  */
 public class InstanceWrapperBaseTestCase extends TestCase {
     private static final Object INSTANCE = new Object();
-    private InstanceWrapperBase<Object> wrapper;
+    private BaseInstanceWrapper<Object> wrapper;
 
     public void testLifecycle() throws Exception {
         assertFalse(wrapper.isStarted());
@@ -52,7 +52,7 @@
 
     public void testNullCheck() {
         try {
-            new InstanceWrapperBase<Object>(null);
+            new BaseInstanceWrapper<Object>(null);
             fail();
         } catch (AssertionError e) {
             // expected
@@ -61,6 +61,6 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        wrapper = new InstanceWrapperBase<Object>(INSTANCE);
+        wrapper = new BaseInstanceWrapper<Object>(INSTANCE);
     }
 }

Modified: incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/integration/AbstractConversationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/integration/AbstractConversationTestCase.java?view=diff&rev=535784&r1=535783&r2=535784
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/integration/AbstractConversationTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/integration/AbstractConversationTestCase.java Mon May  7 01:47:32 2007
@@ -21,10 +21,11 @@
 import junit.framework.TestCase;
 
 import org.apache.tuscany.core.scope.ConversationalScopeContainer;
+import org.apache.tuscany.core.store.MemoryStore;
 import org.apache.tuscany.scope.ScopeContainer;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.component.WorkContextImpl;
-import org.apache.tuscany.spi.services.store.StoreMonitor;
+import org.apache.tuscany.store.StoreMonitor;
 import org.easymock.EasyMock;
 
 /**



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