You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2012/06/05 09:23:59 UTC

svn commit: r1346266 - in /openejb/trunk/openejb: container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java examples/local-on-localview-bean/ examples/pom.xml

Author: rmannibucau
Date: Tue Jun  5 07:23:58 2012
New Revision: 1346266

URL: http://svn.apache.org/viewvc?rev=1346266&view=rev
Log:
removing sample on local on localview beans and adding a validation unit test for the same use case

Added:
    openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java
Removed:
    openejb/trunk/openejb/examples/local-on-localview-bean/
Modified:
    openejb/trunk/openejb/examples/pom.xml

Added: openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java?rev=1346266&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java (added)
+++ openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java Tue Jun  5 07:23:58 2012
@@ -0,0 +1,53 @@
+/**
+ * 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.core.stateless;
+
+import javax.ejb.Local;
+import javax.ejb.Stateless;
+import javax.interceptor.AroundInvoke;
+import org.apache.openejb.config.AppModule;
+import org.apache.openejb.config.EjbModule;
+import org.apache.openejb.config.rules.Key;
+import org.apache.openejb.config.rules.KeyType;
+import org.apache.openejb.config.rules.Keys;
+import org.apache.openejb.config.rules.ValidationRunner;
+import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.StatelessBean;
+import org.apache.xbean.finder.AnnotationFinder;
+import org.apache.xbean.finder.archive.ClassesArchive;
+import org.junit.runner.RunWith;
+
+@RunWith(ValidationRunner.class)
+public class LocalBeanAnnotatedLocalTest {
+    @Keys({@Key(value = "ann.local.forLocalBean", type = KeyType.WARNING)})
+    public AppModule testWebServiceWithStateful() {
+        final EjbJar ejbJar = new EjbJar();
+        ejbJar.addEnterpriseBean(new StatelessBean(LocalBeanLocal.class));
+
+        final EjbModule ejbModule = new EjbModule(ejbJar);
+        ejbModule.setFinder(new AnnotationFinder(new ClassesArchive(LocalBeanLocal.class)));
+
+        return new AppModule(ejbModule);
+    }
+
+    @Local
+    @Stateless
+    public static class LocalBeanLocal {
+        @AroundInvoke
+        public void forceValidationException() {}
+    }
+}

Modified: openejb/trunk/openejb/examples/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/pom.xml?rev=1346266&r1=1346265&r2=1346266&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/pom.xml (original)
+++ openejb/trunk/openejb/examples/pom.xml Tue Jun  5 07:23:58 2012
@@ -67,7 +67,6 @@
     <module>jpa-eclipselink</module>
     <module>jpa-hibernate</module>
     <module>jpa-enumerated</module>
-    <module>local-on-localview-bean</module>
     <module>lookup-of-ejbs</module>
     <module>lookup-of-ejbs-with-descriptor</module>
     <module>mbean-auto-registration</module>