From f62b9397697d93c6db68c877ed21de2758202c2f Mon Sep 17 00:00:00 2001 From: lresende Date: Fri, 1 Aug 2008 08:30:03 +0000 Subject: Corrupted commit git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@681630 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/samples/customer-dojo-webapp/README | 104 --------- .../samples/customer-dojo-webapp/build-dojo.xml | 92 -------- .../sca/samples/customer-dojo-webapp/build.xml | 70 ------ .../sca/samples/customer-dojo-webapp/customer.sql | 33 --- .../customer-dojo-webapp/helloworld-jsonrpc.png | Bin 9947 -> 0 bytes .../customer-dojo-webapp/helloworld-jsonrpc.svg | 177 -------------- .../sca/samples/customer-dojo-webapp/pom.xml | 253 --------------------- .../src/main/java/customer/Customer.java | 93 -------- .../src/main/java/customer/CustomerCollection.java | 26 --- .../main/java/customer/CustomerCollectionImpl.java | 101 -------- .../src/main/java/customer/CustomerService.java | 31 --- .../main/java/customer/CustomerServiceImpl.java | 118 ---------- .../src/main/java/launch/Launch.java | 34 --- .../src/main/resources/META-INF/orm.xml | 51 ----- .../src/main/resources/META-INF/persistence.xml | 40 ---- .../main/resources/META-INF/sca-contribution.xml | 26 --- .../src/main/resources/content/customer.html | 77 ------- .../src/main/resources/customer.composite | 44 ---- 18 files changed, 1370 deletions(-) delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/README delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/build-dojo.xml delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/build.xml delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/customer.sql delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/helloworld-jsonrpc.png delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/helloworld-jsonrpc.svg delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/pom.xml delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/Customer.java delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollection.java delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollectionImpl.java delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerService.java delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerServiceImpl.java delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/launch/Launch.java delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/orm.xml delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/persistence.xml delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/content/customer.html delete mode 100644 sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/customer.composite (limited to 'sandbox/lresende') diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/README b/sandbox/lresende/sca/samples/customer-dojo-webapp/README deleted file mode 100644 index 38392a13b6..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/README +++ /dev/null @@ -1,104 +0,0 @@ -Hello World Dojo RPC Sample -=========================== - -Note. This sample is currently not working correctly on WebSphere - see TUSCANY-1990 - -This sample demostrates the SCA JSONRPC binding using a simple web app that -uses the RPC support of the Dojo Toolkit to an SCA service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-dojo-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -See also the similar helloworld-jsonrpc-webapp sample which also uses the SCA JSONRPC binding -but uses SCA scaDomain.js script on the client instead of the Dojo Toolkit. - -Sample Overview ---------------- -The sample provides a single service with an operation that reflects -a greeting back to the caller. The service is exposed using the JSONRPC -binding. The web app provided shows how the Dojo Toolkit JSON-RPC support can be -used to invoke the SCA service. - -The web app provided shows how the service can be called by using the DOJO toolkit. - -helloworld-dojo-webapp/ - build-dojo.xml - This file is an Ant script used by the - sample build process to download the Dojo Toolkit - and get it included in the WAR file - for use by the sample. - src/ - main/ - java/ - helloworldjsonrpc/ - HelloWorldService.java - service interface - HelloWorldServiceImpl.java - service implementation - resources/ - jsonrpc.composite - the SCA assembly for this sample - webapp - dojo/ - the Dojo toolkit (this directory is created only - when you build the samples from the source distribution) - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - HelloWorldJSONRPC.html - the web application that calls the - SCA service via JSONRPC - style.css - style sheet - - helloworld-jsonrpc-webapp.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file that unpacks the - dojo installation - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd helloworld-dojo-webapp -ant package - -This should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in your -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see a web page that allows you to send messages, via JSONRPC, to the -application running in the Tuscany SCA Runtime - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd helloworld-dojo-webapp -mvn - -Again this should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/build-dojo.xml b/sandbox/lresende/sca/samples/customer-dojo-webapp/build-dojo.xml deleted file mode 100644 index 8c6bd99484..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/build.xml b/sandbox/lresende/sca/samples/customer-dojo-webapp/build.xml deleted file mode 100644 index 95813af65a..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - -]> - - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/customer.sql b/sandbox/lresende/sca/samples/customer-dojo-webapp/customer.sql deleted file mode 100644 index b2b2c8e71c..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/customer.sql +++ /dev/null @@ -1,33 +0,0 @@ --- --- 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. --- - -DROP TABLE CUSTOMER; - -CREATE TABLE CUSTOMER ( - ID INT PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY, - NAME VARCHAR(30) - PHONE VARCHAR(10) - ADDRESS VARCHAR(25) - CITY VARCHAR(15) - STATE VARCHAR(2) - ZIP VARCHAR(5)); - -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Joe Smith', '4081234567', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Erik Johnson', '4081230987', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Mark Pensacola', '4085679988', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/helloworld-jsonrpc.png b/sandbox/lresende/sca/samples/customer-dojo-webapp/helloworld-jsonrpc.png deleted file mode 100644 index 57f90aed01..0000000000 Binary files a/sandbox/lresende/sca/samples/customer-dojo-webapp/helloworld-jsonrpc.png and /dev/null differ diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/helloworld-jsonrpc.svg b/sandbox/lresende/sca/samples/customer-dojo-webapp/helloworld-jsonrpc.svg deleted file mode 100644 index d5c3bc5d3e..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/helloworld-jsonrpc.svg +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldjsonrpc - - HelloWorldJSONServiceComponent - HelloWorldService - WebApp - DOJO - - diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/pom.xml b/sandbox/lresende/sca/samples/customer-dojo-webapp/pom.xml deleted file mode 100644 index c0cd2f4102..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/pom.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-customer-dojo - Apache Tuscany SCA Customer DOJO Sample WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - org.apache.geronimo.specs - geronimo-jpa_3.0_spec - 1.1 - - - - org.apache.openjpa - openjpa - 1.0.0 - - - javax.xml.bind - jaxb-api - - - - - - org.apache.derby - derby - 10.1.2.1 - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - true - - - generate - - - - - - org.codehaus.mojo - sql-maven-plugin - - 1.1-SNAPSHOT - - - - org.apache.derby - derby - 10.1.2.1 - - - - - - create-db - generate-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${pom.basedir}/target/classes/customer;create=true - true - continue - skip - ; - - ${pom.basedir}/customer.sql - - - - - - - shutdown-database-sothat-test-can-run - process-test-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${pom.basedir}/target/classes/customer;shutdown=true - true - - - - - - - diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/Customer.java b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/Customer.java deleted file mode 100644 index 6d207ea2ef..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/Customer.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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 customer; - -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.Id; - -@Entity -public class Customer { - - @Id protected int id; - @Basic protected String name; - @Basic protected String phone; - @Basic protected String address; - @Basic protected String city; - @Basic protected String state; - @Basic protected String zip; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - -} diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollection.java b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollection.java deleted file mode 100644 index 5ad39aad5c..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollection.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 customer; - -import org.apache.tuscany.sca.data.collection.Collection; - - -public interface CustomerCollection extends Collection { - -} diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollectionImpl.java b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollectionImpl.java deleted file mode 100644 index c0a2f25f15..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerCollectionImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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 customer; - -import java.util.Iterator; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; - - -public class CustomerCollectionImpl implements CustomerCollection { - EntityManagerFactory emf = null; - EntityManager em = null; - - public CustomerCollectionImpl() { - System.out.println(">>>"); - try { - emf = Persistence.createEntityManagerFactory("customer-openJPA"); - em = emf.createEntityManager(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public void delete(String arg0) throws NotFoundException { - // TODO Auto-generated method stub - - } - - public Customer get(String arg0) throws NotFoundException { - // TODO Auto-generated method stub - return null; - } - - public Entry[] getAll() { - EntityTransaction tx = em.getTransaction(); - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - Customer customer = (Customer)iter.next(); - - System.out.println(customer); - } - - tx.commit(); - } catch(Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - return null; - } - - public String post(String arg0, Customer arg1) { - // TODO Auto-generated method stub - return null; - } - - public void put(String arg0, Customer arg1) throws NotFoundException { - // TODO Auto-generated method stub - - } - - public Entry[] query(String arg0) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerService.java b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerService.java deleted file mode 100644 index 7915cc6e77..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 customer; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CustomerService { - - Customer[] get(); - - Customer findCustomerByName(String name); - -} diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerServiceImpl.java b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerServiceImpl.java deleted file mode 100644 index 27ba8131bb..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/customer/CustomerServiceImpl.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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 customer; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; - -public class CustomerServiceImpl implements CustomerService { - EntityManagerFactory emf = null; - EntityManager em = null; - - public CustomerServiceImpl() { - - } - - @Init - public void init() { - System.out.println(">>> Initializing JPA"); - try { - emf = Persistence.createEntityManagerFactory("customer-openJPA"); - em = emf.createEntityManager(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Destroy - public void destroy() { - em.close(); - emf.close(); - } - - public Customer[] get() { - EntityTransaction tx = em.getTransaction(); - List customers = new ArrayList(); - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - Customer customer = (Customer)iter.next(); - customers.add(customer); - } - - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - Customer[] customerArray = new Customer[customers.size()]; - customers.toArray(customerArray); - return customerArray; - } - - public Customer findCustomerByName(String name) { - EntityTransaction tx = em.getTransaction(); - Customer customer = null; - - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c WHERE c.name = " + name); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - customer = (Customer)iter.next(); - } - - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - return customer; - } - -} diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/launch/Launch.java b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/launch/Launch.java deleted file mode 100644 index d7f88b8dd4..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/java/launch/Launch.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.host.embedded.SCADomain; - -public class Launch { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("customer.composite"); - System.out.println("store.composite ready for big business !!!"); - System.in.read(); - System.out.println("Stopping ..."); - scaDomain.close(); - System.out.println(); - } -} diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/orm.xml b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/orm.xml deleted file mode 100644 index add55397d3..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/orm.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/persistence.xml b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 4920281b12..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - customer.Customer - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/sca-contribution.xml b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 136326d1d3..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/content/customer.html b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/content/customer.html deleted file mode 100644 index dbc8aad9d0..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/content/customer.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - Tuscany Dojo JSON-RPC Customer Example - - - - - - - - - - - - - - - -

Tuscany Dojo JSON-RPC Customer Sample

- -Customer Name :
- - - - - - - - diff --git a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/customer.composite b/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/customer.composite deleted file mode 100644 index 47bf524924..0000000000 --- a/sandbox/lresende/sca/samples/customer-dojo-webapp/src/main/resources/customer.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3