summaryrefslogtreecommitdiffstats
path: root/sandbox/container.groovy/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/container.groovy/src/main/resources')
-rw-r--r--sandbox/container.groovy/src/main/resources/greetings.componentType9
-rw-r--r--sandbox/container.groovy/src/main/resources/greetings.groovy3
-rw-r--r--sandbox/container.groovy/src/main/resources/logging.properties27
-rw-r--r--sandbox/container.groovy/src/main/resources/sca.module30
-rw-r--r--sandbox/container.groovy/src/main/resources/system.fragment32
5 files changed, 101 insertions, 0 deletions
diff --git a/sandbox/container.groovy/src/main/resources/greetings.componentType b/sandbox/container.groovy/src/main/resources/greetings.componentType
new file mode 100644
index 0000000000..63f054c508
--- /dev/null
+++ b/sandbox/container.groovy/src/main/resources/greetings.componentType
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <service name="GreetingService">
+ <interface.java interface="org.apache.tuscany.samples.groovy.Greeting"/>
+ </service>
+
+</componentType> \ No newline at end of file
diff --git a/sandbox/container.groovy/src/main/resources/greetings.groovy b/sandbox/container.groovy/src/main/resources/greetings.groovy
new file mode 100644
index 0000000000..65878f45a3
--- /dev/null
+++ b/sandbox/container.groovy/src/main/resources/greetings.groovy
@@ -0,0 +1,3 @@
+def greet(name) {
+ println "Hello ${name}"
+}
diff --git a/sandbox/container.groovy/src/main/resources/logging.properties b/sandbox/container.groovy/src/main/resources/logging.properties
new file mode 100644
index 0000000000..58407bd5a9
--- /dev/null
+++ b/sandbox/container.groovy/src/main/resources/logging.properties
@@ -0,0 +1,27 @@
+# Copyright (c) 2006 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.
+#
+# $Rev$ $Date$
+#
+
+# Custom logging configuration for Tuscany samples
+# By default, only INFO level logging is enabled and ALL messages get sent to the console
+# For more messages from the runtime, uncomment specific settings at the end of this file
+handlers = java.util.logging.ConsoleHandler
+java.util.logging.ConsoleHandler.level = ALL
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+.level=INFO
+
+# Uncomment the next setting to get all Tuscany messages (this will be a lot)
+#org.apache.tuscany.level=FINEST \ No newline at end of file
diff --git a/sandbox/container.groovy/src/main/resources/sca.module b/sandbox/container.groovy/src/main/resources/sca.module
new file mode 100644
index 0000000000..d24b5a4e9a
--- /dev/null
+++ b/sandbox/container.groovy/src/main/resources/sca.module
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 BEA Sytems Inc.
+ Copyright (c) 2005 International Business Machines
+
+ 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.
+ -->
+<!--module xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="sampleHelloworld"-->
+<module
+ xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:groovy="http://org.apache.tuscany/xmlns/groovy/0.9"
+ name="GroovySample">
+
+ <component name="GreetingComponent">
+ <groovy:implementation.groovy script="greetings.groovy"/>
+ </component>
+
+</module>
diff --git a/sandbox/container.groovy/src/main/resources/system.fragment b/sandbox/container.groovy/src/main/resources/system.fragment
new file mode 100644
index 0000000000..a95eaa7461
--- /dev/null
+++ b/sandbox/container.groovy/src/main/resources/system.fragment
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:tuscany="http://org.apache.tuscany/xmlns/system/0.9"
+ name="org.apache.tuscany.container.groovy">
+
+ <component name="org.apache.tuscany.container.groovy.builder.GroovyContextFactoryBuilder">
+ <tuscany:implementation.system class="org.apache.tuscany.container.groovy.builder.GroovyContextFactoryBuilder"/>
+ </component>
+
+ <component name="org.apache.tuscany.container.groovy.builder.GroovyTargetWireBuilder">
+ <tuscany:implementation.system class="org.apache.tuscany.container.groovy.builder.GroovyTargetWireBuilder"/>
+ </component>
+
+ <component name="org.apache.tuscany.container.groovy.loader.GroovyImplementationLoader">
+ <tuscany:implementation.system class="org.apache.tuscany.container.groovy.loader.GroovyImplementationLoader"/>
+ </component>
+</moduleFragment>