You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2009/08/27 05:42:11 UTC
svn commit: r808273 [3/5] - in /openejb/trunk/openejb3:
container/openejb-core/src/main/java/org/apache/openejb/config/
container/openejb-core/src/main/java/org/apache/openejb/config/rules/
container/openejb-core/src/main/java/org/apache/openejb/core/e...
Modified: openejb/trunk/openejb3/examples/simple-mdb-with-descriptor/src/main/java/org/superbiz/mdb/MessagingClientLocal.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/simple-mdb-with-descriptor/src/main/java/org/superbiz/mdb/MessagingClientLocal.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/simple-mdb-with-descriptor/src/main/java/org/superbiz/mdb/MessagingClientLocal.java (original)
+++ openejb/trunk/openejb3/examples/simple-mdb-with-descriptor/src/main/java/org/superbiz/mdb/MessagingClientLocal.java Thu Aug 27 03:42:06 2009
@@ -1,29 +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.
- */
-//START SNIPPET: code
-package org.superbiz.mdb;
-
-import javax.jms.JMSException;
-import javax.naming.NamingException;
-
-public interface MessagingClientLocal {
-
- public void sendMessage(String text) throws JMSException;
-
- public String receiveMessage() throws JMSException, NamingException;
-}
-//END SNIPPET: code
+/**
+ * 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.
+ */
+//START SNIPPET: code
+package org.superbiz.mdb;
+
+import javax.jms.JMSException;
+import javax.naming.NamingException;
+
+public interface MessagingClientLocal {
+
+ public void sendMessage(String text) throws JMSException;
+
+ public String receiveMessage() throws JMSException, NamingException;
+}
+//END SNIPPET: code
Modified: openejb/trunk/openejb3/examples/simple-mdb-with-descriptor/src/test/java/org/superbiz/mdb/ChatBeanTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/simple-mdb-with-descriptor/src/test/java/org/superbiz/mdb/ChatBeanTest.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/simple-mdb-with-descriptor/src/test/java/org/superbiz/mdb/ChatBeanTest.java (original)
+++ openejb/trunk/openejb3/examples/simple-mdb-with-descriptor/src/test/java/org/superbiz/mdb/ChatBeanTest.java Thu Aug 27 03:42:06 2009
@@ -1,49 +1,49 @@
-/**
- * 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.
- */
-//START SNIPPET: code
-package org.superbiz.mdb;
-
-import junit.framework.TestCase;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import java.util.Properties;
-
-public class ChatBeanTest extends TestCase {
- protected void setUp() throws Exception {
- System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
- }
-
- public void test() throws Exception {
- InitialContext context = new InitialContext();
-
- MessagingClientLocal bean = (MessagingClientLocal) context.lookup("MessagingClientBeanLocal");
-
- bean.sendMessage("Hello World!");
-
- assertEquals(bean.receiveMessage(), "Hello, Test Case!");
-
- bean.sendMessage("How are you?");
-
- assertEquals(bean.receiveMessage(), "I'm doing well.");
-
- bean.sendMessage("Still spinning?");
-
- assertEquals(bean.receiveMessage(), "Once every day, as usual.");
- }
-}
-//END SNIPPET: code
+/**
+ * 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.
+ */
+//START SNIPPET: code
+package org.superbiz.mdb;
+
+import junit.framework.TestCase;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import java.util.Properties;
+
+public class ChatBeanTest extends TestCase {
+ protected void setUp() throws Exception {
+ System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+ }
+
+ public void test() throws Exception {
+ InitialContext context = new InitialContext();
+
+ MessagingClientLocal bean = (MessagingClientLocal) context.lookup("MessagingClientBeanLocal");
+
+ bean.sendMessage("Hello World!");
+
+ assertEquals(bean.receiveMessage(), "Hello, Test Case!");
+
+ bean.sendMessage("How are you?");
+
+ assertEquals(bean.receiveMessage(), "I'm doing well.");
+
+ bean.sendMessage("Still spinning?");
+
+ assertEquals(bean.receiveMessage(), "Once every day, as usual.");
+ }
+}
+//END SNIPPET: code
Modified: openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorImpl.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorImpl.java (original)
+++ openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorImpl.java Thu Aug 27 03:42:06 2009
@@ -1,38 +1,38 @@
-/**
- * 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.superbiz.calculator;
-
-/**
- * This is an EJB 3 stateless session bean, configured using an EJB 3
- * deployment descriptor as opposed to using annotations.
- * This EJB has 2 business interfaces: CalculatorRemote, a remote business
- * interface, and CalculatorLocal, a local business interface
- *
- */
-//START SNIPPET: code
-public class CalculatorImpl implements CalculatorRemote, CalculatorLocal {
-
- public int sum(int add1, int add2) {
- return add1+add2;
- }
-
- public int multiply(int mul1, int mul2) {
- return mul1*mul2;
- }
-
-}
-//END SNIPPET: code
+/**
+ * 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.superbiz.calculator;
+
+/**
+ * This is an EJB 3 stateless session bean, configured using an EJB 3
+ * deployment descriptor as opposed to using annotations.
+ * This EJB has 2 business interfaces: CalculatorRemote, a remote business
+ * interface, and CalculatorLocal, a local business interface
+ *
+ */
+//START SNIPPET: code
+public class CalculatorImpl implements CalculatorRemote, CalculatorLocal {
+
+ public int sum(int add1, int add2) {
+ return add1+add2;
+ }
+
+ public int multiply(int mul1, int mul2) {
+ return mul1*mul2;
+ }
+
+}
+//END SNIPPET: code
Modified: openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorLocal.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorLocal.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorLocal.java (original)
+++ openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorLocal.java Thu Aug 27 03:42:06 2009
@@ -1,32 +1,32 @@
-/**
- * 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.superbiz.calculator;
-
-import javax.ejb.EJBLocalObject;
-
-/**
- * This is an EJB 3 local business interface
- * This interface is specified using the business-local tag in the deployment descriptor
- */
-//START SNIPPET: code
-public interface CalculatorLocal {
-
- public int sum(int add1, int add2);
-
- public int multiply(int mul1, int mul2);
-}
-//END SNIPPET: code
+/**
+ * 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.superbiz.calculator;
+
+import javax.ejb.EJBLocalObject;
+
+/**
+ * This is an EJB 3 local business interface
+ * This interface is specified using the business-local tag in the deployment descriptor
+ */
+//START SNIPPET: code
+public interface CalculatorLocal {
+
+ public int sum(int add1, int add2);
+
+ public int multiply(int mul1, int mul2);
+}
+//END SNIPPET: code
Modified: openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorRemote.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorRemote.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorRemote.java (original)
+++ openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorRemote.java Thu Aug 27 03:42:06 2009
@@ -1,32 +1,32 @@
-/**
- * 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.superbiz.calculator;
-
-
-/**
- * This is an EJB 3 remote business interface
- * This interface is specified using the business-local tag in the deployment descriptor
- */
-//START SNIPPET: code
-public interface CalculatorRemote {
-
- public int sum(int add1, int add2);
-
- public int multiply(int mul1, int mul2);
-
-}
-//END SNIPPET: code
+/**
+ * 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.superbiz.calculator;
+
+
+/**
+ * This is an EJB 3 remote business interface
+ * This interface is specified using the business-local tag in the deployment descriptor
+ */
+//START SNIPPET: code
+public interface CalculatorRemote {
+
+ public int sum(int add1, int add2);
+
+ public int multiply(int mul1, int mul2);
+
+}
+//END SNIPPET: code
Modified: openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/test/java/org/superbiz/calculator/CalculatorTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/test/java/org/superbiz/calculator/CalculatorTest.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/test/java/org/superbiz/calculator/CalculatorTest.java (original)
+++ openejb/trunk/openejb3/examples/simple-stateless-with-descriptor/src/test/java/org/superbiz/calculator/CalculatorTest.java Thu Aug 27 03:42:06 2009
@@ -1,73 +1,73 @@
-/**
- * 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.superbiz.calculator;
-
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import junit.framework.TestCase;
-
-public class CalculatorTest extends TestCase {
-
- //START SNIPPET: setup
- private InitialContext initialContext;
-
- protected void setUp() throws Exception {
- Properties properties = new Properties();
- properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
-
- initialContext = new InitialContext(properties);
- }
- //END SNIPPET: setup
-
- /**
- * Lookup the Calculator bean via its remote home interface
- *
- * @throws Exception
- */
- //START SNIPPET: remote
- public void testCalculatorViaRemoteInterface() throws Exception {
- Object object = initialContext.lookup("CalculatorImplRemote");
-
- assertNotNull(object);
- assertTrue(object instanceof CalculatorRemote);
- CalculatorRemote calc = (CalculatorRemote) object;
- assertEquals(10, calc.sum(4,6));
- assertEquals(12, calc.multiply(3,4));
- }
- //END SNIPPET: remote
-
- /**
- * Lookup the Calculator bean via its local home interface
- *
- * @throws Exception
- */
- //START SNIPPET: local
- public void testCalculatorViaLocalInterface() throws Exception {
- Object object = initialContext.lookup("CalculatorImplLocal");
-
- assertNotNull(object);
- assertTrue(object instanceof CalculatorLocal);
- CalculatorLocal calc = (CalculatorLocal) object;
- assertEquals(10, calc.sum(4,6));
- assertEquals(12, calc.multiply(3,4));
- }
- //END SNIPPET: local
-
-}
+/**
+ * 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.superbiz.calculator;
+
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.TestCase;
+
+public class CalculatorTest extends TestCase {
+
+ //START SNIPPET: setup
+ private InitialContext initialContext;
+
+ protected void setUp() throws Exception {
+ Properties properties = new Properties();
+ properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+
+ initialContext = new InitialContext(properties);
+ }
+ //END SNIPPET: setup
+
+ /**
+ * Lookup the Calculator bean via its remote home interface
+ *
+ * @throws Exception
+ */
+ //START SNIPPET: remote
+ public void testCalculatorViaRemoteInterface() throws Exception {
+ Object object = initialContext.lookup("CalculatorImplRemote");
+
+ assertNotNull(object);
+ assertTrue(object instanceof CalculatorRemote);
+ CalculatorRemote calc = (CalculatorRemote) object;
+ assertEquals(10, calc.sum(4,6));
+ assertEquals(12, calc.multiply(3,4));
+ }
+ //END SNIPPET: remote
+
+ /**
+ * Lookup the Calculator bean via its local home interface
+ *
+ * @throws Exception
+ */
+ //START SNIPPET: local
+ public void testCalculatorViaLocalInterface() throws Exception {
+ Object object = initialContext.lookup("CalculatorImplLocal");
+
+ assertNotNull(object);
+ assertTrue(object instanceof CalculatorLocal);
+ CalculatorLocal calc = (CalculatorLocal) object;
+ assertEquals(10, calc.sum(4,6));
+ assertEquals(12, calc.multiply(3,4));
+ }
+ //END SNIPPET: local
+
+}
Modified: openejb/trunk/openejb3/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java (original)
+++ openejb/trunk/openejb3/examples/webservice-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java Thu Aug 27 03:42:06 2009
@@ -1,12 +1,12 @@
-package org.superbiz.calculator;
-
-import javax.ejb.Remote;
-
-@Remote
-public interface CalculatorRemote {
-
- public int sum(int add1, int add2);
-
- public int multiply(int mul1, int mul2);
-
-}
+package org.superbiz.calculator;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface CalculatorRemote {
+
+ public int sum(int add1, int add2);
+
+ public int multiply(int mul1, int mul2);
+
+}
Modified: openejb/trunk/openejb3/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java (original)
+++ openejb/trunk/openejb3/examples/webservice-ws-security/src/main/java/org/superbiz/calculator/CalculatorRemote.java Thu Aug 27 03:42:06 2009
@@ -1,28 +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.superbiz.calculator;
-
-import javax.ejb.Remote;
-
-@Remote
-public interface CalculatorRemote {
-
- public int sum(int add1, int add2);
-
- public int multiply(int mul1, int mul2);
-
-}
+/**
+ * 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.superbiz.calculator;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface CalculatorRemote {
+
+ public int sum(int add1, int add2);
+
+ public int multiply(int mul1, int mul2);
+
+}
Modified: openejb/trunk/openejb3/examples/webservice-ws-security/src/test/java/org/superbiz/calculator/CustomPasswordHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webservice-ws-security/src/test/java/org/superbiz/calculator/CustomPasswordHandler.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/webservice-ws-security/src/test/java/org/superbiz/calculator/CustomPasswordHandler.java (original)
+++ openejb/trunk/openejb3/examples/webservice-ws-security/src/test/java/org/superbiz/calculator/CustomPasswordHandler.java Thu Aug 27 03:42:06 2009
@@ -1,67 +1,67 @@
-/**
- * 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.superbiz.calculator;
-
-import org.apache.ws.security.WSPasswordCallback;
-import org.apache.openejb.loader.SystemInstance;
-import org.apache.openejb.spi.SecurityService;
-
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.LoginException;
-import java.io.IOException;
-
-public class CustomPasswordHandler implements CallbackHandler {
- public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
- WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
-
- if(pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN) {
- // TODO get the password from the users.properties if possible
- pc.setPassword("waterfall");
-
- } else if(pc.getUsage() == WSPasswordCallback.DECRYPT) {
- pc.setPassword("serverPassword");
-
- } else if(pc.getUsage() == WSPasswordCallback.SIGNATURE) {
- pc.setPassword("serverPassword");
-
- }
-
- if ((pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN)
- || (pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN)) {
-
- SecurityService securityService = SystemInstance.get()
- .getComponent(SecurityService.class);
- Object token = null;
- try {
- securityService.disassociate();
-
- token = securityService.login(pc.getIdentifer(), pc.getPassword());
- securityService.associate(token);
-
- } catch (LoginException e) {
- e.printStackTrace();
- throw new SecurityException("wrong password");
- } finally {
- }
- }
-
-
- }
-}
+/**
+ * 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.superbiz.calculator;
+
+import org.apache.ws.security.WSPasswordCallback;
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.spi.SecurityService;
+
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.auth.login.LoginException;
+import java.io.IOException;
+
+public class CustomPasswordHandler implements CallbackHandler {
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+ WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
+
+ if(pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN) {
+ // TODO get the password from the users.properties if possible
+ pc.setPassword("waterfall");
+
+ } else if(pc.getUsage() == WSPasswordCallback.DECRYPT) {
+ pc.setPassword("serverPassword");
+
+ } else if(pc.getUsage() == WSPasswordCallback.SIGNATURE) {
+ pc.setPassword("serverPassword");
+
+ }
+
+ if ((pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN)
+ || (pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN)) {
+
+ SecurityService securityService = SystemInstance.get()
+ .getComponent(SecurityService.class);
+ Object token = null;
+ try {
+ securityService.disassociate();
+
+ token = securityService.login(pc.getIdentifer(), pc.getPassword());
+ securityService.associate(token);
+
+ } catch (LoginException e) {
+ e.printStackTrace();
+ throw new SecurityException("wrong password");
+ } finally {
+ }
+ }
+
+
+ }
+}
Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/ApplicationException.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/ApplicationException.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/ApplicationException.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/ApplicationException.java Thu Aug 27 03:42:06 2009
@@ -14,19 +14,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.openejb.test;
-
-/**
- *
- * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
- */
-public class ApplicationException extends Exception{
-
- public ApplicationException(String message){
- super(message);
- }
-
- public ApplicationException(){
- super();
- }
-}
+package org.apache.openejb.test;
+
+/**
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ */
+public class ApplicationException extends Exception{
+
+ public ApplicationException(String message){
+ super(message);
+ }
+
+ public ApplicationException(){
+ super();
+ }
+}
Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbBean.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbBean.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbBean.java Thu Aug 27 03:42:06 2009
@@ -1,142 +1,142 @@
-/**
- *
- * 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.openejb.test.mdb;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.EJBException;
-import javax.ejb.MessageDriven;
-import javax.ejb.MessageDrivenBean;
-import javax.ejb.MessageDrivenContext;
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.Interceptors;
-import javax.interceptor.InvocationContext;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.naming.InitialContext;
-
-import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
-
-import org.apache.openejb.test.TestFailureException;
-
-@Interceptors ({MdbInterceptor.class})
-@MessageDriven(activationConfig = {
- @ActivationConfigProperty(propertyName="destinationType", propertyValue = "javax.jms.Queue"),
- @ActivationConfigProperty(propertyName="destination", propertyValue = "InterceptorMdbBean")})
-public class InterceptorMdbBean implements MessageListener, MessageDrivenBean {
-
- private boolean classLevelBusinessMethodInterception = false;
- private boolean methodLevelBusinessMethodInterception = false;
- protected static boolean classLevelCreateMethodInterception = false;
- private boolean methodLevelCreateMethodInterception = false;
- private MessageDrivenContext mdbContext;
- private Session session;
- private Connection connection;
- protected MdbInvoker mdbInvoker;
- @Resource(name="jms", type=javax.jms.QueueConnectionFactory.class)
- private ConnectionFactory connectionFactory;
-
- public void onMessage(Message msg) {
- try {
- classLevelBusinessMethodInterception = msg.getBooleanProperty("ClassLevelBusinessMethodInterception");
- methodLevelBusinessMethodInterception = msg.getBooleanProperty("MethodLevelBusinessMethodInterception");
- try {
- msg.acknowledge();
- } catch (JMSException e) {
- e.printStackTrace();
- }
- mdbInvoker.onMessage(msg);
- } catch (Throwable e) {
- e.printStackTrace();
- }
- }
-
- @AroundInvoke
- public Object mdbInterceptor(InvocationContext ctx) throws Exception
- {
- Object[] objArr = ctx.getParameters();
- Message msg = (Message)objArr[0];
- msg.setBooleanProperty("MethodLevelBusinessMethodInterception",true);
- ctx.setParameters(objArr);
- return ctx.proceed();
- }
-
- @PostConstruct
- public void ejbCreate() throws EJBException
- {
- methodLevelCreateMethodInterception = true;
- }
-
-
- public void checkMethodLevelBusinessMethodInterception() throws TestFailureException{
- try {
- Assert.assertTrue("Method Level Business Method Interception failed for Mdb", methodLevelBusinessMethodInterception);
- } catch (AssertionFailedError afe) {
- throw new TestFailureException(afe);
- }
- }
-
- public void checkMethodLevelCreateMethodInterception() throws TestFailureException{
- try {
- Assert.assertTrue("Method Level Business Method Interception failed for Mdb", methodLevelCreateMethodInterception);
- } catch (AssertionFailedError afe) {
- throw new TestFailureException(afe);
- }
- }
-
-
- public void checkClassLevelBusinessMethodInterception() throws TestFailureException{
- try {
- Assert.assertTrue("Class Level Business Method Interception failed for Mdb", classLevelBusinessMethodInterception);
- } catch (AssertionFailedError afe) {
- throw new TestFailureException(afe);
- }
- }
-
- public void checkClassLevelCreateMethodInterception() throws TestFailureException{
- try {
- Assert.assertTrue("Class Level Business Method Interception failed for Mdb", classLevelCreateMethodInterception);
- } catch (AssertionFailedError afe) {
- throw new TestFailureException(afe);
- }
- }
-
-
- public void ejbRemove() throws EJBException {
- // TODO Auto-generated method stub
-
- }
-
- public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException {
- this.mdbContext = ctx;
- try {
- mdbInvoker = new MdbInvoker(connectionFactory, this);
- } catch (Exception e) {
- throw new EJBException(e);
- }
- }
-
-}
+/**
+ *
+ * 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.openejb.test.mdb;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.EJBException;
+import javax.ejb.MessageDriven;
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptors;
+import javax.interceptor.InvocationContext;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.naming.InitialContext;
+
+import junit.framework.Assert;
+import junit.framework.AssertionFailedError;
+
+import org.apache.openejb.test.TestFailureException;
+
+@Interceptors ({MdbInterceptor.class})
+@MessageDriven(activationConfig = {
+ @ActivationConfigProperty(propertyName="destinationType", propertyValue = "javax.jms.Queue"),
+ @ActivationConfigProperty(propertyName="destination", propertyValue = "InterceptorMdbBean")})
+public class InterceptorMdbBean implements MessageListener, MessageDrivenBean {
+
+ private boolean classLevelBusinessMethodInterception = false;
+ private boolean methodLevelBusinessMethodInterception = false;
+ protected static boolean classLevelCreateMethodInterception = false;
+ private boolean methodLevelCreateMethodInterception = false;
+ private MessageDrivenContext mdbContext;
+ private Session session;
+ private Connection connection;
+ protected MdbInvoker mdbInvoker;
+ @Resource(name="jms", type=javax.jms.QueueConnectionFactory.class)
+ private ConnectionFactory connectionFactory;
+
+ public void onMessage(Message msg) {
+ try {
+ classLevelBusinessMethodInterception = msg.getBooleanProperty("ClassLevelBusinessMethodInterception");
+ methodLevelBusinessMethodInterception = msg.getBooleanProperty("MethodLevelBusinessMethodInterception");
+ try {
+ msg.acknowledge();
+ } catch (JMSException e) {
+ e.printStackTrace();
+ }
+ mdbInvoker.onMessage(msg);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ @AroundInvoke
+ public Object mdbInterceptor(InvocationContext ctx) throws Exception
+ {
+ Object[] objArr = ctx.getParameters();
+ Message msg = (Message)objArr[0];
+ msg.setBooleanProperty("MethodLevelBusinessMethodInterception",true);
+ ctx.setParameters(objArr);
+ return ctx.proceed();
+ }
+
+ @PostConstruct
+ public void ejbCreate() throws EJBException
+ {
+ methodLevelCreateMethodInterception = true;
+ }
+
+
+ public void checkMethodLevelBusinessMethodInterception() throws TestFailureException{
+ try {
+ Assert.assertTrue("Method Level Business Method Interception failed for Mdb", methodLevelBusinessMethodInterception);
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void checkMethodLevelCreateMethodInterception() throws TestFailureException{
+ try {
+ Assert.assertTrue("Method Level Business Method Interception failed for Mdb", methodLevelCreateMethodInterception);
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+
+ public void checkClassLevelBusinessMethodInterception() throws TestFailureException{
+ try {
+ Assert.assertTrue("Class Level Business Method Interception failed for Mdb", classLevelBusinessMethodInterception);
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void checkClassLevelCreateMethodInterception() throws TestFailureException{
+ try {
+ Assert.assertTrue("Class Level Business Method Interception failed for Mdb", classLevelCreateMethodInterception);
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+
+ public void ejbRemove() throws EJBException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException {
+ this.mdbContext = ctx;
+ try {
+ mdbInvoker = new MdbInvoker(connectionFactory, this);
+ } catch (Exception e) {
+ throw new EJBException(e);
+ }
+ }
+
+}
Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbObject.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbObject.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbObject.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/InterceptorMdbObject.java Thu Aug 27 03:42:06 2009
@@ -1,33 +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.openejb.test.mdb;
-
-import org.apache.openejb.test.TestFailureException;
-
-public interface InterceptorMdbObject {
-
- public void checkClassLevelBusinessMethodInterception() throws TestFailureException;
-
- public void checkMethodLevelBusinessMethodInterception() throws TestFailureException;
-
- public void checkClassLevelCreateMethodInterception() throws TestFailureException;
-
- public void checkMethodLevelCreateMethodInterception() throws TestFailureException;
-
-}
+/**
+ *
+ * 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.openejb.test.mdb;
+
+import org.apache.openejb.test.TestFailureException;
+
+public interface InterceptorMdbObject {
+
+ public void checkClassLevelBusinessMethodInterception() throws TestFailureException;
+
+ public void checkMethodLevelBusinessMethodInterception() throws TestFailureException;
+
+ public void checkClassLevelCreateMethodInterception() throws TestFailureException;
+
+ public void checkMethodLevelCreateMethodInterception() throws TestFailureException;
+
+}
Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInterceptor.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInterceptor.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/mdb/MdbInterceptor.java Thu Aug 27 03:42:06 2009
@@ -1,69 +1,69 @@
-/**
- *
- * 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.openejb.test.mdb;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.annotation.Resource;
-import javax.ejb.EJB;
-import javax.ejb.EJBException;
-import javax.ejb.MessageDrivenContext;
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.InvocationContext;
-import javax.jms.Message;
-
-import org.apache.openejb.test.entity.bmp.BasicBmpHome;
-import org.apache.openejb.test.stateful.BasicStatefulHome;
-import org.apache.openejb.test.stateless.BasicStatelessHome;
-
-public class MdbInterceptor {
- @Resource
- private MessageDrivenContext mdbContext;
- @EJB(beanName = "BasicBmpBean")
- private BasicBmpHome bmpHome;
- @EJB(beanName = "BasicStatefulBean")
- private BasicStatefulHome statefulHome;
- @EJB(beanName = "BasicStatelessBean")
- private BasicStatelessHome statelessHome;
-
-
- @AroundInvoke
- public Object mdbInterceptor(InvocationContext ctx) throws Exception
- {
- Object[] objArr = ctx.getParameters();
- Message msg = (Message)objArr[0];
- msg.clearProperties();
- msg.setBooleanProperty("ClassLevelBusinessMethodInterception",true);
- ctx.setParameters(objArr);
- return ctx.proceed();
- }
-
- @PreDestroy
- public void interceptRemove(InvocationContext ctx) throws Exception {
- ctx.proceed();
- }
-
- @PostConstruct
- public void postConstruct(InvocationContext ctx) throws Exception {
- InterceptorMdbBean.classLevelCreateMethodInterception = true;
- ctx.proceed();
- }
-
-
-}
+/**
+ *
+ * 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.openejb.test.mdb;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
+import javax.ejb.EJB;
+import javax.ejb.EJBException;
+import javax.ejb.MessageDrivenContext;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+import javax.jms.Message;
+
+import org.apache.openejb.test.entity.bmp.BasicBmpHome;
+import org.apache.openejb.test.stateful.BasicStatefulHome;
+import org.apache.openejb.test.stateless.BasicStatelessHome;
+
+public class MdbInterceptor {
+ @Resource
+ private MessageDrivenContext mdbContext;
+ @EJB(beanName = "BasicBmpBean")
+ private BasicBmpHome bmpHome;
+ @EJB(beanName = "BasicStatefulBean")
+ private BasicStatefulHome statefulHome;
+ @EJB(beanName = "BasicStatelessBean")
+ private BasicStatelessHome statelessHome;
+
+
+ @AroundInvoke
+ public Object mdbInterceptor(InvocationContext ctx) throws Exception
+ {
+ Object[] objArr = ctx.getParameters();
+ Message msg = (Message)objArr[0];
+ msg.clearProperties();
+ msg.setBooleanProperty("ClassLevelBusinessMethodInterception",true);
+ ctx.setParameters(objArr);
+ return ctx.proceed();
+ }
+
+ @PreDestroy
+ public void interceptRemove(InvocationContext ctx) throws Exception {
+ ctx.proceed();
+ }
+
+ @PostConstruct
+ public void postConstruct(InvocationContext ctx) throws Exception {
+ InterceptorMdbBean.classLevelCreateMethodInterception = true;
+ ctx.proceed();
+ }
+
+
+}
Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java Thu Aug 27 03:42:06 2009
@@ -1,123 +1,123 @@
-/**
- * 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.openejb.test;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.ejb.EJB;
-import javax.ejb.EJBMetaData;
-import javax.ejb.Handle;
-import javax.ejb.HomeHandle;
-import javax.naming.InitialContext;
-import javax.rmi.PortableRemoteObject;
-
-import org.apache.xbean.finder.ClassFinder;
-
-/**
- * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
- * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
- */
-public abstract class TestClient extends NamedTestCase {
-
- protected InitialContext initialContext;
- protected EJBMetaData ejbMetaData;
- protected HomeHandle ejbHomeHandle;
- protected Handle ejbHandle;
- protected Integer ejbPrimaryKey;
-
- public TestClient(String name){
- super(name);
- }
-
- /**
- * Sets up the fixture, for example, open a network connection.
- * This method is called before a test is executed.
- */
- protected abstract void setUp() throws Exception;
-
- protected Object cast(Object object, Class type) {
- return PortableRemoteObject.narrow(object, type);
- }
-
- protected final void processFieldInjections() {
- Object home = null;
- ClassFinder finder = null;
- List<Field> fieldList = null;
-
- finder = new ClassFinder(getClassPath());
- fieldList = finder.findAnnotatedFields(EJB.class);
- for(Iterator fields = fieldList.iterator(); fields.hasNext();) {
- Field field = (Field) fields.next();
- EJB ejbAnnotation = field.getAnnotation(EJB.class);
- if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
- try {
- home = initialContext.lookup(ejbAnnotation.name());
- // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
- home = cast(home, ejbAnnotation.beanInterface());
- field.setAccessible(true);
- field.set(this, home);
- } catch(Exception ex) {
- // TODO - MNour : Needs better exception handling
- ex.printStackTrace();
- }
- }
- }
- }
-
- protected final void processSetterInjections() {
- Object home = null;
- ClassFinder finder = null;
- List<Method> methodList = null;
-
- finder = new ClassFinder(getClassPath());
- methodList = finder.findAnnotatedMethods(EJB.class);
- for(Iterator methods = methodList.iterator(); methods.hasNext();) {
- Method method = (Method) methods.next();
- EJB ejbAnnotation = method.getAnnotation(EJB.class);
- if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
- try {
- home = initialContext.lookup(ejbAnnotation.name());
- // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
- home = cast(home, ejbAnnotation.beanInterface());
- method.setAccessible(true);
- method.invoke(this, new Object[] {home});
- } catch(Exception ex) {
- // TODO - MNour : Needs better exception handling
- ex.printStackTrace();
- }
- }
- }
- }
-
- private List<Class> getClassPath() {
- Class superClass = null;
- List<Class> classPath = new ArrayList<Class>();
-
- classPath.add(getClass());
- superClass = getClass().getSuperclass();
- while(!superClass.equals(Object.class)) {
- classPath.add(superClass);
- superClass = superClass.getSuperclass();
- }
- return classPath;
- }
-
-}
+/**
+ * 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.openejb.test;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.ejb.EJB;
+import javax.ejb.EJBMetaData;
+import javax.ejb.Handle;
+import javax.ejb.HomeHandle;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+
+import org.apache.xbean.finder.ClassFinder;
+
+/**
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ */
+public abstract class TestClient extends NamedTestCase {
+
+ protected InitialContext initialContext;
+ protected EJBMetaData ejbMetaData;
+ protected HomeHandle ejbHomeHandle;
+ protected Handle ejbHandle;
+ protected Integer ejbPrimaryKey;
+
+ public TestClient(String name){
+ super(name);
+ }
+
+ /**
+ * Sets up the fixture, for example, open a network connection.
+ * This method is called before a test is executed.
+ */
+ protected abstract void setUp() throws Exception;
+
+ protected Object cast(Object object, Class type) {
+ return PortableRemoteObject.narrow(object, type);
+ }
+
+ protected final void processFieldInjections() {
+ Object home = null;
+ ClassFinder finder = null;
+ List<Field> fieldList = null;
+
+ finder = new ClassFinder(getClassPath());
+ fieldList = finder.findAnnotatedFields(EJB.class);
+ for(Iterator fields = fieldList.iterator(); fields.hasNext();) {
+ Field field = (Field) fields.next();
+ EJB ejbAnnotation = field.getAnnotation(EJB.class);
+ if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
+ try {
+ home = initialContext.lookup(ejbAnnotation.name());
+ // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
+ home = cast(home, ejbAnnotation.beanInterface());
+ field.setAccessible(true);
+ field.set(this, home);
+ } catch(Exception ex) {
+ // TODO - MNour : Needs better exception handling
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ protected final void processSetterInjections() {
+ Object home = null;
+ ClassFinder finder = null;
+ List<Method> methodList = null;
+
+ finder = new ClassFinder(getClassPath());
+ methodList = finder.findAnnotatedMethods(EJB.class);
+ for(Iterator methods = methodList.iterator(); methods.hasNext();) {
+ Method method = (Method) methods.next();
+ EJB ejbAnnotation = method.getAnnotation(EJB.class);
+ if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
+ try {
+ home = initialContext.lookup(ejbAnnotation.name());
+ // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
+ home = cast(home, ejbAnnotation.beanInterface());
+ method.setAccessible(true);
+ method.invoke(this, new Object[] {home});
+ } catch(Exception ex) {
+ // TODO - MNour : Needs better exception handling
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private List<Class> getClassPath() {
+ Class superClass = null;
+ List<Class> classPath = new ArrayList<Class>();
+
+ classPath.add(getClass());
+ superClass = getClass().getSuperclass();
+ while(!superClass.equals(Object.class)) {
+ classPath.add(superClass);
+ superClass = superClass.getSuperclass();
+ }
+ return classPath;
+ }
+
+}
Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/mdb/MdbInterceptorTests.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/mdb/MdbInterceptorTests.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/mdb/MdbInterceptorTests.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/mdb/MdbInterceptorTests.java Thu Aug 27 03:42:06 2009
@@ -1,95 +1,95 @@
-/**
- *
- * 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.openejb.test.mdb;
-
-import org.apache.openejb.test.TestFailureException;
-import org.apache.openejb.test.TestManager;
-
-import javax.jms.Destination;
-
-public class MdbInterceptorTests extends MdbTestClient {
-
- public MdbInterceptorTests() {
- super("MDBInterceptor.");
- // TODO Auto-generated constructor stub
- }
- protected InterceptorMdbObject ejbObject;
-
-
-
- protected void setUp() throws Exception {
- super.setUp();
- Destination destination = (Destination) initialContext.lookup("InterceptorMdbBean");
- ejbObject = MdbProxy.newProxyInstance(InterceptorMdbObject.class, connectionFactory, destination);
- TestManager.getDatabase().createEntityTable();
- }
-
- protected void tearDown() throws Exception {
- MdbProxy.destroyProxy(ejbObject);
- try {
- TestManager.getDatabase().dropEntityTable();
- } catch (Exception e){
- throw e;
- } finally {
- super.tearDown();
- }
- }
-
- public void test01_checkClassLevelBusinessMethodInterception() {
- try{
- ejbObject.checkClassLevelBusinessMethodInterception();
- } catch (TestFailureException e){
- throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
- }
- }
-
- public void test02_checkMethodLevelBusinessMethodInterception() {
- try{
- ejbObject.checkMethodLevelBusinessMethodInterception();
- } catch (TestFailureException e){
- throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
- }
- }
-
- public void test03_checkClassLevelCreateMethodInterception() {
- try{
- ejbObject.checkClassLevelCreateMethodInterception();
- } catch (TestFailureException e){
- throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
- }
- }
-
- public void test04_checkMethodLevelCreateMethodInterception() {
- try{
- ejbObject.checkMethodLevelCreateMethodInterception();
- } catch (TestFailureException e){
- throw e.error;
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
- }
- }
-
-
-}
+/**
+ *
+ * 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.openejb.test.mdb;
+
+import org.apache.openejb.test.TestFailureException;
+import org.apache.openejb.test.TestManager;
+
+import javax.jms.Destination;
+
+public class MdbInterceptorTests extends MdbTestClient {
+
+ public MdbInterceptorTests() {
+ super("MDBInterceptor.");
+ // TODO Auto-generated constructor stub
+ }
+ protected InterceptorMdbObject ejbObject;
+
+
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ Destination destination = (Destination) initialContext.lookup("InterceptorMdbBean");
+ ejbObject = MdbProxy.newProxyInstance(InterceptorMdbObject.class, connectionFactory, destination);
+ TestManager.getDatabase().createEntityTable();
+ }
+
+ protected void tearDown() throws Exception {
+ MdbProxy.destroyProxy(ejbObject);
+ try {
+ TestManager.getDatabase().dropEntityTable();
+ } catch (Exception e){
+ throw e;
+ } finally {
+ super.tearDown();
+ }
+ }
+
+ public void test01_checkClassLevelBusinessMethodInterception() {
+ try{
+ ejbObject.checkClassLevelBusinessMethodInterception();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test02_checkMethodLevelBusinessMethodInterception() {
+ try{
+ ejbObject.checkMethodLevelBusinessMethodInterception();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test03_checkClassLevelCreateMethodInterception() {
+ try{
+ ejbObject.checkClassLevelCreateMethodInterception();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test04_checkMethodLevelCreateMethodInterception() {
+ try{
+ ejbObject.checkMethodLevelCreateMethodInterception();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+
+}
Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonLocalTestClient.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonLocalTestClient.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonLocalTestClient.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonLocalTestClient.java Thu Aug 27 03:42:06 2009
@@ -1,40 +1,40 @@
-/**
- * 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.openejb.test.singleton;
-
-/**
- * [2] Should be run as the second test suite of the BasicSingletonTestClients
- *
- * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
- * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
- * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
- *
- * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
- */
-public abstract class AnnotatedFieldInjectionSingletonLocalTestClient extends BasicSingletonLocalTestClient {
-
- public AnnotatedFieldInjectionSingletonLocalTestClient(String name) {
- super("AnnotatedFieldInjectionSingletonLocalTestClient." + name);
- }
-
- protected void setUp() throws Exception{
- super.setUp();
- processFieldInjections();
- }
-
-}
-
+/**
+ * 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.openejb.test.singleton;
+
+/**
+ * [2] Should be run as the second test suite of the BasicSingletonTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+ */
+public abstract class AnnotatedFieldInjectionSingletonLocalTestClient extends BasicSingletonLocalTestClient {
+
+ public AnnotatedFieldInjectionSingletonLocalTestClient(String name) {
+ super("AnnotatedFieldInjectionSingletonLocalTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processFieldInjections();
+ }
+
+}
+
Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonPojoHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonPojoHomeIntfcTests.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonPojoHomeIntfcTests.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonPojoHomeIntfcTests.java Thu Aug 27 03:42:06 2009
@@ -1,57 +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.openejb.test.singleton;
-
-import javax.ejb.EJB;
-
-
-/**
- * [2] Should be run as the second test suite of the BasicSingletonTestClients
- *
- * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
- * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
- * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
- *
- * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
- */
-public class AnnotatedFieldInjectionSingletonPojoHomeIntfcTests extends AnnotatedFieldInjectionSingletonTestClient {
-
- public AnnotatedFieldInjectionSingletonPojoHomeIntfcTests() {
- super("AnnotatedFieldInjectionSingletonHomeIntfc.");
- }
-
- protected void setUp() throws Exception{
- super.setUp();
- }
-
- //===============================
- // Test home interface methods
- //
- public void test01_create(){
- try{
- ejbObject = ejbHome.createObject();
- assertNotNull( "The EJBObject is null", ejbObject );
- } catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
- }
- }
- //
- // Test home interface methods
- //===============================
-
-}
-
+/**
+ * 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.openejb.test.singleton;
+
+import javax.ejb.EJB;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicSingletonTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+ */
+public class AnnotatedFieldInjectionSingletonPojoHomeIntfcTests extends AnnotatedFieldInjectionSingletonTestClient {
+
+ public AnnotatedFieldInjectionSingletonPojoHomeIntfcTests() {
+ super("AnnotatedFieldInjectionSingletonHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbObject = ejbHome.createObject();
+ assertNotNull( "The EJBObject is null", ejbObject );
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonPojoLocalHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonPojoLocalHomeIntfcTests.java?rev=808273&r1=808272&r2=808273&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonPojoLocalHomeIntfcTests.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/AnnotatedFieldInjectionSingletonPojoLocalHomeIntfcTests.java Thu Aug 27 03:42:06 2009
@@ -1,57 +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.openejb.test.singleton;
-
-import javax.ejb.EJB;
-
-
-/**
- * [2] Should be run as the second test suite of the BasicSingletonTestClients
- *
- * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
- * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
- * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
- *
- * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
- */
-public class AnnotatedFieldInjectionSingletonPojoLocalHomeIntfcTests extends AnnotatedFieldInjectionSingletonLocalTestClient {
-
- public AnnotatedFieldInjectionSingletonPojoLocalHomeIntfcTests(){
- super("AnnotatedFieldInjectionSingletonLocalHomeIntfc.");
- }
-
- protected void setUp() throws Exception{
- super.setUp();
- }
-
- //===============================
- // Test home interface methods
- //
- public void test01_create(){
- try{
- ejbLocalObject = ejbLocalHome.create();
- assertNotNull( "The EJBObject is null", ejbLocalObject );
- } catch (Exception e){
- fail("Received Exception " + e.getClass() + " : " + e.getMessage());
- }
- }
- //
- // Test home interface methods
- //===============================
-
-}
-
+/**
+ * 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.openejb.test.singleton;
+
+import javax.ejb.EJB;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicSingletonTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+ */
+public class AnnotatedFieldInjectionSingletonPojoLocalHomeIntfcTests extends AnnotatedFieldInjectionSingletonLocalTestClient {
+
+ public AnnotatedFieldInjectionSingletonPojoLocalHomeIntfcTests(){
+ super("AnnotatedFieldInjectionSingletonLocalHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbLocalObject = ejbLocalHome.create();
+ assertNotNull( "The EJBObject is null", ejbLocalObject );
+ } catch (Exception e){
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+