tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rineh...@apache.org
Subject svn commit: r447397 [2/2] - in /incubator/tuscany/java/sampleapps: ./ bigbank/ bigbank/account/ bigbank/account/src/main/java/bigbank/account/services/account/ bigbank/account/src/main/java/bigbank/account/services/accountdata/ bigbank/account/src/main...
Date Mon, 18 Sep 2006 13:23:25 GMT
Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/account/StockLogTag.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/account/StockLogTag.java?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/account/StockLogTag.java
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/account/StockLogTag.java
Mon Sep 18 06:23:22 2006
@@ -1,18 +1,20 @@
-/**
- *
- *  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.
+/*
+ * 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 bigbank.webclient.tags.account;
 

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/account/StockStatusTag.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/account/StockStatusTag.java?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/account/StockStatusTag.java
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/account/StockStatusTag.java
Mon Sep 18 06:23:22 2006
@@ -1,18 +1,20 @@
-/**
- *
- *  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.
+/*
+ * 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 bigbank.webclient.tags.account;
 

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/sca/LoginBarrierTag.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/sca/LoginBarrierTag.java?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/sca/LoginBarrierTag.java
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/sca/LoginBarrierTag.java
Mon Sep 18 06:23:22 2006
@@ -1,18 +1,20 @@
-/**
- *
- *  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.
+/*
+ * 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 bigbank.webclient.tags.sca;
 
@@ -23,8 +25,8 @@
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
-import org.osoa.sca.CurrentModuleContext;
-import org.osoa.sca.ModuleContext;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
 
 import bigbank.webclient.services.profile.ProfileService;
 
@@ -62,9 +64,9 @@
             throw new JspException("Invalid profile location specified");
         }
 
-        ModuleContext moduleContext = CurrentModuleContext.getContext();
+        CompositeContext moduleContext = CurrentCompositeContext.getContext();
 
-        ProfileService profile = (ProfileService) moduleContext.locateService(mProfile);
+        ProfileService profile = moduleContext.locateService(ProfileService.class, mProfile);
 
         if (profile == null) {
             throw new JspException("Profile [" + mProfile + "] not found in current module
context");

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/sca/ServiceTag.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/sca/ServiceTag.java?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/sca/ServiceTag.java
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/tags/sca/ServiceTag.java
Mon Sep 18 06:23:22 2006
@@ -1,26 +1,28 @@
-/**
- *
- *  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.
+/*
+ * 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 bigbank.webclient.tags.sca;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
-import org.osoa.sca.CurrentModuleContext;
-import org.osoa.sca.ModuleContext;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
 
 /**
  * Places an SCA service in the JSP page context, making it available to other tags corresponding
to its id value.
@@ -74,8 +76,10 @@
     }
 
     public int doStartTag() throws JspException {
-        ModuleContext moduleContext = CurrentModuleContext.getContext();
-        Object service = moduleContext.locateService(mName);
+        CompositeContext moduleContext = CurrentCompositeContext.getContext();
+
+        Object service = moduleContext.locateService(Object.class, mName);
+
         if (service == null) {
             throw new JspException("Service [" + mName + "] not found in current module context");
         }

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/ui/FormServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/ui/FormServlet.java?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/ui/FormServlet.java
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/ui/FormServlet.java
Mon Sep 18 06:23:22 2006
@@ -1,18 +1,20 @@
-/**
- *
- *  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.
+/*
+ * 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 bigbank.webclient.ui;
 
@@ -23,8 +25,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.osoa.sca.CurrentModuleContext;
-import org.osoa.sca.ModuleContext;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
 
 import bigbank.webclient.services.profile.ProfileService;
 
@@ -44,14 +46,15 @@
 
         try {
             final String action = pReq.getParameter("action");
-            ModuleContext moduleContext = CurrentModuleContext.getContext();
-            AccountService accountServices = (AccountService) moduleContext.locateService("AccountServiceComponent");
+            
+            CompositeContext moduleContext = CurrentCompositeContext.getContext();
+            AccountService accountServices = (AccountService) moduleContext.locateService(AccountService.class,
"AccountServiceComponent");
             if (accountServices == null) {
                 throw new ServletException("AccountServiceComponent");
             }
             ProfileService profileServices = null;
             if (!"createAccount".equals(action)) {
-                profileServices = (ProfileService) moduleContext.locateService("ProfileServiceComponent");
+                profileServices = (ProfileService) moduleContext.locateService(ProfileService.class,
"ProfileServiceComponent");
                 if (profileServices == null) {
                     throw new ServletException("ProfileServiceComponent not found.");
                 }

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/ui/LoginServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/ui/LoginServlet.java?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/ui/LoginServlet.java
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/ui/LoginServlet.java
Mon Sep 18 06:23:22 2006
@@ -1,18 +1,20 @@
-/**
- *
- *  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.
+/*
+ * 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 bigbank.webclient.ui;
 
@@ -26,8 +28,8 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import org.osoa.sca.CurrentModuleContext;
-import org.osoa.sca.ModuleContext;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
 
 import bigbank.webclient.services.profile.LoginService;
 
@@ -72,8 +74,8 @@
 
     static int login(final String login, final String password) throws ServletException {
 
-        ModuleContext moduleContext = CurrentModuleContext.getContext();
-        LoginService loginMgr = (LoginService) moduleContext.locateService("LoginServiceComponent");
+        CompositeContext moduleContext = CurrentCompositeContext.getContext();
+        LoginService loginMgr = (LoginService) moduleContext.locateService(LoginService.class,
"LoginServiceComponent");
 
         if (loginMgr == null) {
             throw new ServletException("LoginManager not found");

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/resources/META-INF/sca/default.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/resources/META-INF/sca/default.scdl?view=diff&rev=447397&r1=447146&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/resources/META-INF/sca/default.scdl
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/resources/META-INF/sca/default.scdl
Mon Sep 18 06:23:22 2006
@@ -19,24 +19,33 @@
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
            xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
-           name="helloworldwsclient">
+           name="bigbank.webclient">
     
-    <import.sdo location="wsdl/helloworld.wsdl"/>
+    <!-- import.sdo location="wsdl/helloworld.wsdl"/ -->
     
-    <component name="HelloWorldServiceComponent">
-      <implementation.java class="helloworld.HelloWorldServiceComponent"/>
-      <reference name="helloWorldService">HelloWorldService</reference>
+      <component name="LoginServiceComponent">
+        <implementation.java class="bigbank.webclient.services.profile.AccountLoginServiceImpl"/>
+        <reference name="accountService">AccountServiceComponent</reference>
+         <reference name="profileService">ProfileServiceComponent</reference>
     </component>
+    
+    <property name="name" type="xsd:string">Anonymous</property>
 
-    <reference name="HelloWorldService">
-        <!--  
-        <interface.java interface="helloworld.HelloWorldService"/>
-        -->
-        <interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" 
-            interface="http://helloworld#wsdl.interface(HelloWorld)" 
-            wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
-        <binding.ws endpoint="http://helloworld#wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)"
-			location="wsdl/helloworld.wsdl" />
-    </reference>
+    <component name="ProfileServiceComponent">
+        <implementation.java class="bigbank.webclient.services.profile.ProfileServiceImpl"/>
+        <property name="firstName" source="$name"/>
+    </component>
 
+    <component name="AccountServiceComponent">
+        <implementation.java class="bigbank.webclient.services.account.AccountServiceComponentImpl"/>
+        <reference name="accountService">AccountServiceComponent</reference>
+    </component>
+
+    
+      <reference name="AccountService">
+		<interface.wsdl interface="http://www.bigbank.com/account#wsdl.interface(AccountService)"
 wsdli:wsdlLocation="http://www.bigbank.com/account wsdl/AccountService.wsdl" />
+		<binding.ws endpoint="http://www.bigbank.com/account#wsdl.endpoint(AccountService/AccountServiceSOAP)"
+			location=" wsdl/AccountService.wsdl" />
+    </reference>
+ 
 </composite>

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/resources/wsdl/AccountService.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/resources/wsdl/AccountService.wsdl?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/resources/wsdl/AccountService.wsdl
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/main/resources/wsdl/AccountService.wsdl
Mon Sep 18 06:23:22 2006
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-	Copyright (c) 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.
+ * 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.    
 -->
 <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/test/java/bigbank/webclient/client/TestAccountService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/test/java/bigbank/webclient/client/TestAccountService.java?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/test/java/bigbank/webclient/client/TestAccountService.java
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/test/java/bigbank/webclient/client/TestAccountService.java
Mon Sep 18 06:23:22 2006
@@ -1,26 +1,28 @@
-/**
- *
- *  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.
+/*
+ * 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 bigbank.webclient.client;
 
 import java.util.List;
 
-import org.apache.tuscany.core.client.TuscanyRuntime;
-import org.osoa.sca.CurrentModuleContext;
-import org.osoa.sca.ModuleContext;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
 import org.osoa.sca.SCA;
 
 import com.bigbank.account.AccountReport;
@@ -36,17 +38,15 @@
     }
 
     public static void main(String[] args) throws Exception {
-        TuscanyRuntime tuscany = new TuscanyRuntime("bigbank.webclient.testclient", null);
-        tuscany.start();
-        ModuleContext moduleContext = CurrentModuleContext.getContext();
+        CompositeContext moduleContext = CurrentCompositeContext.getContext();
 
-        AccountService accountService = (AccountService) moduleContext.locateService("AccountServiceComponent");
+        AccountService accountService = (AccountService) moduleContext.locateService(AccountService.class,
"AccountServiceComponent");
 
         AccountReport report = accountService.getAccountReport(12345);
         List summaries = report.getAccountSummaries();
 
         System.out.println("retrieved " + summaries.size() + " summaries");
 
-        tuscany.stop();
+        
     }
 }

Modified: incubator/tuscany/java/sampleapps/bigbank/webclient/src/test/java/bigbank/webclient/client/TestLoginService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/bigbank/webclient/src/test/java/bigbank/webclient/client/TestLoginService.java?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/bigbank/webclient/src/test/java/bigbank/webclient/client/TestLoginService.java
(original)
+++ incubator/tuscany/java/sampleapps/bigbank/webclient/src/test/java/bigbank/webclient/client/TestLoginService.java
Mon Sep 18 06:23:22 2006
@@ -1,27 +1,27 @@
-/**
- *
- *  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.
+/*
+ * 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 bigbank.webclient.client;
 
-import org.osoa.sca.CurrentModuleContext;
-import org.osoa.sca.ModuleContext;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
 import org.osoa.sca.SCA;
 
-import org.apache.tuscany.core.client.TuscanyRuntime;
-
 import bigbank.webclient.services.profile.LoginService;
 
 
@@ -36,11 +36,9 @@
     public static void main(String[] args) throws Exception {
 
 
-        TuscanyRuntime tuscany = new TuscanyRuntime("bigbank.webclient.testclient", null);
-        tuscany.start();
-        ModuleContext moduleContext = CurrentModuleContext.getContext();
+        CompositeContext moduleContext = CurrentCompositeContext.getContext();
         LoginService loginService = (LoginService)
-                moduleContext.locateService("LoginServiceComponent");
+                moduleContext.locateService(LoginService.class, "LoginServiceComponent");
 
         if (loginService.login("test", "password") == LoginService.SUCCESS)
             System.out.println("Success");

Modified: incubator/tuscany/java/sampleapps/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sampleapps/pom.xml?view=diff&rev=447397&r1=424728&r2=447397
==============================================================================
--- incubator/tuscany/java/sampleapps/pom.xml (original)
+++ incubator/tuscany/java/sampleapps/pom.xml Mon Sep 18 06:23:22 2006
@@ -15,92 +15,167 @@
  *  limitations under the License.
  -->
 <project>
+    <parent>
+        <groupId>org.apache.tuscany</groupId>
+        <artifactId>parent</artifactId>
+        <version>1-incubator-SNAPSHOT</version>
+    </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.tuscany.sampleapps</groupId>
     <artifactId>tuscany-sampleapps</artifactId>
+    <version>1.0-incubator-M2-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Tuscany Scenario Samples</name>
-    <url>http://incubator.apache.org/tuscany/</url>
-    <version>incubating-M1</version>
 
     <prerequisites>
         <maven>2.0</maven>
     </prerequisites>
+    <properties>
+        <sca.version>1.0-incubator-M2-SNAPSHOT</sca.version>
+        <scaKernelVersion>1.0-incubator-M2-SNAPSHOT</scaKernelVersion>
+        <axis2Version>SNAPSHOT</axis2Version>
+        <tuscanyVersion>1.0-incubator-M2-SNAPSHOT</tuscanyVersion>
+        <specVersion>0.95</specVersion>
+    </properties>
 
-    <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>
-        </license>
-    </licenses>
-
+    <!-- definition of repositories where the parent pom can be found -->
     <repositories>
         <repository>
-            <id>ibiblio</id>
-            <name>ibiblio</name>
-            <url>http://www.ibiblio.org/maven2</url>
+            <id>apache.snapshots</id>
+            <name>Apache Snapshot Repository</name>
+            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
         </repository>
         <repository>
-            <id>incubating-M1</id>
-            <name>incubating-M1</name>
-            <url>http://people.apache.org/~jsdelfino/maven2</url>
+            <id>apache.incubator</id>
+            <name>Apache Incubator Repository</name>
+            <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
         </repository>
     </repositories>
 
-    <modules>
-        <module>bigbank</module>
-    </modules>
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
 
     <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifestEntries>
-                            <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
-                            <Implementation-URL>http://incubator.apache.org/tuscany/</Implementation-URL>
-                        </manifestEntries>
-                    </archive>
-                </configuration>
-            </plugin>
-        </plugins>
-
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.componentType</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
-
-        <testResources>
-            <testResource>
-                <directory>src/test/java</directory>
-                <includes>
-                    <include>**/*.componentType</include>
-                </includes>
-            </testResource>
-            <testResource>
-                <directory>src/test/resources</directory>
-            </testResource>
-        </testResources>
         <defaultGoal>install</defaultGoal>
-
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-checkstyle-plugin</artifactId>
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.apache.tuscany</groupId>
+                            <artifactId>buildtools</artifactId>
+                            <version>${pom.version}</version>
+                        </dependency>
+                    </dependencies>
+                    <executions>
+                        <execution>
+                            <id>process-sources</id>
+                            <phase>process-sources</phase>
+                            <configuration>
+                                <configLocation>tuscany-checkstyle.xml</configLocation>
+                                <suppressionsLocation>tuscany-suppressions.xml</suppressionsLocation>
+                                <consoleOutput>true</consoleOutput>
+                                <failsOnError>true</failsOnError>
+                                <linkXRef>false</linkXRef>
+                                <sourceDirectory>${basedir}/src</sourceDirectory>
+                                <propertyExpansion>${checkstyle.properties}</propertyExpansion>
+                            </configuration>
+                            <goals>
+                                <goal>checkstyle</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-pmd-plugin</artifactId>
+                    <configuration>
+                        <rulesets>
+                            <ruleset>${basedir}/.ruleset</ruleset>
+                        </rulesets>
+                        <linkXRef>false</linkXRef>
+                        <targetJdk>1.5</targetJdk>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>process-sources</id>
+                            <phase>process-sources</phase>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <configuration>
+                        <source>1.5</source>
+                        <target>1.5</target>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.2</version>
+                    <configuration>
+                        <includes>
+                            <include>**/*TestCase.java</include>
+                        </includes>
+                        <reportFormat>brief</reportFormat>
+                        <useFile>false</useFile>
+                        <forkMode>once</forkMode>
+                        <argLine>-ea</argLine>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.felix.plugins</groupId>
+                    <artifactId>maven-osgi-plugin</artifactId>
+                    <extensions>true</extensions>
+                    <configuration>
+                        <osgiManifest>
+                            <bundleName>${pom.name}</bundleName>
+                            <bundleDescription>${pom.description}</bundleDescription>
+                            <bundleVendor>${pom.organization.name}</bundleVendor>
+                            <bundleLocalization>plugin</bundleLocalization>
+                        </osgiManifest>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-clover-plugin</artifactId>
+                    <configuration>
+                        <jdk>1.5</jdk>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
     </build>
-
+    <modules>
+        <module>bigbank</module>
+    </modules>
 </project>



---------------------------------------------------------------------
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