summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany')
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java44
7 files changed, 246 insertions, 0 deletions
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java
new file mode 100644
index 0000000000..469882f3b3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java
@@ -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 org.apache.tuscany.sca.binding.jms;
+
+public class CheckedExcpetion extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetion(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java
new file mode 100644
index 0000000000..19b584950a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java
@@ -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 org.apache.tuscany.sca.binding.jms;
+
+public class CheckedExcpetion2Args extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetion2Args(String s, Throwable e) {
+ super(s, e);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java
new file mode 100644
index 0000000000..b12e3a562e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java
@@ -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 org.apache.tuscany.sca.binding.jms;
+
+public class CheckedExcpetionChained extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetionChained(Throwable e) {
+ super(e);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java
new file mode 100644
index 0000000000..b23db73c01
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java
@@ -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 org.apache.tuscany.sca.binding.jms;
+
+public class CheckedExcpetionNoArgs extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetionNoArgs() {
+ super();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java
new file mode 100644
index 0000000000..9e4c4c46d4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java
@@ -0,0 +1,33 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface ExceptionService {
+
+ public void throwChecked() throws CheckedExcpetion;
+ public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs;
+ public void throwChecked2Args() throws CheckedExcpetion2Args;
+ public void throwCheckedChained() throws CheckedExcpetionChained;
+
+ public void throwUnChecked();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java
new file mode 100644
index 0000000000..02426936d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java
@@ -0,0 +1,57 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(ExceptionService.class)
+public class ExceptionServiceClient implements ExceptionService {
+
+ private ExceptionService service;
+
+ @Reference
+ public void setService(ExceptionService service) {
+ this.service = service;
+ }
+
+ public void throwChecked() throws CheckedExcpetion {
+ service.throwChecked();
+ }
+
+ public void throwChecked2Args() throws CheckedExcpetion2Args {
+ service.throwChecked2Args();
+ }
+
+ public void throwCheckedChained() throws CheckedExcpetionChained {
+ service.throwCheckedChained();
+ }
+
+ public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs {
+ service.throwCheckedNoArgs();
+ }
+
+ public void throwUnChecked() {
+ service.throwUnChecked();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java
new file mode 100644
index 0000000000..866acf1ce1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java
@@ -0,0 +1,44 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.jms;
+
+public class ExceptionServiceImpl implements ExceptionService {
+
+ public void throwChecked() throws CheckedExcpetion {
+ throw new CheckedExcpetion("foo");
+ }
+
+ public void throwChecked2Args() throws CheckedExcpetion2Args {
+ throw new CheckedExcpetion2Args("foo", new Exception("bla"));
+ }
+
+ public void throwCheckedChained() throws CheckedExcpetionChained {
+ throw new CheckedExcpetionChained(new Exception("bla"));
+ }
+
+ public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs {
+ throw new CheckedExcpetionNoArgs();
+ }
+
+ public void throwUnChecked() {
+ throw new RuntimeException("bla");
+ }
+
+}