summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources
diff options
context:
space:
mode:
authordims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
committerdims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
commitbdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a (patch)
tree38a92061c0793434c4be189f1d70c3458b6bc41d /branches/sca-java-1.0/samples/company-das-webapp/src/main/resources
Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.0/samples/company-das-webapp/src/main/resources')
-rw-r--r--branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/CompanyConfig.xml46
-rw-r--r--branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/dasservice.composite34
-rw-r--r--branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/log4j.properties29
3 files changed, 109 insertions, 0 deletions
diff --git a/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/CompanyConfig.xml b/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/CompanyConfig.xml
new file mode 100644
index 0000000000..3d20054c12
--- /dev/null
+++ b/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/CompanyConfig.xml
@@ -0,0 +1,46 @@
+<?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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <ConnectionInfo dataSource="java:comp/env/jdbc/dastest"/>
+
+ <Command name="all companies" SQL="select * from COMPANY" kind="Select"/>
+
+ <Command name="all companies and departments" SQL="select * from COMPANY left outer join DEPARTMENT on COMPANY.ID = DEPARTMENT.COMPANYID" kind="Select"/>
+
+ <Command name="all departments for company" SQL="select * from COMPANY inner join DEPARTMENT on COMPANY.ID = DEPARTMENT.COMPANYID where COMPANY.ID = ?" kind="Select"/>
+
+ <Command name="company by id with departments" SQL="select * from COMPANY left outer join DEPARTMENT on COMPANY.ID = DEPARTMENT.COMPANYID where COMPANY.ID = ?" kind="Select"/>
+
+
+ <Table tableName="COMPANY">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Relationship name="departments" primaryKeyTable="COMPANY" foreignKeyTable="DEPARTMENT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="COMPANYID"/>
+ </Relationship>
+
+
+</Config>
diff --git a/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/dasservice.composite b/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/dasservice.composite
new file mode 100644
index 0000000000..54c4af61ee
--- /dev/null
+++ b/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/dasservice.composite
@@ -0,0 +1,34 @@
+<?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://das-service"
+ xmlns:das-service="http://das-service"
+ name="DASService">
+
+ <service name="DASService" promote="DASServiceComponent">
+ <interface.java interface="das.DASService"/>
+ <reference>DASServiceComponent</reference>
+ </service>
+
+ <component name="DASServiceComponent">
+ <implementation.java class="das.DASServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/log4j.properties b/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/log4j.properties
new file mode 100644
index 0000000000..c5c2868aaa
--- /dev/null
+++ b/branches/sca-java-1.0/samples/company-das-webapp/src/main/resources/log4j.properties
@@ -0,0 +1,29 @@
+# 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.
+#
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=INFO, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=[DAS RDB] - %c{1}.%M (%L) : %m %n
+
+# Print only messages of level WARN or above in the package com.foo.
+log4j.logger.org.apache.tuscany=NONE \ No newline at end of file