From 88bf2a256b02e1858993bf097f4dc743d389e3f0 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 29 Aug 2010 02:55:29 +0000 Subject: Sandbox to experiment and extend the runtime. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@990479 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/binding/jms/CheckedExcpetion.java | 28 ++++++++++++++ .../sca/binding/jms/CheckedExcpetion2Args.java | 28 ++++++++++++++ .../sca/binding/jms/CheckedExcpetionChained.java | 28 ++++++++++++++ .../sca/binding/jms/CheckedExcpetionNoArgs.java | 28 ++++++++++++++ .../tuscany/sca/binding/jms/ExceptionService.java | 33 ++++++++++++++++ .../sca/binding/jms/ExceptionServiceImpl.java | 44 ++++++++++++++++++++++ 6 files changed, 189 insertions(+) create mode 100644 sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java create mode 100644 sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java create mode 100644 sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java create mode 100644 sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java create mode 100644 sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java create mode 100644 sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java (limited to 'sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache') diff --git a/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java b/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java new file mode 100644 index 0000000000..469882f3b3 --- /dev/null +++ b/sandbox/sebastien/java/extend/itest/jms/exceptions/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/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java b/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java new file mode 100644 index 0000000000..19b584950a --- /dev/null +++ b/sandbox/sebastien/java/extend/itest/jms/exceptions/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/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java b/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java new file mode 100644 index 0000000000..b12e3a562e --- /dev/null +++ b/sandbox/sebastien/java/extend/itest/jms/exceptions/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/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java b/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java new file mode 100644 index 0000000000..b23db73c01 --- /dev/null +++ b/sandbox/sebastien/java/extend/itest/jms/exceptions/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/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java b/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java new file mode 100644 index 0000000000..9e4c4c46d4 --- /dev/null +++ b/sandbox/sebastien/java/extend/itest/jms/exceptions/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/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java b/sandbox/sebastien/java/extend/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java new file mode 100644 index 0000000000..866acf1ce1 --- /dev/null +++ b/sandbox/sebastien/java/extend/itest/jms/exceptions/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"); + } + +} -- cgit v1.2.3