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 2008/03/27 18:12:57 UTC
svn commit: r641905 - in /incubator/tuscany/java/sca/tutorial: ./
catalog-ejb/ catalog-ejb/src/main/java/client/
catalog-ejb/src/main/java/services/ejb/ catalog-ejb/src/main/resources/
catalog-ejb/src/main/resources/META-INF/ catalog-mediation/ catalog...
Author: jsdelfino
Date: Thu Mar 27 10:12:33 2008
New Revision: 641905
URL: http://svn.apache.org/viewvc?rev=641905&view=rev
Log:
Fix for TUSCANY-2160. Integrated sample EJB module in the tutorial.
Added:
incubator/tuscany/java/sca/tutorial/catalog-ejb/
- copied from r640322, incubator/tuscany/java/sca/tutorial/jee-services/catalog-ejb/
incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml
incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType (with props)
incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/catalog-ejb.composite (with props)
incubator/tuscany/java/sca/tutorial/catalog-mediation/
- copied from r640322, incubator/tuscany/java/sca/tutorial/jee-services/catalog-jee/
incubator/tuscany/java/sca/tutorial/catalog-mediation/META-INF/
incubator/tuscany/java/sca/tutorial/catalog-mediation/META-INF/sca-contribution.xml
incubator/tuscany/java/sca/tutorial/catalog-mediation/catalog-mediation.composite
- copied, changed from r640322, incubator/tuscany/java/sca/tutorial/jee-services/catalog-jee/catalog-jee.composite
incubator/tuscany/java/sca/tutorial/catalog-mediation/services/
incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/
incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/CatalogEJB.java (with props)
incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/Vegetable.java (with props)
incubator/tuscany/java/sca/tutorial/catalog-mediation/services/mediation/
incubator/tuscany/java/sca/tutorial/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java (with props)
incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogEJBNode.composite (with props)
incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogMediationNode.composite (with props)
incubator/tuscany/java/sca/tutorial/domain/launch/LaunchCatalogMediationNode.java (with props)
Removed:
incubator/tuscany/java/sca/tutorial/catalog-mediation/CatalogEJB.componentType
incubator/tuscany/java/sca/tutorial/catalog-mediation/catalog-jee.composite
incubator/tuscany/java/sca/tutorial/jee-services/
Modified:
incubator/tuscany/java/sca/tutorial/catalog-ejb/pom.xml
incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/client/Client.java
incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBImpl.java
incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml
incubator/tuscany/java/sca/tutorial/catalog-mediation/pom.xml
incubator/tuscany/java/sca/tutorial/domain/cloud.composite
incubator/tuscany/java/sca/tutorial/domain/domain.composite
incubator/tuscany/java/sca/tutorial/domain/pom.xml
incubator/tuscany/java/sca/tutorial/domain/workspace.xml
incubator/tuscany/java/sca/tutorial/pom.xml
incubator/tuscany/java/sca/tutorial/store-merger/store-merger.composite
Modified: incubator/tuscany/java/sca/tutorial/catalog-ejb/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-ejb/pom.xml?rev=641905&r1=640322&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-ejb/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/catalog-ejb/pom.xml Thu Mar 27 10:12:33 2008
@@ -1,56 +1,99 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-tutorial</artifactId>
- <version>2.0-incubating-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>tutorial-catalog-ejb</artifactId>
- <name>Apache Tuscany SCA Tutorial Catalog EJB</name>
- <packaging>jar</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-ejb_3.0_spec</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>${pom.basedir}/src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </build>
-
-</project>
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-tutorial</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>tutorial-catalog-ejb</artifactId>
+ <name>Apache Tuscany SCA Tutorial Catalog EJB</name>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_3.0_spec</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-openejb</artifactId>
+ <version>2.0.2</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-connector</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-persistence-jpa10</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-ejbd</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-server</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-loader</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-jee</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-ejbd</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-javaagent</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ <resources>
+ <resource>
+ <directory>${pom.basedir}/src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
+
+</project>
+
Modified: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/client/Client.java?rev=641905&r1=640322&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/client/Client.java (original)
+++ incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/client/Client.java Thu Mar 27 10:12:33 2008
@@ -8,28 +8,26 @@
import services.ejb.CatalogEJB;
import services.ejb.Vegetable;
+/**
+ * A test client for the catalog EJB.
+ *
+ * @version $Rev: $ $Date: $
+ */
public class Client {
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- try {
- Properties properties = new Properties();
- properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
- properties.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201");
- InitialContext context = new InitialContext(properties);
-
- CatalogEJB catalog = (CatalogEJB)context.lookup("java:VegetablesCatalogEJB");
+ public static void main(String[] args) throws Exception {
+ Properties properties = new Properties();
+ properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
+ properties.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201");
+ InitialContext context = new InitialContext(/*properties*/);
- Vegetable items[] = catalog.get();
- System.out.println(items[0].getName());
-
- } catch (Exception ex) {
- System.err.println(ex.toString());
+ CatalogEJB catalog = (CatalogEJB)context.lookup("corbaname:iiop:1.2@localhost:1050#VegetablesCatalogEJBRemote");
+ //CatalogEJB catalog = (CatalogEJB)context.lookup("java:VegetablesCatalogEJBRemote");
+
+ Vegetable items[] = catalog.get();
+ for (Vegetable item: items) {
+ System.out.println(item.getName() + " " + item.getPrice());
}
-
}
}
Modified: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBImpl.java?rev=641905&r1=640322&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBImpl.java (original)
+++ incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBImpl.java Thu Mar 27 10:12:33 2008
@@ -22,22 +22,19 @@
import java.util.ArrayList;
import java.util.List;
-import javax.ejb.Init;
import javax.ejb.Stateless;
@Stateless(name="VegetablesCatalogEJB")
public class VegetablesCatalogEJBImpl implements CatalogEJB {
private List<Vegetable> catalog = new ArrayList<Vegetable>();
- @Init
- public void init() {
+ public VegetablesCatalogEJBImpl() {
catalog.add(new Vegetable("Broccoli", "$2.99"));
catalog.add(new Vegetable("Asparagus", "$3.55"));
catalog.add(new Vegetable("Cauliflower", "$1.55"));
}
public Vegetable[] get() {
- init();
Vegetable[] catalogArray = new Vegetable[catalog.size()];
catalog.toArray(catalogArray);
return catalogArray;
Modified: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml?rev=641905&r1=640322&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml (original)
+++ incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml Thu Mar 27 10:12:33 2008
@@ -28,5 +28,5 @@
<sys:version>${version}</sys:version>
<sys:type>jar</sys:type>
</sys:moduleId>
- </sys:environment>
+ </sys:environment>
</openejb-jar>
Added: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml Thu Mar 27 10:12:33 2008
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:c="http://catalog">
+ <export.java package="services.ejb"/>
+ <deployable composite="c:catalog-ejb"/>
+</contribution>
\ No newline at end of file
Added: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType (added)
+++ incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType Thu Mar 27 10:12:33 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+ <service name="CatalogEJB">
+ <interface.java interface="services.ejb.CatalogEJB"/>
+ </service>
+
+</componentType>
Propchange: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/catalog-ejb.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/catalog-ejb.composite?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/catalog-ejb.composite (added)
+++ incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/catalog-ejb.composite Thu Mar 27 10:12:33 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://catalog"
+ name="catalog-ejb">
+
+ <component name="VegetablesCatalogEJB">
+ <implementation.ejb ejb-link="tutorial-catalog-ejb.jar#VegetablesCatalogEJB"/>
+ <service name="CatalogEJB">
+ <binding.ejb uri="java:VegetablesCatalogEJBRemote"/>
+ </service>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/catalog-ejb.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/catalog-ejb/src/main/resources/catalog-ejb.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/catalog-mediation/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-mediation/META-INF/sca-contribution.xml?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-mediation/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/tutorial/catalog-mediation/META-INF/sca-contribution.xml Thu Mar 27 10:12:33 2008
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:c="http://catalog">
+ <import.java package="services"/>
+ <deployable composite="c:catalog-mediation"/>
+</contribution>
\ No newline at end of file
Copied: incubator/tuscany/java/sca/tutorial/catalog-mediation/catalog-mediation.composite (from r640322, incubator/tuscany/java/sca/tutorial/jee-services/catalog-jee/catalog-jee.composite)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-mediation/catalog-mediation.composite?p2=incubator/tuscany/java/sca/tutorial/catalog-mediation/catalog-mediation.composite&p1=incubator/tuscany/java/sca/tutorial/jee-services/catalog-jee/catalog-jee.composite&r1=640322&r2=641905&rev=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/jee-services/catalog-jee/catalog-jee.composite (original)
+++ incubator/tuscany/java/sca/tutorial/catalog-mediation/catalog-mediation.composite Thu Mar 27 10:12:33 2008
@@ -18,14 +18,17 @@
* under the License.
-->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://store"
- name="catalog-jee">
+ targetNamespace="http://catalog"
+ name="catalog-mediation">
- <component name="JEEVegetablesCatalog">
- <implementation.ejb ejb-link="tutorial-catalog-ejb.jar#VegetablesCatalogEJB"/>
- <service name="CatalogEJB">
- <binding.ejb uri="java:VegetablesCatalogEJB"/>
+ <component name="MediatedVegetablesCatalog">
+ <implementation.java class="services.mediation.VegetablesCatalogMediationImpl"/>
+ <service name="Catalog">
+ <binding.ws/>
</service>
+ <reference name="catalog" target="VegetablesCatalogEJB">
+ <binding.ejb/>
+ </reference>
</component>
</composite>
Modified: incubator/tuscany/java/sca/tutorial/catalog-mediation/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-mediation/pom.xml?rev=641905&r1=640322&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-mediation/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/catalog-mediation/pom.xml Thu Mar 27 10:12:33 2008
@@ -25,8 +25,8 @@
<version>2.0-incubating-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>tutorial-catalog-jee</artifactId>
- <name>Apache Tuscany SCA Tutorial Catalog EJB Service</name>
+ <artifactId>tutorial-catalog-mediation</artifactId>
+ <name>Apache Tuscany SCA Tutorial Catalog Mediation</name>
<repositories>
<repository>
@@ -36,6 +36,24 @@
</repositories>
<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tutorial-assets</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tutorial-catalog-ejb</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_3.0_spec</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
Added: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/CatalogEJB.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/CatalogEJB.java?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/CatalogEJB.java (added)
+++ incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/CatalogEJB.java Thu Mar 27 10:12:33 2008
@@ -0,0 +1,27 @@
+/*
+ * 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 services.ejb;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface CatalogEJB {
+ Vegetable[] get();
+}
Propchange: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/CatalogEJB.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/CatalogEJB.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/CatalogEJB.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/Vegetable.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/Vegetable.java?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/Vegetable.java (added)
+++ incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/Vegetable.java Thu Mar 27 10:12:33 2008
@@ -0,0 +1,54 @@
+/*
+ * 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 services.ejb;
+
+import java.io.Serializable;
+
+public class Vegetable implements Serializable {
+ private static final long serialVersionUID = -5847326138627338217L;
+
+ private String name;
+ private String price;
+
+ public Vegetable() {
+ }
+
+ public Vegetable(String name, String price) {
+ this.name = name;
+ this.price = price;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getPrice() {
+ return price;
+ }
+
+ public void setPrice(String price) {
+ this.price = price;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/Vegetable.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/Vegetable.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/ejb/Vegetable.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java (added)
+++ incubator/tuscany/java/sca/tutorial/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java Thu Mar 27 10:12:33 2008
@@ -0,0 +1,43 @@
+/*
+ * 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 services.mediation;
+
+import org.osoa.sca.annotations.Reference;
+
+import services.Catalog;
+import services.Item;
+import services.ejb.CatalogEJB;
+import services.ejb.Vegetable;
+
+public class VegetablesCatalogMediationImpl implements Catalog {
+
+ @Reference
+ public CatalogEJB catalog;
+
+ public Item[] get() {
+ Vegetable[] vegetables = catalog.get();
+ Item[] items = new Item[vegetables.length];
+ for (int i = 0; i < vegetables.length; i++) {
+ items[i] = new Item(vegetables[i].getName(), vegetables[i].getPrice());
+ }
+ return items;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/tutorial/domain/cloud.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/cloud.composite?rev=641905&r1=641904&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/cloud.composite (original)
+++ incubator/tuscany/java/sca/tutorial/domain/cloud.composite Thu Mar 27 10:12:33 2008
@@ -28,4 +28,6 @@
<include name="ns2:StoreSupplierNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
<include name="ns2:StoreEUNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
<include name="ns2:CatalogWebAppNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
+ <include name="ns2:CatalogMediationNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
+ <include name="ns2:CatalogEJBNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
</composite>
Added: incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogEJBNode.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogEJBNode.composite?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogEJBNode.composite (added)
+++ incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogEJBNode.composite Thu Mar 27 10:12:33 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscany.apache.org/cloud"
+ xmlns:c="http://catalog"
+ name="CatalogEJBNode">
+
+ <component name="CatalogEJBNode">
+ <t:implementation.node uri="catalog-ejb" composite="c:catalog-ejb"/>
+ <service name="Node">
+ <t:binding.http uri="http://localhost:8080"/>
+ </service>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogEJBNode.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogEJBNode.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogMediationNode.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogMediationNode.composite?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogMediationNode.composite (added)
+++ incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogMediationNode.composite Thu Mar 27 10:12:33 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscany.apache.org/cloud"
+ xmlns:c="http://catalog"
+ name="CatalogMediationNode">
+
+ <component name="CatalogMediationNode">
+ <t:implementation.node uri="catalog-mediation" composite="c:catalog-mediation"/>
+ <service name="Node">
+ <binding.ws uri="http://localhost:8105"/>
+ </service>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogMediationNode.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/domain/cloud/CatalogMediationNode.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/tutorial/domain/domain.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/domain.composite?rev=641905&r1=641904&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/domain.composite (original)
+++ incubator/tuscany/java/sca/tutorial/domain/domain.composite Thu Mar 27 10:12:33 2008
@@ -28,4 +28,6 @@
<include name="ns2:catalogs" uri="web-services" xmlns:ns2="http://services"/>
<include name="ns2:currency" uri="web-services" xmlns:ns2="http://services"/>
<include name="ns2:catalog-web" uri="catalog-webapp" xmlns:ns2="http://catalog"/>
+ <include name="ns2:catalog-mediation" uri="catalog-mediation" xmlns:ns2="http://catalog"/>
+ <include name="ns2:catalog-ejb" uri="catalog-ejb" xmlns:ns2="http://catalog"/>
</composite>
Added: incubator/tuscany/java/sca/tutorial/domain/launch/LaunchCatalogMediationNode.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/launch/LaunchCatalogMediationNode.java?rev=641905&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/launch/LaunchCatalogMediationNode.java (added)
+++ incubator/tuscany/java/sca/tutorial/domain/launch/LaunchCatalogMediationNode.java Thu Mar 27 10:12:33 2008
@@ -0,0 +1,28 @@
+/*
+ * 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 launch;
+
+import org.apache.tuscany.sca.node.launcher.NodeLauncher;
+
+public class LaunchCatalogMediationNode {
+ public static void main(String[] args) throws Exception {
+ NodeLauncher.main(new String[] {"http://localhost:9990/node-image/CatalogMediationNode"});
+ }
+}
Propchange: incubator/tuscany/java/sca/tutorial/domain/launch/LaunchCatalogMediationNode.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/domain/launch/LaunchCatalogMediationNode.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/tutorial/domain/launch/LaunchCatalogMediationNode.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/tuscany/java/sca/tutorial/domain/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/pom.xml?rev=641905&r1=641904&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/domain/pom.xml Thu Mar 27 10:12:33 2008
@@ -114,7 +114,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-ejb</artifactId>
+ <artifactId>tuscany-implementation-ejb-xml</artifactId>
<version>2.0-incubating-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: incubator/tuscany/java/sca/tutorial/domain/workspace.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/workspace.xml?rev=641905&r1=641904&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/workspace.xml (original)
+++ incubator/tuscany/java/sca/tutorial/domain/workspace.xml Thu Mar 27 10:12:33 2008
@@ -26,5 +26,7 @@
<contribution location="file:../store-eu/target/tutorial-store-eu.jar" uri="store-eu"/>
<contribution location="file:../web-services/target/tutorial-web-services.jar" uri="web-services"/>
<contribution location="file:../catalog-webapp/target/tutorial-catalog-webapp.war" uri="catalog-webapp"/>
+ <contribution location="file:../catalog-mediation/target/tutorial-catalog-mediation.jar" uri="catalog-mediation"/>
+ <contribution location="file:../catalog-ejb/target/tutorial-catalog-ejb.jar" uri="catalog-ejb"/>
<contribution location="file:../domain/cloud" uri="http://tuscany.apache.org/cloud"/>
</workspace>
Modified: incubator/tuscany/java/sca/tutorial/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/pom.xml?rev=641905&r1=641904&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/pom.xml Thu Mar 27 10:12:33 2008
@@ -45,9 +45,8 @@
<module>store-eu</module>
<module>web-services</module>
<module>catalog-webapp</module>
- <!--
- <module>jee-services</module>
- -->
+ <module>catalog-ejb</module>
+ <module>catalog-mediation</module>
</modules>
</profile>
Modified: incubator/tuscany/java/sca/tutorial/store-merger/store-merger.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-merger/store-merger.composite?rev=641905&r1=641904&r2=641905&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-merger/store-merger.composite (original)
+++ incubator/tuscany/java/sca/tutorial/store-merger/store-merger.composite Thu Mar 27 10:12:33 2008
@@ -44,11 +44,12 @@
<service name="Catalog">
<t:binding.jsonrpc/>
</service>
- <reference name="fruitsCatalog" target="StoreMergerFruitsCatalog"/>
+ <reference name="currencyConverter" target="StoreMergerCurrencyConverter"/>
+ <reference name="fruitsCatalog" target="StoreMergerFruitsCatalog"/>
+ <!-- <reference name="vegetablesCatalog" target="MediatedVegetablesCatalog"> -->
<reference name="vegetablesCatalog" target="VegetablesCatalogWebService">
<binding.ws/>
- </reference>
- <reference name="currencyConverter" target="StoreMergerCurrencyConverter"/>
+ </reference>
</component>
<component name="StoreMergerFruitsCatalog">
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org